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

Similar documents
Network Layer: Internet Protocol

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

Network layer: Overview. Network Layer Functions

Master Course Computer Networks IN2097

Router Architecture Overview

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

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

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

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

Chapter 4: Network Layer

Network Layer PREPARED BY AHMED ABDEL-RAOUF

1-1. Switching Networks (Fall 2010) EE 586 Communication and. October 25, Lecture 24

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

internet technologies and standards

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

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

Lecture 4 The Network Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Computer Networking Introduction

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

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

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

Internet Protocol (IP)

IPv4. Christian Grothoff.

internet technologies and standards

TDTS06: computer Networks

Chapter 4: network layer

CSC 401 Data and Computer Communications Networks

COMP211 Chapter 4 Network Layer: The Data Plane

CSCE 463/612 Networks and Distributed Processing Spring 2018

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

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

CMPE 80N: Introduction to Networking and the Internet

CSCI Computer Networks Fall 2016

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

Chapter 4 Network Layer

Network Layer: Control/data plane, addressing, routers

Δίκτυα Υπολογιστών ΙΙ. Κώστας Μαγκούτης Επίκουρος Καθηγητής Τμήμα Μηχανικών Η/Υ και Πληροφορικής Πανεπιστήμιο Ιωαννίνων

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer

Chapter 4 Network Layer

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

Chapter 4 Network Layer

Different Layers Lecture 20

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

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

Lecture 16: Network Layer Overview, Internet Protocol

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

CS 457 Lecture 11 More IP Networking. Fall 2011

Data Communications & Networks. Session 7 Main Theme Networks: Part I Circuit Switching, Packet Switching, The Network Layer

Network Layer: Data Plane 4-2

CSC 4900 Computer Networks: Network Layer

CS 356: Computer Network Architectures. Lecture 10: IP Fragmentation, ARP, and ICMP. Xiaowei Yang

Chapter 4 Network Layer: The Data Plane

The Network Layer Forwarding Tables and Switching Fabric

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

Chapter 4 Network Layer: The Data Plane

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

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

Network Layer: Router Architecture, IP Addressing

ECE 4450:427/527 - Computer Networks Spring 2017

Network layer Network Layer 4-1

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

Chapter 4 Network Layer

ECE 158A: Lecture 7. Fall 2015

Chapter 4 Network Layer: The Data Plane

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

Last time. Wireless link-layer. Introduction. Characteristics of wireless links wireless LANs networking. Cellular Internet access

CSC 401 Data and Computer Communications Networks

CSCI-1680 Network Layer: IP & Forwarding John Jannotti

Information Network Systems The network layer. Stephan Sigg

Networking: Network layer

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

Lecture 5 The Network Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Vorlesung Kommunikationsnetze

CS 3516: Computer Networks

NETWORK LAYER DATA PLANE

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

Network Layer (4): ICMP

CS 3516: Advanced Computer Networks

Internet Technology 3/23/2016

Internet Control Message Protocol (ICMP)

Internetworking With TCP/IP

Introduction to Internetworking

Internet Protocols (chapter 18)

Chapter 4: Network Layer

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

Chapter 4 Network Layer: The Data Plane

Course on Computer Communication and Networks. Lecture 6 Network Layer part 1: Data Plane Chapter 4 (7/e) (6/e Ch4-first part)

Review is pretty much complete! Please help formatting review (indenting). - Jorden

Chapter 4 Network Layer: The Data Plane. Part A. Computer Networking: A Top Down Approach

IP Protocols. ALTTC/Oct

CS 3516: Advanced Computer Networks

TCP/IP Protocol Suite

Module 3 Network Layer CS755! 3-1!

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

(ICMP), RFC

Network Layer: DHCP, ICMP, NAT, IPv6

Chapter 4 Network Layer

Routers. Session 12 INST 346 Technologies, Infrastructure and Architecture

Chapter 4 Network Layer: The Data Plane

Transcription:

1 CPSC 826 Intering The Network Layer: Routing & Addressing Outline The Network Layer Michele Weigle Department of Computer Science Clemson University mweigle@cs.clemson.edu November 10, 2004 Network layer functions Router architecture IP Internet Protocol» Addressing Routing algorithms» Least cost path computation algorithms Hierarchical routing» Connecting s of s Routing on the Internet» Intra-domain routing» Inter-domain routing http://www.cs.clemson.edu/~mweigle/courses/cpsc826 2 The Network Layer Network Layer Functions Application-layer protocols define when and how messages are sent Logical end-toend Transport-layer protocols deliver data between processes on different endsystems» Transport protocols execute only on end systems Network-layer protocols deliver data from one end-system to another» Network layer protocols execute on every end-system and router Physical endto-end packet delivery 3 The Network Layer Network Layer Functions The -layer provides two important functions:» Routing: the route taken by packets from source to destination (involves all routers)» Forwarding (aka Switching): the movement of packets from an input interface to an appropriate output interface (involves a single router) 4

5 The Network Layer: Routing & Addressing Outline Router Architecture Overview Network layer functions Router architecture IP Internet Protocol» Addressing Routing algorithms» Least cost path computation algorithms Hierarchical routing» Connecting s of s Routing on the Internet» Intra-domain routing» Inter-domain routing 6 Routing Architecture Input Port Functions Routing Architecture Three Types of Switching Fabrics Decentralized switching: Given datagram destination, lookup output port using forwarding table in input port memory (forwarding table copied to input port) Goal: complete input port processing at line speed» Lookup should take less time than time to receive next packet at input port Queuing: if datagrams arrive faster than forwarding rate into switch fabric 7 8

9 Output Ports The Network Layer: Routing & Addressing Outline Buffering required when datagrams arrive from fabric faster than the transmission rate Scheduling discipline chooses among queued datagrams for transmission Network layer functions Router architecture IP Internet Protocol» Addressing Routing algorithms» Least cost path computation algorithms Hierarchical routing» Connecting s of s Routing on the Internet» Intra-domain routing» Inter-domain routing 10 The Internet Network layer Host and router layer functions The Internet Network layer IP datagram format Network layer Routing protocols path selection RIP, OSPF, BGP Transport layer: TCP, UDP routing table Link layer Physical layer IP protocol addressing conventions IP datagram format packet handling conventions ICMP protocol error reporting router signaling IP datagrams» The protocol data units at the IP layer) (Not to be confused with UDP datagrams)» The protocol data units at the UDP layer are also called datagrams ver head. len 32 bits 16-bit identifier flgs time to live type of service upper layer fragment offset Internet checksum 32 bit source IP address 32 bit destination IP address Options (if any) data (variable, typically a TCP segment or UDP datagram) 11 12

13 Introduction IP address: 32-bit identifier for host or router interface Interface: connection between host or router and a» Routers typically have multiple interfaces» Host may have multiple interfaces (typically not)» IP addresses are associated with an interface, not the host or router 7 = 11011111 00000001 00000011 00000010 Host address v. Network addresses IP address:» Network part (high order bits)» Host part (low order bits) What s a?» The set of devices that can communicate with each other without an intervening router The devices attached to the same» From an IP address perspective its: The set of device interfaces with IP addresses having a common part 7 Ethernet 223 1 2 3 14 Host address v. Network addresses A (subnet) is the set of hosts reachable without having to traverse a router» Detach each interface from router or host» Create islands of isolated s 223.1.1.4 223.1.9.2 223.1.9.1 223.1.8.1 223.1.7.0 223.1.8.0 Note: single point-to-point is an (IP) 223.1.7.1 223.1.2.6 7 Class-based addressing Class A addresses» 128 s» 65,536 to 2 24 hosts Class B addresses» 16,384 s» 256 to 65,536 hosts 0 1 2 3 4 8 16 24 31 0 net id host id (IP addresses 1.0.0.0 through 127.255.255.255) 0 1 2 3 4 8 16 24 31 1 0 net id host id Class C addresses (IP addresses 128.0.0.0 through 191.255.255.255)» 2 21 s» less than 256 hosts 0 1 2 3 4 1 1 0 8 net id 16 24 host id 31 Class D addresses» 28-bit multicast (IP addresses 192.0.0.0 through 223.255.255.255) addresses» No origin or 0 1 2 3 4 8 16 24 31 information is encoded 1 1 1 0 multicast address (IP addresses 224.0.0.0 through 239.255.255.255) 15 16

17 Classless InterDomain Routing (CIDR) IP addresses How are IP addresses assigned? Network Host part part 11001000 00010111 00010000 00000000 200.23.16.0 / 23 Class-based addressing» Inefficient use of address space, address space exhaustion» E.g., class B allocated enough addresses for 64K hosts, even if only 300 hosts in that Classless addressing» Network portion of address has an arbitrary» Address format: a.b.c.d/x, where x is the number of bits in portion of address; called the mask (netmask) Used only in routing tables, not IP datagram source/destination The address is assigned by the ISP» Hosts portion only; all hosts share the same portion Host address» Static assignment: 223.1.1.4 DCHP Server Configuration parameter (manually) set during system installation» Dynamic assignment at boot/wake-up time DHCP: Dynamic Host Configuration Protocol Host broadcasts a DHCP discover message DHCP server responds with a DHCP offer message Host requests IP address: DHCP request message DHCP server sends address: DHCP ack message 18 IP addresses How are addresses assigned? Datagram Routing and Transmission IP datagram encapsulation (Ethernet) 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 0001011 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 ISPs obtain a block of addresses from ICANN (Internet Corporation for Assigned Names and Numbers)» ICANN allocates IP address blocks, manages DNS, (used to assign domain names) resolves disputes ISPs subdivide their block among their customers 2 8 bytes 6 bytes 6 bytes bytes 46 to 1500 bytes 4 bytes Preamble Destination Address Link layer addresses (not same as IP addresses) Source Address Type IP header Data data TCP header user data CRC CRC IP Datagram TCP Segment Sending interface adapter encapsulates IP datagram (or other layer protocol packet) in an Ethernet frame 19 20

21 Datagram Routing and Transmission IP datagram format IP protocol version Header (bytes) Network layer service requested Maximum number of remaining hops (decremented at each router) Transport layer protocol to receive payload (UDP, TCP) ver head. len time to live 32 bits type of service 16-bit identifier flgs protocol type fragment offset Internet checksum 32 bit source IP address 32 bit destination IP address Options (if any) Data (variable, typically a TCP segment or UDP datagram) Total IP datagram (bytes) For fragmentation/ reassembly E.g.: Timestamp, record route taken, specify routing path, etc. Routing IP Datagrams Example misc fields source IP addr dest IP addr IP Datagram data All routing is based on the IP destination address field in the IP header IP destination address (and data fields) never change!» Delivery to intermediate hops involves -layer addresses A B Dest. Net. next router Nhops 223.1.1/24-1 *(default) 223.1.1.4 2 Routing table in A 7 E 22 Routing IP Datagrams Routing to a local destination misc fields data An on A generates an IP datagram addressed to B» The IP layer on A looks up the address of B...» And determines that B is on same as A (223.1.1) A s layer sends the IP datagram directly to B inside -layer frame» B and A are assumed to be connected to the same A B Dest. Net. next router Nhops 223.1.1/24-1 *(default) 223.1.1.4 2 Routing table in A 7 E 23 Routing IP Datagrams Routing to a remote destination misc Routing table in A fields data Dest. Net. next router Nhops Host A generates an IP datagram addressed to E» The IP layer on A looks up up address of E (223.1.2)» A determines that E is NOT on same as A» A s routing table shows router 223.1.1.4 as the default for all s A s layer sends IP datagram to router inside -layer frame A B 223.1.1/24-1 *(default) 223.1.1.4 2 7 E 24

25 Routing IP Datagrams Routing to a remote destination misc fields data A s datagram addressed to E arrives at the router» The router looks up address of E (223.1.2)» E has the same address as router s interface 223.1.2.9» Router is directly attached to the same (223.1.2) as E Router s layer sends the datagram to inside a -layer frame via interface 223.1.2.9» Datagram arrives at Routing table in router Dest. next router Nhops interface 223.1.1/24-1 223.1.1.4 223.1.2/24-1 223.1.2.9 223.1.3/24-1 7 A B 7 E IP Datagrams Fragmentation & Reassembly Network s have a maximum frame size» Called the maximum transmission unit (MTU)» Different types, different MTUs Large IP datagrams must be fragmented to MTU sizes» One IP datagram becomes several IP datagrams as it transits s» Fragments reassembled only at the final destination All fragments carry the same IP identification number» All fragments (except the last) have the fragment bit set... Fragmentation Reassembly 26 IP Fragmentation and Reassembly Ethernet MTU example = 4000 ID = x fragment offset = 0 = 0 One large IP datagram becomes several smaller IP datagrams =1500 =1500 =1040 ID =x ID =x ID =x fragment =1 offset =0 fragment offset =1 =1480 fragment offset =0 =2960 IP datagram (20 byte IP header + 3,980 byte TCP segment) encapsulated in one FDDI frame Each IP datagram encapsulated in one Ethernet frame Consider a 3,980 byte message sent in an FDDI frame The message generates 3 fragments when it transits an Ethernet» How much data is in each fragment? 27 The Internet Network Layer The Internet control message protocol ICMP Type Code description Used by hosts, routers, gateways 0 0 echo reply (ping) to communicate -level 3 0 unreachable information 3 1 host unreachable» Error reporting: e.g., unreachable 3 2 protocol unreachable {host,, port, protocol} 3 3 port unreachable» Echo request/reply (used by ping) 3 6 unknown Provides -layer functions 3 7 host unknown logically above IP 4 0 source quench (congestion control - not used)» ICMP is encapsulated in IP datagrams 8 0 echo request (ping) 9 0 route advertisement 10 0 router discovery 11 0 TTL expired 12 0 bad IP header» ICMP is assigned a protocol number in the IP header just like TCP and UDP ICMP message: type + code + first 8 bytes of IP datagram triggering the ICMP message 28

29 The Internet Network Layer NAT: Network Address Translation The Internet Network Layer NAT: Network Address Translation rest of Internet 138.76.29.7 All datagrams leaving local have same single source NAT IP address: 138.76.29.7, different source port numbers local (e.g., home ) 10.0.0/24 10.0.0.4 Datagrams with source or destination in this have 10.0.0/24 address for source, destination (as usual) 10.0.0.1 10.0.0.2 10.0.0.3 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 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 10.0.0.4 S: 10.0.0.1, 3345 D: 128.119.40.186, 80 S: 128.119.40.186, 80 D: 10.0.0.1, 3345 1 1: host 10.0.0.1 sends datagram to 128.119.40, 80 4: NAT router changes datagram dest addr from 138.76.29.7, 5001 to 10.0.0.1, 3345 4 10.0.0.1 10.0.0.2 10.0.0.3 30