Configuring a Loopback Interface
A loopback interface is always Up at the physical layer and link layer unless it is manually shut down. You can configure loopback interfaces to enhance network reliability.
Context
The loopback interface has the following features:
- A loopback interface is always Up at the physical layer and link layer unless it is manually shut down. It has the loopback feature.
- The loopback interface can be configured with the mask of all 1s.
Based on the preceding features, the loopback interface has the following applications.
- The IP address of a loopback interface is specified as the source address of packets to improve network reliability.
- When no Router ID is configured for dynamic routing protocols, the maximum IP address of the loopback interface is configured as the router ID automatically.
- The loopback interface is configured as the source interface to send border gateway protocol (BGP) packets to ensure that the BGP session functions correctly when the physical interface is faulty.
- The loopback interface can be configured with the mask of 255.255.255.255 to save IP address resources.
Pre-Configuration
Before configuring a loopback interface, complete the following task:
Powering on the device and performing self-check
Procedure
- Run system-view
The system view is displayed.
- Run interface loopback loopback-number
A loopback interface is created and the loopback interface view is displayed.
- Run ip address ip-address { mask | mask-length } [ sub ]
The IP address of the loopback interface is configured.
- (Optional) Run trigger trap { linkup | linkdown }
The device is configured to report alarms to the network management system.