1

OS: JunOS 19.3

Hello all,

I have an unusual problem.

I have two juniper switches (A) and (B) that are connected on multiple ports

I'm aware that this makes no sense for networking.

This setup is not meant to be run in a networking environment.

No real traffic will ever run through this configuration. It is only used to confirm that the two switches are connected via a certain ports. It is part of a test-setup that has to confirm that an internal switch is correctly connected to a labeled panel.

 |SWITCH A  port x| ----- |PANEL [label foo] | ---- [port y SWITCH B]

Test: If switch (A) port x (mac-address) is connected to port y (mac-address) switch (B) then Switch A is connected to the correct panel port with label 'foo'

Spanning tree is activated on both switches, therefore of course, all but one port is down. Since I have to login to Switch B from Switch A, I can not disable STP or this traffic would loop.

I want to find the mac addresses of all connected ports of switch (B) on switch (A) this would work on switch (A) with show ethernet-switching table, but since the ports are blocked, it doesn't work

I tried to use lldp. but that doesn't work on blocked ports either.

I'm obviously not a juniper expert. Has anybody a (creative) idea, how to accomplish this? TIA

2
  • On all devices I've worked with, LLDP or CDP continued to work even when a port was blocked by STP. Blocked ports aren't down but don't participate in forwarding - therefore, no MAC associations should be present either.
    – Zac67
    Commented Nov 11, 2021 at 9:07
  • Did any answer help you? if so, you should accept the answer so that the question does not keep popping up forever, looking for an answer. Alternatively, you could post and accept your own answer.
    – Ron Maupin
    Commented Dec 23, 2021 at 22:30

2 Answers 2

3

I want to find the mac addresses of all connected ports of switch (B) on switch (A) this would work on switch (A) with show ethernet-switching table, but since the ports are blocked, it doesn't work

This won't actually give you the information you want. show ethernet-switching table will show you MAC-addresses learnt on these switch ports, but any traffic you see will most-likely NOT will not be sourced from the hardware MAC of the neighbour switch port (if you see anything at all), but from any hosts connected to that switch (which would all the be same MAC address on every port).

The easiest way to do what you're trying to do would be with LLDP, so try this:

Have a single port (let's say port ge-0/0/0) on each switch that carries the VLAN that will allow you to manage the remote switch, and link that through a known patch panel port so you can connect to both devices.

Now, assuming you're using a 48-port switch and need to connect all 48 ports, apply the following configuration:

wildcard range delete interfaces ge-0/0/[1-47]
wildcard range set interfaces ge-0/0/[1-47] unit 0 family inet
commit

This will configure all interfaces as routed/L3 ports meaning that spanning-tree will no longer be active/required, so all ports will be able to be connected to the other switch at the same time. LLDP will also still be operational on routed ports.

As a bonus, you should only need to do the above on one of the two switches.

0

I'm aware that this makes no sense for networking.

Oh, it might.

Reasonable configurations are:

  • link aggregation
  • dedicated link for separate VLANs or VLAN groups
  • redundant links used with RSTP/MSTP

Since I have to login to Switch B from Switch A, I can not disable STP or this traffic would loop.

If you put both ports in different VLANs (at least on one switch), there's no bridge loop and no need for STP. Alternatively, if you configure a static link aggregation group (LAG) there's no loop, MAC addresses might show up on the logical interface only, but LLDP/CDP should work.

Even if you stick to STP, the spanning tree status (show spanning-tree interface) displays the detected loop which is pretty much all you need to know about the (working) link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.