01-25-2007 01:24 AM - edited 03-03-2019 03:29 PM
I have a router connected to a switch. I know the IP of the router and the port its connected to on the switch. The switch is not labelled but I have a suspicion I know which IP Address. I want to check if the router is connected to this switch on this port.
I need the router MAC Address. How do I find it? The switch is an HP and the cable runs from Fe0/0 on the router to the port on the switch.
01-25-2007 01:40 AM
Hi!
Good Day! If it is a layer 2 switch, do a command to show the MAC address table. The router MAC address can be seen associated with the port where the router is connected.
Hope this helps,
Regards,
Albert
01-25-2007 01:42 AM
Thanks for info.
It is layer 2 but I need to get the router's mac address from the router itself.... Then finding it on the switch is not a problem
01-25-2007 02:04 AM
Hi!
For Cisco Routers, The MAC address can be seen using the show interface command.
Router# show interfaces
Ethernet 0 is up, line protocol is up
Hardware is MCI Ethernet, address is 0000.0c00.750c (bia 0000.0c00.750c)
Internet address is 10.108.28.8, subnet mask is 255.255.255.0
Please rate if found helpful.
Thanks and Regards,
Albert
01-25-2007 02:13 AM
Ok ... so was I doing the right thing then. I did get teh MAC addie but cannot find it on the switch. Could be the switch IP I have in mind is not the correct one. This sucks!
By the way..... anyone know of an EXTREMELY good and SIMPLE tutorial that teaches about subnetting and how to find out the subnet of a network address?
01-25-2007 02:22 AM
Hi!
The Sybex CCNA reviewer is a good book. Here are some tips for subnetting.
If you're given a /28, identify the masked bits (1) and unmasked bits (0). 2^(masked bits) will be your no. of subnets and (2^[unmasked bits]-2) will be your no. of hosts.
/28 -> 11111111.11111111.11111111.11110000
Class C
Masked bits = 1111 = 4
Unmasked bits = 0000 =4
No. of subnets = 2^4 = 16 if ip subnet 0 is not allowed but you have to remove the first and last subnet giving you a total of 14 subnets.
No. of hosts = (2^4)-2 = 14 because the network and broadcast address is not used.
To identify the network address, find the decimal eqivalent of the octet. For example, 11110000 gives you 240. Then subtract it from 256. This will be your block size thus your 1st address will be .0 then .16 then so on... Your broadcast address is 1 less than the next network address like .15 then .31 and so on...
Another example:
Class C /26 -> 11111111.11111111.11111111.11000000
Masked bits = 11 = 2
Unmasked bits = 000000 = 6
No. of subnets = 2^2 = 4
No. of hosts = (2^6)-2 = 62
256 - 192 = 64
Network address = .0, .64, .128 and so on...
Broadcast address = .63, .127, .191 and so on...
This also applies to Class A and Class B but raising 2 to unmasked bits of more than 8 is quite difficult to calculate mentally. ?
I have also attached an excel file about subnetting.
Again, please rate if found helpful.
Thanks and Regards,
Albert
01-26-2007 02:49 AM
Hi,
I am sure the HP Switches also run CDP. So if you are signed on the Router then type in "show cdp neigh" or "show cdp neigh detail". It will give the information about the switch and switchport where this router is connected. You will also get the other useful information about that Switch including Switch Hardware, software, ip address, switch port, speed and duplex etc.
HTH
Shaheen
01-26-2007 03:07 AM
Thanks for trying to help Shaheen but this dont work.
cdp enabled on the router but I doubt its enabled on the switch. is there another way?
01-26-2007 09:46 AM
If I understand correctly you may be able to do the following :
1) if your PC is in the same subnet as the IP you suspect is the switch, then ping the IP and afterwards run the ARP -a command which will display the contents of the PCs ARP cache, find the MAC associated with the IP, then check to see if the vendor block is one owned by HP.
2) if your PC is NOT in the same subnet :
- ping the suspected switch IP to ensure that the MAC address is in the table (they time out after 5 minutes)
- sho mac-a dyn int fa0/0 (assuming IOS)
* this will give you the complete list of MACs on that port
- sho arp
* you should find the suspect IP and it's associated MAC, which should also be in the list displayed above, and again you can check thatthe vendor block is owned by HP
Dave
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide