openstack新建虚机、网络、路由时候对应的ovs网桥的变化

本文通过实例演示了如何在Open vSwitch (OVS) 中为虚拟机和子网创建网络端口。具体介绍了在br-int网桥上添加不同类型的端口(如qvo和tap),并展示了每次操作前后OVS配置的变化。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

 

[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)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值