cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7289
Views
9
Helpful
7
Replies

What device is my node connected to (CLI)?

CiscoDaven
Level 1
Level 1

I am currently engaged in trying to locate what device my current node is connected to and what interface of that device I am connected to I.E.

-I know how to telnet (using putty)

-I can CMD prompt and ipconfig /all to get my devices information (and default gateway)

-I understand pinging/apr/cdp neighbors

However using these tools I cant quite seem to put togeather how to find the next immediate device and port I am connected to without that switch's direct IP address on hand.

2 Accepted Solutions

Accepted Solutions

Daniel McDavid
Level 1
Level 1

Make sure that Cisco Discovery Protocol (CDP) is enabled globally on the switch (cdp run) and on each port (cdp enable). These are the default settings, but may have been disabled for security reasons. Fire up Wireshark, filter by cdp packet type and move from port to port. CDP packets give you switch name, management IP, IOS version, and what port you are plugged in to (among other things).

View solution in original post

kcnajaf
Level 7
Level 7

Hi Dave,

The best way to do this to follow this path.

1) On host machine do a "ip config/all" and find the default gateway and MAC address of machine of that machine. This would be an L3 device

2) Then try "arp -a x.x.x.x" (where x.x.x.x is the ip address of the default gateway)

3) Now telnet/ssh on to the L3 device (the default gateway address) and issue "show mac-address-table address aaaa.bbbb.cccc" (where aaaa.bbbb.cccc is MAC address of your host).

4)This will give you switch port details of another switch to which this core is connected.

5) Now do a "sh cdp nei Gix/x details" and find the ip address details of that switch.

6) Logon to the new switch and issue again "show mac-address-table address aaaa.bbbb.cccc" (where aaaa.bbbb.cccc is MAC address of your host).

7)Continue this process till you dont find any output for "sh cdp nei details". That would be the port where your host machine is connected.

Please be aware that this path will work only in a Cisco environment where CDP is enabled.

Hope that helps.

Regards

Najaf

Please rate when applicable or helpful !!!


View solution in original post

7 Replies 7

InayathUlla Sharieff
Cisco Employee
Cisco Employee

Hi Daven,

Let me try to clarify or answer on this:

1- Which device are you taking about ? I am assuming this is Cisco Switch(Model?)

2- If you are not sure were and which devices are connected to the switch then its quite hard for you to be abl to check the same through remotely. But still bit of hardwork you should be able to achive what you required.

3- Coming on towards Cisco Switch here are below some of the commands which would help you to find out the end stations connected;

      a- show ip int br : This will give you the interface status and also the description if configured any.(If the      server/network guy have confiugred the host details under description its a easy way.

      b- Show ip arp  >> This gives you the mac address and interface details connected. You would need to findout your      host mac address to corelate the same with the one displayed on the switch.

      c-sh mac address-table.

Further queries:

==============

-I know how to telnet (using putty)  >>> There are couple of third party tools to use to login to the devices.(Putty,Secure CRT etc...

-I can CMD prompt and ipconfig /all to get my devices information (and default gateway) >>> This you would be doing on end stations or servers.(Doesnt work on Cisco Switches.)

-I understand pinging/apr/cdp neighbors  >>> Thats good if you have these understanding....but what required from our side on this?

5-

However using these tools I cant quite seem to put togeather how to find the next immediate device and port I am connected to without that switch's direct IP address on hand

Answer:

======>>On Switch you would have to check the "show cdp ne details" this would give you the interface and ip address of the neighbor device which is connected to this switch.

Please revert back for any clarification.

HTH

Regards

Inayath

*Plz rate all usefull posts.

You giving me some great tips I appreciate it, I should have clarified the situation. 

I am plugging my notebook into a jack to see if the port if properly connected, after doing this I need to gather information from whatever device is on the other side. I would like to avoid going from 50 different desks tracing lines physically to find out where they go.

1)Is the port active? (easy)

2)what device is on the other side of the connection without knowing the physical location (most likely a Cat-3750 series switch)

3)how can I Telnet to this devices IP address (without having it onhand) to gather information.

Hi Daven,

I believe this info is already provided in my earlier post. Does that not helped you?

Okay let me try it once again :

I am plugging my notebook into a jack to see if the port if properly connected, after doing this I need to gather information from whatever device is on the other side. I would like to avoid going from 50 different desks tracing lines physically to find out where they go.

Answer: I belive you need to use some software tool to track this. There is nothing like this present on the notebook which would say it.

1)Is the port active? (easy)>>>>>> This you can see on the switch. But to check which port this pc is connected you need to check the same using the mac address. Again if you are using like any monitoring tool that would help you in checking what device coming in and going out.

2)what device is on the other side of the connection without knowing the physical location (most likely a Cat-3750 series switch)

Answer: This one is easy. Just do show cdp neighbor detail and it will give you all the neighbors connected to this device with there respective ip address. You can use the ip address displayed and telnet to the same.

3)how can I Telnet to this devices IP address (without having it onhand) to gather information.

> If you have some console or again any third party tool were you see all the devices ( Example:Cisco open view /works or other tool) which will be having complete infomraiton of your devices in your network. There is also a way to login tot he devices using there names if you have configured it in that way.

Hope this answered else please revert back with any clarification.

Regards

Inayath

*Plz rate all usefull posts.

Mate,

this is pretty stock standard problem diagnostics.

You need two things:

1-the mac address of your note book's NIC

2-the IP address assigned to that same NIC.

log onto any device in the network, but preferably logically as close to your notebook as possible,

trace back to the subnet of your NIC (arp, routiung table etc).

once you have established the subnet,  check the cam table of the switch and follow the path, you will eventually find the switch (or node as you call it) you have plugged into/.

=============================
Please remember to rate useful posts, by clicking on the stars below. 

=============================

Please remember to rate useful posts, by clicking on the stars below.

Daniel McDavid
Level 1
Level 1

Make sure that Cisco Discovery Protocol (CDP) is enabled globally on the switch (cdp run) and on each port (cdp enable). These are the default settings, but may have been disabled for security reasons. Fire up Wireshark, filter by cdp packet type and move from port to port. CDP packets give you switch name, management IP, IOS version, and what port you are plugged in to (among other things).

kcnajaf
Level 7
Level 7

Hi Dave,

The best way to do this to follow this path.

1) On host machine do a "ip config/all" and find the default gateway and MAC address of machine of that machine. This would be an L3 device

2) Then try "arp -a x.x.x.x" (where x.x.x.x is the ip address of the default gateway)

3) Now telnet/ssh on to the L3 device (the default gateway address) and issue "show mac-address-table address aaaa.bbbb.cccc" (where aaaa.bbbb.cccc is MAC address of your host).

4)This will give you switch port details of another switch to which this core is connected.

5) Now do a "sh cdp nei Gix/x details" and find the ip address details of that switch.

6) Logon to the new switch and issue again "show mac-address-table address aaaa.bbbb.cccc" (where aaaa.bbbb.cccc is MAC address of your host).

7)Continue this process till you dont find any output for "sh cdp nei details". That would be the port where your host machine is connected.

Please be aware that this path will work only in a Cisco environment where CDP is enabled.

Hope that helps.

Regards

Najaf

Please rate when applicable or helpful !!!


Thanks kcnajaf@25070, You made my day.

Review Cisco Networking for a $25 gift card