- 论坛徽章:
- 2
|
本帖最后由 crazyboytan 于 2016-03-22 22:28 编辑
我用的是VBOX创建的一虚拟机,安装了RHEL6.3,刚开始只有一桥接类型的网卡,后来又添加了一内部类型的网卡,但我的第二张网卡不管怎么设置,它的IP地址依然和第一张网卡的IP地址一样,相关配置信息如下:
[root@web1 network-scripts]# cat /etc/udev/rules.d/70-persistent-net.rules
# 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, and change only the value of the NAME= key.
# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:c7:c1:87", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:6c:3f:96", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
[root@web1 network-scripts]#
[root@web1 network-scripts]#
[root@web1 network-scripts]#
[root@web1 network-scripts]#
[root@web1 network-scripts]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 08:00:27:C7:C1:87
inet addr:192.168.1.11 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fec7:c187/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1473 errors:0 dropped:0 overruns:0 frame:0
TX packets:593 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:146529 (143.0 KiB) TX bytes:75150 (73.3 KiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:6C:3F:96
inet addr:192.168.1.11 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe6c:3f96/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:28 errors:0 dropped:0 overruns:0 frame:0
TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4250 (4.1 KiB) TX bytes:8593 (8.3 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:720 (720.0 b) TX bytes:720 (720.0 b)
[root@web1 network-scripts]#
[root@web1 network-scripts]#
[root@web1 network-scripts]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
BROADCAST=10.255.255.255
IPADDR=10.1.1.1
NETMASK=255.0.0.0
NETWORK=10.0.0.0
ONBOOT=yes
[root@web1 network-scripts]#
上面两张网卡的IP地址居然是一样的,我想知道是不是除了上面几个文件之外是否还需要修改其他的配置文件?求知道的兄弟指点!谢谢! |
|