Adding a virtual network interface

At times a virtual network interface is needed, e.g. to bind a test server on it and try it out locally. For this purpose, simply edit the file /etc/network/interfaces and add the following lines for a virtual adapter with the IP 10.0.0.5 for example:

auto lo:1
iface lo:1 inet static
address 10.0.0.5
netmask 255.255.255.0
broadcast 10.0.0.255

Leave a comment