Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

Similar documents
Network layer: Overview. Network layer functions IP Routing and forwarding NAT ARP IPv6 Routing

CS244a: An Introduction to Computer Networks

Network layer: Overview. Network Layer Functions

EC441 Fall 2018 Introduction to Computer Networking Chapter4: Network Layer Data Plane

Network Layer: Internet Protocol

internet technologies and standards

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 12

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The Network Layer

Subnets. IP datagram format. The Internet Network layer. IP Fragmentation and Reassembly. IP Fragmentation & Reassembly. IP Addressing: introduction

Chapter 4: Network Layer

Lecture 8. Network Layer (cont d) Network Layer 1-1

Chapter 4: outline. 4.5 routing algorithms link state distance vector hierarchical routing. 4.6 routing in the Internet RIP OSPF BGP

Network Layer: Control/data plane, addressing, routers

Hierarchical Routing. Our routing study thus far - idealization all routers identical network flat no true in practice. administrative autonomy

CS 43: Computer Networks. 21: The Network Layer & IP November 7, 2018

Data Communication & Networks G Session 7 - Main Theme Networks: Part I Circuit Switching, Packet Switching, The Network Layer

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

Network Layer PREPARED BY AHMED ABDEL-RAOUF

Router Architecture Overview

CMPE 80N: Introduction to Networking and the Internet

Computer Networking Introduction

Lecture 3. The Network Layer (cont d) Network Layer 1-1

CSC 401 Data and Computer Communications Networks

Department of Computer and IT Engineering University of Kurdistan. Network Layer. By: Dr. Alireza Abdollahpouri

Master Course Computer Networks IN2097

internet technologies and standards

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

CS 457 Networking and the Internet. Problems. Mechanisms 9/21/16. Fall 2016 Indrajit Ray

Vorlesung Kommunikationsnetze

IPv4 addressing, NAT. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.

Chapter 4 Network Layer

Last time. Network layer. Introduction. Virtual circuit vs. datagram details. IP: the Internet Protocol. forwarding vs. routing

CSC 4900 Computer Networks: Network Layer

Internetworking Part 2

Lecture 4 - Network Layer. Transport Layer. Outline. Introduction. Notes. Notes. Notes. Notes. Networks and Security. Jacob Aae Mikkelsen

CSCI-1680 Network Layer: IP & Forwarding John Jannotti

Chapter 4 Network Layer: The Data Plane

ECE 4450:427/527 - Computer Networks Spring 2017

IPv4. Christian Grothoff.

Internet Technology 3/23/2016

Chapter 4: network layer

Lecture 8. Basic Internetworking (IP) Outline. Basic Internetworking (IP) Basic Internetworking (IP) Service Model

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 13

Lecture 8. Reminder: Homework 3, Programming Project 2 due on Thursday. Questions? Tuesday, September 20 CS 475 Networks - Lecture 8 1

Ref: A. Leon Garcia and I. Widjaja, Communication Networks, 2 nd Ed. McGraw Hill, 2006 Latest update of this lecture was on

RSC Part II: Network Layer 3. IP addressing (2nd part)

Internet Network Protocols IPv4/ IPv6

Chapter 3 Internetworking

Outline. IP Address. IP Address. The Internet Protocol. o Hostname & IP Address. o The Address

COMP211 Chapter 4 Network Layer: The Data Plane

ECE 158A: Lecture 7. Fall 2015

Chapter 4 Network Layer: The Data Plane

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Information Network Systems The network layer. Stephan Sigg

CSCE 463/612 Networks and Distributed Processing Spring 2018

2/22/2008. Outline Computer Networking Lecture 9 IP Protocol. Hop-by-Hop Packet Forwarding in the Internet. Internetworking.

Network and Security: Introduction

CS 348 Computer Networks. IP and Routing. Indian Institute of Technology, Bombay

Introduction to Internetworking

CCNA Exploration Network Fundamentals. Chapter 06 Addressing the Network IPv4

Chapter 4 Network Layer: The Data Plane

ECE 461 Internetworking Fall Quiz 1

Communication Networks ( ) / Fall 2013 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner

TDTS06: computer Networks

Internet Protocol. Outline Introduction to Internet Protocol Header and address formats ICMP Tools CS 640 1

Quiz. Segment structure and fields Flow control (rwnd) Timeout interval. Phases transition ssthresh setting Cwnd setting

Internet Protocol (IP)

CC231 Introduction to Networks Dr. Ayman A. Abdel-Hamid. Internet Protocol Suite

COMP/ELEC 429/556 Introduction to Computer Networks

Internetworking Part 2

CSCD58 WINTER 2018 WEEK 6 - NETWORK LAYER PART 1. Brian Harrington. February 13, University of Toronto Scarborough

Introduction to Internetworking

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

C14b: Classless Intradomain Routing

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061. Lecture 2. Internetworking IPv4, IPv6

Chapter 4 Network Layer

Chapter 4: network layer. Network service model. Two key network-layer functions. Network layer. Input port functions. Router architecture overview

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca Instructor: Nicholas DeMarinis

HY 335 Φροντιστήριο 8 ο

Network Layer: Data Plane 4-2

Network Layer: DHCP, ICMP, NAT, IPv6

TSIN02 - Internetworking

EP2120 Internetworking/Internetteknik IK2218 Internets Protokoll och Principer

Chapter 4 Network Layer

CS118 Discussion 1A, Week 6. Zengwen Yuan Dodd Hall 78, Friday 10:00 10:50 a.m.

EEC-684/584 Computer Networks

COMP 631: NETWORKED & DISTRIBUTED SYSTEMS 9/6/16 COMP 631: NETWORKED & DISTRIBUTED SYSTEMS. IP Addressing. Jasleen Kaur. Fall 2016

ICS 451: Today's plan

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst

TSIN02 - Internetworking

The Network Layer Forwarding Tables and Switching Fabric

CSEP 561 Internetworking. David Wetherall

Chapter 4 Network Layer

Introduction to Computer Networking. Guy Leduc. Chapter 4 Network Layer: The Data Plane. Chapter 4: Network Layer Data Plane

CS4450. Computer Networks: Architecture and Protocols. Lecture 13 THE Internet Protocol. Spring 2018 Rachit Agarwal

End-to-End Communication

Computer Networks. Course Reference Model. Topic. Error Handling with ICMP. ICMP Errors. Internet Control Message Protocol 12/2/2014.

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

COSC4377. TCP vs UDP Example Statistics

CSC358 Week 6. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

Transcription:

Computer Network Fundamentals Spring 2008 Week 4 Network Layer Andreas Terzis

Outline Internet Protocol Service Model Addressing Original addressing scheme Subnetting CIDR Fragmentation ICMP Address Shortage NAT IPv6 CS 344/Spring08 2

IP Internet Concatenation of Networks Three requirements Connectivity Addressing Path discovery CS 344/Spring08 3

Service Model Connectionless (datagrambased) Best-effort delivery (unreliable service) Packets are lost Packets are delivered out of order Duplicate copies of a packet are delivered Packets can be delayed for a long time App Transport Network Link TCP / UDP IP Data Data Hdr TCP Segment Hdr IP Datagram CS 344/Spring08 4

IP Header CS 344/Spring08 5

Global Addresses Properties globally unique hierarchical network + host Address classes Dot Notation 10.3.2.4 128.96.33.81 CS 344/Spring08 6

Address Allocation Who manages the IP address space? Hierarchical system Internet Assigned Numbers Authority (IANA) Local Internet Registries (LIRs) ISPs ARIN, APNIC, etc CS 344/Spring08 7

Datagram Forwarding (v.1) Strategy every datagram contains destination s address if connected to destination network, then forward to host if not directly connected, then forward to some router forwarding table maps network number into next hop Example (R2) Net Number Next Hop 1 R3 2 R1 3 4 interface 1 interface 0 CS 344/Spring08 8

IP Addressing Problem: Address classes were too rigid. Organizations with internal routers needed to have a separate (Class C) network ID for each link. And then every other router in the Internet had to know about every network ID in every organization, which led to large address tables. Small organizations wanted Class B in case they grew to more than 255 hosts. But there were only about 16,000 Class B network IDs. CS 344/Spring08 9

IP Addressing Two solutions were introduced: Subnetting is used within an organization to subdivide the organization s network ID. Classless Interdomain Routing (CIDR) CS 344/Spring08 10

Subnetting Add another level to address/routing hierarchy: subnet Subnet masks define variable partition of host part Subnets visible only within site CS 344/Spring08 11

Subnet Example 28 28 Forwarding table at router R1 Subnet Number Subnet Mask Next Hop 128.96.34.0 255.255.255.128 interface 0 128.96.34.128 255.255.255.128 interface 1 128.96.33.0 255.255.255.0 R2 CS 344/Spring08 12

Forwarding Algorithm (v.2) D = destination IP address for each entry (SubnetNum, SubnetMask, NextHop) D1 = SubnetMask & D if D1 == SubnetNum if NextHop is an interface deliver datagram directly to D else deliver datagram to NextHop Use a default router if nothing matches Subnets not visible from the rest of the Internet CS 344/Spring08 13

Classless Interdomain Routing (CIDR) The IP address space is broken into line segments. Each line segment is described by a prefix. A prefix is of the form x/y where x indicates the prefix of all addresses in the line segment, and y indicates the length of the segment. e.g. The prefix 128.9/16 represents the line segment containing addresses in the range: 128.9.0.0 128.9.255.255. 65/8 128.9.0.0 128.9/16 142.12/19 0 2 32-1 2 16 128.9.16.14 CS 344/Spring08 14

Classless Interdomain Routing (CIDR) 128.9.19/24 128.9.25/24 128.9.16/20 128.9.176/20 128.9/16 0 2 32-1 128.9.16.14 Most specific route = longest matching prefix CS 344/Spring08 15

Classless Interdomain Routing (CIDR) Prefix aggregation: If a service provider serves two organizations with prefixes, it can (sometimes) aggregate them to form a larger prefix. Other routers can refer to this larger prefix, and so reduce the size of their address table. E.g. ISP serves 128.9.14.0/24 and 128.9.15.0/24, it can tell other routers to send it all packets belonging to the prefix 128.9.14.0/23. ISP Choice: In principle, an organization can keep its prefix if it changes service providers. CS 344/Spring08 16

Hierarchical addressing: route aggregation Hierarchical addressing allows efficient advertisement of routing information: Organization 0 200.23.16.0/23 Organization 1 200.23.18.0/23 Organization 2 200.23.20.0/23 Organization 7. 200.23.30.0/23. Fly-By-Night-ISP Send me anything with addresses beginning 200.23.16.0/20 Internet ISPs-R-Us Send me anything with addresses beginning 199.31.0.0/16 CS 344/Spring08 17

Hierarchical addressing: route aggregation Organization 0 200.23.16.0/23 Organization 1 200.23.18.0/23 Organization 2 200.23.20.0/23 Organization 7. 200.23.30.0/23. Fly-By-Night-ISP Send me anything with addresses beginning 200.23.16.0/20 Internet Multi-homing ISPs-R-Us Send me anything with addresses beginning 199.31.0.0/16, 199.31.0.0/16 or 200.23.30.0/23 CS 344/Spring08 18

How a Router Forwards Datagrams R1 128.17.20.1 3 1 2 128.17.16.1 R2 R3 R4 e.g. 128.9.16.14 => Port 2 Prefix Next-hop Port 65/8 128.17.16.1 3 128.9/16 128.9.16/20 128.9.19/24 128.9.25/24 128.9.176/20 128.17.14.1 128.17.14.1 128.17.10.1 128.17.14.1 128.17.20.1 2 2 7 2 1 142.12/19 128.17.16.1 3 Forwarding table CS 344/Spring08 19

Forwarding in an IP Router (v.3) Lookup packet DA in forwarding table. If known, forward to correct port. If unknown, drop packet. Decrement TTL, update header Checksum. Forward packet to outgoing interface. Transmit packet onto link. Question: How is the address looked up in a real router? CS 344/Spring08 20

Fragmentation Problem: A router may receive a packet larger than the maximum transmission unit (MTU) of the outgoing link. Source Destination A B Ethernet MTU=1500 bytes MTU=1500 bytes R1 MTU<1500 bytes R2 Solution: R1 fragments the IP datagram into mutiple, self-contained datagrams. Offset>0 More Frag=0 Data HDR (ID=x) Offset=0 More Frag=1 Data HDR (ID=x) Data HDR (ID=x) Data HDR (ID=x) CS 344/Spring08 21

Fragmentation (II) Fragments are re-assembled by the destination host; not by intermediate routers. To avoid fragmentation, hosts commonly use path MTU discovery to find the smallest MTU along the path. Path MTU discovery involves sending various size datagrams until they do not require fragmentation along the path. Most links use MTU>=1500bytes today. Try: traceroute f www.mit.edu 1500 and traceroute f www.mit.edu 1501 (DF=1 set in IP header; routers send ICMP error message, which is shown as!f ). CS 344/Spring08 22

ICMP Internet Control Message Protocol: Used by a router/end-host to report some types of error: E.g. Destination Unreachable: packet can t be forwarded to/ towards its destination. E.g. Time Exceeded: TTL reached zero, or fragment didn t arrive in time. Traceroute uses this error to its advantage. An ICMP message is an IP datagram, and is sent back to the source of the packet that caused the error. CS 344/Spring08 23

IP Address Shortage Global IPv4 addresses are getting depleted Increase in number of hosts PCs, PDAs, cellphones, microwaves, etc Address inefficiencies What to do Get larger address space -> IPv6 Remove the assumption that address is globally unique Can reuse the same address multiple times -> NAT CS 344/Spring08 24

NAT: Network Address Translation rest of Internet 138.76.29.7 10.0.0.4 local network (e.g., home network) 10.0.0/24 10.0.0.1 10.0.0.2 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) CS 344/Spring08 25

NAT: Network Address Translation 2: NAT router changes datagram source addr from 10.0.0.1, 3345 to 138.76.29.7, 5001, updates table 2 NAT translation table WAN side addr LAN side addr 138.76.29.7, 5001 10.0.0.1, 3345 S: 138.76.29.7, 5001 D: 128.119.40.186, 80 10.0.0.4 S: 10.0.0.1, 3345 D: 128.119.40.186, 80 1 1: host 10.0.0.1 sends datagram to 128.119.40, 80 10.0.0.1 10.0.0.2 138.76.29.7 S: 128.119.40.186, 80 D: 138.76.29.7, 5001 3 3: Reply arrives dest. address: 138.76.29.7, 5001 S: 128.119.40.186, 80 D: 10.0.0.1, 3345 4 10.0.0.3 4: NAT router changes datagram dest addr from 138.76.29.7, 5001 to 10.0.0.1, 3345 CS 344/Spring08 26

NAT implementation NAT router must: 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 addr. 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 dest fields of every incoming datagram with corresponding (source IP address, port #) stored in NAT table CS 344/Spring08 27

NAT Problems Problems due to NAT Increased network complexity, reduced robustness Cannot run services inside NAT (maybe) Address shortage should instead be solved by IPv6 CS 344/Spring08 28

IPv6 Motivation: 32-bit address space exhaustion Take the opportunity for some clean-up IPv6 datagram format: fixed-length 40 byte header Address length changed from 32 bits to 128 bits fragmentation fields moved out of base header IP options moved out of base header Header Length field eliminated Header Checksum eliminated Type of Service field eliminated Time to Live Hop Limit, Protocol Next Header Precedence Priority, added Flow Label field Length field excludes IPv6 header CS 344/Spring08 29

IPv6 header format Version Priority Flow Label Payload Length Next Header Hop Limit Source Address (16 bytes, 128 bits) Destination Address (16 bytes) IPv4 header CS 344/Spring08 30

Transition From IPv4 To IPv6 Not all routers can be upgraded simultaneously Two proposed approaches to allow the Internet operate with mixed IPv4 and IPv6 routers : Tunneling: IPv6 carried as payload in IPv4 packets among IPv4 routers Dual Stack: some routers with dual stack (v6, v4) can translate between formats CS 344/Spring08 31