Ah, recently lazy, for a long time did not write a blog.
General machine startup will automatically get the dynamic IP address from the DHCP server, this is a very convenient thing, you can not manually set the network-related silkworm parameters, but sometimes need to machine fixed IP address.
The first step, edit the/etc/network/interfaces, add the following content
Static192.168. 1.113 192.168. 1.1 255.255. 255.0 192.168. 1.0 192.168. 1.255
Part Two, edit/etc/resolv.conf, add DNS server
Since the previous use of the IP address from DHCP, the DHCP server will automatically set the corresponding DNS address, now replaced by static P address, so you need to specify the DNS server address
192.168. 1.1 220.170. 64.68
The third step, in order to make the above settings permanent, you need to write the above settings to/etc/resolvconf/resolv.conf.d/base
192.168. 1.1 220.170. 64.68
The fourth step, restart the computer on
Then we should be able to surf the Internet.
ubuntu14.04 setting up a static IP