[j-nsp] juniper switch ex2200 how to find port from ip address?

Evangelos Kanarelis evangelos.kanarelis at saffrondigital.com
Tue Aug 26 08:43:06 EDT 2014


This has now been resolved.

Managed to get access to the core switch and used the arp table.

Thank you all for your help :-)

Angelo Kanarelis
Infrastructure Support Engineer


   
T: +44 (0) 207 421 2575  M: +44(0) 779 5613721
2nd Floor, Nexus Place, 25 Farringdon Street, London, EC4A4AB


-----Original Message-----
From: juniper-nsp [mailto:juniper-nsp-bounces at puck.nether.net] On Behalf Of Phil Mayers
Sent: 26 August 2014 13:06
To: juniper-nsp at puck.nether.net
Subject: Re: [j-nsp] juniper switch ex2200 how to find port from ip address?

On 26/08/14 12:22, Evangelos Kanarelis wrote:
> Hello everybody
>
> I am relatively new to networking and I am currently managing a few
> EX2200 switches.
>
> I need to find to which port a machine is connected to, but all I have 
> is an IP Address. I know that I can use show ethernet-switching table 
> brief but unfortunately I do not have the MAC address.
>
> Any help would be greatly appreciated.

When you have time, consider looking into running something like Netdisco against your switches and routers.

Without a MAC, it's not straightforward.

It's not really difficult either, but if you're new to networking all the suggestions I can think of (put an IP address on the ports vlan, ping the host, look in the ARP table; put a logging firewall filter in, look for matches; enable DHCP/ARP snooping) carry a risk of breaking things.

It would be a lot easier if you could find the MAC address from the router. Can you really not do that?

Or if you can get to the host, just unplug then re-attach the host, then look in the switch logs for which port just came up.

If not, the "safest" thing is probably to modify the switch to have an IP address on the port VLAN and ping the host, then find the MAC from the ARP table like so:

== Add the IP to the vlan ==

configure
set vlan <name> l3-interface vlan.<tag>
set interfaces vlan unit <tag> family inet address <ip/mask> commit

== Find the IP/MAC/port ==

run ping <ip> count 1
run show arp no-resolve hostname <ip>
run show ethernet-switching table | match <MAC from the ARP output>

== Undo adding the IP

rollback 1
commit

_______________________________________________
juniper-nsp mailing list juniper-nsp at puck.nether.net https://puck.nether.net/mailman/listinfo/juniper-nsp



More information about the juniper-nsp mailing list