Creating static ip setting in linux

Written By smart| 3 July 2009| No Comment

1. Open the configuration file

sudo gedit  /etc/network/interfaces

2. Comment out the section where dhcp is being used (put the # in front of the line):

#auto eth1
#iface eth1 inet dhcp

3. Add a section like this example:

auto eth1
iface eth1 inet static
address 192.168.1.10
netmask 255.255.255.0
network 192.168.1.1
broadcast 192.168.0.255
gateway 192.168.1.1

4. Close and save the file

5. Reload the network service:

sudo /etc/network restart

Related Posts with Thumbnails

Share With Others

Leave your response!




Comment moderation is enabled. Your comment may take some time to appear.