This step is to configure network on ubuntu when first installed
the location of ip configuration is on /etc/network/interfaces
The following is a sample configuration that create ip address 192.168.100.120, with gateway at 192.168.100.1 and using google dns 8.8.8.8
you can check whether the network is already activated or not using ping command, in this sample, to check I would ping to 192.168.100.120
If the network interface is not started yet, you can turn it on with this command
or if its still not working you can use this command to restart all network interface without having to restart your computer
the location of ip configuration is on /etc/network/interfaces
sudo nano /etc/network/interfaces
The following is a sample configuration that create ip address 192.168.100.120, with gateway at 192.168.100.1 and using google dns 8.8.8.8
auto eth0 iface eth0 inet static address 192.168.100.120 netmask 255.255.255.0 gateway 192.168.100.1 dns-nameserver 8.8.8.8save and exit nano by pressing Ctrl-X followed by accepting yes
you can check whether the network is already activated or not using ping command, in this sample, to check I would ping to 192.168.100.120
ping 192.168.100.120
If the network interface is not started yet, you can turn it on with this command
sudo ifup eth0
or if its still not working you can use this command to restart all network interface without having to restart your computer
sudo /etc/init.d/networking restart
No comments :
Post a Comment