我正在尝试使用单独的网络命名空间配置和设置 Open vSwitch。我的目标是在同一个单独的网络命名空间中添加两个接口(如我创建的命名空间“netns-ovs”),并尝试使用 Open vSwitch 将数据包从 a2 接口转发到 b2 接口。为清晰起见,附上了目标图。
当我尝试在单独的网络命名空间中建立网桥时出现以下错误:
root@student:~# sudo ip netns exec netns-ovs ovs-vsctl show
72fd2b3a-388b-4a44-818b-5d27f855e5c0
Bridge "ovsbr0"
Port "b2"
Interface "b2"
Port "ovsbr0"
Interface "ovsbr0"
type: internal
Port "a2"
Interface "a2"
ovs_version: "2.0.2"
root@student:~# sudo ip netns exec netns-ovs ovs-ofctl show ovsbr0
OFPT_FEATURES_REPLY (xid=0x2): dpid:00001af89191ab45
n_tables:254, n_buffers:256
capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
actions: OUTPUT SET_VLAN_VID SET_VLAN_PCP STRIP_VLAN SET_DL_SRC SET_DL_DST SET_NW_SRC SET_NW_DST SET_NW_TOS SET_TP_SRC SET_TP_DST ENQUEUE
LOCAL(ovsbr0): addr:3e:d7:2f:6c:e7:46
config: PORT_DOWN
state: LINK_DOWN
speed: 0 Mbps now, 0 Mbps max
OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0
root@student:~# sudo ip netns exec netns-ovs ifconfig ovsbr0 up
ovsbr0: ERROR while getting interface flags: No such device
请问可以吗?不可以吗?