English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hi I just want to know which IP is connected to which port of switch.
i.e how to map ip address to port number on switch ?
Thanks

2007-06-13 02:24:54 · 2 answers · asked by adesh 1 in Computers & Internet Computer Networking

2 answers

Without actually tracing the wire, you can't. You can start at the switch and unplug one wire at a time to see which computer (you can get IP at that computer) disconnects. But since these are probably DHCPd machines the next reboot can change the IP!

There are MANAGED switches which can tell this but the normal inexpensive ones don't have that ability!

Basically a switch is just not "smart" enough to report this information without a processor to track the information.

2007-06-13 02:38:21 · answer #1 · answered by Tracy L 7 · 0 0

This is an interesting question, and it can be done - but without some tools, the process is quite manual and only serves well in troubleshooting. I will lay out the manual process, then give you a link to a tool if this is the kind of work that needs to happen more commonly for you. I will assume here that the switch is Layer 2 strictly, and that you have a router somewhere to move these L2 frames as L3 packets per VLAN. If you actually have a L3 switch - these steps can be condensed.

The switch of course is a Layer 2 device and therefore tracks L2 addresses - or MAC addresses. When those addresses need to go across a boundary (router) there will be a corresponding ARP entry in the router for that MAC address. I am a Cisco oriented engineer, so I can't promise that this syntax will work for you, but to find the MAC on the switch of a port you can use one of two commands (depending on the OS you are running):
CatOS: show cam ... e.g. show cam fa0/13
IOS: show mac-address-table interface

Now you have the MAC address - head to the router for that VLAN and look at his ARP entries, if you have the ability to filter the MAC somehow (in Cisco we do this with the | or pipe operator) then it becomes much easier. Again the Cisco commands would be:

show arp
or with pipe
show arp | inc HHHH.HHHH.HHHH

In troubleshooting this can be a very helpful tool, especially when you are not sure if the issue resides at L2 or L3. If you have need to do this more commonly than troubleshooting, there are tools (fee based is all I know - open source ones may well exist) which can help. My favorite is SolarWinds which is a regular Swiss army knife of network tools - it has a port mapper application which I know works quite well with Cisco gear at least. If you are not using Cisco gear, find out from the manufacture if on link-up and SNMP trap could be generated with the stations MAC address being sent - this is not uncommon as it is used in a lot of security products - if it is, and you are a "script savvy person" you could likely grab those MAC's, grab the arp table from the router, and work out a front end to tie them together. I hope some of this helps answer your question.

2007-06-14 01:48:46 · answer #2 · answered by Anonymous · 0 0

fedest.com, questions and answers