Multiple static IP addresses on one network card

Linux (Ubuntu) Add comments

To bind multiple static IPs to the same netowork card on a Linux server I found this solution online and it works great for me:

sudo nano /etc/network/interfaces (add .100 and .101 as static IPs on this server)
# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.0.100
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
auto eth0:1
iface eth0:1 inet static
        address 192.168.0.101
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1

(eth0 is the first physical network card)

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in