不确定我遗漏了什么,但我已在两个不同的虚拟接口上设置了两个桥,如下所示:
#-----------------------------------------------------------------#
## VIRBR10 ##
auto virbr10-dummy
iface virbr10-dummy inet manual
pre-up /sbin/ip link add virbr10-dummy type dummy
up /sbin/ip link set virbr10-dummy address 52:54:00:1b:2c:3a
auto virbr10
iface virbr10 inet static
bridge_ports virbr10-dummy
bridge_stp on
bridge_fd 2
address 172.20.90.1
netmask 255.255.255.0
#-----------------------------------------------------------------#
#-----------------------------------------------------------------#
## VIRBR122 ##
auto virbr122-dummy
iface virbr122-dummy inet manual
pre-up /sbin/ip link add virbr122-dummy type dummy
up /sbin/ip link set virbr122-dummy address 52:54:00:15:7b:9c
auto virbr122
iface virbr122 inet static
bridge_ports virbr122-dummy
bridge_stp on
bridge_fd 2
address 192.168.122.1
netmask 255.255.255.0
#-----------------------------------------------------------------#
当我只启动其中一个时,一切正常,但是当我启动另一个时,第一个会丢失其配置,如下所示:
virbr10 Link encap:Ethernet HWaddr 52:54:00:1b:2c:3a
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:1540 (1.5 KB)
virbr122 Link encap:Ethernet HWaddr 52:54:00:15:7b:9c
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:8388 (8.3 KB)
virbr10-dummy Link encap:Ethernet HWaddr 52:54:00:1b:2c:3a
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:711 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:52144 (52.1 KB)
virbr122-dummy Link encap:Ethernet HWaddr 52:54:00:15:7b:9c
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1579 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:94742 (94.7 KB)
我做错了什么?(顺便说一句,我正在为 KVM 设置静态虚拟网络,而没有使用它的内置方法 - 这些方法目前有问题)。
第一次编辑:
我把接口的加载顺序改为:
virbr10-假人
virbr122-假人
virbr10
virbr122
现在看起来它运行正常...但仍然没有完全持久。
virbr10 Link encap:Ethernet HWaddr 52:54:00:1b:2d:3a
inet addr:172.20.90.1 Bcast:172.20.90.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:84 (84.0 B)
virbr122 Link encap:Ethernet HWaddr 52:54:00:15:7f:9c
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:84 (84.0 B)
virbr10-dummy Link encap:Ethernet HWaddr 52:54:00:1b:2d:3a
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:1384 (1.3 KB)
virbr122-dummy Link encap:Ethernet HWaddr 52:54:00:15:7f:9c
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:1384 (1.3 KB)
这显然是某种加载顺序错误/超时/错误,我不明白,而且显然没有人愿意回答:'(