|
Configure IP Address on Ubuntu 8.x and 9.x
Configure a dynamically assigned IP address.
sudo vi /etc/network/interfaces
#--
auto eth0
iface eth0 inet dhcp
#--
Configure a statically assigned IP address.
sudo vi /etc/network/interfaces
#--
auto eth0
iface eth0 inet static
address 192.168.1.100
gateway 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
#--
Configure a statically assigned IP alias.
sudo vi /etc/network/interfaces
#--
auto eth0:1
iface eth0:1 inet static
address 192.168.1.101
gateway 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
#--
Do not forget to restart networking when you're done.
sudo /etc/init.d/networking restart
It's wise to make network changes via console connection.
|