Dummy¶
The dummy interface is really a little exotic, but rather useful nevertheless. Dummy interfaces are much like the Loopback interface, except you can have as many as you want.
注解
Dummy interfaces can be used as interfaces that always stay up (in the same fashion to loopbacks in Cisco IOS), or for testing purposes.
提示
A Dummy interface is always up, thus it could be used for management traffic or as source/destination for and IGP like BGP so your internal BGP link is not dependent on physical link states and multiple routes can be chosen to the destination. A Dummy Interface should always be preferred over a Loopback interface.
Configuration¶
Common interface configuration¶
Configure interface <interface> with one or more interface addresses.
address can be specified multiple times as IPv4 and/or IPv6 address, e.g. 192.0.2.1/24 and/or 2001:db8::1/64
Example:
set interfaces dummy dum0 address 192.0.2.1/24
set interfaces dummy dum0 address 2001:db8::1/64
Set a human readable, descriptive alias for this connection. Alias is used by
e.g. the show interfaces
command or SNMP based monitoring tools.
Example:
set interfaces dummy dum0 description 'This is an awesome interface running on VyOS'
Disable given <interface>. It will be placed in administratively down
(A/D
) state.
Example:
set interfaces dummy dum0 disable
Place interface in given VRF instance.
参见
There is an entire chapter about how to configure a VRF, please check this for additional information.
Example:
set interfaces dummy dum0 vrf red
Operation¶
Show brief interface information.information
vyos@vyos:~$ show interfaces dummy
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface IP Address S/L Description
--------- ---------- --- -----------
dum0 172.18.254.201/32 u/u
Show detailed information on given <interface>
vyos@vyos:~$ show interfaces ethernet eth0
dum0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
link/ether 26:7c:8e:bc:fc:f5 brd ff:ff:ff:ff:ff:ff
inet 172.18.254.201/32 scope global dum0
valid_lft forever preferred_lft forever
inet6 fe80::247c:8eff:febc:fcf5/64 scope link
valid_lft forever preferred_lft forever
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collisions
1369707 4267 0 0 0 0