zoukankan      html  css  js  c++  java
  • Configure a bridge interface over a VLAN tagged bonded interface

    SOLUTION VERIFIED

    Environment

    • Red Hat Enterprise Linux 6 (All Versions)
    • Red Hat Enterprise Linux 5 (All Versions)

    Issue

    • Need to configure VLAN on bonded interface and a bridge on top of this VLAN tagged bonded interface.

    Resolution

    • Configure the interface configuration files as below:
      NOTE: In below example, physical interfaces are named as eth0 and eth1, bonded interface is named as bond0, VLAN over bond is named as bond0.402 and a bridge over this VLAN is named as br0.
    /etc/sysconfig/network-scripts/ifcfg-eth0
    -----------------------------------------
    DEVICE=eth0
    ONBOOT=yes
    NM_CONTROLLED=no
    MASTER=bond0
    SLAVE=yes
    HWADDR=XX:XX:XX:XX:XX:XX
    BOOTPROTO=none
    USERCTL=no
    
    /etc/sysconfig/network-scripts/ifcfg-eth1
    -----------------------------------------
    DEVICE=eth1
    ONBOOT=yes
    NM_CONTROLLED=no
    MASTER=bond0
    SLAVE=yes
    HWADDR=XX:XX:XX:XX:XX:XX
    BOOTPROTO=none
    USERCTL=no
    
    /etc/sysconfig/network-scripts/ifcfg-bond0
    -----------------------------------------
    DEVICE=bonde0
    ONBOOT=yes
    NM_CONTROLLED=no
    USERCTL=no
    BOOTPROTO=none
    BONDING_OPTS="mode=1 miimon=100"
    
    /etc/sysconfig/network-scripts/ifcfg-bond0.402
    ----------------------------------------------
    DEVICE=bond0.402
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=none
    VLAN=yes
    BRIDGE=br0
    
    /etc/sysconfig/network-scripts/ifcfg-br0
    ----------------------------------------
    DEVICE=br0
    TYPE=Bridge
    BOOTPROTO=static
    ONBOOT=yes
    NM_CONTROLLED=no
    IPADDR=X.X.X.X
    NETMASK=X.X.X.X
    GATEWAY=X.X.X.X
    • For RHEL5 , add below line to /etc/modprobe.conf so as to load module.
    alias bond0 bonding

      NOTE: RHEL6 does not need above step.

    • Restart network service.
    service network restart
    
    
  • 相关阅读:
    Linq查询操作之排序操作
    记一次docker机器无法访问本身的端口的错误2020-06-17
    prometheus监控docker的状态2020-06-17
    Docker RabbitMQ 重新启动时遇到错误
    Docker-Compose的地址与公司网络冲突
    MongDB自动运行脚本
    RabbitMQ内存泄露问题
    离线安装K3S Server(v1.17.4+k3s1)
    kubernetes yaml文件学习
    Docker Desktop启动Kubernetes
  • 原文地址:https://www.cnblogs.com/echo1937/p/6239040.html
Copyright © 2011-2022 走看看