Made with ScholarlyTurn your own files into documents like this
Shared by Abhisekh Nayak
The network layer carries packets across interconnected networks through packetizing, routing, and forwarding; the guide focuses on packet switching and IPv4 datagrams, including header fields, TTL, and fragmentation (pp. 1–5). The central distinction is that routing plans paths across a network, while forwarding is each router’s next-hop action; IPv4 itself offers best-effort, connectionless delivery rather than guarantees of reliability or order (pp. 1–2).
Packetizing, routing, and forwarding are separate jobs: packetizing adds or removes a network header around payload; routing establishes route information across the network; forwarding looks up an output interface and sends the packet onward. A router ordinarily processes the header without changing the source or destination IP addresses (p. 1).
Datagram vs. virtual circuit: In the datagram model, no connection is set up first; each packet is routed independently, so packets from one message may take different routes and arrive out of order, late, lost, or corrupted. A virtual circuit has a logical path established before packets are sent, and packets are associated with that path (p. 2). Example: three IP datagrams sent to the same destination, each routed from its own header and potentially taking different routes, illustrate the connectionless datagram model (p. 2).
IPv4 best-effort delivery means IPv4 provides packetizing, forwarding, and delivery but does not promise delivery, ordering, or payload integrity. Datagrams may be lost, delayed, corrupted, reordered, or contribute to congestion; applications needing reliability typically rely on an upper-layer protocol such as TCP (p. 2).
IPv4’s supporting protocols have distinct roles: ICMPv4 assists with certain network-layer errors, such as a discarded datagram or unknown header information; IGMP supports IPv4 multicast group management; and ARP maps network-layer addresses to link-layer addresses, connecting the network and data-link layers (p. 3).
Calculating IPv4 header and payload sizes: If IHL is 5, the header is 5×4=20 bytes. With a total length of 1,500 bytes, the payload is 1,500−20=1,480 bytes. If IHL is 8 with the same total length, the header is 32 bytes and the payload is 1,468 bytes (pp. 3–4). Remember: IHL measures the header in 4-byte words, whereas total length measures the complete datagram in bytes.
LAN-to-WAN forwarding and fragmentation: A router receives a LAN-format frame, extracts and processes the IP datagram, then encapsulates it in a WAN-format frame for the outgoing link. The frame representation changes, but the IP source and destination addresses remain the same. If the outgoing network cannot carry the datagram whole, IPv4 fragmentation fields support subdivision and later reassembly at the destination (p. 4).
TTL and routing loops: The source assigns a TTL; each router decrements it by one, and a router drops the datagram when the value reaches zero. In this treatment TTL counts router hops, not elapsed seconds, so a routing loop cannot circulate a datagram indefinitely (p. 5).
Worked example: IHL = 5 and total length = 1,500 bytes gives a 20-byte header and 1,480-byte payload (p. 3).
Make from this