Network Interface Layer
Datagrams generated on the Internet layer will be sent down to the Network Interface layer, if we are sending data, or the Network Interface layer will get data from the network and send it to the Internet layer, if we are receiving data.
This layer is defined by what type of physical network your computer is connected to. Almost always your computer will be connected to an Ethernet network (wireless networks are also Ethernet networks like we will explain).
Like we said in the previous page, TCP/IP is a set of protocols that deals with layers 3 to 7 from the OSI reference model, while Ethernet is a set of protocols that deals with layers 1 and 2 from the OSI reference model – meaning Ethernet deals with the physical aspect of the data transmission. So they complement each other, as we need the full seven layers (or their equivalents) to establish a network connection.
Ethernet has three layers: Logic Link Control (LLC), Media Access Control (MAC) and Physical. LLC and MAC layers correspond, together, to the second layer from the OSI reference model. You can see Ethernet architecture in Figure 6.
The Logic Link Control layer (LLC) is in charge of adding information of which protocol on the Internet layer delivered data to be transmitted, so when receiving a frame from the network this layer on the receiving computer has to know to which protocol from the Internet layer it should deliver data. This layer is defined by IEEE 802.2 protocol.
The Media Access Control layer (MAC) is in charge of assembling the frame that will be sent over the network. This layer is in charge of adding the source MAC address and the target MAC address – as we explained before, MAC address is the physical address of a network card. Frames that are targeted to another network will use the router MAC address as the target address. This layer is defined by IEEE 802.3 protocol, if a cabled network is being used, or by IEEE 802.11 protocol, if a wireless network is being used.
The Physical layer is in charge of converting the frame generated by the MAC layer into electricity (if a cabled network is being used) or into electromagnetic waves (if a wireless network is being used). This layer is also defined by IEEE 802.3 protocol, if a cabled network is being used, or by IEEE 802.11 protocol, if a wireless network is being used.
The LLC and MAC layers add their own headers to the datagram they receive from the Internet layer. So a complete structure of the frames generated by these two layers can be seen in Figure 7. Notice that the headers added by the upper layers are seen as “data” by the LLC layer. The same thing happens with the header inserted by the LLC layer, which will be seen as data by the MAC layer.
The LLC layer adds a 3-byte or 5-byte header and its datagram has a maximum total size of 1,500 bytes, leaving a maximum of 1,497 or 1,492 bytes for data. The MAC layer adds a 22-byte header and a 4-byte CRC (data correction) data at the end of the datagram received from the LLC layer, forming the Ethernet frame. Thus the maximum size of an Ethernet frame is of 1,526 bytes.
To learn more about other TCP/IP protocols and functionalities, read the second part of this tutorial.