About :IP static on Ubuntu server 12.4
About :IP static on Ubuntu server 12.4
--------------------------------------------------
rajesh@dns:~$ 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
auto lo eth0
iface lo inet loopback
iface eth0 inet static
address 192.168.88.128
netmask 255.255.255.0
gateway 192.168.88.2
dns-search rajesh.com
dns-nameservers 8.8.8.8 8.8.4.4
======================================================================
rajesh@dns:~$ more /etc/hosts
127.0.0.1 localhost
127.0.1.1 dns.kl.rajesh.local dns
192.168.88.128 dns.kl.rajesh.local dns
rajesh@dns:~$sudo ifup eth0
rajesh@dns:~$sudo ifdown eth0
=======================================================================
Adding IP temporary, will be reset once server reboot:-
----------------------------------------------------------------------
sudo ifconfig eth0 192.168.88.128 netmask 255.255.255.0
sudo route add default gw 192.168.88.2 eth0
Restart Network Service :-
-----------------------------
rajesh@dns:~$ sudo /etc/init.d/networking restart
* Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
* Reconfiguring network interfaces...
ssh stop/waiting
ssh start/running, process 2326
...done.
rajesh@dns:~$
--------------------------------------------------
rajesh@dns:~$ 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
auto lo eth0
iface lo inet loopback
iface eth0 inet static
address 192.168.88.128
netmask 255.255.255.0
gateway 192.168.88.2
dns-search rajesh.com
dns-nameservers 8.8.8.8 8.8.4.4
======================================================================
rajesh@dns:~$ more /etc/hosts
127.0.0.1 localhost
127.0.1.1 dns.kl.rajesh.local dns
192.168.88.128 dns.kl.rajesh.local dns
rajesh@dns:~$sudo ifup eth0
rajesh@dns:~$sudo ifdown eth0
=======================================================================
Adding IP temporary, will be reset once server reboot:-
----------------------------------------------------------------------
sudo ifconfig eth0 192.168.88.128 netmask 255.255.255.0
sudo route add default gw 192.168.88.2 eth0
Restart Network Service :-
-----------------------------
rajesh@dns:~$ sudo /etc/init.d/networking restart
* Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
* Reconfiguring network interfaces...
ssh stop/waiting
ssh start/running, process 2326
...done.
rajesh@dns:~$
Comments
Post a Comment