Ubuntu System Network configuration sometimes with a graphical interface does not work, in this case you can directly modify some startup scripts or configuration files
Ubuntu system for network configuration involves several configuration files 1./etc/network/interfaces 2./etc/resolv.conf
Operation Steps:
1. The default content of the/etc/network/interfaces file that opens Ubuntu is as follows:
Auto Lo
Iface Lo inet Loopback
Dynamically acquired configuration methods:
Auto Eth0
Iface eth0 inet DHCP
Statically allocated configuration methods:
Auto Eth0
Iface eth0 inet Static
Address 192.168.0.1
Netmask 255.255.255.0
Gateway 192.168.0.1
Modify the configuration file to save according to the configuration requirements (whether it is dynamically allocated or obtained automatically).
2. Add a domain Name server: Open/etc/resolv.conf file
Add this line: NameServer 202.99.166.4
3. Restart the network
$/etc/init.d/networking Restart (This command is to restart the NIC)
Or
$ifdown eth0
$ifup eth0 (These two commands are targeted to restart a network interface because a system may have multiple network interfaces)
4. See if the parameters of the network configuration are correct ( you can see if the network configuration is modified for each operation )
$ifconfig
5. See if you can ping through
Ping does not pass the gateway indicates a problem with the network configuration ping domain name Description DNS problem
There are times when you need to modify the hardware address of the NIC:
Method One:
$ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX
$/etc/init.d/networking Restart (restart NIC)
Method Two:
The above is only a temporary modification of the hardware address to permanently modify, directly edit the/etc/network/interfaces file, after iface eth0 inet static Add a line: pre-up ifconfig eth0 hw ether xx:xx:xx : Xx:xx:xx (Mac to change)
$ sudo/etc/init.d/networking Restart (restart NIC)
This article from "There is nothing, know in Providence" blog, please be sure to keep this source http://yangsj.blog.51cto.com/8702844/1712781
Ubuntu network configuration by modifying the configuration file