LACP bonding + vlan not working

Topics about the networking software (ssh, nfs, samba, ...). No questions about network drivers there.
nryc
Posts: 9
Joined: 29 Apr 2013, 12:08

LACP bonding + vlan not working

Postby nryc » 29 Apr 2013, 12:25

Hello,

I use sysrecueCD 3.5.0 (64 bits kernel) on an USB stick to work on servers with bonding (LACP) + VLANs. This is what I do :

Code: Select all

modprobe 8021q
modprobe bonding mode=4 miimon=100 lacp_rate=1
 
ifenslave bond0 eth1
ifenslave bond0 eth0


At this point, the bonding is working correctly, a capture on the "bond0" interface with "tcpdump -i bond0" shows me traffic.

When I try to configure a specific VLAN for this interface, it's not working anymore :

Code: Select all

vconfig add bond0 2004


Nothing is showing up when I capture with "tcpdump -i bond0.2004". Is there something I can do?

Code: Select all

bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  mtu 1500
        inet6 fe80::21e:c9ff:fef2:c081  prefixlen 64  scopeid 0x20<link>
        ether 00:1e:c9:f2:c0:81  txqueuelen 0  (Ethernet)
        RX packets 129353  bytes 15781426 (15.0 MiB)
        RX errors 0  dropped 20575  overruns 0  frame 0
        TX packets 7306  bytes 994664 (971.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

bond0.2004: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.20.1.17  netmask 255.255.255.0  broadcast 172.20.1.255
        inet6 fe80::21e:c9ff:fef2:c081  prefixlen 64  scopeid 0x20<link>
        ether 00:1e:c9:f2:c0:81  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 15  bytes 762 (762.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 00:1e:c9:f2:c0:81  txqueuelen 1000  (Ethernet)
        RX packets 50909  bytes 6212137 (5.9 MiB)
        RX errors 0  dropped 21  overruns 0  frame 0
        TX packets 3707  bytes 504562 (492.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 17  memory 0xdc000000-dc012800 

eth1: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 00:1e:c9:f2:c0:83  txqueuelen 1000  (Ethernet)
        RX packets 78444  bytes 9569289 (9.1 MiB)
        RX errors 0  dropped 44  overruns 0  frame 0
        TX packets 3599  bytes 490102 (478.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 18  memory 0xda000000-da012800 

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 13  bytes 1456 (1.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 13  bytes 1456 (1.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


Code: Select all

Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

802.3ad info
LACP rate: fast
Min links: 0
Aggregator selection policy (ad_select): stable
Active Aggregator Info:
   Aggregator ID: 1
   Number of ports: 2
   Actor Key: 17
   Partner Key: 299
   Partner Mac Address: 00:1e:4f:08:e5:c8

Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:1e:c9:f2:c0:81
Aggregator ID: 1
Slave queue ID: 0

Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 00:1e:c9:f2:c0:83
Aggregator ID: 1
Slave queue ID: 0


Code: Select all

bond0.2004  VID: 2004    REORDER_HDR: 1  dev->priv_flags: 1
         total frames received            0
          total bytes received            0
      Broadcast/Multicast Rcvd            0

      total frames transmitted           15
       total bytes transmitted          762
Device: bond0
INGRESS priority mappings: 0:0  1:0  2:0  3:0  4:0  5:0  6:0 7:0
 EGRESS priority mappings:

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: LACP bonding + vlan not working

Postby gernot » 29 Apr 2013, 14:33

Your configuration looks good.
Like described here https://www.kernel.org/doc/Documentatio ... onding.txt
i am not sure that tcpdump work well for the vlan.

Tried you to run tcpdump on the target PC ?
Use you untagged switch ports?
Checked you the routing?

Gernot

nryc
Posts: 9
Joined: 29 Apr 2013, 12:08

Re: LACP bonding + vlan not working

Postby nryc » 29 Apr 2013, 16:00

I did not mentioned it, but I have configured an IP address on the VLANed interface with :

Code: Select all

ifconfig bond0.2004 172.24.1.17/24 up
route add default gw 172.24.1.72 bond0.2004


The ping to a host on the same VLAN or the gateway doesn't work, I will try to capture the traffic on the target to see if the ICMP message are send.

One ultimate solution consists to temporary disable LACP/VLAN on the switch, in this case I can boot SystemRescueCD with PXE and it works 100% of the time. But I don't like modifying the switch configuration, it's too dangerous on a production environment.

I will try to run more tests...

sigprof
Posts: 4
Joined: 11 Apr 2013, 13:54

Re: LACP bonding + vlan not working

Postby sigprof » 29 Apr 2013, 17:31

What network controllers are in this system, and what kernel driver is used for them (lspci -vnn)?

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: LACP bonding + vlan not working

Postby gernot » 29 Apr 2013, 17:38

Get you vlan without bonding to work?
nryc wrote:One ultimate solution consists to temporary disable LACP/VLAN on the switch
If the switch ports where you connect bond0.2004 is taged to vlan 2004 this would be the problem.

Gernot

nryc
Posts: 9
Joined: 29 Apr 2013, 12:08

Re: LACP bonding + vlan not working

Postby nryc » 30 Apr 2013, 13:04

The problem is solved. It works *much better* with the correct VLANID...

For the record, this is the full commands to make it work, it's pretty simple actually. Tested on SystemRescueCD 3.5.0

Code: Select all

# Configuration of bonding (mode 4 = LACP)
modprobe 8021q
modprobe bonding mode=4 miimon=100 lacp_rate=1

# Physical interfaces to join
ifenslave bond0 eth1
ifenslave bond0 eth0

# Configuration of a VLAN on the bonding interface
vconfig add bond0 <YOUR_VLAN>
 
# IPv4 configuration of the "VLANed" interface
ifconfig bond0.<YOUR_VLAN> <YOUR_IP_ADDRESS>/24 up
route add default gw <IP_ADDRESS_OF_GATEWAY> bond0.<YOUR_VLAN>


Return to “Networking (except PXE booting)”

Who is online

Users browsing this forum: No registered users and 1 guest