- Table of Contents
-
- 03-Layer 2 Configuration Guide
- 00-Preface
- 01-Ethernet Interface Configuration
- 02-Loopback and Null Interface Configuration
- 03-VLAN Configuration
- 04-MAC Address Table Configuration
- 05-Ethernet Link Aggregation Configuration
- 06-Spanning Tree Configuration
- 07-Layer 2 Forwarding Configuration
- 08-PPPoE Configuration
- 09-FPGA Fast Forwarding Configuration
- 10-QinQ Termination Configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
02-Loopback and Null Interface Configuration | 40.69 KB |
Configuring loopback and null interfaces
Configuring a loopback interface
Configuring the null interface
Displaying and maintaining loopback and null interfaces
Configuring loopback and null interfaces
Configuring a loopback interface
Introduction
A loopback interface is a virtual interface. The physical layer state and link layer protocols of a loopback interface are always up unless the loopback interface is manually shut down.
A loopback interface address can be configured as the source address of the IP packets that the device generates. Because loopback interface addresses are stable unicast addresses, they are usually used as device identifications. When you configure a rule on an authentication or security server to permit or deny packets that a device generates, you can simplify the rule by configuring it to permit or deny packets carrying the loopback interface address that identifies the device. When you use a loopback interface address as the source address of IP packets, make sure the peer is reachable through routes by performing routing configuration. All data packets sent to the loopback interface are considered as packets sent to the device itself, so the device does not forward these packets.
Configuration procedure
To configure a loopback interface:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Create a loopback interface and enter loopback interface view. |
interface loopback interface-number |
N/A |
3. Set the interface description. |
description text |
Optional. By default, the description of a loopback interface is interface name Interface. |
4. Shut down the loopback interface. |
shutdown |
Optional. By default, a loopback interface is up. |
5. Restore the default settings for the loopback interface. |
default |
Optional. |
You can configure settings such as IP addresses and IP routes on loopback interfaces. For more information, see Layer 3—IP Services Configuration Guide and Layer 3—IP Routing Configuration Guide.
Configuring the null interface
Introduction
A null interface is a completely software-based logical interface, and is always up. However, you cannot use it to forward data packets or configure an IP address or link layer protocol on it. With a null interface specified as the next hop of a static route to a specific network segment, any packets routed to the network segment are dropped. The null interface provides a simpler way to filter packets than ACL. You can filter uninteresting traffic by transmitting it to a null interface instead of applying an ACL.
Only one null interface, Null 0, is supported on your device. You cannot remove or create a null interface.
Configuration procedure
To enter null interface view:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter null interface view. |
interface null 0 |
The Null 0 interface is the default null interface on your device. It cannot be manually created or removed. |
3. Set the interface description. |
description text |
Optional. By default, the description of a null interface is interface name Interface. |
4. Restore the default settings for the null interface. |
default |
Optional. |
Displaying and maintaining loopback and null interfaces
Task |
Command |
Remarks |
Display information about loopback interfaces. |
display interface [ loopback ] [ brief [ down ] ] [ | { begin | exclude | include } regular-expression ] display interface loopback interface-number [ brief ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display information about the null interface. |
display interface [ null ] [ brief [ down ] ] [ | { begin | exclude | include } regular-expression ] display interface null 0 [ brief ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Clear the statistics on a loopback interface. |
reset counters interface [ loopback [ interface-number ] ] |
Available in user view. |
Clear the statistics on the null interface. |
reset counters interface [ null [ 0 ] ] |
Available in user view. |