How do I add more IP addresses to a network card on Linux? Do I use the route command?
It's Ubuntu Server 10.04 LTS.
How do I add more IP addresses to a network card on Linux? Do I use the route command?
It's Ubuntu Server 10.04 LTS.
You can use the new style:
ip address add 192.168.10.0/24 dev eth0
Or the old style:
ifconfig eth0:1 192.168.10.0 netmask 255.255.255.0
do you mean you want to add secondary ip ?
$ sudo vi /etc/network/interfaces
auto eth0
iface eth0 inet static
address x.x.x.x
netmask x.x.x.x
network x.x.x.x
gateway x.x.x.x
broadcast x.x.x.x
auto eth0:1
iface eth0:1 inet static
address x.x.x.x
netmask x.x.x.x
network x.x.x.x
broadcast x.x.x.x
$ sudo /etc/init.d/networking restart