Loopback
The loopback interface is a virtual, software-based network interface. All traffic sent to it loops back and only targets services on the local host.
Note
Only one loopback lo interface is allowed per operating system.
If you require multiple virtual interfaces, use the Dummy
interface type.
Configuration
Common interface configuration
Configure one or more interface IP addresses.
<address> supports IPv4 and IPv6 in CIDR notation. For example, use
192.0.2.1/24 for IPv4 or 2001:db8::1/64 for IPv6.
Example:
set interfaces loopback lo address 192.0.2.1/24
set interfaces loopback lo address 2001:db8::1/64
Operation
Show brief interface information.
vyos@vyos:~$ show interfaces loopback
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface IP Address S/L Description
--------- ---------- --- -----------
lo 127.0.0.1/8 u/u
::1/128
Show detailed interface information.
vyos@vyos:~$ show interfaces loopback lo
lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
RX: bytes packets errors dropped overrun mcast
300 6 0 0 0 0
TX: bytes packets errors dropped carrier collisions
300 6 0 0 0 0