Hi,
For an OpenWrt package I am working on, I need to know the following things:
1) How many Ethernet switches are in the router
2) To which Ethernet interface they are attached to
Right now, I am using the output of "swconfig list" to know how many switches I have. For instance:
root@OpenWrt:~# swconfig list
Found: switch0 - eth0
However, sometimes swconfig does not give me the information as I would like. On a lantiq-based ARV7518PW:
root@OpenWrt:~# swconfig list
Found: switch0 - 1e180000.etop-ff
On a MT7620-based router:
root@OpenWrt:/# swconfig list
Found: switch0 - mt7620
Therefore, if I have more than one Ethernet devices in the router, how can I know for sure that "switch0" corresponds to "eth0" and not to another one (i.e. "eth1")?
Thank you very much for your help.