Chapter 4 Network Layer: The Data Plane PDF
Document Details
![AudibleParody3141](https://quizgecko.com/images/avatars/avatar-6.webp)
Uploaded by AudibleParody3141
2024
Firoz Fariz
Tags
Related
- Computer Networking: A Top-Down Approach, Chapter 4, Network Layer, Data Plane PDF
- Network Layer: Data Plane (PDF)
- Computer Networking: A Top-Down Approach PDF
- Computer Networking: A Top-Down Approach PDF
- Computer Networking CCS-2201/CE-231 Introduction to Networks PDF
- Computer Networking: A Top-Down Approach 8th Edition PDF
Summary
This document is chapter 4 of a computer networking textbook, focusing on the network layer and the data plane. It includes information on network layer services, forwarding versus routing, and router functions. The document is part of a larger computer networking book by Jim Kurose and Keith Ross, published by Pearson in 2020.
Full Transcript
Chapter 4 Network Layer: The Data Plane A note on the use of these Powerpoint slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you see the animations; and can add, modify, and delete slides (including this one) and slide content t...
Chapter 4 Network Layer: The Data Plane A note on the use of these Powerpoint slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you see the animations; and can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: § If you use these slides (e.g., in a class) that you mention their source (after all, we’d like people to use our book!) Computer Networking: § If you post any slides on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this A Top-Down Approach material. 8th edition Thanks and enjoy! JFK/KWR Jim Kurose, Keith Ross Pearson, 2020 All material copyright 1996-2016 J.F Kurose and K.W. Ross, All Rights Reserved Network Layer: Data Plane 4-1 Chapter 4: network layer chapter goals: § understand principles behind network layer services, focusing on data plane: network layer service models forwarding versus routing how a router works addressing generalized forwarding § instantiation, implementation in the Internet IP protocol NAT § Generalized Forwarding and SDN Network Layer: Data Plane 4-2 The Network Layer Overview Transport layer v Provides various forms of process-to-process communication by relying on the network layer’s host-to-host communication service. Network layer Decomposed the network layer into TWO parts: v Can provide its host-to-host Data Plane (Chapter 4) & communication service. Control Plane (Chapter 5) v the most complex layer in the protocol stack. 4-3 4-3 Chapter 4: data plane 4.1 Overview of Network layer data plane control plane 4.2 What’s inside a router input ports, switching, output ports, buffer management, scheduling 4.3 IP: Internet Protocol datagram format fragmentation IPv4 addressing network address translation (NAT) IPv6 4.4 Generalized Forwarding and SDN Match+action OpenFlow: match+action in action Network Layer: Data Plane 4-4 Network layer services and protocols application § transport segment from sending to transport network receiving host data link physical sender: encapsulates segments into network network datagrams, passes to link layer network data link data link physical physical data link receiver: delivers segments to transport physical network network layer protocol data link data link § network layer protocols in every physical physical Internet devices: hosts, routers network network § routers data link physical network data link physical router examines header fields in all IP data link datagrams passing through it physical application moves datagrams from input network data link transport ports to output ports to transfer network physical network data link network data link datagrams along end-end path data link physical physical physical Network Layer: Data Plane 4-5 Two key network-layer functions Two Functions routing forwarding 1st: Forwarding 2nd: Routing Move packets from Determine route taken router’s input to by packets from source appropriate router output. to destination. * routing algorithms Analogy: Analogy: Forwarding: process of Routing: Process of getting through single planning trip from source interchange. to destination. Network Layer: Data Plane 4-6 Two key network-layer functions Interplay between forwarding and routing Routing: Determines Forwarding: end-to-end Determines local path through forwarding for this network router. Figure: Routing algorithm determine values in forwarding tables 4-7 Network layer: data plane, control plane Data plane Control plane § Forwarding function: § Routing function: Determines how Determines how datagram is routed datagram arriving on among routers along end-end path router input port is from source host to destination host. forwarded to router § Network-wide logic. output port. Two Control-Plane § Local, per-router Approaches function. values in arriving packet header Traditional Routing SDN Algorithms 0111 1 (Software-Defined Networking SDN) 2 3 Implemented Implemented in server in routers. (remote) Network Layer: 4-8 Network Layer: Data Plane 4-8 Datagram forwarding table 4 billion IP addresses, so routing algorithm rather than list individual destination address, local forwarding table list range of addresses dest address output link (aggregate table entries) address-range 1 3 address-range 2 2 32 address-range 3 2 IPv4: 2 = 4,294,967,296 address-range 4 1 IP destination address in arriving packet’s header 1 3 2 Network Layer: 4-9 Forwarding and Routing (a) Per-router control plane The Traditional Approach Routing: Individual routing algorithm components in Determines end-to- each and every router interact in the control end path through plane network. Forwarding: Determines local forwarding of this router. Figure: Routing algorithm determine values in forwarding tables 4-10 Kurose, J.F. and Ross, K.W. (2021). Computer Networking: A Top-Down Approach (8th Edition). Pearson Education Limited, England. (pp. 307) Routing: Determines end-to- Forwarding and Routing end path through network. (b) The SDN Approach Software-Defined Networking (SDN) Remote controller computes, installs forwarding tables in routers Forwarding: Determines local forwarding of this router. 4-11 Figure: A remote controller determines and distributes values in forwarding tables Network service model Q: What service model for “channel” transporting datagrams from sender to receiver? example services for example services for a flow individual datagrams: of datagrams: § guaranteed delivery § in-order datagram delivery § guaranteed delivery with § guaranteed minimum less than 40 msec delay bandwidth to flow § restrictions on changes in inter-packet spacing Network Layer: Data Plane 4-12 Network-layer service model Quality of Service (QoS) Guarantees ? Network Service Architecture Model Bandwidth Loss Order Timing Internet best effort none no no no ATM Constant Bit Rate Constant rate yes yes yes Internet “best effort” service model ATM NoAvailable guarantees Bit Rate on: Guaranteed min no yes no Internet i. successful Intserv Guaranteeddatagram yes delivery toyesdestination yes yes ii. 1633 (RFC timing ) or order of delivery Internet iii. bandwidth Diffserv (RFC 2475) available to end-end possible flow possibly possibly no Network Layer: 4-13 Network layer service models: Quality of Service Network Service (QoS) Guarantees ?Congestion Architecture Model Bandwidth Loss Order Timing feedback Internet best effort none no no no no (inferred via loss) ATM CBR constant yes yes yes no rate congestion ATM VBR guaranteed yes yes yes no rate congestion ATM ABR guaranteed no yes no yes minimum ATM UBR none no yes no no Asynchronous Transfer Mode (ATM) - Network Architecture CBR: Constant Bit Rate,VBR=Variable Bit Rate, ABR=Available Bit Rate, UBR= Unspecified Bit Rate Network Layer: Data Plane 4-14 Reflections on best-effort service: § simplicity of mechanism has allowed Internet to be widely deployed adopted § sufficient provisioning of bandwidth allows performance of real-time applications (e.g., interactive voice, video) to be “good enough” for “most of the time” § replicated, application-layer distributed services (datacenters, content distribution networks) connecting close to clients’ networks, allow services to be provided from multiple locations § congestion control of “elastic” services helps It’s hard to argue with success of best-effort service model 4-15 Chapter 4: data plane 4.1 Overview of Network layer data plane control plane 4.2 What’s inside a router input ports, switching, output ports buffer management, scheduling 4.3 IP: Internet Protocol datagram format fragmentation IPv4 addressing network address translation (NAT) IPv6 4.4 Generalized Forwarding and SDN Match+action OpenFlow: match+action in action Network Layer: Data Plane 4-16 Router architecture overview TWO key router functions: v run routing algorithms / protocol (RIP, OSPF, BGP) v forwarding datagrams from a router’s incoming links to the appropriate outgoing links at a router Input Ports v Four router Output Ports components can be Router Switching Fabric identified: Routing Processor RIP (Routing Information Protocol) Figure: Four router components OSPF (Open-Shortest Path First) Network Layer: Data Plane 4-17 BGP (Border Gateway Protocol) Router architecture overview § high-level view of generic router architecture: routing, management routing control plane (software) processor operates in millisecond time frame forwarding data plane (hardware) operates in nanosecond timeframe high-speed switching fabric router input ports router output ports Network Layer: Data Plane 4-18 Router architecture overview The forwarding table (FT) is a shadow copy of computed and updated by FT is stored at each the routing processor input port Why shadow copy? forwarding decisions done locally (at input port) avoiding bottleneck at central processor forwarded via the Packet Lookup performed switching fabric arrives in the input port 36 Network Layer: Data Plane 4-19 Input port functions lookup, link forwarding line layer switch termination protocol fabric (receive) queueing physical layer: bit-level reception data link layer: decentralized switching: e.g., Ethernet § using header field values, lookup output see chapter 6 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 Network Layer: Data Plane 4-20 Input port functions lookup, link forwarding line layer switch termination protocol fabric (receive) queueing physical layer: bit-level reception decentralized switching: data link layer: § using header field values, lookup output e.g., Ethernet port using forwarding table in input port see chapter 6 memory (“match plus action”) § destination-based forwarding: forward based only on destination IP address (traditional) § generalized forwarding (SDN): forward based on any set of header field values Network Layer: Data Plane 4-21 Destination-based forwarding 3 Q: but what happens if ranges don’t divide up so nicely? Network Layer: 4-22 Longest prefix matching longest prefix match when looking for forwarding table entry for given destination address, use longest address prefix that matches destination address. Destination Address Range Link interface 11001000 00010111 00010*** ******** 0 11001000 00010111 00011000 ******** 1 11001000 00010111 00011*** ******** 2 otherwise 3 11001000 00010111 00010110 10100001 which interface? examples: 11001000 00010111 00011000 10101010 which interface? Network Layer: 4-23 Longest prefix matching longest prefix match when looking for forwarding table entry for given destination address, use longest address prefix that matches destination address. Destination Address Range Link interface 11001000 00010111 00010** ******** 0 11001000 00010111 * 00011000 1 ******** 11001000 match! 00010111 00011** ******** 2 otherwise * 3 11001000 00010111 00010110 10100001 which interface? examples: 11001000 00010111 00011000 10101010 which interface? Network Layer: 4-24 Longest prefix matching longest prefix match when looking for forwarding table entry for given destination address, use longest address prefix that matches destination address. Destination Address Range Link interface 11001000 00010111 00010** ******** 0 11001000 00010111 * 00011000 1 ******** 11001000 00010111 00011** ******** 2 otherwise * 3 match! 11001000 00010111 00010110 10100001 which interface? examples: 11001000 00010111 00011000 10101010 which interface? Network Layer: 4-25 Longest prefix matching longest prefix match when looking for forwarding table entry for given destination address, use longest address prefix that matches destination address. Destination Address Range Link interface 11001000 00010111 00010** ******** 0 11001000 00010111 * 00011000 1 ******** 11001000 00010111 00011** ******** 2 otherwise * 3 match! 11001000 00010111 00010110 10100001 which interface? examples: 11001000 00010111 00011000 10101010 which interface? Network Layer: 4-26 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 Network Layer: Data Plane 4-27 Switching Fabrics v Transfer packet from input link to appropriate output link v Switching rate: rate at which packets can be transfer from inputs to outputs § often measured as multiple of input/output line rate. § N inputs: switching rate = N times line rate desirable. R (rate: NR, R ideally)...... N input ports high-speed switching fabric N output ports R R 4-28 Switching fabrics § transfer packet from input link to appropriate output link § switching rate: rate at which packets can be transfer 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 Network Layer: Data Plane 4-29 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 output port memory port (e.g., (e.g., Ethernet) Ethernet) system bus Network Layer: Data Plane 4-30 Switching via memory Switching Fabrics Processor copy Datagram datagram into Memory arrives Check Dest Lookup FT Copy datagram to output port 4-31 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 bus speed for access and enterprise routers Network Layer: Data Plane 4-32 Switching via a bus Datagram gets Datagram on bus arrives Datagram gets switch label The correct output port get it à strip label à send on its ways 4-33 Switching via interconnection network (crossbar) § overcome bus bandwidth limitations § Crossbar, Clos networks, other interconnection nets initially developed to connect processors in multiprocessor § multistage switch: nxn switch from 3x3 crossbar multiple stages of smaller switches § exploiting parallelism: fragment datagram into fixed length cells on entry switch cells through the fabric, reassemble datagram at exit 8x8 multistage switch built from smaller-sized switches 4-34 Switching via interconnection network (crossbar) § scaling, using multiple switching “planes” in parallel: § speedup, scaleup via parallelism § Cisco CRS router: fabric plane 0 § basic unit: 8 fabric plane 1 fabric plane 2............ switching planes fabric plane 3 fabric plane 4............ § each plane: 3-stage fabric plane 5 interconnection fabric plane 6............ fabric plane 7 network............ § up to 100’s Tbps switching capacity Switching via interconnection network (crossbar) Check Datagram dest. (Y) Close A-Y à put arrives datagram on bus Y picks up datagram 45 Network Layer: Data Plane 4-36 Input port queuing § If fabric slower than input ports combined -> queueing may occur at input queues queueing delay and loss due to input buffer overflow! § Head-of-the-Line (HOL) blocking: queued datagram at front of queue prevents others in queue from moving forward switch switch fabric fabric output port contention: one packet time later: only one red datagram can be green packet transferred. experiences HOL lower red packet is blocked blocking Network Layer: Data Plane 4-37 Output port queuing datagram switch buffer link layer line fabric termination protocol (rate: NR) queueing (send) R § Buffering required when datagrams arrive from fabric faster than link Datagrams can be lost transmission rate. Drop policy: which datagrams to drop if no free buffers? due to congestion, lack of buffers § Scheduling discipline chooses Priority scheduling – who among queued datagrams for gets best performance, transmission network neutrality 4-38 Output port queueing switch switch fabric fabric at t, packets more one packet time later from input to output § buffering when arrival rate via switch exceeds output line speed § queueing (delay) and loss due to output port buffer overflow! Network Layer: Data Plane 4-39 How much buffering? § RFC 3439 rule of thumb: average buffering size = RTT * link capacity C e.g., RTT=250 msec (“typical”), C = 10 Gpbs link average buffering size =250 msec * 10 Gpbs » = 2.5 Gbit buffer § More recent recommendation: with N flows, buffering equal to. RTT C N § but too much buffering can increase delays (particularly in home routers) long RTTs: poor performance for realtime apps, sluggish TCP response recall delay-based congestion control: “keep bottleneck link just full enough (busy) but no fuller” Network Layer: Data Plane 4-40 Exercise Supposed the link capacity for a router is 20Mbps and RTT for a packet is 400msec. If the TCP flow of packets is 16, calculate the buffering needed for the router. Solution: v Link capacity, C = 20Mbps v RTT = 400msec v TCP flows, N = 16 RTT ∗ C 400msec∗ 20Mbps Buffer size, B = = N 16 0.4sec∗ 20Mbps = 4 = 0.4 ∗ 5 = 2Mb 4-41 Buffer Management buffer management: switch datagram buffer link § drop: which packet to add, fabric layer line R drop when buffers are full protocol termination queueing (send) tail drop: drop arriving scheduling packet priority: drop/remove on priority basis Abstraction: queue § marking: which packets to mark to signal congestion R packet (ECN, RED) packet departures arrivals queue link (waiting area) (server) 4-42 Chapter 4: data plane 4.1 Overview of Network layer data plane control plane 4.2 What’s inside a router input ports, switching, output ports buffer management, scheduling 4.3 IP: Internet Protocol datagram format fragmentation IPv4 addressing network address translation (NAT) IPv6 4.4 Generalized Forwarding and SDN Match+action OpenFlow: match+action in action Network Layer: Data Plane 4-43 Network Layer: Internet host, router network layer functions: transport layer: TCP, UDP Path-selection IP protocol datagram format algorithms: addressing network implemented in packet handling conventions routing protocols forwarding layer (RIP, OSPF, BGP) table ICMP protocol SDN controller error reporting router “signaling” link layer physical layer RIP (Routing Information Protocol) OSPF (Open Shortest path First) BGP (Border Gateway Protocol) 4-44 IP Datagram format 32 bits IP protocol version number total datagram ver head. type of length length (bytes) header length(bytes) len service fragment fragmentation/ “type” of service: 16-bit identifier flgs § diffserv (0:5) offset reassembly time to upper header § ECN (6:7) header checksum live layer checksum TTL: remaining max hops source IP address 32-bit source IP address (decremented at each router) Maximum length: 64K bytes destination IP address 32-bit destination IP or less upper layer protocol (e.g., TCP or UDP) Typically: 1500 bytes address options (if any) e.g., timestamp, record route taken payload data (variable length, typically a TCP or UDP segment) 4-45 IP datagram format § Understanding datagram format is important § A datagram has its own header (overhead) è 20 bytes § A datagram holds TCP/UDP segment within it è TCP/UDP has own overhead overhead § 20 bytes of TCP § 20 bytes of IP § = 40 bytes + app layer overhead for TCP+IP 4-46 IP datagram format IPv4 Datagram Format 20 bytes 4-47 IP fragmentation, reassembly § network links have MTU (max.transfer unit) - largest possible link-level frame fragmentation: different link types, … in: one large datagram different MTUs out: 3 smaller datagrams Ethernet MTU 1500 bytes § large IP datagram divided reassembly (“fragmented”) within net one datagram becomes several datagrams “reassembled” only at … final destination IP header bits used to identify, order related fragments Network Layer: Data Plane 4-48 IP fragmentation, reassembly IP fragmentation, reassembly Original datagram : 4000 bytes = 20 bytes of IP header Fragmentation: + 3,980 bytes of IP payload = 4000 / 1500 bytes = 3 datagrams Reassembly: 4-49 IP fragmentation, reassembly IP fragmentation, reassembly Fragment #1 length=1500 ID=777 flag=1 offset=0 Fragment #2 length=1500 ID=777 flag=1 offset=185 Fragment #3 length=1040 ID=777 flag=0 offset=370 4-50 IP fragmentation, reassembly IP fragmentation, reassembly Data (1480) + Header (20) = 1500 bytes Why 1480 not 1500? offset: 0 0 8 Fragments of... 1472 Fragment 1 same datagram Offset value specified in 1480 185 units of 8-byte chunks... Fragment 2 2952 2960 370... Fragment 3 3980 4-51 Exercise A datagram of 5000 bytes arrived at a router and must be forwarded to a link with an MTU of 1500 bytes. Suppose that the original datagram is stamped with an identification number of 333. Draw all IP fragments generated after fragmentation that reflect the requirement of original payload data in the datagram. Datagram length=5000 ID=333 flag=0 offset=0 4-52 Solution Solution: Datagram length=5000 ID=333 flag=0 offset=0 § 20 header + 4980 data v Total fragments = 5000 / 1500 = 4 v 4980 = 1480 + 1480 + 1480 + 540 Fragment#1 length=1500 ID=333 flag=1 offset=0 Fragment#2 length=1500 ID=333 flag=1 offset=185 Fragment#3 length=1500 ID=333 flag=1 offset=370 Fragment#4 length= 560 ID=333 flag=0 offset=555 4-53 Chapter 4: data plane 4.1 Overview of Network layer data plane control plane 4.2 What’s inside a router input ports, switching, output ports buffer management, scheduling 4.3 IP: Internet Protocol datagram format fragmentation IPv4 addressing network address translation (NAT) IPv6 4.4 Generalized Forwarding and SDN Match+action OpenFlow: match+action in action Network Layer: Data Plane 4-54 IPv4 Addressing What is an IP Address? ❖ IP address is used to identify a host within a network. are written in a so-called dotted decimal notation Each byte is identified by a decimal number in the range [0…255]: ❖ Example: 4-55 IPv4 Addressing Addresses ❖ IP address: 32-bit identifier for each host or 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 802.11) One IP address associated with each interface ! 4-56 IPv4 Addressing Addresses Q: How are interfaces actually connected? A: wired Ethernet interfaces connected by Ethernet switches (Link Layer) A: wireless WiFi interfaces connected by WiFi base station (AP – access point) 4-57 IPv4 Addressing – Subnet/Subnetting 4-58 IPv4 Addressing Subnets Interconnecting three host interfaces and one router interface forms a subnet. What’s a subnet ? ❖ device interfaces that can physically reach each other without passing through an intervening router ❖ is a logical, visible subdivision of an IP network. The practice of dividing a network into two or more networks is called 4-59 subnetting. IPv4 Addressing Subnets ❖ A subnet is a group of host identified with having the same 223.1.1.0/24 223.1.2.0/24 network portion of their IP address ❖ Example: ❖ 223.1.1.1, 223.1.1.2, 223.1.1.3, 223.1.1.4, … 223.1.3.0/24 223.1.1.1, 223.1.1.2, 223.1.1.3, 223.1.1.4, … ❖ This network portion is indicated by the subnet mask with notation /24 Network consisting of 3 subnets ❖ Subnet mask defines the subnet address ➙ 223.1.1.0/24 4-60 IPv4 Addressing Subnet Mask ❖ A computer OR a router must be able to identify whether a host with a given IP address is on its subnet or not. ❖ The subnet mask is: used to separate the network portion of an IP address from the host portion. a set of 32 bits IP address which the bits in the network portion of the address are set to 1s and the host portion is set to 0s. 4-61 IPv4 Addressing Subnet Mask ❖ IP address with w.x.y.z /24 address. 8 bits 8 bits 8 bits 8 bits 11111111 11111111 11111111 00000000 Network portion Host portion § Thus, subnet mask = 255.255.255.0 4-62 IPv4 Addressing Subnet Mask ❖ Each IP address can be divided into network portion and host portion Network portion (indicated by subnet mask) all host with same network portion are in the same subnet these host can physically reach each other without intervening router Host portion (the remaining bits à {32 bits – subnet mask }) The individual (unique) address for a host Example: 192.64.22.31/24 192 64 22 31 11000000. 01000000. 00010110. 00011111 Network portion Host portion 4-63 IPv4 Addressing Example Subnet Mask Convert these subnet mask into decimal values. (a) /8 11111111.00000000.00000000.00000000 255.0.0.0 (b) /16 11111111.11111111.00000000.00000000 255.255.0.0 (c) /24 11111111.11111111.11111111.00000000 255.255.255.0 (d) /25 11111111.11111111.11111111.10000000 255.255.255.128 4-64 IPv4 Addressing 192.64.22.31/24 192 64 22 31 11000000. 01000000. 00010110. 00011111 Network portion Host portion ❖ Given the information we find that: The host portion has 8 bits à this subnet can have up to 28 = 256 hosts With IP addresses ranging from 192.64.22.0 – 192.64.22.255 But the first and last IP address cannot be assigned to host so only 254 hosts available (or usable) …thus useable IP addresses à 192.64.22.1 – 192.64.22.254 The first IP – becomes network address à to address the subnet The last IP – becomes broadcast address à used to broadcast info throughout the subnet 4-65 IPv4 Addressing Subnet Network Address (Binary Method) and Broadcast Address ❖ Given an IP address and subnet mask, we can find the network address and broadcast address … ❖ Example: IP address = 192.168.1.10/24 Set the host portion as all zero(0) to get network address Set the host portion as all one(1) to get broadcast address 192.168.1.10 Network address: 192.168.1.0 192.168.1. 192.168.1. Broadcast address: 192.168.1.255 4-66 IPv4 Addressing Subnet Network Address (AND Method) To determine subnet address: 223.1.1.0/24 IP address AND subnet mask Example: If the subnet mask is 255.255.255.0, define 223. 1. 1.4 the subnet address. AND 255.255.255.0 11011111.00000001.00000001.00000100 (AND) 11111111.11111111.11111111.00000000 11011111.00000001.00000001.00000000 4-67 223.1.1.0/24 IPv4 Addressing Example 182.126.103.215/30 Network portion of the address DOES NOT CHANGE. 4-68 IPv4 Addressing Example 178.120.188.96/16 16 bits for the network portion and 16 bits for host portion Network portion of the address DOES NOT CHANGE. 4-69 Class Exercise ❖ Given these IP addresses, determine the network portion and the host portion In-class try a. 192.168.12.0/24 out... b. 192.168.12.25/25 c. 172.16.32.0/16 d. 172.16.32.0/20 e. 10.10.10.0/8 4-70 IPv4 Addressing – Type of Addressing Type of Addressing Classful Classless (CIDR) ( old one) ( current) 4-71 Classful Addressing ❖ In the beginning, addressing scheme known as classful addressing à where IP blocks were given according to size Class A – big size of organization Class B – medium size of organization Class C – small size of organization 4-72 Classful addressing 4-73 Classful addressing /8 255.0.0.0 /16 255.255.0.0 /24 255.255.255.0 4-74 Classful addressing Example: ❖ An organization needs 2000 hosts and apply class B ❖ Class B allocated 65000 addresses, and leaving more than 63000 not used. ❖ PROBLEMS: Wasted addresses and not optimized Large organizations do not fully utilize the IP address they have Had problem supporting the rapidly growing number of organizations with small and medium-sized subnets 4-75 Classless Inter Domain Routing (CIDR) more flexible than original system of internet address scheme (classful addressing), subnet portion of address of arbitrary length can avoid situations where large numbers of IP addresses are unused where x is no. of bits in address format: a.b.c.d/x subnet portion of address 200.23.16.0/23 often referred to as prefix 11001000.00010111.00010000.00000000 host Subnet part part Network part 4-76 Classless Inter Domain Routing (CIDR) Example: An organization needs 2000 hosts and apply for IP address Host needed is 2000 à 211 = 2048 (i.e. only extra 48) Thus an IP addressà 163.44.224.0/21 is given How we get … /21 ? à 32 – 11 = 21 21 bits 11 bits 11111111 11111111 11111 00000000000 Network portion Host portion 4-77 Subnetting: To subnet a small network Q: How does a network get subnets part of an IP address? A: by subnetting the given IP address Example: 200.23.16.0/20 to be divided into 8 subnets (23). need to borrow 3 bits from host portion Network portion to define Host8 subnets portion ISP’s block: 200.23.16.0/20 à 11001000.00010111.00010000.00000000 Subnet 0: 200.23.16.0/23 à 11001000.00010111.00010000.00000000 Subnet 1: 200.23.18.0/23 à 11001000.00010111.00010010.00000000 …... 4-78 Subnet 7: 200.23.30.0/23 à 11001000.00010111.00011110.00000000 Subnetting (Example): To subnet a small network ❖ Say, Company A (CA) is given the IP address 192.168.1.0/24 ❖ CA has 4 departments under it: RND Sales Finance Human Resource (HR) ❖ CA decided to divide the network according to purpose. So, the network needs to have 4 subnets. 4-79 Subnetting (Example): To subnet a small network 192.168.1.0/24 to be divided into 4 subnets 192.168.1.0/24 à 11000000.10101000.00000001.00000000 4-80 Subnetting (Example): To subnet a small network 192.168.1.0/24 to be divided into 4 subnets Network portion Host portion 192.168.1.0/24 à 11000000.10101000.00000001.00000000 Subnet address: à 11000000.10101000.00000001.00000000 need to borrow 2 bits from host portion to define 4 subnets (i.e. 22) 4-81 Subnetting (Example): To subnet a small network 192.168.1.0/24 to be divided into 4 subnets Network portion Host portion 192.168.1.0/24 à 11000000.10101000.00000001.00000000 Subnet address: à 11000000.10101000.00000001.00000000 Subnet 0: à 11000000.10101000.00000001.00000000 192.168.1.0/26 6 bit left for host The subnet mask for each subnet is /26 OR 255.255.255.192 4-82 Subnetting (Example): To subnet a small network Subnet 0: à 11000000.10101000.00000001.00000000 192.168.1.0/26 192.168.1.[ 00 000000 ] subnet 0.[ 00 111111 ].[ 01 000000 ] subnet 1.[ 01 111111 ].[ 10 000000 ] subnet 2.[ 10 111111 ].[ 11 000000 ] subnet 3.[ 11 111111 ] 4-83 Subnetting (Example): To subnet a small network Subnet 0: à 11000000.10101000.00000001.00000000 192.168.1.0/26 192.168.1.[ 00 000000 ] subnet 0; network address = 192.168.1.0.[ 00 111111 ].[ 01 000000 ] subnet 1; network address = 192.168.1.64.[ 01 111111 ].[ 10 000000 ] subnet 2; network address = 192.168.1.128.[ 10 111111 ].[ 11 000000 ] subnet 3; network address = 192.168.1.192.[ 11 111111 ] 4-84 Subnetting (Example): To subnet a small network Subnet 0: à 11000000.10101000.00000001.00000000 192.168.1.0/26 192.168.1.[ 00 000000 ].[ 00 111111 ] subnet 0; broadcast address = 192.168.1.63.[ 01 000000 ].[ 01 111111 ] subnet 1; broadcast address = 192.168.1.127.[ 10 000000 ].[ 10 111111 ] subnet 2; broadcast address = 192.168.1.191.[ 11 000000 ].[ 11 111111 ] subnet 3; broadcast address = 192.168.1.255 4-85 Subnetting (Example): To subnet a small network Subnet 0: à 11000000.10101000.00000001.00000000 192.168.1.0/26 192.168.1.[ 00 000000 ] 00 000001 – first host.[ 00 111111 ] 00 111110 – last host.[ 01 000000 ] 01 000001 – first host.[ 01 111111 ] 01 111110 – last host.[ 10 000000 ] 10 000001 – first host.[ 10 111111 ] 10 111110 – last host.[ 11 000000 ] 11 000001 – first host.[ 11 111111 ] 11 111110 – last host 4-86 Subnetting (Example): To subnet a small network 192.168.1.0/24 be divided into 4 subnets we get: 4-87 Self Exercise study A B Given a network with hosts and interconnecting routers. (a) What are the subnet mask 200.1.0.0/16 for the network that consists C of host A, B, D and E? (b) What is the subnet network address of X if the subnet mask is 255.0.0.0? (c) Get first valid usable IP F address for host A, B, D, E and G. 161.139.2.0/24 X (d) Get last valid usable IP address for each router’s interface at C and F. D E G 10.90.2.1 4-88 Self Solution study (a) Net. consists of host A, B: A B 255.255.0.0 Net. consists of host D, E: 255.255.255.0 200.1.0.0/16 (b) 10.90.2.1 C 255. 0.0.0 10. 0.0.0 (c) First valid usable IP address: A: 200.1.0.1 B: 200.1.0.2 D: 161.139.2.1 F E: 161.139.2.2 161.139.2.0/24 X G: 10.90.2.2 (d) Last valid usable IP address: C: 200.1.255.254 F: 161.139.2.254 D E G 10.90.2.1 4-89 Self Exercise study Given an IP address as 200.23.0.0/20. The network need to be divided into 5 subnets with first subnet label as Subnet 0 and last subnet label as Subnet 4. (a) What is the original subnet mask for the given IP address network? (b) How many hosts can be supported in the original IP address network? (c) List all new subnet address in binary and dotted decimal format. (d) What is the new subnet mask for each subnet? (e) How many hosts can be supported for each new subnet? (f) List the first 5 valid IP addresses for the Subnet 3. (g) How many subnet remain unused and can be utilized in future? 4-90 Self study Solution Solutions: (a) 11111111.11111111.11110000.00000000 255.255.240.0 (b) Total original hosts à 212 – 2 = 4096 – 2 = 4094 hosts (12 bit for host portion) (c) Number of Subnets Needed = 5 à nearest 23 = 8 subnets; 3 bits for subnet; 11001000.00010111.00000000.00000000 (200.23.0.0/23) 11001000.00010111.00000010.00000000 (200.23.2.0/23) 11001000.00010111.00000100.00000000 (200.23.4.0/23) 11001000.00010111.00000110.00000000 (200.23.6.0/23) 11001000.00010111.00001000.00000000 (200.23.8.0/23) 11001000.00010111.00001010.00000000 (200.23.10.0/23) 11001000.00010111.00001100.00000000 (200.23.12.0/23) 11001000.00010111.00001110.00000000 (200.23.14.0/23) 4-91 Self study Solution Solutions: (d) 11111111.11111111.11111110.00000000 255.255.254.0 (e) Total hosts in new subnet à 29 = 512 – 2 = 510 hosts (9 bits for host portion) (f) Subnet 3 = 200.23.6.0/23 11001000.00010111.00000110.00000001 (200.23.6.1/23) 11001000.00010111.00000110.00000010 (200.23.6.2/23) 11001000.00010111.00000110.00000011 (200.23.6.3/23) 11001000.00010111.00000110.00000100 (200.23.6.4/23) 11001000.00010111.00000110.00000101 (200.23.6.5/23) (g) Need 5 subnets, generated subnets = 8, extra = 8 – 5 = 3 subnets for future use 4-92 Extra Exercise: Subnet small network Say, Company A (CA) is given the Network address 192.168.1.0/24 CA has 4 departments under it: RND, Sales, Finance, HR Each department needs the following number of usable host: RND(50), Sales(30), Finance(20), HR(10) Task: – Divide equally for all dept. (same/equal size) 4-93 Network address 192.168.1.0/24 to divide into SAME/EQUAL SIZED 4 dept : RND, SALES, FIN, HR STEP 1 : Divide the Network and host portion (HP) 192. 168. 1. 0 11000000. 10101000.00000001.00000000 NP = 24 bits **when subnetting ONLY HOST PORTION is borrowed from (disturbed) STEP 2 : Decide how many bits need to BORROW from HP? 4 depts. è 4 subnet So 2x = 4 è x = 2 bits Borrow 2 bits 4-94 Network address 192.168.1.0/24 to divide into SAME/EQUAL SIZED 4 dept : RND, SALES, FIN, HR Borrow from STEP 3 : Borrow 2 bits from the host portion this end – THE LEFTMOST 192. 168. 1. 0 11000000. 10101000.00000001.00000000 Within the subnet , the HP STEP 4 : Arrange the new subnets gets all 0 and all 1 192. 168. 1. 0 11000000. 10101000.00000001.00000000.00111111.01000000.01111111.10000000 4-95 Network address 192.168.1.0/24 to divide into SAME/EQUAL SIZED 4 dept : RND, SALES, FIN, HR STEP 4 : Arrange the new subnets S0 Network Add 192. 168. 1. 0 11000000. 10101000.00000001.00000000 S0.00111111 S0 Broadcast Add.01 000000 S1 S0 (Subnet 0).01 111111 network address:.10 000000 S2 192.168.1.0.10 111111 Broadcast address:.11 000000 S3 192.168.1.63.11 111111 4-96 Network address 192.168.1.0/24 to divide into SAME/EQUAL SIZED 4 dept : RND, SALES, FIN, HR S0 (Subnet 0) Usable/valid IP address: STEP 5 : Assign the new subnets 192.168.1.1 to 192. 168. 1. 0 192.168.1.62 11000000. 10101000.00000001.00000000 000001 S0 - RND.00111111 111110.01 000000 000001 S1 - SALES.01 111111 111110.10 000000 000001 S2 - FIN.10 111111 111110.11 000000 000001 S3 - HR.11 111111 111110 4-97 STEP 6 : Complete the subnetting table SUBNET NETWORK USABLE/VALID IP BROADCAST SUBNET MASK ADDRESS ADD. RANGE ADDRESS 0 192.168.1.0 192.168.1.1 – 192.168.1.63 /26 OR 192.168.1.62 255.255.255.192 1 192.168.1.64 192.168.1.65 – 192.168.1.127 /26 OR 192.168.1.126 255.255.255.192 2 192.168.1.128 192.168.1.126 – 192.168.1.191 /26 OR 192.168.1.190 255.255.255.192 3 192.168.1.192 192.168.1.190 – 192.168.1.255 /26 OR 192.168.1.254 255.255.255.192 Convert calculation in table to binary format for complete understanding 4-98 Obtaining a block of addresses (network address) Q: How does a network get IP address block for itself (network part of address) A: ICANN: Internet Corporation for Assigned Names and Numbers (http://www.icann.org/) allocates addresses manages DNS assigns domain names, resolves disputes ICANN allocates addresses to 5 regional Internet registries (RRs) like ARIN, RIPE, APNIC, and LACNIC …which handle the allocation/management of addresses within their regions. 4-99 Obtaining a host addresses Q: How does a host get IP address within its network (host part of address)? A: local ISP (e.g. Telekom, Celcom, DiGi, Maxis) & local organization like UTM: DHCP: Dynamic Host Configuration Protocol: dynamically get address from server. “plug-and-play” concept OR hard-coded by sysadmin in config file (e.g., /etc/rc.config in UNIX) 4-100 Dynamic Host Configuration Protocol (DHCP) ❖ In an organization, IP address can be assigned to host Statically – User manually configure IP address at host (normally done by ‘network admin’) Dynamically - done using DHCP ❖ DHCP can be configured to assign the same IP address to a given host each time it connects to the network OR different IP address each time the host connects to the network. 4-101 Dynamic Host Configuration Protocol (DHCP) ❖ Goal: allow host to dynamically obtain its IP address from DHCP server when it joins network host will lease an IP address, can renew its lease on address in use allows reuse of addresses (only hold address while connected/on) support for mobile users who want to join/leave network ❖ DHCP is a plug-and-play protocol Makes network admin job easier Makes network mobility easier too 4-102 Dynamic Host Configuration Protocol (DHCP) A newly arriving host, goes through the DHCP protocol four-step process 4-103 DHCP client-server scenario DHCP 223.1.1.0/24 server 223.1.1.1 223.1.2.1 223.1.1.2 arriving DHCP 223.1.1.4 223.1.2.9 client needs address in this 223.1.1.3 223.1.3.27 223.1.2.2 network 223.1.2.0/24 223.1.3.1 223.1.3.2 DHCP can return more than just allocated IP address on subnet: 223.1.3.0/24 address of first-hop router for client name and IP address of DNS sever network mask (indicating network versus host portion of address) Network Layer 4-104 DHCP – 4 Steps Process DHCP overview: § host broadcasts DHCP discover msg [optional] § DHCP server responds with DHCP offer msg [optional] § host requests IP address: DHCP request msg § DHCP server sends address: DHCP ack msg ❖ DHCP 4 steps process DHCP server discovery DHCP server offer DHCP request DHCP ACK 4-105 DHCP – 4 Steps Process ❖ DHCP server discovery newly arriving host needs to find a DHCP server à done by broadcasting the DHCP discover message source: this host 0.0.0.0 dest: 255.255.255.255 (i.e. broadcast to all) UDP: Port 67 ❖ DHCP server offer DHCP server(s) will respond to the client with a DHCP offer message that is broadcast to all A client might receive offers from > 1 DHCP servers 4-106 DHCP – 4 Steps Process ❖ DHCP request Client choose from among the offers Respond to its selected offer with a DHCP request message. ❖ DHCP ACK The server responds to the DHCP request message with a DHCP ACK message, confirming the requested parameters. 4-107 DHCP – 4 Steps Process yiaddr = your IP address 4-108 DHCP client-server scenario DHCP server: 223.1.2.5 DHCP discover arriving client src : 0.0.0.0, 68 Broadcast: is there a dest.: 255.255.255.255,67 DHCPyiaddr: server 0.0.0.0 out there? transaction ID: 654 DHCP offer src: 223.1.2.5, 67 Broadcast: I’m a DHCP dest: 255.255.255.255, 68 server! yiaddrr:Here’s an IP 223.1.2.4 address you can use transaction ID: 654 lifetime: 3600 secs DHCP request src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 Broadcast: OK. I’ll take yiaddrr: 223.1.2.4 that IP address! transaction ID: 655 lifetime: 3600 secs DHCP ACK src: 223.1.2.5, 67 Broadcast: OK. You’ve dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 got that IPID: transaction address! 655 lifetime: 3600 secs 4-109 DHCP: example DHCP DHCP § Connecting laptop will use DHCP DHCP DHCP UDP IP to get IP address, address of first- DHCP Eth hop router, address of DNS server. Phy DHCP § DHCP REQUEST message encapsulated in UDP, encapsulated in IP, DHCP DHCP 168.1.1.1 encapsulated in Ethernet DHCP UDP IP § Ethernet frame broadcast (dest: DHCP DHCP Eth router with DHCP Phy server built into FFFFFFFFFFFF) on LAN, received at router router running DHCP server § Ethernet demux’ed to IP demux’ed, UDP demux’ed to DHCP DHCP: example DHCP DHCP § DCP server formulates DHCP ACK DHCP UDP containing client’s IP address, IP DHCP IP address of first-hop router for client, Eth name & IP address of DNS server DHCP Phy § encapsulated DHCP server reply DHCP DHCP forwarded to client, demuxing up to DHCP DHCP UDP IP DHCP at client DHCP Eth router with DHCP DHCP Phy server built into § client now knows its IP address, name router and IP address of DNS server, IP address of its first-hop router DHCP: Example Wireshark output (home LAN) request reply Message type: Boot Request (1) Message type: Boot Reply (2) Hardware type: Ethernet Hardware type: Ethernet Hardware address length: 6 Hardware address length: 6 Hops: 0 Hops: 0 Transaction ID: 0x6b3a11b7 Transaction ID: 0x6b3a11b7 Seconds elapsed: 0 Seconds elapsed: 0 Bootp flags: 0x0000 (Unicast) Bootp flags: 0x0000 (Unicast) Client IP address: 0.0.0.0 (0.0.0.0) Client IP address: 192.168.1.101 (192.168.1.101) Your (client) IP address: 0.0.0.0 (0.0.0.0) Your (client) IP address: 0.0.0.0 (0.0.0.0) Next server IP address: 0.0.0.0 (0.0.0.0) Next server IP address: 192.168.1.1 (192.168.1.1) Relay agent IP address: 0.0.0.0 (0.0.0.0) Relay agent IP address: 0.0.0.0 (0.0.0.0) Client MAC address: Wistron_23:68:8a (00:16:d3:23:68:8a) Client MAC address: Wistron_23:68:8a (00:16:d3:23:68:8a) Server host name not given Server host name not given Boot file name not given Boot file name not given Magic cookie: (OK) Magic cookie: (OK) Option: (t=53,l=1) DHCP Message Type = DHCP Request Option: (t=53,l=1) DHCP Message Type = DHCP ACK Option: (61) Client identifier Option: (t=54,l=4) Server Identifier = 192.168.1.1 Length: 7; Value: 010016D323688A; Option: (t=1,l=4) Subnet Mask = 255.255.255.0 Hardware type: Ethernet Option: (t=3,l=4) Router = 192.168.1.1 Client MAC address: Wistron_23:68:8a (00:16:d3:23:68:8a) Option: (6) Domain Name Server Option: (t=50,l=4) Requested IP Address = 192.168.1.101 Length: 12; Value: 445747E2445749F244574092; Option: (t=12,l=5) Host Name = "nomad" IP Address: 68.87.71.226; Option: (55) Parameter Request List IP Address: 68.87.73.242; Length: 11; Value: 010F03062C2E2F1F21F92B IP Address: 68.87.64.146 1 = Subnet Mask; 15 = Domain Name Option: (t=15,l=20) Domain Name = "hsd1.ma.comcast.net." 3 = Router; 6 = Domain Name Server 44 = NetBIOS over TCP/IP Name Server …… Network Layer 4-112 DHCP: Example Assignment (home LAN) TCP/IP Client Setting DHCP Server Assignment 4-113 Chapter 4: data plane 4.1 Overview of Network layer data plane control plane 4.2 What’s inside a router input ports, switching, output ports buffer management, scheduling 4.3 IP: Internet Protocol datagram format fragmentation IPv4 addressing network address translation (NAT) IPv6 4.4 Generalized Forwarding and SDN Match+action OpenFlow: match+action in action 4-117 NAT: network address translation Q: are there enough 32-bit IP addresses? § ICANN allocated last chunk of IPv4 addresses to RRs in 2011 § NAT (next) helps IPv4 address space exhaustion § IPv6 has 128-bit address space "Who the hell knew how much address space we needed?" Vint Cerf (reflecting on decision to make IPv4 address 32 bits long) 4-118 NAT: network address translation NAT: all devices in local network share just one IPv4 address as far as outside world is concerned rest of local network (e.g., home Internet network) 10.0.0/24 10.0.0.1 138.76.29.7 10.0.0.4 10.0.0.2 10.0.0.3 all datagrams leaving local network have datagrams with source or destination in same source NAT IP address: 138.76.29.7, this network have 10.0.0/24 address for but different source port numbers source, destination (as usual) NAT: network address translation § all devices in local network have 32-bit addresses in a “private” IP address space (10/8, 172.16/12, 192.168/16 prefixes) that can only be used in local network § advantages: § just one IP address needed from provider ISP for all devices § can change addresses of host in local network without notifying outside world § can change ISP without changing addresses of devices in local network § security: devices inside local net not directly addressable, visible by outside world NAT: network address translation implementation: NAT router must (transparently): § outgoing datagrams: replace (source IP address, port #) of every outgoing datagram to (NAT IP address, new port #) remote clients/servers will respond using (NAT IP address, new port #) as destination address § remember (in NAT translation table) every (source IP address, port #) to (NAT IP address, new port #) translation pair § incoming datagrams: replace (NAT IP address, new port #) in destination fields of every incoming datagram with corresponding (source IP address, port #) stored in NAT table NAT: network address translation NAT translation table 1: host 10.0.0.1 2: NAT router WAN side addr LAN side addr changes datagram sends datagram to source addr from 138.76.29.7, 5001 10.0.0.1, 3345 128.119.40.186, 80 10.0.0.1, 3345 to …… …… 138.76.29.7, 5001, updates table S: 10.0.0.1, 3345 D: 128.119.40.186, 80 10.0.0.1 1 S: 138.76.29.7, 5001 2 D: 128.119.40.186, 80 10.0.0.4 10.0.0.2 138.76.29.7 S: 128.119.40.186, 80 D: 10.0.0.1, 3345 4 S: 128.119.40.186, 80 D: 138.76.29.7, 5001 3 10.0.0.3 4: NAT router 3: reply arrives changes datagram dest. address: dest addr from 138.76.29.7, 5001 138.76.29.7, 5001 to 10.0.0.1, 3345 * Check out the online interactive exercises for more examples: http://gaia.cs.umass.edu/kurose_ross/interactive/ 4-122 NAT: network address translation § NAT has been controversial: routers “should” only process up to layer 3 address “shortage” should be solved by IPv6 violates end-to-end argument (port # manipulation by network-layer device) NAT traversal: what if client wants to connect to server behind NAT? § but NAT is here to stay: extensively used in home and institutional nets, 4G/5G cellular nets 4-123 Chapter 4: data plane 4.1 Overview of Network layer data plane control plane 4.2 What’s inside a router input ports, switching, output ports buffer management, scheduling 4.3 IP: Internet Protocol datagram format fragmentation IPv4 addressing network address translation (NAT) IPv6 4.4 Generalized Forwarding and SDN Match+action OpenFlow: match+action in action 4-124 IPv6: motivation § initial motivation: 32-bit IPv4 address space soon to be completely allocated. IPv6 provided a larger IP address space à more IP address § additional motivation: speed processing/forwarding: 40-byte fixed length header enable different network-layer treatment of “flows” (QoS) 4-125 IPv6 datagram format flow label: identify priority: identify 32 bits datagrams in same priority among ver pri flow label "flow.” (concept of datagrams in flow payload len next hdr hop limit “flow” not well defined). source address 128-bit (128 bits) IPv6 addresses destination address (128 bits) payload (data) 4-126 IPv6 datagram format priority: identify priority among datagrams in flow flow Label: labeling of packets belonging to particular flows for which the sender requests special handling Example: real-time service, media streaming But the real definition of flow is still vague (unclear) next header: identify upper layer protocol for data Traffic class: used to give priority to datagrams certain datagrams within a flow datagrams from certain applications (for example, ICMP) over others Payload length: What size of data sent (not including header) If payload is 4bytes à total datagram size = 40 + 4 = 44 bytes 4-127 IPv6 datagram format Used to give priority to certain datagrams ver pri flow label payload len next hdr hop limit source address (128 bits) destination address increased the size of the IP (128 bits) address from 32 to 128 bits data 32 bits Network Layer: Data Plane 4- 128 4-128 IPv6 datagram format and other changes from IPv4 § IPv6 datagram format: Header : 40-byte fixed-length header è allows faster processing of the IP datagram Fragmentation: NO fragmentation allowed options: allowed, but outside of header, indicated by “Next Header” field Checksum: NO checksum at Network Layer for faster processing at each hop à use checksum on Transport Layer ICMPv6: new version of ICMP additional message types, e.g. “Packet Too Big” multicast group management functions 4-129 Transition from IPv4 to IPv6 § not all routers can be upgraded simultaneously no “flag days” how will network operate with mixed IPv4 and IPv6 routers? § tunneling: IPv6 datagram carried as payload in IPv4 datagram among IPv4 routers (“packet within a packet”) IPv4 header fields IPv6 header fields IPv4 payload IPv4 source, dest addr IPv6 source dest addr UDP/TCP payload IPv6 datagram IPv4 datagram 4-130 Tunneling and encapsulation A B Ethernet connects two E F Ethernet IPv6 routers connecting two IPv6 IPv6 IPv6 IPv6 IPv6 routers: IPv6 datagram Link-layer frame The usual: datagram as payload in link-layer frame IPv4 network A B E F connecting two IPv6 routers IPv6 IPv6/v4 IPv6/v4 IPv6 IPv4 network Tunneling and encapsulation A B Ethernet connects two E F Ethernet IPv6 routers connecting two IPv6 IPv6 IPv6 IPv6 IPv6 routers: IPv6 datagram Link-layer frame The usual: datagram as payload in link-layer frame IPv4 tunnel A B IPv4 tunnel E F connecting IPv6 routers connecting two IPv6 routers IPv6 IPv6/v4 IPv6/v4 IPv6 IPv6 datagram IPv4 datagram tunneling: IPv6 datagram as payload in a IPv4 datagram Tunneling A B IPv4 tunnel E F connecting IPv6 routers logical view: IPv6 IPv6/v4 IPv6/v4 IPv6 A B C D E F physical view: IPv6 IPv6/v4 IPv4 IPv4 IPv6/v4 IPv6 flow: X src:B src:B src:B flow: X src: A dest: E dest: E src: A dest: F dest: E dest: F Flow: X Flow: X Flow: X Src: A Src: A Src: A Note source data Dest: F Dest: F Dest: F data and destination addresses! data data data A-to-B: E-to-F: B-to-C: B-to-C: B-to-C: IPv6 IPv6 IPv6 inside IPv6 inside IPv6 inside IPv4 IPv4 IPv4 IPv6: adoption § Google1: ~ 30% of clients access services via IPv6 § NIST: 1/3 of all US government domains are IPv6 capable 1 https://www.google.com/int l/en/ipv6/statistics.html IPv6: adoption § Google1: ~ 30% of clients access services via IPv6 § NIST: 1/3 of all US government domains are IPv6 capable § Long (long!) time for deployment, use 25 years and counting! think of application-level changes in last 25 years: WWW, social media, streaming media, gaming, telepresence, … Why? 1 https://www.google.com/intl/en/ipv6/statistics.html Chapter 4: data plane 4.1 Overview of Network layer data plane control plane 4.2 What’s inside a router input ports, switching, output ports buffer management, scheduling 4.3 IP: Internet Protocol datagram format fragmentation IPv4 addressing network address translation (NAT) IPv6 4.4 Generalized Forwarding and SDN Match+action OpenFlow: match+action in action 4-136 Generalized forwarding: match plus action Review: each router contains a forwarding table (aka: flow table) § “match plus action” abstraction: match bits in arriving packet, take action destination-based values in arriving packet header forwarding: forward based on dest. IP address generalized forwarding: 0111 1 2 3 many header fields can determine action many action possible: drop/copy/modify/log packet forwarding table (aka: flow table) Generalized Forwarding and SDN Overview Generalized Forwarding: Each packet switch contains a match-plus- action flow table that is computed and distributed by a remote controller. 4-138 Kurose, J.F. and Ross, K.W. (2021). Computer Networking: A Top-Down Approach (8th Edition). Pearson Education Limited, England. (pp. 353) Generalized Forwarding and SDN Overview v Generalized forwarding will be based on a standard rule à Open-Flow. v It is a highly visible standard that has pioneered the notion of the match-plus-action forwarding abstraction and controllers. v OpenFlow1.0 is used, which introduced key SDN abstractions and functionality 4-139 Kurose, J.F. and Ross, K.W. (2021). Computer Networking: A Top-Down Approach (8th Edition). Pearson Education Limited, England. (pp. 353) Flow table abstraction § flow: defined by header field values (in link-, network-, transport- layer fields) § generalized forwarding: simple packet-handling rules match: pattern values in packet header fields actions: for matched packet: drop, forward, modify, matched packet or send matched packet to controller priority: disambiguate overlapping patterns counters: #bytes and #packets Flow table Router’s flow table define match action router’s match+action rules Flow table abstraction § flow: defined by header fields § generalized forwarding: simple packet-handling rules match: pattern values in packet header fields actions: for matched packet: drop, forward, modify, matched packet or send matched packet to controller priority: disambiguate overlapping patterns counters: #bytes and #packets Flow table src = *.*.*.*, dest=3.4.*.* forward(2) match action src=1.2.*.*, dest=*.*.*.* drop src=10.1.2.3, dest=*.*.*.* send to controller * : wildcard 1 4 3 2 OpenFlow: flow table entries Match Action Stats Packet + byte counters 1. Forward packet to port(s) 2