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"
  • 相关阅读:
    TTreeView.OnCustomDrawItem
    xe Style
    delphi 加密 XOR
    ReportMachine 自定义代码 画细线
    XE 安装后C盘占用太大,C盘空间清理
    FireFox 书签 缓存 路径设置
    Android 照相
    Android手机与服务器(案例一) webservice
    win10/win7 笔记本 开启虚拟无线 批处理
    Delphi XE6打电话
  • 原文地址:https://www.cnblogs.com/dream397/p/12306943.html
Copyright © 2011-2022 走看看