Datagram Forwarding - Module 11: Networking

Datagram Forwarding

Module Overview

  • Subject: Networking

  • Focus: Fundamental communication service in the Internet

  • Key Topics:

    • Formats of packets sent across the internet

    • Datagram encapsulation, forwarding, fragmentation, and reassembly

    • Types of Services: Connection-oriented vs Connectionless

Connectionless Service

  • Definition:

    • Data communication between two nodes where the sender sends data without ensuring the receiver's availability.

    • Packets are referred to as datagrams.

  • Application Implications:

    • Programs remain unaware of underlying physical networks.

    • Data can be sent and received without knowledge of the land or destination network.

Types of Network Services
  • Connection-Oriented Services:

    • Requires a connection to be established before communication.

    • Analogy: Telephone call – you dial, they answer, connection is established.

  • Connectionless Services:

    • Broadcasting information without confirmation of receipt.

    • Analogy: Megaphone - broadcasting without certainty of the audience.

  • TCP/IP Protocols:

    • Includes protocols for both services.

    • Provides an unreliable connectionless delivery service (low overhead) and a connection-oriented service using underlying connectionless service.

How Datagrams Travel Across the Internet

  1. Packet Creation: Host creates a packet and includes the destination address in the packet header.

  2. Router Role:

    • The nearby router receives the packet.

    • Looks up the destination address and selects the next router on the path.

  3. Delivery to Final Destination:

    • Process continues until the packet reaches the final intended router or host.

  • Virtual Packets:

    • Packets are hardware independent.

    • Each host/router has protocol software recognizing internet packets.

Datagram Structure and Headers

IPv4 Datagram Header Format
  • Each field has a fixed size, ensuring efficient processing by routers.

  • Fields in IPv4 Header:

    • Identification (16 bits): Sequential number assigned to the datagram for reassembly.

    • Flags (3 bits): Specifies fragmentation status and order.

    • Fragment Offset (13 bits): Indicates position of this fragment in the original datagram.

    • Time to Live (8 bits): Initialized by sender, decremented by each router; discarded if it reaches zero.

    • Type (8 bits): Specifies payload type.

    • Header Checksum (16 bits): Checks for errors in header fields via a complement algorithm.

    • Source IP Address (32 bits): Address of original sender, unchanging.

    • Destination IP Address (32 bits): Address of the final destination, also unchanging.

    • IP Options: Optional controls for routing or processing, most datagrams omit this field.

    • Padding: Used to ensure header aligns on 32-bit boundaries.

Transition to IPv6 Datagram Header
  • IPv6 New Header Format:

    • Consists of a base header plus optional extension headers.

    • Version (4 bits): Indicates IPv6.

    • Traffic Class (8 bits): Similar to service type in IPv4.

    • Flow Label (20 bits): Designates a datagram with a label switched path (rarely used).

    • Payload Length (16 bits): Specifies size of the payload in octets.

    • Next Header (8 bits): Identifies information type that follows the current header.

    • Hop Limit (8 bits): Functions like Time to Live in IPv4.

    • Source Address (128 bits): Address of original sender.

    • Destination Address (128 bits): Address of recipient.

Next Hop Forwarding

  • Process: Each router uses the destination address to decide the next hop, forwarding the datagram accordingly.

  • Forwarding Table:

    • Initialized on router startup, updated with topology changes.

    • Contains entries indicating destinations and their corresponding next hops.

  • Example:

    • Each router has multiple IP addresses for different interfaces with CIDR (Classless Inter-Domain Routing) notation.

Forwarding Process
  1. Router receives a datagram (e.g., destined for 192.40.10.3).

  2. Checks entries in the forwarding table:

    • Matches destination prefix using subnet mask to find next hop.

  3. Longest Prefix Match: Resolves overlaps in entries to choose the most specific route.

  4. If no explicit entry exists, a default entry is used.

Best Effort Delivery

  • Definition: A service that does not guarantee the delivery or quality of data transmission.

  • IP Protocol:

    • Makes a best effort to deliver datagrams without error corrections or guarantees of delivery.

Encapsulation Technique
  • Encapsulation:

    • When datagrams are placed into a frame's payload area without alterations.

    • Frame headers differ between various protocols.

    • Analogy: Like a vacuum tube system used in banking; contents remain unchanged during transmission.

Frame Processing
  • Receiver identifies payload type through frame type field agreement.

  • Upon arrival, routers strip the old frame and encapsulate the datagram into a new frame, repeating this until the final destination is reached.

  • Maximum Transmission Unit (MTU):

    • Defines maximum data size a frame can carry; datagrams must fit within the MTU limits.

  • Fragmentation:

    • Necessary for transporting larger datagrams over networks with smaller MTUs.

    • Routers divide datagrams into smaller fragments when needed.

Fragmentation and Reassembly

  • Fragmentation Process:

    • Each fragment retains the original datagram’s header format with identification and offset fields.

  • Reassembly Process:

    • Performed at the final destination using identification number and offsets to place each fragment correctly.

  • Out-of-Order Fragments:

    • The reassembly process anticipates and accommodates out-of-order arrival of fragments.

Conclusion

  • Summary of Key Points:

    • Datagram structure (IP and IPv6).

    • Forwarding mechanisms via next hop routing and the use of forwarding tables.

    • Importance of best effort delivery and encapsulation in IP protocol operations.

    • Handling fragmentation and reassembly for varying MTU sizes.

Final Notes
  • Encourage questions in class and to test knowledge on the subject.