1/25
Looks like no tags are added yet.
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.
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?”
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”
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
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.
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)
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.
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
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.
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
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.

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.

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.

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.

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).
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.
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.

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.

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.

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:
Discover: Client broadcasts to find a DHCP server.
Offer: Server offers an IP address.
Request: Client requests that address.
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).
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.
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.

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.

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.
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.

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.