【问题标题】:In Linux ,how to connect two vNIC? [closed]在Linux中,如何连接两个vNIC? [关闭]
【发布时间】:2015-10-28 09:34:34
【问题描述】:

这是我的问题: 我在 Centos 上创建 vlan 设备 eth0.10 和 veth-pair(if_in 和 if_out),如何将 eth0.10 连接到 if_in ??

ip link add link eth0 name eth0.10 type vlan protocol 802.1Q id 100

ip link add name if_in type veth peer name if_out

我对linux虚拟网络不是很了解,有什么办法可以解决这个问题吗? 我真的很感激

【问题讨论】:

    标签: linux virtual


    【解决方案1】:

    您可以使用this page 中所述的虚拟交换机或网桥。

    虽然页面使用了网络命名空间,但基本思路还是将eth0.10和if_in添加到同一个vswitch/bridge中,让openvswitch/linux bridge来做。

    一个使用 linux bridge 的例子:

    # create the switch
    BRIDGE=br-test
    brctl addbr $BRIDGE
    brctl stp   $BRIDGE off
    ip link set dev $BRIDGE up
    brctl addif br-test eth0.10
    brctl addif br-test if_in 
    

    【讨论】:

      猜你喜欢
      • 2019-06-15
      • 2011-02-10
      • 2019-03-23
      • 2017-07-26
      • 2022-01-14
      • 1970-01-01
      • 2016-12-14
      • 2020-05-11
      • 1970-01-01
      相关资源
      最近更新 更多