As loopback interfaces remain Up after being created, they are often used to improve configuration reliability.
The loopback interface is usually used in two situations.
The IP address of the loopback interface is designated as the source address of packets.
Controlling the access interface and filtering log based on the IP address simplify information.
Generally, BGP uses the optimal local address to set up the TCP connection with its neighbor. If the interface turns to Down, the BGP neighbor relationship cannot be set up. In practice, often more than one link can reach the same neighbor. In this situation, using the loopback interface as the BGP neighbor of the local FW can ensure the reliable connection.
Do as follows on the FW.
system-view
interface loopback loopback-number
You can create or delete loopback interface dynamically. Once a loopback interface is created, it keeps Up all the time until it is deleted.
ip address ip-address [ mask | mask-length ]
After loopback interfaces are configured, you need to check whether the configuration is correct. In addition, you can view the statistics about loopback interfaces.
Example
Run the display interface loopback command, and you can view that the link layer protocol status of the interface is Up.
<sysname> display interface loopback 6
LoopBack6 current state : UP
Line protocol current state : UP (spoofing)
Description : LoopBack6 Interface
Route Port,The Maximum Transmit Unit is 1500
Internet Address is 10.10.1.1/24
Physical is Loopback
Statistics last cleared: never
Last 300 seconds input rate 0 bits/sec, 0 packets/sec
Last 300 seconds output rate 0 bits/sec, 0 packets/sec
Realtime 2 seconds input rate 0 bits/sec, 0 packets/sec
Realtime 2 seconds output rate 0 bits/sec, 0 packets/sec
Input: 0 packets,0 bytes,
0 unicast,0 broadcast,0 multicast
0 errors,0 drops,
Output:0 packets,0 bytes,
0 unicast,0 broadcast,0 multicast
0 errors,0 drops
Input bandwidth utilization : 0.00%
Output bandwidth utilization : 0.00%