以下命令:
~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
~$
~$
~$
~$
~$ sudo ovs-vsctl add-br bridge1
~$ sudo ovs-vsctl show
ab9fb6c9-69e5-4a60-84d1-94da5a66b4e2
Bridge "mybridge"
Port "mybridge"
Interface "mybridge"
type: internal
ovs_version: "2.9.5"
~$
~$
~$
创建两个新的第 2 层接口(ovs-system
& bridge1
),如下所示:
~$
~$
~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether ff:ff:ff:19:f1:f6 brd ff:ff:ff:ff:ff:ff
3: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 10:0b:a9:0f:ff:f4 brd ff:ff:ff:ff:ff:ff
inet 192.168.68.103/24 brd 192.168.68.255 scope global dynamic noprefixroute wlp2s0
valid_lft 6717sec preferred_lft 6717sec
inet6 fe80::6ce4:7dff:7ff8:3fff/64 scope link noprefixroute
valid_lft forever preferred_lft forever
6: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 6e:ed:1a:5e:a7:d1 brd ff:ff:ff:ff:ff:ff
7: mybridge: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 92:21:d4:14:9f:41 brd ff:ff:ff:ff:ff:ff
~$
~$
~$
ovs-system
上面的接口列表中有什么?下图中桥接器()的端口(
Port "mybridge"
)和接口( )之间有什么不同?Interface "mybridge"
Bridge "mybridge"
答案1
我没有太多的 OVS 经验。总共只有 10 分钟。
但在我看来,“桥”与 VLAN 有点相似。VLAN 本身不能做任何事情。不同的机器要通过该桥/VLAN 进行通信,它们需要通过端口连接到它。因此,想象一下桥是物理第 2 层交换机/集线器,端口是该交换机上的端口。没有端口的交换机是无用的,连接到此交换机的唯一方法是通过端口。
关于你的第一个问题:
这个接口似乎是某种内部路由器。所以我想你可以将 ovs-system 接口视为 vswitch 本身。