Chapter 4 Network Layer: Data Plane

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play

1/25

encourage image

There are no tags or description

Looks like no tags are added yet.

26 Terms

1
New cards

What are the key functions of the network layer?

  • Sender: Encapsulates transport segments into IP datagrams → passes to link layer

  • Receiver: Delivers segments to the transport layer

  • Hosts and routers: All Internet devices implement network-layer protocols

  • Routers:

    • Examine IP datagram header fields

    • Forward datagrams from input ports → output ports along end-to-end path

Recall: Network layer = delivers datagrams from source → destination.

2
New cards

What are the 2 key network-layer functions?

  • Forwarding = local action

    • Move packets from router input link → appropriate output link

    • Happens at a single router

  • Routing = global action

    • Determines paths packets take from source → destination

    • Uses routing algorithms

Recall: Forwarding = “which output?” | Routing = “which path?”

3
New cards

What are the differences between the network layer's data plane and control plane?

  • Data plane = local, per-router function

    • Determines how incoming datagrams are forwarded to output ports

    • Handles forwarding decisions

  • Control plane = network-wide logic

    • Determines routes from source → destination across routers

    • Two approaches:

      • Traditional routing: algorithms implemented in routers

      • SDN: routing logic implemented in remote servers

Recall: Data plane = “how to forward” | Control plane = “where to route”

4
New cards

What are the 2 control-plane approaches?

  • Per-router control plane:

    • Routing algorithm runs in each router

    • Routers interact to determine routes

  • SDN control plane:

    • Remote controller computes routes

    • Installs forwarding tables in routers

Recall: Per-router = distributed routing | SDN = centralized controller

5
New cards

What is the Internet's network-layer service model?

  • Best-effort service: No guarantees for:

    • Successful datagram delivery

    • Timing or delay

    • In-order delivery

    • Minimum bandwidth

Recall: Best effort succeeds through simplicity, sufficient bandwidth, distributed services, and congestion control.

6
New cards

What are the main components of router architecture?

  • Input ports: Receive incoming packets

  • Switching fabric: Transfers packets from input → output ports

  • Output ports: Send packets out

  • Routing processor: Handles routing and router management

Two router planes:

  • Data plane (hardware): Forwarding; operates in nanoseconds

  • Control plane (software): Routing and management; operates in milliseconds

Recall: Data plane = fast forwarding (ns) | Control plane = routing/management (ms)

7
New cards

What are the main input port functions?

  • Physical layer: Receives incoming bits

  • Link layer: Processes frames (e.g., Ethernet)

  • Lookup/forwarding:

    • Examines packet header to determine output port

    • Uses forwarding table stored in input port memory

    • Decentralized switching ("match + action")

  • Input queuing: Occurs when packets arrive faster than they can enter the switching fabric

Recall: Input ports receive bits, process frames, look up forwarding decisions, and queue packets if needed.

8
New cards

What are the 2 types of network-layer forwarding?

  • Destination-based forwarding:

    • Uses only destination IP address to determine output port

    • Traditional forwarding method

  • Generalized forwarding:

    • Uses any set of packet header field values to determine output port

Recall: Destination-based = destination IP only | Generalized = multiple/arbitrary header fields

9
New cards

What is longest prefix matching?

  • Selects the forwarding table entry with the longest matching address prefix for the destination IP address.

  • More specific matches take priority over shorter matches.

  • Recall: TCAM = extremely fast lookup, regardless of table size.

Recall: Longest matching prefix = most specific route.

10
New cards

What is a router's switching fabric and switching rate?

  • Switching fabric: Transfers packets from input ports → appropriate output ports.

  • Switching rate: rate at which packets can be transfer from

    inputs to outputs

    • Measured as a multiple of input/output line rate.

    • For N input ports, ideal switching rate = N × line rate.

Recall: Switching fabric = packet transfer | Switching rate = transfer speed

11
New cards

What are the 3 types of router switching fabrics?

  • Switching via memory: Packet copied into system memory; speed limited by memory bandwidth (2 bus crossings per datagram).

  • Switching via bus: Packet transferred from input-port memory to output-port memory over a shared bus; limited by bus bandwidth (bus contention).

  • Switching via interconnection network: Uses crossbars or multistage switches to transfer packets in parallel.

    • Can split datagrams into fixed-length cells, switch them, then reassemble them.

Recall: Memory = CPU/system memory | Bus = shared pathway | Interconnection = parallel switching.

<ul><li><p><strong>Switching via memory:</strong> Packet copied into system memory; speed limited by memory bandwidth (2 bus crossings per datagram).</p></li><li><p><strong>Switching via bus:</strong> Packet transferred from input-port memory to output-port memory over a shared bus; limited by bus bandwidth (<strong>bus contention</strong>).</p></li><li><p><strong>Switching via interconnection network:</strong> Uses crossbars or multistage switches to transfer packets in parallel.</p><ul><li><p>Can split datagrams into fixed-length cells, switch them, then reassemble them.</p></li></ul></li></ul><p>Recall: Memory = CPU/system memory | Bus = shared pathway | Interconnection = parallel switching.</p>
12
New cards

How can interconnection networks increase switching capacity?

  • Use multiple switching planes in parallel to improve speed and capacity.

  • Example: Cisco CRS router

    • 8 switching planes.

    • Each plane uses a 3-stage interconnection network.

    • Can provide up to hundreds of Tbps of switching capacity.


<ul><li><p>Use multiple switching <strong>planes in parallel</strong> to improve speed and capacity.</p></li><li><p>Example: Cisco CRS router</p><ul><li><p>8 switching planes.</p></li><li><p>Each plane uses a 3-stage interconnection network.</p></li><li><p>Can provide up to hundreds of Tbps of switching capacity.</p></li></ul></li></ul><p></p>
13
New cards

What causes input port queuing, and what is Head-of-the-Line (HOL) blocking?

  • Queuing occurs when the switching fabric is slower than the combined input-port arrival rate.

    • Causes queueing delay and packet loss if input buffers overflow.

  • HOL blocking: A packet at the front of a queue prevents packets behind it from moving forward, even if their output ports are available.

Recall: HOL = front packet blocks the packets behind it.

<ul><li><p>Queuing occurs when the switching fabric is slower than the combined input-port arrival rate.</p><ul><li><p>Causes <strong>queueing delay</strong> and packet loss if input buffers overflow.</p></li></ul></li><li><p><strong>HOL blocking:</strong> A packet at the front of a queue prevents packets behind it from moving forward, even if their output ports are available.</p></li></ul><p>Recall: HOL = front packet blocks the packets behind it.</p>
14
New cards

Why does output port queuing occur, and what are its effects?

  • Occurs when packets arrive from the switching fabric faster than the output link can transmit them.

  • Buffering temporarily stores packets waiting to be transmitted.

  • If buffers fill, packets are dropped due to congestion / buffer overflow.

  • Scheduling discipline determines which queued packet is transmitted next.

    • Priority scheduling raises questions about who receives better performance and network neutrality.


<ul><li><p>Occurs when packets arrive from the switching fabric faster than the output link can transmit them.</p></li><li><p><strong>Buffering</strong> temporarily stores packets waiting to be transmitted.</p></li><li><p>If buffers fill, packets are dropped due to congestion / buffer overflow.</p></li><li><p><strong>Scheduling discipline</strong> determines which queued packet is transmitted next.</p><ul><li><p>Priority scheduling raises questions about who receives better performance and network neutrality.</p></li></ul></li></ul><p></p>
15
New cards

How much buffering should a router have, and what is buffer management?

  • Traditional rule of thumb: buffer size = RTT × link capacity (C).

    • Example: 250 ms RTT × 10 Gbps = 2.5 Gbit buffer.

  • With N flows, a more recent recommendation is RTT × C / √N?

  • Too much buffering increases delay, hurting real-time apps and TCP responsiveness.

  • Buffer management decides:

    • Dropping: Which packets to discard when buffers are full (e.g., tail drop or priority-based).

    • Marking: Which packets to mark to signal congestion (e.g., ECN, RED).


16
New cards

What are the 4 main packet scheduling policies?

  • FCFS / FIFO: Send packets in order of arrival.

  • Priority scheduling: Classify packets into priority queues; always send from the highest-priority nonempty queue.

    • FCFS within each priority class.

  • Round Robin (RR): Cycle through queues, sending one packet from each nonempty queue in turn.

  • Weighted Fair Queuing (WFQ): Like RR, but each class receives service based on its assigned weight.

    • Provides a minimum bandwidth guarantee per traffic class.

Recall: FCFS = arrival order | Priority = highest first | RR = take turns | WFQ = weighted turns.

17
New cards

What are the main components of the Internet network layer and IPv4 datagram?

  • IP: Handles datagram format, addressing, and packet handling.

  • Routing protocols / SDN controller: Determine paths and forwarding tables.

  • ICMP: Handles error reporting and router signaling.

  • IPv4 header fields include:

    • Version, header length, type of service (DiffServ / ECN), total length.

    • Identification, flags, fragment offset.

    • TTL, upper-layer protocol, header checksum.

    • Source and destination IP addresses.

  • Header is typically 20 bytes; maximum datagram size is 65,535 bytes.

  • TTL is decremented at each router to limit packet lifetime.


<ul><li><p><strong>IP:</strong> Handles datagram format, addressing, and packet handling.</p></li><li><p><strong>Routing protocols / SDN controller:</strong> Determine paths and forwarding tables.</p></li><li><p><strong>ICMP:</strong> Handles error reporting and router signaling.</p></li><li><p>IPv4 header fields include:</p><ul><li><p>Version, header length, type of service (DiffServ / ECN), total length.</p></li><li><p>Identification, flags, fragment offset.</p></li><li><p>TTL, upper-layer protocol, header checksum.</p></li><li><p>Source and destination IP addresses.</p></li></ul></li><li><p>Header is typically <strong>20 bytes</strong>; maximum datagram size is <strong>65,535 bytes</strong>.</p></li><li><p>TTL is decremented at each router to limit packet lifetime.</p></li></ul><p></p>
18
New cards

Why does IP fragmentation occur, and how does it work?

  • Each link has a Maximum Transmission Unit (MTU): largest link-layer frame it can carry.

  • If an IP datagram is too large for a link, it is divided into smaller fragments.

  • Fragments are reassembled only at the destination.

  • IP header fields identify and order fragments:

    • Identification: Identifies fragments belonging to the same datagram.

    • Fragment offset: Indicates where fragment data belongs.

    • Flags: Indicate whether more fragments follow.

Recall: Fragment when datagram exceeds MTU; reassemble at destination.

<ul><li><p>Each link has a <strong>Maximum Transmission Unit (MTU)</strong>: largest link-layer frame it can carry.</p></li><li><p>If an IP datagram is too large for a link, it is divided into smaller <strong>fragments</strong>.</p></li><li><p>Fragments are reassembled only at the destination.</p></li><li><p>IP header fields identify and order fragments:</p><ul><li><p><strong>Identification:</strong> Identifies fragments belonging to the same datagram.</p></li><li><p><strong>Fragment offset:</strong> Indicates where fragment data belongs.</p></li><li><p><strong>Flags:</strong> Indicate whether more fragments follow.</p></li></ul></li></ul><p>Recall: Fragment when datagram exceeds MTU; reassemble at destination.</p>
19
New cards

How are IP addresses structured, and what are subnets and CIDR?

  • IP address: 32-bit identifier associated with each host or router interface.

    • Written in dotted-decimal notation (e.g., 223.1.1.1).

  • Interface: Connection between a host/router and a physical link.

    • Routers typically have multiple interfaces; hosts usually have one or two.

  • Subnet: Group of interfaces that can reach each other without passing through a router.

  • IP address has two parts:

    • Subnet part: High-order bits shared by devices in the same subnet.

    • Host part: Remaining low-order bits.

  • Subnet mask: Identifies which bits belong to the subnet.

    • Example: /24 means the first 24 bits are the subnet part.

  • CIDR (Classless InterDomain Routing): Allows subnet portions of arbitrary length.

    • Format: a.b.c.d/x, where x = number of subnet bits.

Recall: /24 = 24 network bits + 8 host bits.

<ul><li><p><strong>IP address:</strong> 32-bit identifier associated with each host or router interface.</p><ul><li><p>Written in dotted-decimal notation (e.g., 223.1.1.1).</p></li></ul></li><li><p><strong>Interface:</strong> Connection between a host/router and a physical link.</p><ul><li><p>Routers typically have multiple interfaces; hosts usually have one or two.</p></li></ul></li><li><p><strong>Subnet:</strong> Group of interfaces that can reach each other without passing through a router.</p></li><li><p>IP address has two parts:</p><ul><li><p><strong>Subnet part:</strong> High-order bits shared by devices in the same subnet.</p></li><li><p><strong>Host part:</strong> Remaining low-order bits.</p></li></ul></li><li><p><strong>Subnet mask:</strong> Identifies which bits belong to the subnet.</p><ul><li><p>Example: <code>/24</code> means the first 24 bits are the subnet part.</p></li></ul></li><li><p><strong>CIDR (Classless InterDomain Routing):</strong> Allows subnet portions of arbitrary length.</p><ul><li><p>Format: <code>a.b.c.d/x</code>, where <code>x</code> = number of subnet bits.</p></li></ul></li></ul><p>Recall: <code>/24</code> = 24 network bits + 8 host bits.</p>
20
New cards

How does a host get an IP address, and how does DHCP work?

  • A host can get an IP address by:

    • Manual configuration: Hard-coded by a system administrator.

    • DHCP: Dynamically obtains an address when joining a network (“plug-and-play”).

  • DHCP (Dynamic Host Configuration Protocol) message sequence:

    1. Discover: Client broadcasts to find a DHCP server.

    2. Offer: Server offers an IP address.

    3. Request: Client requests that address.

    4. ACK: Server confirms the assignment.

  • DHCP addresses are leased and can be renewed or reused when devices disconnect.

  • DHCP can also provide:

    • First-hop router address.

    • DNS server name and IP address.

    • Network mask.

  • DHCP messages are encapsulated in UDP → IP → Ethernet; the initial request is broadcast on the LAN.

Recall: Discover → Offer → Request → ACK (DORA).

21
New cards

How does hierarchical addressing make Internet routing more efficient?

  • A network receives a block of IP addresses from its provider ISP.

  • The ISP divides its address block into smaller blocks for organizations.

  • Route aggregation: ISP advertises one larger address prefix representing multiple smaller networks.

    • Reduces the amount of routing information the Internet must store.

  • More-specific routes: If an organization changes ISPs, its new ISP can advertise a more-specific route for that organization.

    • Routers use longest-prefix matching to select the more-specific route.

  • ICANN coordinates IP address allocation through regional registries and manages the DNS root zone.

  • IPv4 addresses are limited; NAT helps conserve them, while IPv6 provides a much larger address space.

Recall: Aggregation = advertise one large block instead of many smaller blocks.

22
New cards

What are private IP addresses, and how does NAT work?

  • Private IP addresses are used within local networks and are not routed on the public Internet.

    • Ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16.

  • NAT (Network Address Translation): Allows devices in a local network to share one public IPv4 address.

  • NAT router:

    • Outgoing datagrams: Replaces the private source IP address and port with the NAT's public IP address and a new port number.

    • Stores the mapping in a NAT translation table.

    • Incoming replies: Uses the table to replace the public destination IP/port with the correct private IP/port.

  • Advantages:

    • Only one public IP address needed for many devices.

    • Internal addresses can change without notifying the outside world.

    • Internal devices are not directly addressable from outside.

Recall: NAT translates private IP/port ↔ public IP/port using a table.

<ul><li><p><strong>Private IP addresses</strong> are used within local networks and are not routed on the public Internet.</p><ul><li><p>Ranges: <code>10.0.0.0/8</code>, <code>172.16.0.0/12</code>, <code>192.168.0.0/16</code>.</p></li></ul></li><li><p><strong>NAT (Network Address Translation):</strong> Allows devices in a local network to share one public IPv4 address.</p></li><li><p>NAT router:</p><ul><li><p>Outgoing datagrams: Replaces the private source IP address and port with the NAT's public IP address and a new port number.</p></li><li><p>Stores the mapping in a <strong>NAT translation table</strong>.</p></li><li><p>Incoming replies: Uses the table to replace the public destination IP/port with the correct private IP/port.</p></li></ul></li><li><p>Advantages:</p><ul><li><p>Only one public IP address needed for many devices.</p></li><li><p>Internal addresses can change without notifying the outside world.</p></li><li><p>Internal devices are not directly addressable from outside.</p></li></ul></li></ul><p>Recall: NAT translates private IP/port <span data-name="left_right_arrow" data-type="emoji">↔</span> public IP/port using a table.</p>
23
New cards

Why was IPv6 introduced, and how does it differ from IPv4?

  • Motivation: IPv4's 32-bit address space was running out.

  • IPv6 uses 128-bit addresses, providing a much larger address space.

  • IPv6 has a simpler, fixed-length 40-byte header to speed router processing.

  • IPv6 header includes:

    • Version, priority, flow label, payload length.

    • Next header, hop limit.

    • 128-bit source and destination addresses.

  • Compared with IPv4, IPv6 has:

    • No header checksum.

    • No fragmentation/reassembly by routers.

    • No options field.

  • Tunneling: Carries an IPv6 datagram inside an IPv4 datagram across an IPv4 network.

    • Allows IPv6 networks to communicate through routers that only support IPv4.

    • Also called “packet within a packet.”

  • IPv6 adoption has been slow because upgrading the Internet requires widespread deployment.

Recall: IPv4 = 32-bit | IPv6 = 128-bit | Tunneling = IPv6 inside IPv4.

<ul><li><p><strong>Motivation:</strong> IPv4's 32-bit address space was running out.</p></li><li><p>IPv6 uses <strong>128-bit addresses</strong>, providing a much larger address space.</p></li><li><p>IPv6 has a simpler, fixed-length <strong>40-byte header</strong> to speed router processing.</p></li><li><p>IPv6 header includes:</p><ul><li><p>Version, priority, flow label, payload length.</p></li><li><p>Next header, hop limit.</p></li><li><p>128-bit source and destination addresses.</p></li></ul></li><li><p>Compared with IPv4, IPv6 has:</p><ul><li><p>No header checksum.</p></li><li><p>No fragmentation/reassembly by routers.</p></li><li><p>No options field.</p></li></ul></li><li><p><strong>Tunneling:</strong> Carries an IPv6 datagram inside an IPv4 datagram across an IPv4 network.</p><ul><li><p>Allows IPv6 networks to communicate through routers that only support IPv4.</p></li><li><p>Also called “packet within a packet.”</p></li></ul></li><li><p>IPv6 adoption has been slow because upgrading the Internet requires widespread deployment.</p></li></ul><p>Recall: IPv4 = 32-bit | IPv6 = 128-bit | Tunneling = IPv6 inside IPv4.</p>
24
New cards

What is generalized forwarding, and how does the match + action abstraction work?

  • Destination-based forwarding: Uses only the destination IP address.

  • Generalized forwarding: Can match on many packet-header fields across link, network, and transport layers.

  • Match + action: Match packet-header values, then perform an action.

  • A router's flow table contains rules with:

    • Match: Header-field patterns that identify packets.

    • Action: Drop, forward, modify, or send the packet to a controller.

    • Priority: Resolves overlapping matching rules.

    • Counters: Track the number of packets and bytes.

Recall: Match = identify packet | Action = what to do with it.

25
New cards

What are examples of match + action rules in OpenFlow?

  • Destination-based forwarding: Match a destination IP address → forward to a specified output port.

  • Firewall: Match TCP destination port 22 (SSH) → drop packet.

  • Source-based filtering: Match a specific source IP address → drop packet.

  • Layer 2 forwarding: Match destination MAC address → forward to a specified port.

  • The same match + action abstraction can support:

    • Routers: Match destination IP prefix → forward.

    • Switches: Match destination MAC → forward or flood.

    • Firewalls: Match IP addresses/ports → permit or deny.

    • NAT: Match IP address/port → rewrite address and port.


<ul><li><p><strong>Destination-based forwarding:</strong> Match a destination IP address → forward to a specified output port.</p></li><li><p><strong>Firewall:</strong> Match TCP destination port 22 (SSH) → drop packet.</p></li><li><p><strong>Source-based filtering:</strong> Match a specific source IP address → drop packet.</p></li><li><p><strong>Layer 2 forwarding:</strong> Match destination MAC address → forward to a specified port.</p></li><li><p>The same match + action abstraction can support:</p><ul><li><p>Routers: Match destination IP prefix → forward.</p></li><li><p>Switches: Match destination MAC → forward or flood.</p></li><li><p>Firewalls: Match IP addresses/ports → permit or deny.</p></li><li><p>NAT: Match IP address/port → rewrite address and port.</p></li></ul></li></ul><p></p>
26
New cards

How does OpenFlow create network-wide behavior, and what is generalized forwarding used for?

  • A controller installs match + action rules in multiple switches.

  • Coordinated flow tables allow packets to follow specific paths across the network.

  • Generalized forwarding supports:

    • Matching fields from link, network, and transport layers.

    • Actions: drop, forward, modify, or send packets to a controller.

    • Programming network-wide packet behavior.

  • This is a form of network programmability: programmable, per-packet processing.

  • Related technology: P4, which supports more generalized network programming.

Recall: OpenFlow = coordinated match + action rules across network devices.