vb中网络有4个网卡,分别对应enp0s7 enp0s8 enp0s9 enp0s10

我这里第二个网卡为NAT桥接模式,对应主机为网关,虚拟机为子网

vim /etc/sysconfig/network-scripts/ifcfg-enp0s8


TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
# 静态IP(static/dhcp)
BOOTPROTO=static
NETMASK=255.255.255.0
broadcast=192.168.165.255

IPADDR=192.168.165.3
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s8
UUID=a76b81c9-12b6-4e29-a2f8-0bd1e42e377a
DEVICE=enp0s8

ONBOOT=yes