binding multiple IP addresses on a single ethernet on Ubuntu 8.10

来源:互联网 发布:linux more命令查看 编辑:程序博客网 时间:2024/05/19 13:07

Working Environment

* Ubuntu 8.10
* LAN : 192.168.1.1 - 224
* GateWay: 192.168.1.1

Todo

1 setting the Ip is static, then reboot the network

# sudo /etc/init.d/networking restart

2 edit the interfaces config file

#sudo gedit /etc/network/interfaces

you will see the following
auto lo
iface lo inet loopback


3 add the eth0:0 at the bottom of the file


auto eth0
iface eth0 inet static
address 192.168.1.114
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

iface eth0:0 inet static
address 192.168.1.119
netmask 255.255.255.0
gateway 192.168.1.1
auto eth0:0

4 Saving it,then reboot the network again

#sudo /etc/init.d/networking restart

5 testing our change

#ping 192.168.1.1

#ping 192.168.1.119

原创粉丝点击