zoukankan      html  css  js  c++  java
  • 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"
  • 相关阅读:
    linux安装nginx
    git配置多个SSH密钥
    webpack加载器安装node-sass失败的解决方法
    Vue-cli webpack打包之后index.html缺少引号的问题
    算法:一个数组中所有元素的最小公倍数
    JS 实现一个睡眠函数sleep
    剑指offer 牛客67道题集合
    剑指offer
    剑指offer
    剑指offer
  • 原文地址:https://www.cnblogs.com/dream397/p/12306943.html
Copyright © 2011-2022 走看看