• ovs+linux bridge


    1、 创建ovs br-int br-tun

    ovs-vsctl add-br br-tun
    ovs-vsctl add-br br-int
    
    
    [root@kunpeng82 ovs]# ovs-vsctl list-ports br-int
    patch-int
    [root@kunpeng82 ovs]# ovs-vsctl list-ports br-tun
    patch-tun
    
    [root@kunpeng82 ovs]# ovs-vsctl add-port br-int patch-int -- set Interface patch-int type=patch -- set Interface patch-int options:peer=patch-tun
    [root@kunpeng82 ovs]# ovs-vsctl add-port br-tun patch-tun -- set Interface patch-tun type=patch -- set Interface patch-tun options:peer=patch-int
    [root@kunpeng82 ovs]# ovs-vsctl show
    2be9582b-aee2-4bc5-8856-2adaabcef19b
        Bridge br-tun
            Port br-tun
                Interface br-tun
                    type: internal
            Port patch-tun
                Interface patch-tun
                    type: patch
                    options: {peer=patch-int}
        Bridge br-int
            Port patch-int
                Interface patch-int
                    type: patch
                    options: {peer=patch-tun}
            Port br-int
                Interface br-int
                    type: internal
    [root@kunpeng82 ovs]# brctl addbr qbr01
    [root@kunpeng82 ovs]# ip link set qbr01 up
    [root@kunpeng82 ovs]# ip link add qvo01 type veth peer name qvb01
    [root@kunpeng82 ovs]# brctl addif qbr01 qvb01
    [root@kunpeng82 ovs]# brctl show qbr01
    bridge name bridge id STP enabled interfaces
    qbr01 8000.86286e0f27b5 no qvb01
    [root@kunpeng82 ovs]# ovs-vsctl add-port br-int qvo01
    [root@kunpeng82 ovs]# ovs-vsctl show
    2be9582b-aee2-4bc5-8856-2adaabcef19b
        Bridge br-tun
            Port br-tun
                Interface br-tun
                    type: internal
            Port patch-tun
                Interface patch-tun
                    type: patch
                    options: {peer=patch-int}
        Bridge br-int
            Port patch-int
                Interface patch-int
                    type: patch
                    options: {peer=patch-tun}
            Port "qvo01"
                Interface "qvo01"
            Port br-int
                Interface br-int
                    type: internal
    [root@kunpeng82 ovs]# ovs-vsctl list-ports br-tun
    patch-tun
    [root@kunpeng82 ovs]# ovs-vsctl list-ports br-int
    patch-int
    qvo01
    [root@kunpeng82 ovs]# ovs-vsctl add-br br-tun2
    [root@kunpeng82 ovs]# ovs-vsctl list-ports br-tun2
    [root@kunpeng82 ovs]# ovs-vsctl show
    2be9582b-aee2-4bc5-8856-2adaabcef19b
        Bridge br-tun
            Port br-tun
                Interface br-tun
                    type: internal
            Port patch-tun
                Interface patch-tun
                    type: patch
                    options: {peer=patch-int}
        Bridge "br-tun2"
            Port "br-tun2"
                Interface "br-tun2"
                    type: internal
        Bridge br-int
            Port patch-int
                Interface patch-int
                    type: patch
                    options: {peer=patch-tun}
            Port "qvo01"
                tag: 100
                Interface "qvo01"
            Port br-int
                Interface br-int
                    type: internal
        Bridge ovs-switch
            Port ovs-switch
                Interface ovs-switch
                    type: internal
            Port "p0"
                Interface "p0"
                    type: internal
            Port "p1"
                Interface "p1"
                    type: internal
            Port "p2"
                Interface "p2"
                    type: internal
        ovs_version: "2.12.0"
  • 相关阅读:
    Python 元胞自动机模拟——生命游戏
    ()python画动态图——plt.ion动图使用,训练过程展示
    Python——因子分析(KMO检验和Bartlett's球形检验)
    bind(),unbind(),hover(),toggle(),animate()
    多计算机通信中的时间同步问题
    如何创建自定义尺寸的空白地图
    ROS中的珊格地图——nav_msgs::OccupancyGrid
    c++使用eigen库,矩阵维度错误
    Eigen 求最小二乘
    Mybatis 框架下 SQL 注入攻击的 3 种方式,真是防不胜防!
  • 原文地址:https://www.cnblogs.com/dream397/p/12306943.html
Copyright © 2020-2023  润新知