vagrant 网络设置

文档档参考
网络说明 https://www.jianshu.com/p/a1bc23bc7892
Internal 内网设置 https://www.vagrantup.com/docs/virtualbox/networking.html
bridge 桥接设置 https://www.vagrantup.com/docs/networking/public_network.html
hostonly 设置 https://www.vagrantup.com/docs/networking/private_network.html

#Internal 内网
config.vm.network "private_network", ip: "192.168.50.100",virtualbox__intnet: true

#bridge
config.vm.network "public_network", bridge: "Realtek Gaming GBE Family Controller"

#private_network
config.vm.network "private_network", ip: "192.168.56.100"

场景1.
开2台机器测试openXXX。
机器1:有一个private_network,一个Internal,该机器做server
机器2: 只有Internal,和机器1的Internal一个网段
通过配置,本地物理机能ping 机器2的Internal内网。

上一篇:xshell配置方案


下一篇:kubernetes 概念