`
sillycat
  • 浏览: 2490860 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Ubuntu9.04网络设置

阅读更多
Ubuntu9.04网络设置

最近一个兄弟拷贝给我一个9.04的虚拟机。设置网络还遇到些和8.04不同的地方,记录一下:

sudo gedit /etc/network/interfaces

#设置静态IP
auto eth0

iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
#broadcast 192.168.1.255
gateway 192.168.1.1

#设置动态dhcp
auto eth0 inet dhcp

上面两个设置二选一就行了,看哪个适合你。


sudo gedit /etc/resolv.conf

#设置DNS server(可以设置多个)
nameserver 192.168.1.1

#重新设置网络
sudo /etc/init.d/networking restart

由于我的UBUNTU虚拟机是从朋友那里拷贝的,所以
设置后报错如下:
eth0: ERROR while getting interface flags:No such device
SIOCSIFNETMASK:No such device
eth0: ERROR while getting interface flags:No such device
Failed to bring up eth0.
    ...done.

解决方法:
在 /etc/udev/rules.d 目录里 *_persistent-net.rules 文件
这个文件里有网卡MAC地址和网卡名称的对应关系。
里面肯定会有关于eth0 和eth1的两行信息
删除这个文件,然后重启解决!

新的CN99的源

deb http://ubuntu.cn99.com/ubuntu/ jaunty main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ jaunty-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ jaunty-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ jaunty-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ jaunty-backports main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ jaunty main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ jaunty-security main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ jaunty-updates main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ jaunty-proposed main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ jaunty-backports main restricted universe multiverse
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics