Comprehensive and Detailed Notes For Chapter 4 CN
Comprehensive and Detailed Notes For Chapter 4 CN
The network layer is pivotal in the OSI and TCP/IP models, handling the
movement of packets across network boundaries and ensuring they reach
their destination.
Key Responsibilities:
• Routing: Determines the optimal path for data to travel from the
source to the destination across interconnected networks.
• Forwarding: Transfers packets from the input port to the
appropriate output port within a router based on routing tables.
• Addressing: Manages the assignment and interpretation of IP
addresses, facilitating correct packet delivery.
Services Provided:
• End-to-End Packet Delivery: Ensures packets are routed
correctly from the source to the destination.
• Fragmentation and Reassembly: Handles the splitting and
reassembling of packets to fit the MTU of various networks.
• Quality of Service (QoS): Implements mechanisms to prioritize
and manage traffic to meet performance requirements.
Advantages:
Disadvantages:
Datagram Networks:
• Concept: Each packet is treated independently, with no
predetermined path, allowing for dynamic routing.
• Operation: Routers make forwarding decisions for each packet
based on destination addresses.
• Examples: The Internet Protocol (IP) operates as a datagram
network, emphasizing flexibility and simplicity.
Advantages:
Disadvantages:
IPv4 Addressing:
IPv6 Addressing:
Address Types:
IP Datagram Formats:
• IPv4 Header:
o Key fields include version, header length, type of service,
total length, identification, flags, fragment offset, TTL,
protocol, header checksum, and source and destination
addresses.
o Fragmentation: If a packet exceeds the MTU, it is divided
into smaller fragments, reassembled at the destination.
• IPv6 Header:
o Simplified compared to IPv4, with fixed length and no
fragmentation by routers.
o Key fields include version, traffic class, flow label, payload
length, next header, hop limit, and source and destination
addresses.
4. Routing Algorithms
Link-State Routing:
Distance-Vector Routing:
Hierarchical Routing:
Broadcast Routing:
• Flooding:
o Concept: Every incoming packet is sent out on all outgoing
links, except the one it arrived on.
o Issues: Can lead to packet duplication and network
congestion.
o Solutions:
▪ Sequence Numbers: Track and discard duplicate
packets.
▪ Spanning Tree Protocol (STP): Creates a loop-free
tree structure ensuring each network node receives the
broadcast packet exactly once.
• Spanning Tree:
o Operation: Constructs a spanning tree to prevent loops and
optimize broadcast routing.
o Uses: Commonly used in Ethernet networks to ensure loop-
free topologies.
Multicast Routing:
7. Router Architecture
Key Components:
1. Input Ports:
o Functions: Receive packets from the network and perform
preliminary processing.
o Operations:
▪ Physical Layer Processing: Converts physical signals
to data.
▪ Data Link Layer Decapsulation: Removes the link-
layer header and trailer.
▪ Network Layer Lookup and Forwarding: Determines
the appropriate output port using the routing table.
o Forwarding Decision: Quick and efficient lookup
mechanisms are crucial to minimize delay and process
packets at high speeds.
Diagram: Input Port Operations
2. Switching Fabric:
o Purpose: Connects input ports to output ports and directs
packets internally.
o Types:
▪ Memory-Based Switching: Uses a memory buffer to
store packets temporarily before forwarding them to the
output port.
▪ Bus-Based Switching: A shared bus system where
packets are transferred from input to output through a
common pathway.
▪ Crossbar Switch: A matrix of pathways that allows
simultaneous data transfer between multiple input-
output pairs, supporting high throughput.
o Scalability: The crossbar switch is particularly effective for
large-scale, high-speed networks due to its parallel data
paths.
3. Output Ports:
o Functions: Final processing and sending of packets to the
appropriate network interface.
o Operations:
▪ Packet Queuing: Manages packet buffers to handle
varying traffic loads and prevent congestion.
▪ Scheduling: Determines the order in which packets are
transmitted, often prioritizing based on QoS policies.
▪ Link Layer Encapsulation: Adds the necessary link-
layer header and trailer before transmission.
o Buffer Management: Strategies to handle buffer overflow
and packet loss during high traffic periods are crucial for
maintaining performance and avoiding data loss.
Understanding the separation between the data plane and control plane is
fundamental to grasping how routers operate.
Data Plane:
Control Plane:
Key Takeaways: