I'm trying to configure a T1040rdb (SDK1.7) based device to have a single LAN interface by combining fm1-gb0 and fm1-gb1 interfaces.
I chose to use bonding interface bond0 (802.3ad mode) with fm1-gb0 and fm1-gb1 as slaves. I don't see any issue with this until I configure VLANs on bond0.
It is behaving very differently from VLANs on fm1-gb0/fm1-gb1. When I put any port on Access mode, it is always sending the packets out with vlan tag 1 (it needs to be untagged) and In Trunk mode, it is sending the untagged packets (it needs to be tagged).
Bonding Interface Configuration:
root@t1040rdb:/sys/class/net/bond0/bonding# cat mode
802.3ad 4
root@t1040rdb:/sys/class/net/bond0/bonding# cat oh_en
LAG:[CPU 0 ln 1650 fn export_oh_port_info_to_ceetm] - This oh port mapped to bond has channel:0x80a
LAG:[CPU 0 ln 1652 fn export_oh_port_info_to_ceetm] - fman_dcpid:0x0, oh_offset:0x83000, cell-index:1
LAG:[CPU 0 ln 286 fn bonding_show_oh_enable] - offline port channel:2058
1
root@t1040rdb:/sys/class/net/bond0/bonding# cat oh_needed_for_hw_distribution
fman0-oh@2
root@t1040rdb:/sys/class/net/bond0/bonding# cat slaves
fm1-gb0 fm1-gb1
root@t1040rdb:/sys/class/net/bond0/bonding# ethtool -k bond0
Features for bond0:
rx-checksumming: off [fixed]
tx-checksumming: off
tx-checksum-ipv4: off [fixed]
tx-checksum-ip-generic: off
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: off
tx-scatter-gather: off
tx-scatter-gather-fraglist: off
tcp-segmentation-offload: off
tx-tcp-segmentation: off [requested on]
tx-tcp-ecn-segmentation: off [requested on]
tx-tcp6-segmentation: off [requested on]
udp-fragmentation-offload: off [fixed]
generic-segmentation-offload: off
generic-receive-offload: on
large-receive-offload: off
rx-vlan-offload: on
tx-vlan-offload: on
ntuple-filters: off [fixed]
receive-hashing: off [fixed]
highdma: on
rx-vlan-filter: on
vlan-challenged: off [fixed]
tx-lockless: on [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-mpls-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off [requested on]
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
hw-qdisc: off [fixed]
hw-accel-mq: off [fixed]
VLAN Configuration:
root@t1040rdb:~# l2switch-cfg vlan show
Printing all VLANs...
VLAN 1: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
VLAN 10: 5, 9, /* LAN host is connected to Port 5 */
root@t1040rdb:~# l2switch-cfg port all vlan show
Vlan port-based configuration (port - VID):
0 - VID 1
1 - VID 1
2 - VID 1
3 - VID 1
4 - VID 1
5 - VID 1 /* Configured as 1 for Trunk mode and 10 for Access Mode */
6 - VID 1
7 - VID 1
8 - VID 1
9 - VID 1
root@t1040rdb:/sys/class/net/bond0/bonding# l2switch-cfg set lag no 1 members 8 9
LAG NO 1 members: 8 9
Packet capture on LAN device
Access Mode:
No. Time Source Destination Protocol Length Info
2 0.018593000 54:39:68:03:e8:62 68:05:ca:15:89:32 ARP 64 192.168.2.144 is at 54:39:68:03:e8:62
Frame 2: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
Ethernet II, Src: 54:39:68:03:e8:62 (54:39:68:03:e8:62), Dst: 68:05:ca:15:89:32 (68:05:ca:15:89:32)
Destination: 68:05:ca:15:89:32 (68:05:ca:15:89:32)
Source: 54:39:68:03:e8:62 (54:39:68:03:e8:62)
Type: 802.1Q Virtual LAN (0x8100)
802.1Q Virtual LAN, PRI: 0, CFI: 0, ID: 1
000. .... .... .... = Priority: Best Effort (default) (0)
...0 .... .... .... = CFI: Canonical (0)
.... 0000 0000 0001 = ID: 1
Type: ARP (0x0806)
Padding: e862000000000000000000000000
Trailer: 00000000
Address Resolution Protocol (reply)
Trunk Mode:
No. Time Source Destination Protocol Length Info
22 83.259189000 54:39:68:03:e8:62 68:05:ca:15:89:32 ARP 60 192.168.2.144 is at 54:39:68:03:e8:62
Frame 22: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Ethernet II, Src: 54:39:68:03:e8:62 (54:39:68:03:e8:62), Dst: 68:05:ca:15:89:32 (68:05:ca:15:89:32)
Destination: 68:05:ca:15:89:32 (68:05:ca:15:89:32)
Source: 54:39:68:03:e8:62 (54:39:68:03:e8:62)
Type: ARP (0x0806)
Padding: e86200000000000000000000000000000000
Address Resolution Protocol (reply)
Can you guys please help me with this VLAN configuration??
Also, do you think any other better approach to achieve single interface for whole switch?? Bridging will be our last choice to go ahead with.
Thanks,
Mohan.
Hi,
1. Did you configured "Bonding driver support" in "Network device support"?
Building the Linux Kernel
Linux kernel has to be rebuilt with bonding support. In Freescale SDK this can be done by:
> bitbake -c menuconfig virtual/kernel
Select "Bonding driver support" in the "Network device support" section. Configure the driver as a module.
Build the kernel with the updated configuration and also the bonding module:
> bitbake -c deploy virtual/kernel
Installing the module
2. What are the different IP address that are being used for fm1-db0 and fm1-gb1?
3. Could you provide the commends that you run to configure the bonds? Something similar as:
> ifconfig bond0 1.0.0.2 up
> ifenslave bond0 fm1-gb0 fm1-gb1
BR
Hi Lunmin,
Thanks for the reply,
It seems to be working now. I was not really sure what was the problem before.
Appreciate your response.
Thanks,
Mohan.
Welcome, thanks for feedback, good to know it's working.
Hi Yiping,
Can you please help me here.??
Please let me know if I'm heading in wrong direction here.
Thanks,
Mohan.