M

The Network and Transport Layers

CHAPTER 5 The Network and Transport Layers

Learning Objectives

  • Differentiate between the standards, specifications, technologies, and infrastructure that drive current LAN connectivity.

Key Concepts

  • The Network and Transport Layers of the OSI model

  • Internet Protocol (IP)

  • IP Device Addressing:

    • Using IPv4 and IPv6.

  • IP-based Communications:

    • Connectionless versus connection-oriented communications.

OSI Model Overview

  • Figure 5-1: Comparison of the OSI model to the TCP/IP model.

Knowledge Check 1

  • Question: True or False: the term "router" is synonymous with a Layer 2 switch.

OSI Layers

The OSI Network Layer (Layer 3)

  • Provides network addressing for packets.

  • Supports switching and routing technologies to direct packets.

  • Addresses issues related to packet delivery from source to destination.

  • Supports the creation of virtual circuits.

  • Protocols at OSI Layer 3 include:

    • Internet Protocol (IP): The main protocol for transmitting packets across networks.

    • Internet Control Message Protocol (ICMP): Provides methods to send error messages.

    • Internet Protocol Security (IPSec): For authentication and encryption of packets.

    • AppleTalk: A legacy protocol now replaced by TCP/IP.

Knowledge Check 2

  • Question: Which protocol guarantees delivery? TCP or UDP?

The OSI Transport Layer (Layer 4)

  • Ensures reliable data transfer between computers.

  • Accepts data from upper layers.

  • Services provided include:

    • Flow control to manage transmission pace.

    • Fragmentation and reassembly of data packets.

    • Error control to detect missing packets.

    • Acknowledgment of delivery to ensure packets have arrived.

  • Protocols at Layer 4 include:

    • Transmission Control Protocol (TCP): Used for applications like WWW and email; persistent connection.

    • User Datagram Protocol (UDP): Faster, less overhead; used in applications like DNS.

    • Stream Control Transmission Protocol (SCTP).

Knowledge Check 3

  • Question: Which of the following network devices operates at Layer 3 of the OSI model?

      1. Switch

      1. Router

      1. Hub

      1. Bridge

Internet Protocol (IP)

  • Primary protocol for relaying packets across networks.

  • Handles packet routing and host identification.

  • Each packet, or datagram, contains a header with the destination IP address.

IPv4 and IPv6 Packet Headers

  • IPv4 Packet Header:

    • Figure 5-3: Structure of an IPv4 packet header.

  • IPv6 Packet Header:

    • Figure 5-4: Structure of an IPv6 packet header.

Decentralization of IP Protocol

  • IP networks are decentralized and dynamic.

  • Packets may not reach the intended destination.

  • Checksums can detect changes in packet headers.

Knowledge Check 5

  • Question: True or False: IP provides automatic notification of lost packets.

Checksum in IPv4

  • Figure 5-6: Demonstrates IPv4 header checksum usage.

Knowledge Check 6

  • Question: Which protocol includes a checksum to ensure data integrity? (Options: IP, TCP, UDP, All of the above)

Knowledge Check 7

  • Question: What do you remember about IPv4 and IPv6?

IP Addressing: IPv4 vs IPv6

  • Devices require IP addresses for IP-based networks.

  • Internet Assigned Numbers Authority (IANA): Governs IP address allocation.

  • IPv4 is largely used despite the transition to IPv6.

  • IPv4:

    • 32-bit addresses presented in dot notation (e.g., 192.168.0.1).

    • Classful and classless networks exist.

  • Dynamic Host Configuration Protocol (DHCP): Assigns IP addresses dynamically.

  • Network Address Translation (NAT): Allows private IP address use.

Knowledge Check 8

  • Question: Why do organizations choose to separate their DHCP server from a router or firewall?

IPv4 Classful Network Architecture

  • Original architecture with classes for addressing: Classes A, B, C, D, E.

    • Class A: 0 leading bits, allows large number of nodes.

    • Class B and C serve medium and small networks respectively.

Classful Network Classes Table

Class

Leading Bits

Size of Network Field

# of Networks

Number of Nodes

Address Range

A (large)

0

8

128

16,777,216

0.0.0.0 to 127.255.255.255

B (medium)

10

16

16,384

65,536

128.0.0.0 to 191.255.255.255

C (small)

110

24

2,097,152

256

192.0.0.0 to 223.255.255.255

D (multicast)

1110

N/A

N/A

N/A

224.0.0.0 to 239.255.255.255

E (future use)

1111

N/A

N/A

N/A

240.0.0.0 to 255.255.255.255

CIDR and Subnet Mask in IPv4

  • CIDR (Classless Inter-Domain Routing): Aids in addressing shortage, replaces classful architecture.

  • Subnet Masks: Define which portion of an IP address is the network versus the host.

CIDR Block Addresses Table

CIDR BLOCK

ADDRESS

COMMENTS

168.12.0.0/16

168.12.0.0 to 168.12.255.255

Same as classful Class B network

201.100.98.0/24

201.100.98.0 to 201.100.98.255

Same as classful Class C network

Subnet Masks Table

CIDR BLOCK ADDRESS

SUBNET MASK

168.12.0.0/16

255.255.0.0

201.100.98.0/24

255.255.255.0

Address Resolution

  • Process of mapping hostnames to IP addresses.

  • Domain Name System (DNS): Hierarchical system to resolve hostnames.

IPv6 Overview

  • Created to expand the address space; it uses 128-bit addresses.

  • IPv6 Format: Eight groups of four hexadecimal numbers.

Knowledge Check 11

  • Question: What is the bit size of IPv4 versus IPv6? (Options: 128; 32, 32; 128)

IPv6 Address Compression

  • Techniques to simplify IPv6 addresses by dropping leading zeros and using :: for sequences of 0s.

IPv6 Network Methodologies

  • Unicast: Packet sent to one destination.

  • Anycast: Packet sent to the nearest node in a group.

  • Multicast: Packet sent to multiple destinations.

  • Note: IPv6 does not support broadcast packets.

IPv4 to IPv6 Transition

  • Dual IP stack allows support of both IPv4 and IPv6.

  • IPv4-mapped addresses enable IPv6 to utilize IPv4 addresses.

IP Communications

  • ARP in IPv4 networks provides MAC addresses while IPv6 uses Neighbor Discovery Protocol (NDP).

  • Support for various data types over IP networks including emails, calls, and streaming data.

Connectionless vs Connection-Oriented Communications

  • IP as Connectionless Protocol: Treats each packet independently.

  • Connection-Oriented Protocols (e.g., TCP): Establish connections and manage data transfer order.

Connection-Oriented vs Connectionless Protocols

  • Figure 5-8: Visual comparison of connection-oriented and connectionless protocols.

TCP (Transmission Control Protocol)

  • Connection-oriented; more setup work than UDP.

UDP (User Datagram Protocol)

  • Connectionless; suitable for simple queries and load balancing.

  • Other connectionless protocols include: ICMP, DNS, TFTP, SNMP.

Summary

  • Covered the Network and Transport Layers of the OSI model, IP addressing with IPv4 and IPv6, and the differences between connectionless and connection-oriented communications.