[root@wb5 ~]# [root@wb5 ~]# [root@wb5 ~]# [root@wb5 ~]# [root@wb5 ~]# [root@wb5 ~]# [root@wb5 ~]# [root@wb5 ~]# [root@wb5 ~]# [root@wb5 ~]# [root@wb5 ~]# [root@wb5 ~]# [root@wb5 ~]# [root@wb5 ~]# ovs-vsctl show =========================原始====================== bf9e88f0-f9f7-4878-81df-6faa332ab037 Bridge br-tun fail_mode: secure Port patch-int Interface patch-int type: patch options: {peer=patch-tun} Port br-tun Interface br-tun type: internal Bridge br-ex Port br-ex Interface br-ex type: internal Port "ens256" Interface "ens256" Bridge br-int fail_mode: secure Port patch-tun Interface patch-tun type: patch options: {peer=patch-int} Port br-int Interface br-int type: internal ovs_version: "2.3.0" [root@wb5 ~]# create admin-int=====================增加br-int的一個tap的port========================= -bash: create: command not found [root@wb5 ~]# ovs-vsctl show bf9e88f0-f9f7-4878-81df-6faa332ab037 Bridge br-tun fail_mode: secure Port patch-int Interface patch-int type: patch options: {peer=patch-tun} Port br-tun Interface br-tun type: internal Bridge br-ex Port br-ex Interface br-ex type: internal Port "ens256" Interface "ens256" Bridge br-int fail_mode: secure Port patch-tun Interface patch-tun type: patch options: {peer=patch-int} Port br-int Interface br-int type: internal Port "tapb3284d90-04"----------------------------------------------------------------- tag: 1 Interface "tapb3284d90-04" type: internal ovs_version: "2.3.0" [root@wb5 ~]# add admin-router=============================沒有變化================ -bash: add: command not found [root@wb5 ~]# ovs-vsctl show bf9e88f0-f9f7-4878-81df-6faa332ab037 Bridge br-tun fail_mode: secure Port patch-int Interface patch-int type: patch options: {peer=patch-tun} Port br-tun Interface br-tun type: internal Bridge br-ex Port br-ex Interface br-ex type: internal Port "ens256" Interface "ens256" Bridge br-int fail_mode: secure Port patch-tun Interface patch-tun type: patch options: {peer=patch-int} Port br-int Interface br-int type: internal Port "tapb3284d90-04" tag: 1 Interface "tapb3284d90-04" type: internal ovs_version: "2.3.0" [root@wb5 ~]# add ext-net======================================沒有變化========= -bash: add: command not found [root@wb5 ~]# ovs-vsctl show bf9e88f0-f9f7-4878-81df-6faa332ab037 Bridge br-tun fail_mode: secure Port patch-int Interface patch-int type: patch options: {peer=patch-tun} Port br-tun Interface br-tun type: internal Bridge br-ex Port br-ex Interface br-ex type: internal Port "ens256" Interface "ens256" Bridge br-int fail_mode: secure Port patch-tun Interface patch-tun type: patch options: {peer=patch-int} Port br-int Interface br-int type: internal Port "tapb3284d90-04" tag: 1 Interface "tapb3284d90-04" type: internal ovs_version: "2.3.0" [root@wb5 ~]# add ext-subnet 101~105 108~110=====================增加br-int的一個tap的port==================== -bash: add: command not found [root@wb5 ~]# ovs-vsctl show bf9e88f0-f9f7-4878-81df-6faa332ab037 Bridge br-tun fail_mode: secure Port patch-int Interface patch-int type: patch options: {peer=patch-tun} Port br-tun Interface br-tun type: internal Bridge br-ex Port br-ex Interface br-ex type: internal Port "ens256" Interface "ens256" Bridge br-int fail_mode: secure Port "tap7d3cee3e-2b" tag: 2 Interface "tap7d3cee3e-2b"---------------------------------------------------------------------- type: internal Port patch-tun Interface patch-tun type: patch options: {peer=patch-int} Port br-int Interface br-int type: internal Port "tapb3284d90-04" tag: 1 Interface "tapb3284d90-04" type: internal ovs_version: "2.3.0" [root@wb5 ~]# add interface to extnet in admin-router==========================沒有變化======== -bash: add: command not found [root@wb5 ~]# ovs-vsctl show bf9e88f0-f9f7-4878-81df-6faa332ab037 Bridge br-tun fail_mode: secure Port patch-int Interface patch-int type: patch options: {peer=patch-tun} Port br-tun Interface br-tun type: internal Bridge br-ex Port br-ex Interface br-ex type: internal Port "ens256" Interface "ens256" Bridge br-int fail_mode: secure Port "tap7d3cee3e-2b" tag: 2 Interface "tap7d3cee3e-2b" type: internal Port patch-tun Interface patch-tun type: patch options: {peer=patch-int} Port br-int Interface br-int type: internal Port "tapb3284d90-04" tag: 1 Interface "tapb3284d90-04" type: internal ovs_version: "2.3.0" [root@wb5 ~]# add interface to admin-int in admin-router===========================沒有變化================== -bash: add: command not found [root@wb5 ~]# ovs-vsctl show bf9e88f0-f9f7-4878-81df-6faa332ab037 Bridge br-tun fail_mode: secure Port patch-int Interface patch-int type: patch options: {peer=patch-tun} Port br-tun Interface br-tun type: internal Bridge br-ex Port br-ex Interface br-ex type: internal Port "ens256" Interface "ens256" Bridge br-int fail_mode: secure Port "tap7d3cee3e-2b" tag: 2 Interface "tap7d3cee3e-2b" type: internal Port patch-tun Interface patch-tun type: patch options: {peer=patch-int} Port br-int Interface br-int type: internal Port "tapb3284d90-04" tag: 1 Interface "tapb3284d90-04" type: internal ovs_version: "2.3.0" [root@wb5 ~]# add a vm 192.168.1.6=====================================增加了br-int的一個qvo的port======= -bash: add: command not found [root@wb5 ~]# ovs-vsctl show bf9e88f0-f9f7-4878-81df-6faa332ab037 Bridge br-tun fail_mode: secure Port patch-int Interface patch-int type: patch options: {peer=patch-tun} Port br-tun Interface br-tun type: internal Bridge br-ex Port br-ex Interface br-ex type: internal Port "ens256" Interface "ens256" Bridge br-int fail_mode: secure Port "tap7d3cee3e-2b" tag: 2 Interface "tap7d3cee3e-2b" type: internal Port "qvo1a7bcce3-c9"------------------------------------------------------------- tag: 1 Interface "qvo1a7bcce3-c9" Port patch-tun Interface patch-tun type: patch options: {peer=patch-int} Port br-int Interface br-int type: internal Port "tapb3284d90-04" tag: 1 Interface "tapb3284d90-04" type: internal ovs_version: "2.3.0" [root@wb5 ~]# add a vm2 192.168.1.7=========================================增加了br-int的一個qvo的port============= -bash: add: command not found [root@wb5 ~]# ovs-vsctl show bf9e88f0-f9f7-4878-81df-6faa332ab037 Bridge br-tun fail_mode: secure Port patch-int Interface patch-int type: patch options: {peer=patch-tun} Port br-tun Interface br-tun type: internal Bridge br-ex Port br-ex Interface br-ex type: internal Port "ens256" Interface "ens256" Bridge br-int fail_mode: secure Port "tap7d3cee3e-2b" tag: 2 Interface "tap7d3cee3e-2b" type: internal Port "qvo1a7bcce3-c9" tag: 1 Interface "qvo1a7bcce3-c9" Port patch-tun Interface patch-tun type: patch options: {peer=patch-int} Port "qvo824b8f9d-c5"---------------------------------------------------------------------- tag: 1 Interface "qvo824b8f9d-c5" Port br-int Interface br-int type: internal Port "tapb3284d90-04" tag: 1 Interface "tapb3284d90-04" type: internal ovs_version: "2.3.0" [root@wb5 ~]#
總結:
在增加 虛機 和 有子網的網絡 的時候才會在br-int這個網橋增加一個port(虛機是qvo, 網絡是tap)