ubuntu8.10更改网络设置

1:26:00 PM 0 Comments

ubuntu8.10更改网络设置
1)对于network-manager,可以彻底卸载之
sudo apt-get remove network-manager --purge
2)在面板上单击右键,选择添加到面板,将网络监视器加入到面板
3)ifconfig -a
得到网卡的mac地址(serial),比如我的是:00:88:88:ff:12:61
4)接着编辑70-persistent-net.rules:
sudo gedit /etc/udev/rules.d/70-persistent-net.rules
删除里面的所有内容,再加入下面的内容,注意颜色部分要和你个人情况和期望一致,mac不能填错,一定要写真实的物理mac,直接抄我的无效:
引用:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:88:88:ff:12:61", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
代码:
sudo /etc/init.d/networking restart
5)配置网卡:
sudo gedit /etc/network/interfaces
编辑网卡配置如下:

静态ip的配置
auto lo
auto eth0
iface lo inet loopback
iface eth0 inet static
address 10.9.1.5
netmask 255.255.255.0
gateway 10.9.1.1

dhcp的配置则可写为:
auto lo
auto eth0
iface lo inet loopback
iface eth0 inet dhcp
6)dns的修改:
sudo gedit /etc/resolv.conf
内容: nameserver 60.191.244.5
nameserver 60.191.244.2
7)重启网络服务
sudo /etc/init.d/networking restart

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard.