Posts Tagged ‘tips&tricks’

Locating the Cisco Switchport of a Server based on IP Address

Thursday, October 23rd, 2008

Locating computers or servers is a task I often do, and this is a tutorial on how I do it.

I have mentioned the do command, and mentioned it again in my 5 Magic Cisco Tips and Tricks article.

I am now going to give you more of a tutorial!

Locating a machine on switch port in a larger Cisco network
If you only have the IP address, just run this command:

show ip route *ipaddress*

The router will now tell you which interface this subnet is connected to.

In a usual setting you might have routed a larger block of addresses to for example a routing switch.
If this is the case, you will need to investigate layer 3 further down to that switch/router.

When you have found the IP address as directly connected issue this command to look up the MAC address in the ARP table.

show ip arp | include *ipaddress*

This will output the MAC address for this IP address, you can use this with this command:

show mac address-table | include *macaddress*

You will now see which port this hardware address is connected to.

In case you have a switch connected, you will need do the show mac address-table command on that switch also.

You can often identify switches by doing a show mac address-table interface *port*
If this gives a long list of MAC addresses with the TYPE dynamic, this is probably a switch.

Saving time with the cisco ‘do’ command

Saturday, September 6th, 2008

This is probably the most usefull and most overlooked command in Cisco IOS.

Have you ever been annoyed from having to leave config mode because you wanted to run exec commands?
Like if you are configuring an interface, and you want to look at that interface configuration?

Well, look no longer!
do To run exec commands in config mode

You can now use do show running-config interface fastethernet 2/0 while you are configuring fa 2/0!

Do you have other time saving commands?   Leave a comment!