分类: LINUX
2011-10-19 13:13:41
Ethernet controller: Intel Corporation 82562V-2 10/100 Network Connection
Ethernet controller: D-Link System Inc DGE-530T Gigabit Ethernet Adapter
注意,此时新网卡的名称时eth1,因为被原有的网卡占用。如果想将新网卡设置为eth0,则需要进行以下步骤。
1)ifconfig eth0和ifconfig eth1查看网卡的MAC地址并记录,MAC地址主要用来区分两块网卡;
2)vi /etc/udev/rules.d/70-persistent-net.rules
3)上面的文件内容与下面类似
# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
# PCI device 0x8086:0x10c0 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1a:a0:9d:f2:58", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x1186:0x4b01 (skge)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:26:5a:81:9f:e7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0 #设置eth0
iface eth0 inet static
address 192.168.37.76
netmask 255.255.255.0
network 192.168.37.0
broadcast 192.168.37.255
gateway 192.168.37.254
dns-nameservers 192.168.37.254
#auto eth1 #设置eth1
#iface eth1 inet static
#address xxx
#auto eth0:1 #单网卡设置多个IP
#iface eth0:1 inet static
#address 192.168.1.60
#netmask 255.255.255.0
#network x.x.x.x
#broadcast x.x.x.x
#gateway x.x.x.x