Loopback Interface Configuration
4 min
Loopback Interface Configuration
interface loopback loopback-id
[Command] interface loopback loopback-id
[Purpose] Switch to loopback view
[Parameter]
Parameter | Description |
|---|---|
loopback-id | Loopback port ID |
[View] System configuration view
[Use Cases]
sonic# configure terminal
sonic(config)# interface loopback 0
sonic(config-loif-0)# show this
!
interface loopback 0ip address A.B.C.D/M
[Command] ip address A.B.C.D/M
[Purpose] Adding an IP address to the loopback port
[Parameter]
Parameter | Description |
|---|---|
A.B.C.D/M | IP address with prefix length |
[View] System configuration view
[Notes] The IPv4 address configured on the Loopback port is not allowed to be deleted and can be overwritten by reconfiguration.
[Use Cases]
sonic# configure terminal
sonic(config)# interface loopback 2
sonic(config-loif-2)# ip address 3.3.3.6/24
sonic(config-loif-2)# show this
!
interface loopback 2
ip address 3.3.3.6/24