mac下virtualbox实现主机和虚拟机、虚拟机和外网互访的方案
- 全局添加Host-Only网络
Adapter
IPv4 Address:192.168.56.1
IPv4 Network Mask:255.255.255.0
IPv6 Address:空
IPv6 Network Mask Length:DHCP Server
Server Address:192.168.56.100
Network Mask:255.255.255.0
Lower Address Bound:192.168.56.101
Upper Address Bound:192.168.56.101(此处最大可设置为254,为避免浮动设置与最小地址一样的值)其中DHCP地址前缀保持和主机虚拟前缀保持一致
- 某一系统添加NAT网络
默认配置即可
- 某一系统添加Host-Only网络
选择第1步配置的Host-Only网络,其他默认