No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Create an Interface Bond for Carry Different VLANS Traffic on Linux RHEL 6.*

Publication Date:  2016-09-28 Views:  131 Downloads:  0
Issue Description
None
Solution
 

Solution:

Suppose we have to carry 2 x VLANs (VLAN-10 & VLAN-20) on interface bond

 

 

 

Step: 1 First Create Linux interface bond

root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0
TYPE=Bond
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static

 

root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes

 

root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes

 

root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth2

DEVICE=eth2
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes

 

root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth3

DEVICE=eth3
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes

 

Step:2  Create the Bond file(bonding.conf)

root@localhost ~]# vi /etc/modprobe.d/bonding.conf

alias bond0 bonding
options bond0 mode=1 miimon=100

 

Step:3  Tag VLAN-10 on bond0

root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-bond0.10 (.10 is the vlan-id)

DEVICE=bond0.10
IPADDR=192.168.1.9
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
TYPE=Bond
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static

Step :4 Now Tag second VLAN-20 on same bond0

VLAN-20

root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-bond0.20 (.20 is the vlan-id)

DEVICE=bond0.20
IPADDR=192.168.2.9
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
TYPE=Bond
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static

Now restart the network Service

root@localhost ~]# Service network restart

END