Thursday, September 6, 2012

Bind multiple ip address to NIC in Debian



First, back up your working interface to somewhere.
# cp /etc/network/interfaces /root/bak.interface
Then edit file
# vi /etc/network/interfaces

## This is how to bind multiple ip to NIC

auto eth0
auto eth0:0
auto eth0:1

iface eth0 inet static
address 192.168.20.31
netmask 255.255.255.0
gateway 192.168.20.1

iface eth0:0 inet static
address 192.168.20.32
netmask 255.255.255.0
gateway 192.168.20.1

iface eth0:1 inet static
address 192.168.20.33
netmask 255.255.255.0
gateway 192.168.20.1

##save and quit
##restart network service

No comments:

Post a Comment