如果你是将专用网络分配给现有的机器 (或部署您自己的操作系统),你需要在专用接口上配置 IP 地址。 控制面板会分配给你的 IP 地址,您应该替换为 ‘10.99.0.200’ 在例子中该 IP。 窗口: 注意: Windows 可以选择一个不同的名称为您的专用接口,请务必检查之前尝试用“以太网 2″
1 2 |
netsh interface ip set address name="Ethernet 2" static 10.99.0.200 255.255.0.0 0.0.0.0 1 |
CentOS: /Etc/sysconfig/network-scripts/ifcfg-eth1 替换为以下内容: DEVICE=eth1 ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=static IPADDR=10.99.0.200 NETMASK=255.255.0.0 IPV6INIT=no MTU=1450 Debian/Ubuntu: 在 /etc/network/interfaces 中添加以下行:
1 2 3 4 5 6 |
auto eth1 iface eth1 inet static address 10.99.0.200 netmask 255.255.0.0 mtu 1450 |
FreeBSD: 在 /etc/rc.conf 中添加以下行:
1 2 |
ifconfig_vtnet1="inet 10.99.0.200 netmask 255.255.0.0" |