By default most linux OS have their network config set to DHCP. How to change it and get going with custom settings.
This is what DHCP setting looks like
For same we need to edit interfaces file as following:
After saving above configuration we need to restart networking service to apply changes
Checking of new configuration can be done as follows
This is what DHCP setting looks like
auto eth0 iface eth0 inet dhcp
For same we need to edit interfaces file as following:
sudo vi /etc/network/interfaces
Contents of file considering we are editing for eth0 cardauto eth0
iface eth0 inet static
address 192.168.2.1
netmask 255.255.255.0
gateway 192.168.X.X
dns-nameservers X.X.X.X Y.Y.Y.Y Z.Z.Z.Z
After saving above configuration we need to restart networking service to apply changes
sudo /etc/init.d/networking restart
Checking of new configuration can be done as follows
$ ifconfig eth0 $ ifconfig
No comments:
Post a Comment