Previous Post
« Новое на WWW.PETERPAUL.RU

 

Next Post
[EN] Linux-UBUNTU. HOW-TO start and configure OpenSSH server »

Mon, March 5th, 2007 16:17

[EN] Linux-UBUNTU. HOW-TO change IP address

Computer IP address is defined at /etc/network/interfaces file. You may have the static IP address or gained by external DHCP server. It is possible to change your IP address at the graphic interface “System” -> “Administration” -> “Networking”. OR by hand editing right at /etc/network/interfaces.

Example for case of static IP address.

# more /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 10.10.1.225
netmask 255.255.255.0
gateway 10.10.1.254

auto eth1
iface eth1 inet dhcp

auto eth2
iface eth2 inet dhcp

auto ath0
iface ath0 inet dhcp

auto wlan0
iface wlan0 inet dhcp

Example for the case of IP address gained from DHCP server.

# more /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

After all IP addresses manipulation one should restart the network interfaces.

# sudo /etc/init.d/networking restart

For advanced usage one should read man interfaces manuals.

Further reading : http://www.debianadmin.com/ubuntu-networking-for-basic-and-advanced-users.html

@ Category Linux UBUNTU, Tech



Previous Post
« Новое на WWW.PETERPAUL.RU

 

Next Post
[EN] Linux-UBUNTU. HOW-TO start and configure OpenSSH server »