[PLUG] Lan loops - follow on PoE injecto

Russell Senior russell at personaltelco.net
Thu Dec 26 02:47:39 UTC 2019


> Even more interesting is that you might be able to even get a diagram of
> the switch/router backplane that will show you how the ports are physically
> & logically connected. Such as this diagram I found in the OpenWrt
> documentation. (See attached screenshot "Diagram")
>

A fun command in OpenWrt is:

  swconfig dev switch0 show

or, to reduce some of the piles of information:

  swconfig dev switch0 show | grep port

Here's an example from my Buffalo:

# swconfig dev switch0 show | grep port
        mirror_monitor_port: 0
        mirror_source_port: 0
        link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
        link: port:1 link:down
        link: port:2 link:down
        link: port:3 link:down
        link: port:4 link:up speed:100baseT full-duplex auto
        ports: 0t 1 2 3 4

In the case of this router, there are two interfaces on the SoC, one of
them is dedicated to by wan (eth1) and the other interface (eth0) is
connected to switch0's port 0. The numbering in swconfig doesn't
necessarily (sometimes does, sometimes doesn't) correspond to any labelling
on the outside of the device. The output above shows that one external
device is also connected to the switch on port 4 (at 100Mbps).

On another router, both WAN and LAN ports might be connected to the switch,
and separate VLANs are used so that the CPU can distinguish them.  Here's
the output from the DLink:

# swconfig dev switch0 show | grep port
        mirror_monitor_port: 0
        mirror_source_port: 0
        link: port:0 link:up speed:1000baseT full-duplex
        link: port:1 link:down
        link: port:2 link:down
        link: port:3 link:down
        link: port:4 link:down
        link: port:5 link:down
        link: port:6 link:up speed:1000baseT full-duplex
        link: port:7 link:down
        ports: 1 2 3 4 6t
        ports: 0 6t

Here, the CPU is attached to port 6 of the switch. The first VLAN includes
ports 1, 2, 3, and 4 (which correspond to the labelled LAN ports), and the
second VLAN includes port 0 (which is labelled the WAN port). The 't'
indicates that packets leaving that port are tagged. No 't' means that
packets leaving that port aren't tagged. In this case, only one port is
connected externally, the WAN port (at 1Gbps).



More information about the PLUG mailing list