0

i'm trying to determine the ip of the network switch several linux boxes are plugged into. Background: i need to know in which physical port they're plugged in, so the machines automatically detect their 'spatial placing' (Since a certain port is hard-wired to a specific location). The port detection itself is done via snmp, which works quite well, but obviously i need the ip of the switch.

What i'm doing at the moment is: run nmap (meh...) with just ping scan on the whole subnet (or scanning for telnet, since the switch has this port open) and afterwards check the arp cache and retrieve the ip by checking against the mac address, since i know what manufacturer part to look for.

Question: Is there some easier way (avoiding nmap), i already tried arp broadcasting, but that doesn't seem to give me an arp cache entry for the switch. The switch in question is an IGS-801M from Planet Technology (http://www.planet.com.tw/en/product/product.php?id=25685), the (six) devices are plugged in directly, nothing network'ish between them. The switch gets his ip assign via dhcp or even auto assigned (169.xxx), static ip is no option. I also tried stuff like traceroute and hoping the switch would show up as a hop, but since it just (quietly) forwards stuff to the gateway it won't show up. Any ideas?

  • What is wrong with nmap? With the right options, it would seem to be the right tool for the job. – mivk Feb 23 '14 at 12:45
0

It is probable your switch does not have an IP address (as a router would) and is switching on the data-link layer.

It may still be possible to detect the hops (which is what I'm guessing you want) but not with Nmap; which might be too high level rendering your switch invisible. Maybe this guy's recommendation of netdisco can help.

Here's a manual ctrl+f for level 2, I don't know, maybe there's a definitive answer in there. I don't know if it would hinder your quest if it was though.

  • The switch does have an ip address, but maybe in another way of meaning. Let me restate it: The web server (configuration interface) running on the switch has an ip address. This is all i need to get the snmp magic to work. – flipflop Feb 14 '14 at 12:10
0

You could try tracing cables, but as we all know sometimes that leads to massive frustration. In the event that the switch has CDP or lldp turned on you could use that to find out.

I know Debian includes packages for CDP and LLDP, but not sure about other distributions.

0

This switch is working in Layer 2, then the switch has not IP address. The IP protocol is Layer 3. You should search if the switch has a port of management (and the address to connect it).

0

The IGS-801M has a security feature supporting L2 to L4. So I'm guessing maybe it has an IP address.

  • Ping to broadcast ip address of the current network from the PC. All PCs are, by default, configured not to respond to broadcast pings, as a security measure. So the only responses you will get would be from the Switch ( and maybe from a router too if any)

OR

  • If, like you said, you know the OUI part of the mac, check the DHCP server for IP bindings.

PS: You can 'reserve' an IP for a mac address, from the DHCP server. Do this for the switch's mac with an IP you can remember, so you wont have to check everytime

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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