Announcement Chapter 3, slide: Info about Midterm is sent via class email, please read it carefully. 100+(40 extra credit), 80 min 5-layer Internet Protocol, and describe the functionality and relations between some of these layers. You may refer to the slides, in class discussions and especially hand notes posted on this. Comparison of TCP and UDP, their pros cons, and potential use-cases for them as discussed in the class. RTT Analysis for TCP with Exponential Weighted Moving Average (EWMA) expression. Write the basic expression, explain its two main components and objectives, and then write it in open form for n’th iteration as I have done in my hand notes in the class. Then, as I described in the class, explain the terms that are negligible (how related to negligible function), weighted, moving average and so on, over the equation. One selected question from HW1 One selected question from HW2 Congestion Control Mechanisms. I described the main idea behind AIMD, slow start, Tahoe and Reno protocols. I will ask these main ideas to be described with a few sentences only for each, and then show their relation with each other. For instance, slow start addresses a limitation of AIMD, and they both play a role in Reno, and so forth. These are available in slides, and I have talked about them in detail already in the class. Reliable data transfer: Behaviors of stop-n-wait, go-back-n, and selective repeat. Compare and contrast them, as I have did in the class. Only main differences with a few sentences for each will suffice. Basic network layer concepts recently covered (e.g., routing, control/data plane etc..) Extra Credits: Huffman coding Bloom filter (optional) Questions from featured lecture No electronic device, cheat sheet, etc. Brief answers for “main idea” and, comparison and description questions: A few sentences, a small paragraph Chapter 3, slide:
Chapter 4: Network Layer Chapter goals: understand principles behind network layer services: network layer service models forwarding versus routing subnetting and IP addressing Chapter 4, slide:
Network layer network layer protocols run at Sender side: end systems & routers Sender side: get segments from transport layer encapsulates segments into IP datagrams router examines header fields in all IP datagrams Receiver side: delivers segments to transport layer application transport network data link physical network data link physical application transport network data link physical Chapter 4, slide:
Interplay between routing and forwarding local forwarding table header value 0100 0101 0111 1001 3 2 1 output link routing algorithm: constructs routing tables routing algorithm forwarding table: a lookup table for figuring out output port for each input pkt forwarding process: move pkts from input to output 0111 value in arriving packet’s header 1 Source 2 3 Destination routing process: find route taken by packets from source to dest. Chapter 4, slide:
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 dest. routing algorithms Chapter 4, slide:
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 Chapter 4, slide:
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 Chapter 4, slide:
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 Chapter 4, slide:
Datagram networks no call setup at network layer no state about end-to-end connections is kept in routers no network-level concept of “connection” packets forwarded using dest. host address packets (same source-dest pair) may take different paths application transport network data link physical application transport network data link physical 1. Send data 2. Receive data Chapter 4, slide:
Forwarding table 4 billion possible entries Destination Address Range Link Interface 11001000 00010111 00010000 00000000 through 0 11001000 00010111 00010111 11111111 11001000 00010111 00011000 00000000 through 1 11001000 00010111 00011000 11111111 11001000 00010111 00011001 00000000 through 2 11001000 00010111 00011111 11111111 otherwise 3 Chapter 4, slide:
Longest prefix matching Prefix Match Link Interface 11001000 00010111 00010 0 11001000 00010111 00011000 1 11001000 00010111 00011 2 otherwise 3 Examples DA: 11001000 00010111 00010110 10100001 Which interface? DA: 11001000 00010111 00011000 10101010 Which interface? Chapter 4, slide:
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 Chapter 4, slide:
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 Chapter 4, slide:
IP Fragmentation & Reassembly (ctd) ID =x offset =0 fragflag length =4000 One large datagram becomes several smaller datagrams Example 4000 byte datagram = 20 (header) + 3980 (data) MTU = 1500 bytes Chapter 4, slide:
IP Fragmentation & Reassembly (ctd) ID =x offset =0 fragflag length =4000 =1 =1500 =185 =370 =1040 One large datagram becomes several smaller datagrams Example 4000 byte datagram = 20 (header) + 3980 (data) MTU = 1500 bytes 1480 bytes in data field offset = 1480/8 1040= 20 (header) + 1020 (data) 1020 (data) =3980 – 1480 -1480 Chapter 4, slide:
IP Addressing: introduction IP address: 32-bit identifier for host, router interface interface: connection between host/router and physical link multiple interfaces per router one interface per host one IP address per interface 223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 Chapter 4, slide:
Subnets IP address: What’s a subnet ? subnet part (higher bits) 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 subnet IP address: subnet part (higher bits) host part (lower bits) What’s a subnet ? device interfaces with same subnet part of IP address can physically reach each other without intervening router 11001000 00010111 00010000 00000000 subnet part host 200.23.16.0/23 network consisting of 3 subnets Chapter 4, slide:
Subnets 223.1.1.0/24 223.1.2.0/24 223.1.3.0/24 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 Chapter 4, slide:
IP addressing: CIDR Classful addressing: A, B, C (only 28 subnets, but 224 hosts per subnet) (216 subnets, and 216 hosts per subnet) (224 subnets, but only 28 hosts per subnet) Classful addressing: A, B, C A: /8 B: /16 C: /24 Problem: see which class is needed for 300 hosts? Issue? CIDR: Classless InterDomain Routing subnet portion of address of arbitrary length address format: a.b.c.d/x, where x is # bits in subnet portion of address 11001000 00010111 00010000 00000000 subnet part host 200.23.16.0/23 Chapter 4, slide:
IP addresses: how to get one? Q: How does host get IP address? hard-coded by system admin in a file DHCP: Dynamic Host Configuration Protocol: dynamically get IP address from as server when joining the network IP address can be reused by other hosts if released Can renew IP addresses if stayed connected Chapter 4, slide:
DHCP: Dynamic Host Configuration Protocol goal: allow host to dynamically obtain its IP address from network server when it joins network 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 network (more shortly) 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 Network Layer: Data Plane
DHCP client-server scenario DHCP server: 223.1.2.5 DHCP discover src : 0.0.0.0, 68 dest.: 255.255.255.255,67 yiaddr: 0.0.0.0 transaction ID: 654 arriving client Broadcast: is there a DHCP server out there? 000.000.000.000. 255.255.255.255 DHCP offer src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 654 lifetime: 3600 secs Broadcast: I’m a DHCP server! Here’s an IP address you can use DHCP request src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 yiaddrr: 223.1.2.4 transaction ID: 655 lifetime: 3600 secs Broadcast: OK. I’ll take that IP address! DHCP ACK src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 655 lifetime: 3600 secs Broadcast: OK. You’ve got that IP address! Network Layer: Data Plane
DHCP client-server scenario 223.1.2.1 223.1.1.1 server 223.1.1.2 223.1.1.4 223.1.2.9 B 223.1.2.2 arriving DHCP client needs address in this network E 223.1.1.3 223.1.3.27 223.1.3.1 223.1.3.2 Chapter 4, slide:
IP addresses: how to get one? Q: How does network get subnet part of IP addr? A: gets allocated portion of its provider ISP’s address space ISP's block 11001000 00010111 00010000 00000000 200.23.16.0/20 Organization 0 11001000 00010111 00010000 00000000 200.23.16.0/23 Organization 1 11001000 00010111 00010010 00000000 200.23.18.0/23 Organization 2 11001000 00010111 00010100 00000000 200.23.20.0/23 ... ….. …. …. Organization 7 11001000 00010111 00011110 00000000 200.23.30.0/23 Chapter 4, slide:
NAT: Network Address Translation Motivation: range of addresses not needed from ISP: just one IP address for all devices can change addresses of devices in local network without notifying outside world can change ISP without changing addresses of devices in local network devices inside local net not explicitly addressable, visible by outside world (a security plus). Chapter 4, slide:
NAT: Network Address Translation rest of Internet local network (e.g., home network) 10.0.0/24 10.0.0.1 10.0.0.4 10.0.0.2 138.76.29.7 10.0.0.3 All datagrams leaving local network have same single source NAT IP address: 138.76.29.7, different source port numbers Datagrams with source or destination in this network have 10.0.0/24 address for source, destination (as usual) Chapter 4, slide:
NAT: Network Address Translation NAT translation table WAN side addr LAN side addr 1: host 10.0.0.1 sends datagram to 128.119.40.186, 80 2: NAT router changes datagram source addr from 10.0.0.1, 3345 to 138.76.29.7, 5001, updates table 138.76.29.7, 5001 10.0.0.1, 3345 …… …… S: 10.0.0.1, 3345 D: 128.119.40.186, 80 1 10.0.0.1 S: 128.119.40.186, 80 D: 10.0.0.1, 3345 4 S: 138.76.29.7, 5001 D: 128.119.40.186, 80 2 10.0.0.4 10.0.0.2 138.76.29.7 S: 128.119.40.186, 80 D: 138.76.29.7, 5001 3 10.0.0.3 4: NAT router changes datagram dest addr from 138.76.29.7, 5001 to 10.0.0.1, 3345 3: Reply arrives dest. address: 138.76.29.7, 5001 Chapter 4, slide:
IPv6 Initial motivation: Additional motivation: 32-bit address space soon to be completely allocated (if not already!) Additional motivation: header changes to facilitate QoS Major changes from IPv4: Fragmentation: no longer allowed; drop packet if too big; send an ICMP msg back Checksum: removed to reduce processing time; already done at transport and link layers Chapter 4, slide:
Transition From IPv4 To IPv6 Can all routers be upgraded simultaneously ?? Answer: it can’t; no “flag days” Analogy: (IP for Internet) ~ (foundation for House) To change the foundation, you need to tear down the house!! Solution gradually incorporate IPv6 (may take few years) How will the network operate with mixed IPv4 and IPv6 routers? Tunneling?? Chapter 4, slide:
Tunneling What is the problem here? F IPv6 tunnel Logical view: Physical view: A B E F IPv6 IPv4 C D Flow: X Src: A Dest: F data Be aware that: IPv6 nodes have both IPv4 & IPv6 addresses Nodes know which nodes are IPv4 and which ones are IPv6 (use for e.g. DNS) What is the problem here? Why can’t B just send an IPv4 packet to C ? Problem: D won’t be able to send an IPv6 packet to E? Why? A-to-B: IPv6 Chapter 4, slide:
Tunneling Be aware that: A B E F Logical view: A B C D E F IPv6 IPv6 IPv6 IPv6 A B C D E F Physical view: IPv6 IPv6 IPv4 IPv4 IPv6 IPv6 Flow: X Src: A Dest: F data Flow: X Src: A Dest: F data Src:B Dest: E B-to-C: IPv6 inside IPv4 Flow: X Src: A Dest: F data Src:B Dest: E B-to-C: IPv6 inside IPv4 Flow: X Src: A Dest: F data E-to-F: IPv6 Be aware that: IPv6 nodes have both IPv4 & IPv6 addresses Nodes know which nodes are IPv4 and which one are IPv6 (use for e.g. DNS) A-to-B: IPv6 Chapter 4, slide: