Identifying Ports

Unanswered Question
Sep 4th, 2009
User Badges:

I know this is a windows problem more than cisco, but this is what I'm limited to. I'm a PFC in the United States Army, and in a position to where I need to know the ports connected to each computer. I have access to the computers, just not the switches. And my bosses want a detailed diagram of the network in the building. I'm currently in Iraq so I didn't make this network and the wires are in such a way that, just looking at our switch room gives me a headache.

So what I'm wondering is, is there a windows command, that I would be able to identify what port a computer is attached to. I have been through Cisco classes at high school but am uncertified and join the military to pay for such endeavours, so I'm not super savy as I'm sure all you guys are. Either way, just thank you guys for atleast taking the time to read this


PFC Green

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
ktwaddell Fri, 09/04/2009 - 07:19
User Badges:


Can you not talk with the network admins for the switch?


you could use some SNMP software that will 'get' the switch info, but you will need the community strings in order to that, hence talking to you're network admin for the switches again.

that is all I can think off

good luck

Kev Fri, 09/04/2009 - 07:54
User Badges:

Well normally that wouldn't be a problem. The problem stems from that lack of ability of us to be able to console directly into the switch. We are not given permission.

Secondly the lack of communication, we make changes to our network daily, and all have to be approved but through that one central hub (the net admin).

That being said, the net admin is in charge of this entire base, so just imagine battalion after battalion asking for information because either a)They forgot or b)Thier new and fell in on a amazing disorganized network. So that's pretty much my current prediciment.

Like what about ping or tracert. Is there no way to like...(ride the packets) for info. Now as to your post I do have WUG but don't know about the community strings in which your refering to sir.

hdecreis Fri, 09/04/2009 - 13:05
User Badges:


depending of the switch configuration (CDP / LLDP / RSTP active or not), you could try some ethereal/wireshark on the hosts and look at the port information either in the BPDUs or CDP/LLDP packets ?

On unix, you have a package named "cdpr" which gives all CDP information it receives on a given port, I'm sure there is something alike in Windows if parsing packets with wireshark is not an option...



Jerry Ye Fri, 09/04/2009 - 13:25
User Badges:
  • Cisco Employee,

Since you are in the military, you better check with your boss to see will he takes the full responsibility if you are going to put sniffer on your hosts. These type of software might consider unauthorized software in your situation, this can get you in trouble big time.

Remember to check your AR also.



Mohamed Sobair Fri, 09/04/2009 - 13:23
User Badges:
  • Gold, 750 points or more

Hi Justin,

please issue the following command on the Command prompt:

netstat -a

netstat -n

it should show you the local address with the protocl and port number attached with the foreign address.


Mohamed Fri, 09/04/2009 - 14:04
User Badges:

Hey Jerry,

I'm not about to put something on the network that isn't approved. Here in my area they have an approved software list. I get all my stuff from that. Nothing more or less. But I do thank you for making sure, or trying to keep me honest. I know that there can be servere punishments for messing with the network.

Secondly, Mohamed. I did as asked, and I have previously done. Now unless I totally missed something the port numbers that the netstat command gives you is application and such ports correct? I need the physical ports of the switch I'm connecting to. Unless of course, I really did miss something in class.

But either way, this is a lot more support than I had previously had anticipated. Thank you guys very much for writing this stuff.

Mohamed Sobair Fri, 09/04/2009 - 14:38
User Badges:
  • Gold, 750 points or more

Hi Jusin,

Yes correct, it gives you the application ports. I actually missed the part of your question indicating what ports in the Switches. and yes you will need a sniffer to identify what are the physical ports on the switches.



Joseph W. Doherty Fri, 09/04/2009 - 16:00
User Badges:
  • Super Bronze, 10000 points or more

If you have access to see the switch, most have link status links. What you might try is have a buddy diconnect an active host jack while you watch the status lights. Not elegant, but doesn't require any software. (This assumes you can communicate with your buddy - i.e. you and he know when link status changed on remote [host] end.)

If it's a real rat's nest, first port might be hard to see go off/on. Hopefully, near by host ports are also near each other on switch, but even if not, as you identify more and more, less and less to check for off/on.

You don't need to use PC host on the remote end (for example, if there isn't one or it's off), a four port hub/switch or a laptop can be used to bring ports up/down. Sat, 09/05/2009 - 01:52
User Badges:

Yeah the system we use here is fickle. It seems when you do that, you seem to run into a 50/50 chance of the port being disabled. I see now that is most definately a software issue. I thank everyone for their help but I guess I'm going to be up our ceiling for the next year. Anyway, Thank you guys.

Joseph W. Doherty Sat, 09/05/2009 - 15:47
User Badges:
  • Super Bronze, 10000 points or more

Well that does make it more difficult, however similar technique can be used independently of the closet switch the link is connected to. I.e., for ports that the status link doesn't change, plug in device on remote side then try all the unknown links on your own standalone device (at the closet end).

Leo Laohoo Sun, 09/06/2009 - 14:42
User Badges:
  • Super Gold, 25000 points or more
  • Hall of Fame,

    The Hall of Fame designation is a lifetime achievement award based on significant overall achievements in the community. 

  • Cisco Designated VIP,

    2017 LAN, Wireless

If your superiors are reluctant to provide you with access to the appliances, then you can only do so much.

Ask them why you need access and they just might give it to you.

Enable commands such as "sh run" is just one of the few reasons you may want to have access to.


This Discussion