Wrap the payload
The source network layer encapsulates the payload inside an IP packet. The destination network layer decapsulates it. The network layer carries the payload without changing or using its contents.
A deeper guide to IP packet delivery: packetizing, packet switching, IPv4 addressing, classful/classless ideas, subnetting, DHCP, ARP, fragmentation, and NAT.
The network layer is responsible for moving packets across interconnected networks from source host to destination host.
The source network layer encapsulates the payload inside an IP packet. The destination network layer decapsulates it. The network layer carries the payload without changing or using its contents.
Routing finds the best path by running routing protocols and filling a routing table.
Forwarding is the router action performed when a packet arrives. The router checks its table and decides which outgoing interface to use.
Packet switching can be connection-oriented or connectionless. The Internet network layer uses the datagram approach.
Packets are related to a virtual connection. Resources such as buffers, lines, and switches are still shared, which is why it is virtual rather than a dedicated physical circuit.
No network-layer handshaking is required. Each packet is sent independently and can take a different path to the destination.
Packet networks can experience processing, queuing, transmission, and propagation delays. Datagram networks may deliver packets out of order because paths can differ.
IPv4 addresses are 32-bit Internet addresses. The course still uses classful addressing for masks and subnetting examples even though classless addressing is used today.
IPv4 has 2^32 possible addresses. Dotted decimal writes four 8-bit octets as decimal numbers, such as 192.168.1.10.
Class A uses default /8, Class B uses /16, and Class C uses /24. The first bits or first decimal octet identify the old class.
The network address has host bits set to 0. Host addresses identify devices. Broadcast addresses target all nodes in a network. Limited broadcast stays local; directed broadcast targets a specific network.
| Concept | Meaning | Exam clue |
|---|---|---|
| Class A | 0-127, default /8 | Large networks |
| Class B | 128-191, default /16 | Medium networks |
| Class C | 192-223, default /24 | Small networks |
| Slash notation | /n means n network prefix bits | Example: /27 |
Subnetting divides a network into smaller subnetworks. The mask tells which bits belong to network/subnet and which bits remain for hosts.
Write the IP address and mask in binary, then apply AND. A 1 in the mask keeps the address bit. A 0 in the mask turns the result bit into 0.
Given original classful mask and subnet mask, number of subnets is
2^(subnet mask length - classful mask length). Host count depends on remaining host bits.
Subnetting improves organization, security, and routing inside a site while the outside Internet can still see the organization as one larger network.
These mechanisms support practical IPv4 delivery: automatic configuration, local address resolution, packet formatting, MTU handling, and address translation.
DHCP provides host settings: IP address, subnet mask, default gateway/router, and DNS server.
ARP translates an IP address to a MAC address for local link delivery. ARP request is broadcast; ARP reply is unicast.
Minimum IPv4 header length is 20 bytes without options. Total length includes header and data. Protocol field tells which upper-layer protocol should receive the payload.
Each link-layer protocol has an MTU. If a datagram is too large, it may be fragmented. Identification, flags, and offset support reassembly.
NAT maps private local addresses to public global addresses so many internal devices can share one public IP address.
Use this as the last-pass memory page before a quiz or exam.
These questions target the facts, comparisons, and calculations that are easiest to test.
Answer: Connectionless datagram service.
Explanation: There is no network-layer handshaking and packets are independent.
Answer: AND the IP address with the subnet mask.
Explanation: Mask 1 bits keep address bits; mask 0 bits clear them.
Answer: IP address, subnet mask, gateway router, and DNS server.
Explanation: These are the main host configuration values listed in the slides.
Answer: No, it is unicast.
Explanation: The requester is known after the ARP request.
Answer: Public IPv4 addresses.
Explanation: Many private hosts can share fewer public addresses.