Download presentation
Presentation is loading. Please wait.
1
CS/ECE 438: Communication Networks
Fall 2017 4. Network Layer
2
Chapter 4: Network Layer
application transport network link physical
3
Chapter 4: Network Layer
Kurose & Ross 6th Edition: Chapter 4: Network Layer Kurose & Ross 7th Edition: Chapter 4: Network Data Plane Chapter 5: Network Control Plane This Course: Hybrid -Combine in one chapter -But follow 7th Ed. (Mostly!) application transport network link physical
4
Chapter 4: Network Layer
our goals: understand principles behind network layer services: Network layer service models Forwarding versus routing How a router works Routing (Path Selection) Broadcast, Multicast Dealing with Scale Advanced Topics: IPv6, Mobility, SDN Controllers Instantiation, Implementation in the Internet Network Management
5
Chapter 4: Outline Data Plane Control Plane Overview of Network Layer
What’s Inside a Router? IP: Internet Protocol Routing Protocols Intra-AS Routing in the internet: OSPF Routing among ISPs: BGP The SDN Control Plane ICMP: The Internet Control Message Protocol Network Management and SNMP
6
Network layer Transport segment from sending to receiving host
application transport network data link physical Transport segment from sending to receiving host On sending side encapsulates segments into datagrams On receiving side, delivers segments to transport layer Network layer protocols in every host, router Router examines header fields in all IP datagrams passing through it network data link physical application transport network data link physical
7
Two key network-layer functions
forwarding: move packets from router’s input to appropriate router output routing: determine route taken by packets from source to destination routing algorithms analogy: taking a trip forwarding: process of getting through single interchange routing: process of planning trip from source to destination
8
Network layer: data plane, control plane
local, per-router function determines how datagram arriving on router input port is forwarded to router output port forwarding function Control plane network-wide logic determines how datagram is routed among routers along end-end path from source host to destination host two control-plane approaches: traditional routing algorithms: implemented in routers software-defined networking (SDN): implemented in (remote) servers 1 2 3 0111 values in arriving packet header
9
Per-router control plane
Individual routing algorithm components in each and every router interact in the control plane Routing Algorithm data plane control values in arriving packet header 0111 1 2 3
10
Logically centralized control plane
A distinct (typically remote) controller interacts with local control agents (CAs) Remote Controller CA data plane control values in arriving packet header 1 2 0111 3
11
Network service model Q: What service model for “channel” transporting datagrams from sender to receiver? example services for individual datagrams: guaranteed delivery guaranteed delivery with less than 40 msec delay example services for a flow of datagrams: in-order datagram delivery guaranteed minimum bandwidth to flow restrictions on changes in inter-packet spacing
12
Network layer service models:
Guarantees ? Network Architecture Internet Service Model best effort Congestion feedback no (inferred Via loss Bandwidth none Loss no Order no Timing no
13
Chapter 4: Outline Overview of Network Layer What’s Inside a Router?
IP: Internet Protocol Routing Protocols Intra-AS Routing in the internet: OSPF Routing among ISPs: BGP The SDN Control Plane ICMP: The Internet Control Message Protocol Network Management and SNMP
14
Router architecture overview
high-level view of generic router architecture: routing, management control plane (software) operates in millisecond time frame routing processor forwarding data plane (hardware) operttes in nanosecond timeframe high-seed switching fabric router input ports router output ports
15
Input port functions decentralized switching:
lookup, forwarding queueing line termination link layer protocol (receive) switch fabric physical layer: bit-level reception decentralized switching: using header field values, lookup output port using forwarding table in input port memory (“match plus action”) goal: complete input port processing at ‘line speed’ queuing: if datagrams arrive faster than forwarding rate into switch fabric data link layer: e.g., Ethernet see chapter 5
16
Input port functions decentralized switching:
lookup, forwarding queueing line termination link layer protocol (receive) switch fabric physical layer: bit-level reception decentralized switching: using header field values, lookup output port using forwarding table in input port memory (“match plus action”) Destination-based forwarding: forward based only on destination IP address (traditional) Generalized Forwarding: forward based on any set of header field values data link layer: e.g., Ethernet see chapter 5
17
Destination-based forwarding
forwarding table Destination Address Range through otherwise Link Interface 1 2 3 Q: but what happens if ranges don’t divide up so nicely?
18
Longest prefix matching
when looking for forwarding table entry for given destination address, use longest address prefix that matches destination address. Destination Address Range *** ********* ********* *** ********* otherwise Link interface 1 2 3 examples: DA: which interface? DA: which interface?
19
Longest prefix matching
we’ll see why longest prefix matching is used shortly, when we study addressing longest prefix matching: often performed using ternary content addressable memories (TCAMs) content addressable: present address to TCAM: retrieve address in one clock cycle, regardless of table size Cisco Catalyst: can up ~1M routing table entries in TCAM
20
Switching fabrics transfer packet from input buffer to appropriate output buffer switching rate: rate at which packets can be transferred from inputs to outputs often measured as multiple of input/output line rate N inputs: switching rate N times line rate desirable three types of switching fabrics memory memory bus crossbar
21
Switching via memory first generation routers:
traditional computers with switching under direct control of CPU packet copied to system’s memory speed limited by memory bandwidth (2 bus crossings per datagram) input port (e.g., Ethernet) memory output system bus
22
Switching via a bus datagram from input port memory
to output port memory via a shared bus bus contention: switching speed limited by bus bandwidth 32 Gbps bus, Cisco 5600: sufficient speed for access and enterprise routers bus
23
Switching via interconnection network
overcome bus bandwidth limitations banyan networks, crossbar, other interconnection nets initially developed to connect processors in multiprocessor advanced design: fragmenting datagram into fixed length cells, switch cells through the fabric. Cisco 12000: switches 60 Gbps through the interconnection network crossbar
24
Input Port Queueing Packets may queue at input ports. Why?
Answer 1: Slow switching fabric switch fabric
25
Input port queuing Answer 2: Output port contention
Head-of-the-Line (HOL) blocking: queued datagram at front of queue prevents others in queue from moving forward one packet time later: green packet experiences HOL blocking switch fabric X switch fabric output port contention: only one red datagram can be transferred. lower red packet is blocked
26
Reducing Input Queueing
Why? Reduce HOL blocking Avoid packet drops at input queues Save on queue memory How? Increase switch fabric speed Increase inbound capacity of output ports
27
Output ports datagram buffer queueing switch fabric link layer protocol (send) line termination buffering required when datagrams arrive from fabric faster than the transmission rate scheduling discipline chooses among queued datagrams for transmission Datagram (packets) can be lost due to congestion, lack of buffers Priority scheduling – who gets best performance, network neutrality
28
Output port queueing at t, packets move from input to output one packet time later switch fabric buffering when arrival rate via switch exceeds output line speed queueing (delay) and loss due to output port buffer overflow!
29
How much buffering? 𝑅𝑇𝑇×𝐶 𝑁
RFC 3439 rule of thumb: average buffering equal to “typical” RTT (say 250 msec) times link capacity C e.g., C = 10 Gpbs link: 2.5 Gbit buffer recent recommendation [Appenzellet’04]: with N flows, buffering equal to: 𝑅𝑇𝑇×𝐶 𝑁
30
Scheduling mechanisms
scheduling: choose next packet to send on link FIFO (first in first out) scheduling: send in order of arrival to queue discard policy: if packet arrives to full queue: who to discard? tail drop: drop arriving packet priority: drop/remove on priority basis random: drop/remove randomly packet arrivals packet departures queue (waiting area) link (server)
31
Scheduling policies: priority
high priority queue (waiting area) low priority queue arrivals classify departures link (server) priority scheduling: send highest priority queued packet multiple classes, with different priorities class may depend on marking or other header info, e.g. IP source/dest, port numbers, etc. 2 1 3 4 5 arrivals 1 3 2 4 5 packet in service departures 1 3 2 4 5
32
Scheduling policies: still more
Round Robin (RR) scheduling: multiple classes cyclically scan class queues, sending one complete packet from each class (if available) real world example? 2 1 3 4 5 arrivals 1 3 2 4 5 packet in service departures 1 2 4 5 3
33
Scheduling policies: still more
Weighted Fair Queuing (WFQ): generalized Round Robin each class gets weighted amount of service in each cycle
34
Chapter 4: Outline Overview of Network Layer What’s Inside a Router?
IP : Internet Protocol Routing Protocols Intra-AS Routing in the internet: OSPF Routing among ISPs: BGP The SDN Control Plane ICMP: The Internet Control Message Protocol Network Management and SNMP Data Format and Fragmentation IPv4 Addressing Network Address Translation IPv6
35
The Internet network layer
host, router network layer functions: transport layer: TCP, UDP IP protocol addressing conventions datagram format packet handling conventions routing protocols path selection RIP, OSPF, BGP network layer forwarding table ICMP protocol error reporting router “signaling” link layer physical layer
36
32 bit destination IP address
IP datagram format IP protocol version number ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier header checksum time to live 32 bit source IP address head. len type of service flgs fragment offset upper layer 32 bit destination IP address options (if any) total datagram length (bytes) header length (bytes) “type” of data for fragmentation/ reassembly max number remaining hops (decremented at each router) upper layer protocol to deliver payload to e.g. timestamp, record route taken, specify list of routers to visit. how much overhead? 20 bytes of IP 20 bytes of TCP = 40 bytes + app layer overhead
37
IP fragmentation, reassembly
network links have MTU (max.transfer size) - largest possible link-level frame different link types, different MTUs large IP datagram divided (“fragmented”) within net one datagram becomes several datagrams “reassembled” only at final destination IP header bits used to identify, order related fragments … fragmentation: in: one large datagram out: 3 smaller datagrams reassembly …
38
IP fragmentation, reassembly
ID =x offset =0 fragflag length =4000 example: 4000 byte datagram MTU = 1500 bytes ID =x offset =0 fragflag =1 length =1500 =185 =370 =1040 one large datagram becomes several smaller datagrams 1480 bytes in data field offset = 1480/8
39
IP fragmentation, reassembly
Path MTU discovery MSS clamping Send large packet with Don’t Fragment (DF) flag set If arrives at router with smaller MTU, packet dropped ICMP “packet too big” sent back, with MTU Fails if ICMP packets are blocked Router adds/alters TCP maximum segment size (MSS) option to all flows Breaks layering guarantees
40
Chapter 4: Outline Overview of Network Layer What’s Inside a Router?
IP : Internet Protocol Routing Protocols Intra-AS Routing in the internet: OSPF Routing among ISPs: BGP The SDN Control Plane ICMP: The Internet Control Message Protocol Network Management and SNMP Data Format and Fragmentation IPv4 Addressing Network Address Translation IPv6
41
IP addressing: introduction
IP address: 32-bit identifier for host, router interface interface: connection between host/router and physical link Router’s typically have multiple interfaces host typically has one or two interfaces (e.g., wired Ethernet, wireless ) IP addresses associated with each interface = 223 1 1 1
42
IP addressing: introduction
Q: how are interfaces actually connected? A: we’ll learn about that in next chapters. A: wired Ethernet interfaces connected by Ethernet switches A: wireless WiFi interfaces connected by WiFi base station For now: don’t need to worry about how one interface is connected to another (with no intervening router)
43
Subnets IP address: What’s a subnet ? subnet part - high order bits
host part - low order bits What’s a subnet ? device interfaces with same subnet part of IP address can physically reach each other without intervening router subnet network consisting of 3 subnets
44
Subnets /24 /24 /24 subnet recipe to determine the subnets, detach each interface from its host or router, creating islands of isolated networks each isolated network is called a subnet subnet mask: /24
45
Subnets how many?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.