Ubuntu配置网络遇到的一些问题
在配置Ubuntu网络时,曾遇到了一些问题。查找了一些博客,所幸都解决了。记录一下,以便日后查阅。
设置DNS
sudo vim /etc/resolv.conf
nameserver 202.112.80.168
nameserver 202.112.80.106
设置IP
sudo vim /etc/network/interfaces
添加内容如下 :
-
若动态IP(DHCP)
auto eth0 iface eth0 inet dhcp
-
若静态IP
auto eth0 iface eth0 inet static address 219.224.30.49 netmask 255.255.255.192 gateway 219.224.30.1
重启服务
sudo service network-manager restart
参考:
http://blog.csdn.net/anhuidelinger/article/details/17584299
http://my.oschina.net/zjuysw/blog/348764
开机时出现“waiting for network configuration”
sudo vim /etc/network/interfaces
删除除auto lo iface lo inet loopback
外其他内容
参考:http://www.cnblogs.com/chenchenluo/archive/2013/05/26/3099689.html