Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to show on a switch which ports are connect to another switch 2

Status
Not open for further replies.

surfbum99

Technical User
May 8, 2006
81
GB
Hi there,

One part of a switch practical exam question was finding out which MAC addresses of ports are connected to other switches. Is there a nice command to do this?

Trouble is with "show interfaces" is that is shows all of them and not the connected ones.

Question was like, what port is 00:AE:E1:00:B2:C9 connected to 00:B3:F4:F8:C1:C5?

And you have a terminal screen on the switch which is connected to two or three other switches.

 
surfbum99 you sure spam the forum with all this test questions. The best way to learn is trying to figure it out yourself first if you can't then come for help. buy a router sim or actual routers and try to learn from there.
 
surfbum99,

A good CCNA study guide is -
CCNA: Cisco Certified Network Associate Study Guide, 5th Edition (640-801)
by Todd Lammle
Sybex - Published January 2005, 720 pages, ISBN 0782143911 about $30 online and even less used!!


Also Google should be your best friend!!!

Hope this helps!



E.A. Broda
CCNA, CCDA, CCAI, Network +
 
Hi,

I have got two routers at home, 2611 with dual ethernet cards, and a 1761. What I haven't got it a switch :-(

I've tried at work a few commands on a switch there,

show spanning-tree for the root bridge for example

show interfaces trunk

but when you do a show interfaces it mentions all of them, and their mac addresses whether they are live or not.

Just wanted to know if there is a command to save time in an exam where it only lists the active ports which are connected to different switches
 
sh cdp neigh

this is show the directly connected switch/routers
 
Hello,

The best place to look for MACs is the switch's CAM table. The easiest (and IMHO fastest) way is to do show mac-address-table address XXXX.XXXX.XXXX. This would list the interface.
 
Hi,

Many thanks for the replies. Hang on I'm getting a bit confused he as usual. Looking at the config of a switch we have at work. There seems to be six FastEthernet interfaces and ports 1 to 48, e.g 1/1 to 1/48, 2/1 to 2/48 etc.

So is it the case that each port has a MAC address or the interface as a whole has the MAC address?

what makes the config even more confusing is that there are port-channels as well.

In the exam question it simply asks which interface is the following and where is it connecting to and gives you two MAC addresses.


In the diagram sw1 is connected to sw2 and sw3, they want you to find out which port the mac address is assicoated with and find out where this mac address is connecting to and if its the same as they ask.

MAC address 1 00:45:23:12:E1:F1 (somewhere on sw1) this connects to another port on either sw2 or sw3.
 
Looking at the config of a switch we have at work. There seems to be six FastEthernet interfaces and ports 1 to 48, e.g 1/1 to 1/48, 2/1 to 2/48 etc."

Do you mean that there are six 48-port modules?

"In the diagram sw1 is connected to sw2 and sw3, they want you to find out which port the mac address is assicoated with and find out where this mac address is connecting to and if its the same as they ask."

I'm not sure I understand your question exactly but here's my shot again. Each switch has a management IP, I assume and each IP is associated with a MAC.

One way to find out how each switch is connected is to do show cdp neigh det (as someone had suggested earlier) if cdp is enabled.

If you really want to understand how a switch builds its forwarding database table/CAM table, then do the command I stated in my previous post. (thats for IOS) For CatOS, do show cam XX-XX-XX-XX-XX-XX. SW1 would have each MAC of SW2 and SW3 on specific ports. As for port-channels, just think of them as one big port.

 
Thanks for this, mm getting there.

In the question it has one mac address which belongs to sw1, and one mac address which belongs to either sw2 or sw3.
So the idea is you have to find out which port this mac address is associated with and where its connecting to.
 
sh cdp nei det will show which interface and ALL capabilities of attached device, but I do not think it will show MAC. But once you know the interface, sh mac int should sort it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top