That's a short question with a long answer!
Layer 2 protocols deal with media access addresses (e.g. MAC addresses) which are the physical addresses of devices on the network segment and support communications between them on the same segment or within the same physical LAN. Layer 3 protocols deal with network addresses (e.g. IP addresses) which can identify devices uniquely within an internetwork and allow for routing and transport of traffic between different networks.
For more information on the OSI model layers, routing and many other topics have a look through the menus along the top of the Firewall.cx home page
Re: Layer 2&3 protocols
11 years 3 months ago #20440
You can think of Layer 3 as logical addressing and routing. Layer 3 is where we map our own IP Addressing scheme's onto the machines and create a routed network.
Layer 2 is more physical addressing which is based on the Physical MAC (Media Access Control) address on the Network Interface Card. Since Layer 2 is not a routable layer, this provides a directed communication at this layer. If the Destination Machine is on this segment of the network, then the Source Machine will talk directly to it using the MAC address, otherwise it will talk directly to the Default Gateway in order to then route the traffic through the network. ARP is the protocol at Layer 2 that provides the IP to MAC address look up (RARP provides this functionality the other way around, MAC to IP Address).
As i said, there are loads of articles that i would recommend reading through.