/etc/network/interfaces: What's <eth>:<num> mean?

Viewed 1895

In /etc/network/interfaces, I have a physical eth0 and a vlan eth0.10, however there is an additional eth0:0

iface eth0 inet manual

iface eth0.10 inet manual
    vlan-raw-device eth0

iface eth0:0 inet manual

What does a colon mean in interfaces file? Is it the same as a dot?

2 Answers

Column in network interfaces mean virtual interface. Here is in Debian/Ubuntu:

[root@ubuntu ~]# cat /etc/network/interfaces
iface eth0:0 inet static
address 123.123.22.22
netmask 255.0.0.0
broadcast 123.255.255.255

For more info you can check here.

As far as I remember you can have up to 255 (or 256, not sure) virtual interfaces per physical one.

It is another network interface name. Linux accepts any string as the name of the network interface. eth0 is one network interface. eth1 is another. eth0:0 is another network interface. eth0!@#$&*() may be another interface name. There is no special meaning in any : nor . nor any special characters in the interface name. Allowed chars in Linux network interface names?

Well, maybe except for meaning/interpretation. I would expect the interface named eth0:0 to be someone "binded"/"connected" with eth0. But that is (human) interpretation. I don't think linux binds any significance in how the network interface is named. For example, user on this question uses : for ip aliases and . to denote VLAN.

In your configuration the three network interfaces eth0, eth0.10 and eth0:0 are all configured using manual configuration. Check the output of cat /proc/net/dev or any of ip a or ifconfig ip config utilities to see what network interfaces are available on your machine.

Related