附加IP段 假如是111.111.111.0/24, 可用IP 111.111.111.2---254
我母鸡配置:
# network-config
auto lo
iface lo inet loopback
auto vmbr0
iface vmbr0 inet static
address 母鸡主IP.194
netmask 255.255.255.248
gateway 母鸡主IP.193
bridge_ports eno1
bridge_stp off
bridge_fd 0
auto vmbr1
iface vmbr1 inet static
address 111.111.111.2
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
# up ip route add 111.111.111.0/24 dev vmbr1 --------这一句加不加都不行。
小鸡配置:
address 111.111.111.3
netmask 255.255.255.0
gateway 111.111.111.2
此时,母鸡主IP.194 和 111.111.111.2 都可以ping通, 但是小鸡111.111.111.3 无法对外ping通, 只能ping通网关111.111.111.2