In yesterday’s lecture we looked at the network layer, and introduced some concepts. I have added some diagrams to the slides on the course website to make things a little clearer, including this one:

Network Data Encapsulation Diagram

This diagram describes the data encapsulation involved in transmitting packets of data across the network. First the application data is broken up into small units, and then it is passed to the transport layer. The transport layer will add a header to the data unit and pass the protocol data unit (PDU) to the network layer. Now an IP header is added an the packet is passed to the link layer, where an frame header and usually a trailer is added to create a complete frame which is now transmitted across the network.

Encapsulation of these layers means that you can change what is happening at a layer without affecting the other layers. You can transmit frames over Ethernet, or WiFi or some other technology, without changing the upper layers at all. You can move from IPv4 to IPv6 without changing your link layer or ttansport leyer, and you can use any of a variety of transport layer protocols over the same network layer.

The IPv4 header looks like this:

IPv4 Header

The meaning of the fields in the header is fully described in RFC 791. There is also a good article on IPv4 including a description of the header on Wikipedia. The Wikipedia article also discusses IPv4 address exhaustion, which we mentioned in yesterday’s lecture.

The following diagram describes three of the IPv4 address classes – the “unicast” classes A, B and C. It shows how the first bits of the address can be used to determine the address class.

Network Classes