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.

TDA2E: Multiple VLANs use the same IP address,how to configure?

Part Number: TDA2E
Other Parts Discussed in Thread: TDA2

There is such a problem in the customer's project requirements.

Multiple VLANs need to be configured on TDA2EX SOC , but they all use the same IP address. What kind of configuration do you have here.

If I configure the IP address directly, there will be conflicts and ARP will not work.

  • Hi,

    Which SDK are you using ? CPSW does support VLAN

    Can you provide more details about your setup ?

    Regards

    Vineet

  • I'm using vsdk version 3.6.

    Well, I mean:

    I use the vconfig command to configure VLAN, and the results are as follows: eth0.2 and eth0.4 sub nodes. Then I configure this node to the same IP address 172.16.2.92, so that the network function is not working. I try to Ping other 192.16.2.xxx networks. If I want several VLAN nodes to set the same IP address and the network can be connected, how can I modify it?

    root@dra7xx-evm:~# ifconfig
    eth0 Link encap:Ethernet HWaddr F8:36:9B:C2:12:64
    inet addr:172.16.2.92 Bcast:172.16.255.255 Mask:255.255.0.0
    UP BROADCAST 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:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    Interrupt:97

    eth0.2 Link encap:Ethernet HWaddr 02:47:57:4D:00:92
    inet addr:172.16.2.92 Bcast:172.16.2.255 Mask:255.255.255.0
    inet6 addr: fe80::47:57ff:fe4d:92%131824/64 Scope:Link
    UP BROADCAST 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:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    eth0.4 Link encap:Ethernet HWaddr 02:47:57:4D:00:92
    inet addr:172.16.2.92 Bcast:172.16.255.255 Mask:255.255.0.0
    inet6 addr: fe80::47:57ff:fe4d:92%131824/64 Scope:Link
    UP BROADCAST 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:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1%131824/128 Scope:Host
    UP LOOPBACK RUNNING MTU:65536 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:1
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    root@dra7xx-evm:~# ping 172.16.2.XXX

  • Hi,

    I tried to add VLAN to CPSW interface eth1 on AM57 (same CPSW) using the commands

    1. vconfig add eth1 5 (adding VLAN 5 to eth1 interface)

    2. ip addr add 192.168.0.3/24 dev eth1.5

    3. ip link set eth1.5 up

    With this I was able to configure VLAN ID of 5 for the virtual interface eth1.5

    When I ping from eth1.5 using "ping -I eth1.5" I can see that outgoing ARP has VLAN ID=5. I think this confirms that VLAN interface is working.

    Regarding the ping issue, I think this is a generic network configuration issue on Linux and nothing to do with CPSW driver.

    You can take a look at these threads

    Regards

    Vineet

  • Yes, this should be a Linux system problem,

    We just want to ask you, if you modify the configuration of Linux system according to the requirements of customers, can you achieve such functional requirements?

    Or is this kind of customer demand theoretically unreasonable?

  • OK, we know that VLAN function on tda2 is good.

    We just want to know how to realize the function of external network communication of multiple VLANs

  • Hi,

    The network configuration will depend on the actual system that customer is using. I haven't done it myself but I am guessing that it would require setting up IP routing, enabling VLAN, trunking multiple virtual interfaces.

    I am sorry, but I cannot help you further with this as it does not relate to the HW or TI software.

    Regards

    Vineet