virtual box 网络配置 主机与虚拟机互相访问,虚拟机上网,同一局域网设备相互访问

virtual box 网络配置 主机与虚拟机互相访问,虚拟机上网,同一局域网设备相互访问_第1张图片

虚拟机

enp0s3: flags=4163  mtu 1500
        inet 192.168.42.29  netmask 255.255.255.0  broadcast 192.168.42.255
        inet6 fe80::19de:e5b2:1fb3:4345  prefixlen 64  scopeid 0x20
        ether 08:00:27:d8:fc:ca  txqueuelen 1000  (Ethernet)
        RX packets 66  bytes 6750 (6.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 50  bytes 6803 (6.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@localhost network-scripts]# cat ifcfg-enp0s3
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DNS1=192.168.42.1
IPADDR=192.168.42.29
NETMASK=255.255.255.0
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=enp0s3
UUID=1d928aa2-e2fd-3d64-bb3e-78899243da1a
ONBOOT=yes
AUTOCONNECT_PRIORITY=-999
DEVICE=enp0s3
HWADDR=08:00:27:D8:FC:CA
PREFIX=24
ZONE=FedoraServer

 

 

 

virtual box 网络配置 主机与虚拟机互相访问,虚拟机上网,同一局域网设备相互访问_第2张图片

虚拟机

enp0s8: flags=4163  mtu 1500
        inet 192.168.1.184  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::4416:2a7:5ad4:bd3d  prefixlen 64  scopeid 0x20
        ether 08:00:27:eb:86:f8  txqueuelen 1000  (Ethernet)
        RX packets 15  bytes 2832 (2.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 32  bytes 3004 (2.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
window主机

enp0s8: flags=4163  mtu 1500
        inet 192.168.1.184  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::4416:2a7:5ad4:bd3d  prefixlen 64  scopeid 0x20
        ether 08:00:27:eb:86:f8  txqueuelen 1000  (Ethernet)
        RX packets 15  bytes 2832 (2.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 32  bytes 3004 (2.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 

你可能感兴趣的:(virtual box 网络配置 主机与虚拟机互相访问,虚拟机上网,同一局域网设备相互访问)