0

以这种方式,我为 LXC 容器LXC 配置了 OVS 桥接器和 Open vSwitch

它是桥接配置:

# ovs-vsctl show
1b236728-4637-42a5-8b81-53d4c93a6803
    Bridge "switch0"
        Port vethNSCEGY
            Interface vethNSCEGY
        Port "switch0"
            Interface "switch0"
                type: internal
        Port "vethD6TFEB"
            Interface "vethD6TFEB"
    ovs_version: "2.3.2"

switch0是主机上的接口,具有 IP 192.168.100.1/24 vethNSCEGYvethD6TFEB是 LXC 来宾的接口。

最终,IP 为192.168.100.10/24的第一个 LXC 访客可以 ping 第二个 LXC 访客192.168.100.11/24但无法 ping 主机 IP 192.168.100.1/24

OVS可以吗?还是我需要 smth 才能启用?

PS。我的接口上的 IP:

# ip a
...
4: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default 
    link/ether 52:9d:e1:60:1d:56 brd ff:ff:ff:ff:ff:ff
5: switch0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default 
    link/ether 16:63:eb:47:13:41 brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.1/24 scope global switch0
       valid_lft forever preferred_lft forever
35: vethNSCEGY: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP group default qlen 1000
    link/ether fe:d1:06:81:69:ed brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fcd1:6ff:fe81:69ed/64 scope link 
       valid_lft forever preferred_lft forever
37: vethD6TFEB: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP group default qlen 1000
    link/ether fe:ca:e9:16:dd:81 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fcca:e9ff:fe16:dd81/64 scope link 
       valid_lft forever preferred_lft foreve
4

1 回答 1

0

又是我的错。switch0下来了。所以打开界面帮助了我:

# ip link set dev switch0 up
于 2015-12-11T11:53:45.303 回答