In this article I want to show you how you can find devices that are attached to a juniper router.
Search the MAC table
You can print out the entire mac table using this command
> show ethernet switching table
If you want to know what is connected to a specific interface use this
> show ethernet switching-table interface ge-0/0/2
If you know the MAC of the device you are looking for, this command will find it
> show ethernet switching-table | match <string>
If you only want to see what devices are connected to the Gigabit Ethernet interfaces do this > show ehternet switching table | match ge-
Be careful… if you use aggregated interfaces (AE) or glas modules (SFP) this search pattern would not work.
Cheers, Ori