Procedure:
1. Go to Application --> Terminal.
2. Type the following command:
#network setting interface
sudo emacs /etc/network/interfaces/
Note:
Text code editor of linux debian, mint, and fedora, red hat.
a. emacs
b. nano
c. vi
d. gedit
e. pico
f. blufish
g. aljuta
3. Setup your network
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.xxx.xxx
broadcast 192.168.xxx.xxx
gateway 192.168.xxx.xxx
Note:
Comment the default DHCP network settings.
iface eth0 inet DCHP
4. Restart the network server by typing this command
sudo /etc/init.d/networking restart
''' You have now Static IP Address '''
Change IP address and netmask from command line
Activate network interface eth0 with a new IP (192.xxx.xxx.xxx) / netmask:
$ sudo ifconfig eth0 192.168.xxx.xxx netmask 255.255.255.0 up
Display the routing table
$ /sbin/route OR$ /sbin/route -n
Output:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.255.255.0 U 0 0 0 ra0
192.xxx.xxx.0 * 255.255.255.0 U 0 0 0 eth0
192.xxx.xxx.0 * 255.255.255.0 U 0 0 0 eth1
default 192.168.xxx.xxx 0.0.0.0 UG 0 0 0 ra0
Define new DNS servers
Open /etc/resolv.conf file
$ sudo vi /etc/resolv.conf
You need to remove old DNS server assigned by DHCP server:
search myisp.com
nameserver 192.xxx.xxx.xxx
nameserver 192.xxx.xxx.xxx
nameserver 192.xxx.xxx.xxx
No comments:
Post a Comment