当前位置: 移动技术网 > 网络运营>服务器>虚拟主机 > 详解VMware中CentOS配置多网卡多IP

详解VMware中CentOS配置多网卡多IP

2019年05月31日  | 移动技术网网络运营  | 我要评论

一,配置第二块网卡

1) 《centos配置网络》(//www.jb51.net/os/redhat/86265.html);讲解了怎么配置eth0。这一篇讲解在虚拟机中配置eth1。

2)首先给eth0:192.168.142.130的虚拟机,添加第二块网卡设备。选中虚拟机,右键设置,添加网络适配器。

3)配置。将eth1配置成为内网ip:10.107.1.130。

# vi /etc/sysconfig/network-scripts/ifcfg-eth1

device=eth1 
#hwaddr=00:0c:29:f5:6e:85 
type=ethernet 
onboot=yes 
nm_controlled=yes 
#bootproto=dhcp 
bootproto=static 
ipaddr=10.107.1.130 
netmask=255.255.255.0 
ipv6init=no 
dns1=192.168.142.2 

4)重启网卡。

# service network restart

5)检查配置

# ifconfig

二,配置多个内网ip

1)用一中同样的方式,eth0:192.168.142.133的虚拟机;配置第二块网卡eth1:10.107.1.133。则10.107.1.130和10.107.1.133配置为同一个网段的内网ip。

2)在10.107.1.133可以ping通10.107.1.130。

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持移动技术网。

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网