ubuntu通过桥接方式上网

vi /etc/network/interfaces

auto lo

iface lo inet loopback

这两行注释掉,添加如下内容(具体的地址根据自己的实际改) 
auto eth0
iface eth0 inet static
        address 192.168.5.123
        netmask 255.255.255.0
        network 192.168.5.0
        broadcast 192.168.5.255
        gateway 192.168.5.1

用vi /etc/resolv.conf命令设置DNS(设置成你的路由器的DNS),我的如下:

nameserver 202.96.128.166

nameserver 202.96.134.133

 

posted @ 2011-04-15 11:54  往事如风似过往  阅读(1245)  评论(1编辑  收藏  举报