This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Trouble of the VLAN in CPSW of AM335x



Hi,

I set VLAN by setting of Dual Standalone EMAC mode of the following site.

processors.wiki.ti.com/.../Linux_Core_CPSW_User's_Guide

When I connect eth1 and eth2 to same hub and do ping, the phenomenon such as the multicast storm occurs, and a packet outputs it in large quantities in the network, and a network is downed.

As return, two following methods are found.
①I carry out ifdown.
②I pull an LAN cable.

Our customer is troubled with the trouble that is near a mass production.

Will there be any solution?
The problem occurs even if I validate 802.1d of kernel of linux.

The environment is as follows.
I confirm that it occurs in all.
ti-processor-sdk-am335x-2.00.00.00
ti-processor-sdk-am335x-2.01.00.07
EVM:AM335x SK

ti-processor-sdk-am437x-2.01.00.07
EVM:AM437x SK

Will this be the cause of a driver of CPSW of linux which is in processor-sdk?
Or will it be to be caused by a module of CPSW?

The following becomes log of ifconfig when it occurs.

ping -c 5 192.168.21.1 

eth0 Link encap:Ethernet HWaddr D4:94:A1:87:FB:84
inet addr:192.168.0.3 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:35645784 errors:0 dropped:0 overruns:0 frame:0
TX packets:117 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2138747292 (1.9 GiB) TX bytes:7440 (7.2 KiB)
Interrupt:169

eth0.21 Link encap:Ethernet HWaddr D4:94:A1:87:FB:84
inet addr:192.168.21.2 Bcast:192.168.21.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:588 (588.0 B) TX bytes:1946 (1.9 KiB)

eth0.22 Link encap:Ethernet HWaddr D4:94:A1:87:FB:84
inet addr:192.168.22.2 Bcast:192.168.22.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:35645776 errors:0 dropped:0 overruns:0 frame:0
TX packets:84 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1497122592 (1.3 GiB) TX bytes:3528 (3.4 KiB)

eth1 Link encap:Ethernet HWaddr D4:94:A1:87:FB:85
inet addr:192.168.0.4 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13965617 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:837937020 (799.1 MiB) TX bytes:0 (0.0 B)

eth1.23 Link encap:Ethernet HWaddr D4:94:A1:87:FB:85
inet addr:192.168.23.2 Bcast:192.168.23.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

eth1.24 Link encap:Ethernet HWaddr D4:94:A1:87:FB:85
inet addr:192.168.24.2 Bcast:192.168.24.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Best Regards,
Shigehiro Tsuda

  • Hi Shigehiro,

    Could you describe how configure your network and VLAN settings.
    Also add the output of the 'route' command.

    BR
    Tsvetolin Shulev
  • Hi Shulev,

    Thank you for quick reply.

    The setting of the VLAN is as follows.
    vconfig add eth0 21
    vconfig add eth0 22
    vconfig add eth1 23
    vconfig add eth1 24

    ifconfig eth0.21 192.168.21.2 netmask 255.255.255.0 broadcast 192.168.21.255 up
    ifconfig eth0.22 192.168.22.2 netmask 255.255.255.0 broadcast 192.168.22.255 up
    ifconfig eth1.23 192.168.23.2 netmask 255.255.255.0 broadcast 192.168.23.255 up
    ifconfig eth1.24 192.168.24.2 netmask 255.255.255.0 broadcast 192.168.24.255 up

    Follows are results of the execution in route command.
    root@am335x-evm:~# route
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    default 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
    default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
    192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
    192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
    192.168.21.0 * 255.255.255.0 U 0 0 0 eth0.21
    192.168.22.0 * 255.255.255.0 U 0 0 0 eth0.22
    192.168.23.0 * 255.255.255.0 U 0 0 0 eth1.23
    192.168.24.0 * 255.255.255.0 U 0 0 0 eth1.24

    switching hub:Corega SW08GTV2
    AM335x SK
    Only LAN1 and LAN2 of AM335x SK board connect with hub mentioned above.
    When this problem occurs, I do not connect the PC to this hub because the disposal of PCs becomes heavy.

    ping -c 2 192.168.22.1
    --- 192.168.21.1 ping statistics ---
    2 packets transmitted, 0 packets received, 100% packet loss

    It is finished in two times of ping, but packets continue increasing after the end.

    As return, two following methods are found.
    ①I carry out ifdown.
    ②I pull an LAN cable.

    Best Regards,
    Shigehiro Tsuda
  • Shigehiro,

    I'm seeing something confusing in the eth0 configuration of your board related to Bcast:

    eth0 Link encap:Ethernet HWaddr D4:94:A1:87:FB:84

    inet addr:192.168.0.3 Bcast:192.168.1.255 Mask:255.255.255.0

    .......

    but I expect the eth0 configuration to be:

    eth0 Link encap:Ethernet HWaddr D4:94:A1:87:FB:84

    inet addr:192.168.0.3 Bcast:192.168.0.255 Mask:255.255.255.0

    ........

    Is it a mistake or intentional configuration?

    BR

    Tsvetolin Shulev

  • Shigehiro,

    The other disturbing is that both eth0 and eth1 are in one network 192.168.0.X. I'm not sure what is the idea of this configuration but it can cause a loop.

    BR
    Tsvetolin Shulev