GenerationIP

Just for you

  • Increase font size
  • Default font size
  • Decrease font size
Home Documentation System Documentation Advanced Configuration for bonding and teaming with vlans

Advanced Configuration for bonding and teaming with vlans

E-mail Print PDF
User Rating: / 9
PoorBest 
Article Index
Advanced Configuration for bonding and teaming with vlans
MTU / Jumbo frame
Tips and Tricks
All Pages

Type : System
Operating System : Redhat,Centos,Fedora

I have already write an article on bonding but this one is more for system administrator who need to implement bonding with VLAN with different size of MTU.

This howto is very useful if you have a virtualisation platform or big databases which need a connection to a SAN or a NAS with high performances.

Creation of the bonding interface : Bonding or Teaming for redhat Server

VLAN

The creation of a VLAN is very simple on REDHAT like distribution.

Your bondX must be like that :.

# cat ifcfg-bond0
DEVICE=bond0
ONBOOT=yes
USERCTL=no
BOOTPROTO=none

The base insterface must be clear of ip addresses.

Now, if you want to create the VLAN 60 with ip address 10.0.60.2 with a /24 netmask you have to create this file :

cd /etc/sysconfig/networks-scripts/

#vim icfg-bond0.60

IPADDR=10.0.60.2
NETMASK=255.255.255.0
DEVICE=bond0.60
ONBOOT=yes
VLAN=yes

Now if you need to create a route on this vlan interface you have to create this file :

#vim route-bond0.60

default via 10.0.60.1

After that you can start the interface :

# ifup bond0.60

Added VLAN with VID == 60 to IF -:bond0:-

If you need to stop the interface :

# ifdown bond0.60

Removed VLAN -:bond0.656:-

you must have a result like that :

# ifconfig -a

bond0 Link encap:Ethernet HWaddr 00:1E:C9:**:**:EC
inet6 addr: fe80::21e:c9ff:fe**:**EC/64 Scope:Link
UP BROADCAST RUNNING PROMISC MASTER MULTICAST MTU:1500 Metric:1
RX packets:265541174 errors:0 dropped:0 overruns:0 frame:0
TX packets:312719058 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:43939681299 (40.9 GiB) TX bytes:215071502703 (200.3 GiB)

bond0.60 Link encap:Ethernet HWaddr 00:1E:C9:**:**:EC
inet addr:10.0.61.1 Bcast:10.0.60.255 Mask:255.255.255.0
inet6 addr: fe80::21e:c9ff:fe**:**EC/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:207609442 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:14131592873 (13.1 GiB) TX bytes:5219 (5.0 KiB)

eth0 Link encap:Ethernet HWaddr 00:1E:C9:**:**:EC
inet6 addr: fe80::21e:c9ff:fe**:**EC/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:263373897 errors:0 dropped:0 overruns:0 frame:0
TX packets:312719058 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:43782845022 (40.7 GiB) TX bytes:215071502703 (200.3 GiB)
Interrupt:16 Memory:f8000000-f8012100

eth1 Link encap:Ethernet HWaddr 00:1E:C9:**:**:EC
inet6 addr: fe80::21e:c9ff:fe**:**EC/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:2167277 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:156836277 (149.5 MiB) TX bytes:0 (0.0 b)
Interrupt:16 Memory:f4000000-f4012100

Now on your cisco switch you need to have this configuration :

vlan 60
name mon-vlan-60
!
interface GigabitEthernet0/*
description vlanbond-linux
switchport trunk allowed vlan 60
switchport mode trunk
speed 1000
duplex full
spanning-tree portfast trunk

This network configuration provide you a full duplex Gigabit interface with trunk port on vlan 60 and fast spanning tree to reduce the time of activation of the network port.



Last Updated on Saturday, 30 January 2010 22:43