Comware Based
1819684 Members
3532 Online
109605 Solutions
New Discussion

find IP of a connected switch ...

 
grenzo
Frequent Advisor

find IP of a connected switch ...

Hi,

I have a switch JG236A in DHCP and I connected it to a port of a JF290A module.
How do I know the IP assigned to switch JG236A  having the mac address?

 

Thanks

7 REPLIES 7
Ivan_B
HPE Pro

Re: find IP of a connected switch ...

Hi @grenzo!

This switch may have many IP addresses - one or more per Vlan-interface. And also it may have just VLANs without SVI (Vlan-interface), so it doesn't work like this - plug a cable to arbitrary port and access the switch. Also, even if you are lucky enough and the port you are connected on is Access and its VLAN has Vlan-interface, it doesn't mean it can't have an ACL that blocks connection from clients in this VLAN to the switch itself allowing only transit traffic. Also, even if the switch allows VLAN traffic to reach its IP of the Vlan-interface, it doesn't mean you can telnet or ssh to it. You may be able to, but both protocols should be explicitly configured.

Generally speaking you could use a network scanner like Nmap and try to scan the whole local subnet for active hosts, then find each host's MAC and compare it with the MAC you already know, but for this task you need to know the subnet you are in. If you decide to go this way - https://nmap.org - they have very devent documentation. Also since it's a free and quite popular tool you won't have issues finding help for your scanning needs.

For me the only valid way to find out IP addresses that belong to your switch is console connection to the switch. And then you can do whatever you need - look for IP addresses by "display ip interface brief", change configuration, whatever. 

I am an HPE employee

Accept or Kudo

grenzo
Frequent Advisor

Re: find IP of a connected switch ...

ok, but the switch is in a remote place, commands like
sh mac-address-table | include MAC
don't work?
Ivan_B
HPE Pro

Re: find IP of a connected switch ...

How can you run any command if you don't know the IP of the switch, therefore you can't establish a CLI session over a telnet or ssh and therefore you can't run any command? 

Sorry, but let's clarify the situation. Do you want to say that you don't want to find an IP address of the switch itself, but you want to find an IP of a client connected to the switch? Because your initial message is quite confusing....

I am an HPE employee

Accept or Kudo

grenzo
Frequent Advisor

Re: find IP of a connected switch ...

 
Sorry, I connect with telnet to module 
JF290A and to this module I have connected switch JG236A of which I would like to know the IP

Thanks

Ivan_B
HPE Pro

Re: find IP of a connected switch ...

JG236A is a module for 7500 switch. Your PC and 5120 (JG236A) are connected to the same module... Ok, so one way to find an IP address by MAC address is to look in ARP table:

 

display arp all | include <mac_address>

 

MAC address should be in the following format: xxxx-xxxx-xxxx.

If you won't find anything, it will mean that 7500 either doesn't have Vlan-interface in the VLAN where 5120's IP resides or 7500's Vlan-interface doesn't get anything from the 5120 by ARP.

Another way - 5120 may announce to 7500 its management IP address by LLDP, so use this command to find it out:

 

display lldp neighbor-information

 

or if you know the port on the 7500 where 5120 is connected, you can use more precise command:

 

display lldp neighbor-information interface <port_number>

 

 

Hope this helps!

 

I am an HPE employee

Accept or Kudo

grenzo
Frequent Advisor

Re: find IP of a connected switch ...

ok i did this

[CORE-XXX]display lldp neighbor-information

LLDP neighbor-information of port 145[Ten-GigabitEthernet3/0/1]:
Neighbor index : 1
Update time : 482 days,0 hours,3 minutes,50 seconds
Chassis type : MAC address
Chassis ID : cc3e-5f47-0d75
Port ID type : Interface name
Port ID : Ten-GigabitEthernet1/1/1
Port description : Ten-GigabitEthernet1/1/1 Interface
System name : HP
System description : HP Comware Platform Software, Software Version 5.20.99 Release 2222P11
HP A5120-24G-PoE+ EI Switch with 2 Interface Slots
Copyright (c) 2010-2018 Hewlett Packard Enterprise Development LP
System capabilities supported : Bridge,Router
System capabilities enabled : Bridge,Router

Port VLAN ID(PVID): 1

Port and protocol VLAN ID(PPVID) : 0
Port and protocol VLAN supported : Yes
Port and protocol VLAN enabled : No

VLAN name of VLAN 1: VLAN 0001

Auto-negotiation supported : Yes
Auto-negotiation enabled : No
OperMau : speed(10000)/duplex(Full)

Power port class : PSE
PSE power supported : No
PSE power enabled : No
PSE pairs control ability : No
Power pairs : Signal
Port power classification : Class 0

Link aggregation supported : Yes
Link aggregation enabled : No
Aggregation port ID : 0

Maximum frame Size: 9216

-----

It found JG236A. How do I know the IP address it got from the DHCP server?

 

Thanks

Ivan_B
HPE Pro

Re: find IP of a connected switch ...

Bad luck, your switch does not report its management IP. Then ARP table is your only hope.

I am an HPE employee

Accept or Kudo