+ OVS Linux bridge

1. Create 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 transl] # ovs- vsctl show 
2be9582b -aee2-4bc5- 8856 - 2adaabcef19b 
    Bridge br - Tuna 
        Port br - tuna 
            Interface br - tuna 
                type: internalize 
        Port patch - tuna 
            Interface patch - tuna 
                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 transl] # transl-vsctl add port br- int qvo01 
[root @ kunpeng82 transl] # transl - vsctl show 
2be9582b -aee2-4bc5- 8856 - 2adaabcef19b 
    Bridge br - Tuna 
        Port br - tuna 
            Interface br - tuna 
                type : internalize 
        Port patch - tuna 
            Interface patch - tuna 
                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-port Br- tuna 
patch - tuna 
[root @ kunpeng82 OVS] # OVS -vsctl list-port Br- int 
patch - int 
qvo01
[root @ kunpeng82 OVS] # OVS vsctl add-br br- tun2 
[root @ kunpeng82 OVS] # OVS -vsctl list-port Br- tun2 
[root @ kunpeng82 OVS] # OVS - vsctl show 
2be9582b -aee2-4bc5- 8856 - 2adaabcef19b 
    Bridge br - tuna 
        Port br - tuna 
            Interface br - tuna 
                type: internalize 
        Port patch - tuna 
            Interface patch - tuna 
                type: patch 
                options: {peer = patchint}
    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"

 

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/dream397/p/12306943.html