添加双网卡(设置IP地址、广播地址和子网掩码)

先在虚拟机中添加网卡
在这里插入图片描述
重启网卡:systemctl restart network
查看网络设备:ifconfig
在这里插入图片描述

[root@localhost ~]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# cp -p ifcfg-ens33 ifcfg-ens37
[root@localhost network-scripts]# nmcli connection 
NAME        UUID                              			    TYPE      DEVICE 
ens33       59f94206-a1b2-44a5-994d-50106adfc1a8  ethernet  ens33  
virbr0      800d3f21-9941-4b1e-b552-4d846a299acb  bridge    virbr0 
有线连接 1  411b013f-7247-38f6-917e-0a2639fb347a  ethernet  ens37  
[root@localhost network-scripts]# vi ifcfg-ens37

[root@localhost network-scripts]#systemctl restart network
[root@localhost network-scripts]#ifconfig      

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_48190875/article/details/107796881