![]() #PING SWITCH FOR MAC ADDRESS AND SHIW WHICH PORT MAC#Since Host 1 doesn’t know exactly where Host 2 is, Host 1 broadcasts an ARP request to all the devices on the local subnet asking, “What’s the MAC address for Host 2’s IP address?”. Host 1 can use ARP to discover Host 2’s MAC address. Host 1 will know Host 2’s IP address (192.168.0.10 in our example), but to communicate with Host 2 directly, Host 1 also needs to know Host 2’s MAC address.Įnter the ARP table. Say you have a device (Host 1) that needs to communicate with another device (Host 2) on the same subnet. While IP addresses are unique within a local network, they’re assigned logically, rather than physically, so a device’s IP address can change over time. It’s used at the network layer to communicate with devices both in and outside of the local network. It’s used at the data link layer to handle device-to-device communication within the same network.Īn IP address is a 32-bit address that’s assigned (either manually or through another service like DHCP) to a device when it’s connected to a network. It’s a 48-bit address that doesn’t change as the device moves from network to network. To fully wrap our heads around how the ARP table works, we need to start with a quick explanation of what MAC and IP addresses are, and how they relate to specific OSI model layers, namely Layer 2, the data link layer, and Layer 3, the network layer.Ī MAC address is a unique ID assigned to every network-connected device by the manufacturer. If there’s no record on the ARP table for a specific IP address destination, ARP will need to send out a broadcast message to all devices in that specific subnet to determine what the receiver MAC address should be. Once a MAC and IP address pair is learned, it’s kept in the ARP table for a specified period of time. Each device that’s connected to a network has its own ARP table, responsible for storing the address pairs that a specific device has communicated with.ĪRP is critical network communication, so pairs of MAC and IP addresses don’t need to be discovered (and rediscovered) for every data packet sent. It’s used to record the discovered MAC and IP address pairs of devices connected to a network. This critical function allows for the discovery of a devices’ MAC (media access control) address based on its known IP address.īy extension, an ARP table is simply the method for storing the information discovered through ARP. (ETA: What if you can't get to the Console port? How do you get the IP address of the switch in order to SSH or (if you must) Telnet in?)Ĭouldn't you just use CDP? #show cdp nei detail will show you the ip of the connected devices.ARP (Address Resolution Protocol) is the protocol that bridges Layer 2 and Layer 3 of the OSI model, which in the typical TCP/IP stack is effectively gluing together the Ethernet and Internet Protocol layers. The amazing thing to me is, this far into the 21st Century, this is still the only way I could find to get this information - i.e. Also, 'sh ip arp | i 0/24' will show just the MAC address(es) on that port.) If you're all Cisco, 'show cdp neighbor' (or 'sh cdp nei') will get you to the next switch. (Small tip: When you see a large number of MAC addresses showing up on a single port, there's a switch on that port into which those MAC addresses are connected. It helps to Ping the subnet's broadcast address (e.g. :^D After beating Google to death over it, hoping for some useful tool, I ended up using exactly the same process (plus the online MAC address lookup to ID the device manufacturer), so I can affirm this works perfectly, if you work it.Īs you can see, the 'sh arp' or 'sh ip arp' commands also give you the MAC addresses, so essentially the 'sh mac add' is only to get the port in which the device is connected. Thanks for posting this *after* I finished a "What's Connected Where" jihad on our network. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |