【数据资料来自互联网,个人收集总结】
1、首先在VMWare里新添加一个网卡
我原来的网卡用NAT连接方式,新添加的采用Bridged连接方式。
启动(或者重启)系统后,可以看到新添加了eth1网卡,但是没有ipv4地址。
我原来的网卡用NAT连接方式,新添加的采用Bridged连接方式。
启动(或者重启)系统后,可以看到新添加了eth1网卡,但是没有ipv4地址。
[root@pps ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:5C:C1:75
inet addr:192.168.32.50 Bcast:192.168.32.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe5c:c175/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:54 errors:0 dropped:0 overruns:0 frame:0
TX packets:90 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6548 (6.3 KiB) TX bytes:14296 (13.9 KiB)
Interrupt:67 Base address:0x2024
inet addr:192.168.32.50 Bcast:192.168.32.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe5c:c175/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:54 errors:0 dropped:0 overruns:0 frame:0
TX packets:90 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6548 (6.3 KiB) TX bytes:14296 (13.9 KiB)
Interrupt:67 Base address:0x2024
eth1 Link encap:Ethernet HWaddr 00:0C:29:5C:C1:7F
inet6 addr: fe80::20c:29ff:fe5c:c17f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:209 errors:0 dropped:0 overruns:0 frame:0
TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20891 (20.4 KiB) TX bytes:6714 (6.5 KiB)
Interrupt:67 Base address:0x20a4
......
2、手工配置ipv4以太网地址
[root@pps network-.s]# cat ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=dhcp
HWADDR=00:0c:29:5c:c1:7f
[root@pps network-.s]# cat ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=dhcp
HWADDR=00:0c:29:5c:c1:7f
修改为:
[root@pps network-.s]# cat ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
HWADDR=00:0c:29:5c:c1:7f
IPADDR=172.18.70.50
NETMASK=255.255.255.0
GATEWAY=172.18.70.1
[root@pps network-.s]# cat ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
HWADDR=00:0c:29:5c:c1:7f
IPADDR=172.18.70.50
NETMASK=255.255.255.0
GATEWAY=172.18.70.1
3、重启eth1
[root@pps network-.s]# ifdown eth1
[root@pps network-.s]# ifup eth1
[root@pps network-.s]# ifdown eth1
[root@pps network-.s]# ifup eth1
OK:)
这样自己可以同时使用 192.168.32.0/24 和 172.18.70.0/24 网段了!
------------------------------------------------------------------------------------------
赵小蜗牛
QQ: 755721501
E-mail:
snailwarrior@qq.com
在不断奉献中谋求生存发展、打造自己的优秀人品,用人性最本质最动人的一面“营销”自己!
转载于:https://blog.51cto.com/snailwarrior/136781