Loopback¶
The main purpose of loopback interfaces is to provide one or more permanent addresses to a network device, regardless of which network interfaces are up. A loopack address is typically announced into the routing tables, and can therefore be used as a management address instead of a physical interface address. This is preferable since a loopback interface is independent from any physical interface and is, therefore, always available. This also enables to configure unnumbered point-to-point interfaces (for example with a PPPv4 server) A loopback address will typically be used in IPv4 packets. Finally, a prefix configured on a loopback interface can be used to announce some directly connected networks via dynamic routing protocols.
To configure loopback, enter the context interface
type loopback
from the
VRF in which you plan to define a loopback logical interface.
vrouter running vrf main# interface loopback loop0
vrouter running loopback loop0# commit
Let’s fetch the state after committing this configuration:
vrouter running vrf main# interface loopback loop0
vrouter running loopback loop0# show state
loopback loop0
oper-status UP
enabled true
mtu 1500
counters
in-octets 0
out-octets 0
in-errors 0
in-unicast-pkts 0
in-discards 0
out-unicast-pkts 0
out-errors 0
out-discards 0
..
ethernet
mac-address 26:16:54:8d:10:0a
..
ipv6
address fe80::2416:54ff:fe8d:100a/64
..
..
The same configuration can be made using this NETCONF XML configuration:
vrouter running loopback loop0# show config xml absolute
<config xmlns="urn:6wind:vrouter">
<vrf>
<name>main</name>
<interface xmlns="urn:6wind:vrouter/interface">
<loopback xmlns="urn:6wind:vrouter/loopback">
<name>loop0</name>
(...)
</loopback>
</interface>
</vrf>
</config>
See also
The command reference for details.