Forum has been slow, so let's talk about the often forgotten but never missed protocol - ARP.
http://en.wikipedia.org/wiki/A...ss_Resolution_Protocol
This is the glue that holds together datalink layer address, or layer2, and higher protocols like IP. Without it you could never talk to the computer next to you, your default gateway, etc. It is what maps layer3/IP addresses to layer2/MAC addresses.
So your computer wants to talk to another computer on the same LAN, the same IP subnet? The very first thing that computer will do is look at it ARP TABLE to see if it already has a mapping of the IP address to a cooresponding MAC address. You can look at your ARP TABLE on a computer with "arp -g" command.
This is mine:
C:\>arp -g
Interface: 192.168.1.147 --- 0x2
Internet Address Physical Address Type
192.168.1.1 00-04-5a-e1-97-4f dynamic
What this tells me is the IP address 192.168.1.1 has a MAC address of 00-04-5a-e1-979-4f. It also tells me that my computer has already sent out an ARP request, a layer2 BROADCAST, of "hey! If you're 192.168.1.1 you must respond to me and tell me your MAC address!" I want to talk to another IP address on my LAN - 192.168.1.250...
C:\>ping 192.168.1.250
Pinging 192.168.1.250 with 32 bytes of data:
Reply from 192.168.1.250: bytes=32 time=2ms TTL=255
Reply from 192.168.1.250: bytes=32 time=2ms TTL=255
Reply from 192.168.1.250: bytes=32 time=1ms TTL=255
Reply from 192.168.1.250: bytes=32 time=1ms TTL=255
Ping statistics for 192.168.1.250:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 2ms, Average = 1ms
C:\>arp -g
Interface: 192.168.1.147 --- 0x2
Internet Address Physical Address Type
192.168.1.1 00-04-5a-e1-97-4f dynamic
192.168.1.250 00-15-c6-e8-bf-dd dynamic
See there! My computer's ARP table didn't contain that entry before. But by trying to communicate at the IP layer (PING) I had to send an ARP request of "Who's got 192.168.1.250?" 192.168.1.250 responded to me and told me. But keep in mind this is still operating at the datalink/layer2 - there is NO ip/layer3 going on.
This function can be very important because if layer2 isn't correctly mapped to layer3 then anything above layer2 won't work. This can be very useful in troublshooting as you work your way up the OSI model - layer1 first, then check layer2 (ARP lives here), move up to layer3 and so on.
http://en.wikipedia.org/wiki/A...ss_Resolution_Protocol
This is the glue that holds together datalink layer address, or layer2, and higher protocols like IP. Without it you could never talk to the computer next to you, your default gateway, etc. It is what maps layer3/IP addresses to layer2/MAC addresses.
So your computer wants to talk to another computer on the same LAN, the same IP subnet? The very first thing that computer will do is look at it ARP TABLE to see if it already has a mapping of the IP address to a cooresponding MAC address. You can look at your ARP TABLE on a computer with "arp -g" command.
This is mine:
C:\>arp -g
Interface: 192.168.1.147 --- 0x2
Internet Address Physical Address Type
192.168.1.1 00-04-5a-e1-97-4f dynamic
What this tells me is the IP address 192.168.1.1 has a MAC address of 00-04-5a-e1-979-4f. It also tells me that my computer has already sent out an ARP request, a layer2 BROADCAST, of "hey! If you're 192.168.1.1 you must respond to me and tell me your MAC address!" I want to talk to another IP address on my LAN - 192.168.1.250...
C:\>ping 192.168.1.250
Pinging 192.168.1.250 with 32 bytes of data:
Reply from 192.168.1.250: bytes=32 time=2ms TTL=255
Reply from 192.168.1.250: bytes=32 time=2ms TTL=255
Reply from 192.168.1.250: bytes=32 time=1ms TTL=255
Reply from 192.168.1.250: bytes=32 time=1ms TTL=255
Ping statistics for 192.168.1.250:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 2ms, Average = 1ms
C:\>arp -g
Interface: 192.168.1.147 --- 0x2
Internet Address Physical Address Type
192.168.1.1 00-04-5a-e1-97-4f dynamic
192.168.1.250 00-15-c6-e8-bf-dd dynamic
See there! My computer's ARP table didn't contain that entry before. But by trying to communicate at the IP layer (PING) I had to send an ARP request of "Who's got 192.168.1.250?" 192.168.1.250 responded to me and told me. But keep in mind this is still operating at the datalink/layer2 - there is NO ip/layer3 going on.
This function can be very important because if layer2 isn't correctly mapped to layer3 then anything above layer2 won't work. This can be very useful in troublshooting as you work your way up the OSI model - layer1 first, then check layer2 (ARP lives here), move up to layer3 and so on.
