Study guide

1.2 TCP/IP Protocol Stack and Data Encapsulation

Nokia Network Routing Specialist I NRS I, 4A0-100

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: OSI and TCP/IP Networking Models

1.1 OSI Reference Model and Layer Functions 1.2 TCP/IP Protocol Stack and Data Encapsulation 1.3 Network Architecture and Device Planes

2 Chapter 2: Ethernet Technology and LAN Switching

2.1 Ethernet Framing and Physical Standards 2.2 Bridging, Switching, and Collision/Broadcast Domains 2.3 VLANs and IEEE 802.1Q Tagging 2.4 Ethernet Redundancy, Spanning Tree, and LAGs

3 Chapter 3: IP Addressing and Subnetting

3.1 IPv4 Addressing Architecture and Classes 3.2 IPv4 Subnetting, CIDR, and VLSM 3.3 IPv6 Addressing Fundamentals 3.4 IP in Homes and Small Businesses

4 Chapter 4: IP Forwarding and Host Resolution

4.1 IPv4 Header Architecture and Packet Forwarding 4.2 Address Resolution Protocol (ARP) and IPv6 Neighbor Discovery 4.3 ICMP and Network Troubleshooting

5 Chapter 5: Nokia Service Router Hardware and Management

5.1 Nokia Service Router Hardware Architecture 5.2 SR OS Classic CLI Navigation and Operations 5.3 Model-Driven CLI (MD-CLI) and Datastore Management 5.4 Boot Process and Configuration Recovery

6 Chapter 6: Routing Fundamentals and Static Routing

6.1 Routing Concepts, RIB vs FIB, and Route Preference 6.2 Static Route Configuration and Next-Hop Resolution 6.3 Dynamic Routing Protocols Overview

7 Chapter 7: Interior Gateway Protocols: OSPF and IS-IS

7.1 OSPF Fundamentals and Adjacency Formation 7.2 OSPF Multi-Area Architecture and LSA Types 7.3 IS-IS Protocol Architecture and Operations

8 Chapter 8: BGP and Internet Architecture

8.1 BGP Architecture and Peering 8.2 BGP Path Attributes and Route Selection 8.3 IBGP Split-Horizon and Scaling Solutions 8.4 Internet Components, Peering, and Transit

9 Chapter 9: MPLS Architecture and Signaling

9.1 MPLS Concepts and Label Operations 9.2 Label Distribution Protocol (LDP) 9.3 RSVP-TE and Traffic Engineering

10 Chapter 10: Nokia VPN Services: Layer 2 and Layer 3

10.1 Nokia Service Architecture and Building Blocks 10.2 Layer 2 Services: VPWS/VLL and VPLS 10.3 Layer 3 Services: IES and VPRN

1.2 TCP/IP Protocol Stack and Data Encapsulation

Key Takeaways Explain This Topic AI

TCP/IP commonly uses four layers: Application, Transport, Internet, and Link.

EtherType, the IP Protocol/Next Header field, and transport ports demultiplex different protocol layers.

TCP supplies a reliable ordered byte stream but can report unrecoverable connection failure.

UDP has an eight-byte header and no transport handshake or retransmission mechanism.

BGP uses TCP 179; LDP uses UDP and TCP 646 for different functions.

Last updated: October 2026

1.2 TCP/IP Protocol Stack and Data Encapsulation

While the OSI reference model provides a theoretical framework for networking concepts, the TCP/IP protocol suite (also known as the Internet Protocol Suite) represents the practical, universally implemented architecture that powers modern enterprise backbones and the global Internet. Developed through research funded by the U.S. Defense Advanced Research Projects Agency (DARPA) and formalized in RFC 1122 , the TCP/IP architecture was designed with a fundamental engineering mandate: to create a robust, survivable, and highly scalable packet-switched network capable of maintaining communication sessions even if underlying transmission links suffer catastrophic failure.

The 4-Layer TCP/IP Architecture

Unlike the 7-layer OSI model, the TCP/IP model organizes network functionality into four pragmatic layers. It consolidates the upper application-oriented layers and collapses the lower hardware-dependent media functions.

TCP/IP Layer Corresponding OSI Layers Core Responsibilities Key Protocols

Application Layers 5, 6, 7 (Session, Presentation, Application) High-level protocols, user interfaces, data formatting, encryption, session management HTTP, HTTPS, SSH, Telnet, DNS, DHCP, TFTP, NTP, BGP, LDP

Transport Layer 4 (Transport) Host-to-host process communication, port multiplexing, segmentation, flow control TCP, UDP, SCTP

Internet Layer 3 (Network) Logical addressing, routing, packet forwarding across heterogeneous networks IPv4, IPv6, ICMP

Network Interface Layers 1, 2 (Physical, Data Link) Framing, physical MAC addressing, media access, electrical/optical bit transmission Ethernet, Wi-Fi, PPP; ARP supports IPv4 delivery on Ethernet

Layer Responsibilities in the TCP/IP Model

Application Layer: Provides network services directly to end-user applications and system processes. Application developers write software that interfaces directly with transport sockets (such as TCP or UDP ports), handling any necessary data presentation, compression, and session tracking within the application code itself.

Transport Layer: Provides end-to-end communication channels between software processes running on distinct hosts. It abstracts the underlying network routing topology, delivering application payloads across standard interfaces.

Internet Layer: Packages transport segments into routable IP datagrams (packets) , attaches source and destination IP addresses, and routes packets across interconnected network hops using dynamic routing protocols and local forwarding tables.

Network Interface (Link) Layer: Defines the physical media characteristics and protocols required to transmit IP packets across a single local network segment or physical link between adjacent network nodes.

Data Encapsulation and Decapsulation Workflows

For network communication to succeed, data must traverse the protocol stack through two mirror-image operations: encapsulation at the sending host and decapsulation at the receiving host.

The Encapsulation Process (Outbound Transmission)

When a user application (such as a web browser or a BGP routing daemon) transmits data, the payload moves downward through the stack:

Application Layer: The application formats its raw payload (e.g., an HTTP GET request or BGP UPDATE message) and hands the data stream to the Transport Layer.

Transport Layer Encapsulation: The Transport Layer takes the application data and prepends a TCP or UDP header . This header includes the source port and destination port numbers. The resulting unit is called a Segment (for TCP) or a Datagram (for UDP).

Internet Layer Encapsulation: The Internet Layer accepts the transport segment as its payload (SDU) and prepends an IP header . This header contains the source and destination IP addresses, Time-to-Live (TTL), and the Protocol field identifying the transport protocol. The resulting data structure is an IP Packet .

Network Interface Layer Encapsulation: The packet is passed down to the link layer, which prepends a Data Link header containing the source and destination physical hardware MAC addresses and the EtherType field. It also appends a Frame Check Sequence (FCS) trailer containing a CRC-32 checksum to form a Frame .

Physical Transmission: The network interface card (NIC) converts the frame's digital bits into electrical voltages, light pulses, or radio signals, transmitting them across the physical medium.

The Decapsulation Process and Protocol Demultiplexing

When the receiving host's physical network adapter detects incoming signals, it reconstructs the bit stream into a frame and initiates decapsulation , working upward through the stack:

Frame Verification and Link Decapsulation: The receiving NIC calculates a CRC over the frame and compares it with the FCS trailer. If no transmission errors occurred, the NIC strips the Layer 2 header and trailer. To determine which network protocol should receive the packet, it reads the EtherType field:

0x0800 → Hand payload to IPv4 .

0x86DD → Hand payload to IPv6 .

0x0806 → Hand payload to ARP .

Internet Layer Decapsulation: The IP module inspects the destination IP address to verify that the packet is destined for this host (or needs forwarding, if operating as a router). If the packet is destined for the local host, the IP header is stripped. The IP module examines the 8-bit Protocol field (or Next Header in IPv6) to determine the transport destination:

Protocol 6 → Hand payload to TCP .

Protocol 17 → Hand payload to UDP .

Protocol 1 → Hand payload to ICMP .

Protocol 89 → Hand payload to OSPF .

Transport Layer Decapsulation: The transport layer (TCP or UDP) inspects the 16-bit Destination Port number in the transport header. The port number identifies the specific listening socket or application process (e.g., port 80 for a web server, port 179 for BGP). The transport header is stripped, and the original, unaltered application data is delivered into the receiving application's buffer.

Transport Layer Comparison: TCP vs. UDP

The transport layer offers two primary workhorse protocols that represent fundamentally different design philosophies regarding reliability, overhead, and latency.

  • Architectural Feature Transmission Control Protocol (TCP) User Datagram Protocol (UDP)
  • Connection State Connection-oriented (stateful session required) Connectionless (stateless datagrams)
  • Header Size 20 bytes minimum (up to 60 bytes with options) Fixed 8 bytes

Delivery Guarantee Reliable ordered byte stream with retransmission; unrecoverable failure can terminate the connection Best-effort (no retransmissions)

  • Data Ordering Strictly ordered (resequences out-of-order packets) Unordered (packets delivered as they arrive)
  • Flow Control Dynamic sliding window (rwnd) None
  • Congestion Control Supported (Slow Start, Congestion Avoidance) None

Transmission Overhead Higher processing overhead and latency Small header; network and application delays still apply

Primary Use Cases Web (HTTP/S), File Transfer (FTP/SCP), SSH, BGP, LDP Voice (VoIP), Video streaming, DNS queries, DHCP, TFTP, NTP

TCP Mechanics: Reliability, Handshaking, and Flow Control

TCP ( RFC 9293 , the current core specification) achieves robust reliability across unreliable network paths through several sophisticated mechanisms:

1. The Three-Way Handshake

Before any user data can be exchanged, TCP must establish a synchronized, stateful connection between client and server:

Step 1 (SYN): The client transmits a segment with the SYN (Synchronize) control flag asserted and chooses an Initial Sequence Number (ISN), denoted as Seq = X .

Step 2 (SYN-ACK): The server receives the SYN and responds with both SYN and ACK flags asserted. The server acknowledges the client's sequence number by sending Ack = X + 1 and selects its own Initial Sequence Number, denoted as Seq = Y .

Step 3 (ACK): The client completes the handshake by transmitting a segment with the ACK flag asserted, confirming the server's sequence number with Ack = Y + 1 .

Once the three-way handshake completes, both endpoints transition to the ESTABLISHED state and bidirectional data transfer begins.

2. Sequence and Acknowledgment Numbers

TCP numbers bytes in its stream; a segment header identifies its first data byte. SYN and FIN also consume sequence space. The receiver sends cumulative acknowledgments indicating the next byte it expects to receive ( ACK = next contiguous byte expected ). If a segment is dropped in transit, the receiver's acknowledgment remains stalled at the missing byte offset, prompting the sender's retransmission timer to fire and retransmit the missing data.

3. Sliding Window Flow Control

TCP dynamically regulates data transmission speed to match the receiver's available processing capacity. The receiving host advertises its available buffer space inside the Receive Window (rwnd) field of every acknowledgment segment. The sender is permitted to transmit only up to the unacknowledged byte volume indicated by rwnd . If the receiver's application processes data slowly, the advertised window shrinks; if buffers fill completely, the receiver advertises a zero-window ( rwnd = 0 ), instructing the sender to pause transmission immediately until buffer space frees.

4. Connection Teardown

When communication concludes, TCP closes the session gracefully typically through FIN and ACK exchanges; combining FIN and ACK can reduce the packet count. A common four-packet example is:

Initiator sends a FIN (Finish) segment.

Responder acknowledges with an ACK .

Responder completes its pending data transmission and sends its own FIN .

Initiator acknowledges with a final ACK , closing the connection after a safety timeout ( TIME_WAIT ).

UDP Mechanics: Lightweight and Connectionless

UDP ( RFC 768 ) strips transport communication down to its bare essentials. The UDP header is fixed at exactly 8 bytes , containing only four 16-bit fields:

Source Port: Identifies the sending application process (optional in some implementations).

Destination Port: Identifies the receiving application process.

Length: Specifies the total length of the UDP header plus payload in bytes.

Checksum: Provides optional (IPv4) or mandatory (IPv6) error detection over the header and data.

Because UDP maintains no session state, it requires no three-way handshake, eliminates connection setup latency, and introduces no transmission overhead for sequence tracking or acknowledgment packets. If a packet is lost due to network congestion or link corruption, UDP does not retransmit it; upper-layer applications (such as real-time audio codecs or DNS resolvers) must handle retransmission if desired.

Critical Well-Known Port Numbers

Transport layer port numbers are 16-bit integers ranging from 0 to 65535 . The Internet Assigned Numbers Authority (IANA) divides the port space into three distinct categories:

Well-Known Ports (0 to 1023): Reserved for system services and standard Internet protocols.

Registered Ports (1024 to 49151): Assigned by IANA to specific user processes or vendor software applications upon request.

Dynamic / Private / Ephemeral Ports (49152 to 65535): Allocated dynamically by client operating systems as temporary source ports when initiating outbound connections.

In telecommunications and carrier routing environments, network engineers and candidates preparing for the Nokia NRS I certification must master critical well-known port numbers and their transport protocols:

  • Service / Protocol Port Number Transport Protocol Primary Function in Enterprise and Service Provider Networks
  • FTP Data 20 TCP Transfers bulk file data in File Transfer Protocol sessions
  • FTP Control 21 TCP Passes authentication commands and directory queries
  • SSH 22 TCP Secure Shell for encrypted command-line router management
  • Telnet 23 TCP Unencrypted terminal emulation for legacy remote router CLI access

DNS 53 UDP & TCP Domain Name System (UDP for standard queries; TCP for zone transfers and truncated-response retries; EDNS permits larger UDP responses)

  • DHCP Server 67 UDP Bootstrap Protocol (BOOTP) / Dynamic Host Configuration Protocol server listening port
  • DHCP Client 68 UDP Client listening port for incoming DHCP lease offers and acknowledgments
  • TFTP 69 UDP Trivial File Transfer Protocol used for router firmware booting and config backups
  • HTTP 80 TCP Hypertext Transfer Protocol for unencrypted web administration and traffic
  • NTP 123 UDP Network Time Protocol for precision router clock synchronization
  • BGP 179 TCP Border Gateway Protocol peering sessions between autonomous systems
  • HTTPS 443 TCP Encrypted HTTP over TLS/SSL for secure web management portals

LDP 646 TCP & UDP Label Distribution Protocol (UDP 646 for Hello discovery; TCP 646 for session establishment and MPLS label exchange)

Exam Tip: Pay particular attention to the dual transport usage of LDP (Port 646) and DNS (Port 53) :

LDP utilizes UDP port 646 to transmit multicast "Hello" discovery packets to discover adjacent MPLS routers (sent to the All-Routers multicast address 224.0.0.2 ), and then initiates a TCP port 646 connection to establish a reliable, stateful session for exchanging MPLS label bindings.

BGP utilizes TCP port 179 exclusively. Because BGP relies on TCP for reliability, retransmission, and flow control, it does not need to implement its own transport reliability mechanisms.

Primary technical reference

Specification or Nokia manual , checked October 20, 2026. Examples are teaching scenarios, not captured router execution.

Loading diagram... Protocol Demultiplexing in the TCP/IP Stack