Add dual network cards (set IP address, broadcast address and subnet mask)

First add the network card in the virtual machine.
Insert picture description here
Restart the network card: systemctl restart network.
Check the network device: ifconfig
Insert picture description here

[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      

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_48190875/article/details/107796881