Router Architecture Overview

Similar documents
Chapter 4: Network Layer

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

Master Course Computer Networks IN2097

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

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

internet technologies and standards

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

Network layer: Overview. Network Layer Functions

Computer Networking Introduction

Chapter 4: network layer

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

TDTS06: computer Networks

internet technologies and standards

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

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

COMP211 Chapter 4 Network Layer: The Data Plane

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

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

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

Network Layer: Internet Protocol

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

Network Layer: Router Architecture, IP Addressing

CMPE 80N: Introduction to Networking and the Internet

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

Chapter 4 Network Layer

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer

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

CSC 401 Data and Computer Communications Networks

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

CSC 4900 Computer Networks: Network Layer

Network Layer: Data Plane 4-2

CSCE 463/612 Networks and Distributed Processing Spring 2018

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer

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

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

Chapter 4 Network Layer

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

Network Layer PREPARED BY AHMED ABDEL-RAOUF

NETWORK LAYER DATA PLANE

Chapter 4 Network Layer: The Data Plane

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

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

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

The Network Layer Forwarding Tables and Switching Fabric

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

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer

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

CSC 401 Data and Computer Communications Networks

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

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer: The Data Plane

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

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

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

Chapter 4 Network Layer: The Data Plane

IPv4. Christian Grothoff.

CSCI Computer Networks Fall 2016

Network Layer: DHCP, ICMP, NAT, IPv6

Lecture 16: Network Layer Overview, Internet Protocol

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

Network Layer: Control/data plane, addressing, routers

Different Layers Lecture 20

Network Layer: outline

Internetworking With TCP/IP

Chapter 4 Network Layer: The Data Plane

CS 3516: Advanced Computer Networks

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

Network Technology 1 5th - Network Layer. Mario Lombardo -

COSC4377. TCP vs UDP Example Statistics

ECE 4450:427/527 - Computer Networks Spring 2017

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

Lecture 17: Network Layer Addressing, Control Plane, and Routing

Chapter 4 Network Layer: The Data Plane

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

Introduction to Internetworking

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

Network Layer II. Getting IP addresses. DHCP client-server scenario. DHCP client-server scenario. C compiler. You writing assignment 2

Distributed Systems. 7. Network Layer. Werner Nutt

EECS 3214: Computer Networks Protocols and Applications

Chapter 4 Network Layer

3.7 TCP congestion. reliable data transfer. sliding window. Lecture 4: Transport layer III: flow control and congestion control & Network layer I: IP

Network layer. Key Network-Layer Functions. Network service model. Interplay between routing and forwarding. CSE 4213: Computer Networks II

CSC 4900 Computer Networks: Network Layer

Internet Technology 3/23/2016

EPL606. Internetworking. Part 2a. 1Network Layer

Chapter 4: Network Layer

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

Network layer Network Layer 4-1

CMSC 332 Computer Networks Network Layer

Chapter 4 Network Layer

Chapter 4 Network Layer: The Data Plane

Internet Network Protocols IPv4/ IPv6

CSE 3214: Computer Network Protocols and Applications Network Layer

Chapter 4 Network Layer. Network Layer 4-1

Routers. Session 12 INST 346 Technologies, Infrastructure and Architecture

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

CS 3516: Advanced Computer Networks

Transcription:

Chapter 4: r Introduction (forwarding and routing) r Review of queueing theory r Router design and operation r IP: Internet Protocol m IPv4 (datagram format, addressing, ICMP, NAT) m Ipv6 r Generalized Forwarding & SDN Router Architecture Overview Two key router functions: r run routing algorithms/protocol (RIP, OSPF, BGP) r forwarding datagrams from incoming to outgoing link

Input Port Functions Physical layer: bit-level reception Data link layer: e.g., Ethernet see chapter 5 Decentralized switching: r given datagram destination, lookup output port using forwarding table in input port memory r goal: complete input port processing at line speed r queueing: if datagrams arrive faster than forwarding rate into switch fabric Three types of switching fabrics (or, more generally, an interconnection network)

Switching Via Memory First generation routers: r were simply computers, with switching under direct control of CPU r packet copied to system s memory, routed, then copied out r speed limited by memory bandwidth (2 bus crossings per datagram) Input Port Memory Output Port System Bus Switching Via a Bus r datagram from input port memory to output port memory via a shared bus r bus contention: switching speed limited by bus bandwidth r 32 Gbps bus, Cisco 5600: sufficient speed for access and enterprise routers

Switching Via Interconnection Network r overcome bus bandwidth limitations r Banyan networks, other interconnection networks initially developed to connect processors in multiprocessor r advanced design: fragmenting datagram into fixed length cells, switch cells through the fabric. r Cisco 12000: switches 60 Gbps through the interconnection network Output port queueing r buffering when arrival rate via switch exceeds output line speed r queueing (delay) and loss due to output port buffer overflow!

Input Port Queueing r if the switching fabric is slower than input ports combined speed, queueing may occur at input queues r Head-of-the-Line (HOL) blocking: queued datagram at front of queue prevents others in queue from moving forward r queueing delay and loss due to input buffer overflow! Chapter 4: (Data Plane) r Introduction (forwarding and routing) r Review of queueing theory r Router design and operation r IP: Internet Protocol m IPv4 (datagram format, addressing, ICMP, NAT) m Ipv6 r Generalized Forwarding & SDN

The picture can't be displayed. Internet Protocol (IP) r IP is a DoD standard, designed from the beginning with internetworking in mind r IP features m unreliable -delivery of packets is not guaranteed m connectionless -packets are routed and handled independently, even if part of the same message m best-effort delivery -packets are only discarded when underlying components fail or an overload condition occurs r Defines basic unit of data transfer, the IP datagram The Internet Network layer Host, router network layer functions: Transport layer: TCP, UDP Network layer Routing protocols path selection RIP, OSPF, BGP forwarding table ICMP protocol error reporting router signaling IP protocol addressing conventions datagram format packet handling conventions Link layer physical layer

IP (v4) datagram format IP protocol version number header length (bytes) type of data max number remaining hops (decremented at each router) upper layer protocol to deliver payload to how much overhead with TCP? r 20 bytes of TCP r 20 bytes of IP r = 40 bytes + app layer overhead ver head. len 16-bit identifier time to live 32 bits type of service upper layer flgs length fragment offset header checksum 32 bit source IP address 32 bit destination IP address Options (if any) data (variable length, typically a TCP or UDP segment) total datagram length (bytes) for fragmentation/ reassembly E.g. timestamp, record route taken, specify list of routers to visit. Internet Addressing r To support a universal communication service, a globally accepted addressing method is required. r IPv4 address properties m unique 32-bit number for each host m an IP address comprises two components m netid identifies a network (subnet) m hostid identifies a host on that network

IP Address Allocation Q: How does an ISP get block of addresses? A: ICANN: Internet Corporation for Assigned Names and Numbers Non-profit organization that: m allocates addresses m manages DNS m assigns domain names, resolves disputes Traditional IPv4 Addressing 32 Bits Class A B C D E 0 Network Host 10 Network Host 110 Network Host 1110 Multicast address 11110 Reserved for future use Range of host addresses 1.0.0.0 to 127.255.255.255 128.0.0.0 to 191.255.255.255 192.0.0.0 to 223.255.255.255 224.0.0.0 to 239.255.255.255 240.0.0.0 to 247.255.255.255

Addressing Conventions r Normally, the 32-bit IP addresses are written as four decimal numbers separated by decimal points m 10000000 00001010 00000010 00011110 m Is written as 128.10.2.30 r A network address with hostid = 0...0 refers to a network. r A network address with hostid = 1...1 is a (directed) broadcast address, referring to all hosts on a specified network. Where possible (e.g., Ethernet), IP broadcasting takes advantage of a hardware broadcast facility. Addressing Conventions r A network address with netid = 1...1 and hostid =1...1 is a broadcast address for the local network. Local broadcast is used in startup before a host knows its IP address or the IP address of the local network. r 127.0.0.0 is reserved for loopback. Using this network address, a packet will not get to the network. r Question: If an IP address identifies a host, how do we assign a single IP address to a gateway/router node, which by definition belongs to multiple networks?

IPv4 Addressing r IP address: 32-bit identifier for host or router interface r interface: connection between host/router and physical link m router s typically have multiple interfaces m host typically has one interface m IP addresses associated with each interface 223.1.1.1 223.1.2.1 223.1.1.2 223.1.1.4 223.1.2.9 223.1.1.3 223.1.3.1 223.1.3.27 223.1.2.2 223.1.3.2 223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 1 1 Subnetting (traditional) r Some bits in the hostid part of the IP address are actually used to specify a particular physical network, such as a LAN on a campus

Subnetting (traditional) r All gateways on rest of the Internet route packets as if there were one physical network behind G r The partitioning of the local address part is an autonomous decision r A subnet mask indicates which bits in the hostid are to be used for network addressing r 11111111 11111111 11111111 00000000 11111111 11111111 00011000 01000000 r Although not required to do so, managers would usually select contiguous bits for the subnetwork and use the same mask for all physical networks at a particular site. Subnetting (generalized) r IP address: m subnet part (high order bits) m host part (low order bits) r What s a subnet? m device interfaces with same subnet part of IP address m can physically reach each other without intervening router 223.1.1.1 223.1.2.1 223.1.1.2 223.1.1.4 223.1.2.9 223.1.2.2 223.1.1.3 223.1.3.27 subnet 223.1.3.1 223.1.3.2 network consisting of 3 subnets

Subnets 223.1.1.0/24 223.1.2.0/24 Procedure r To determine the subnets, detach each interface from its host or router, creating islands of isolated networks. Each isolated network is called a subnet. 223.1.3.0/24 Subnet mask notation: address/#bits Traditional Addressing Problem

IP addressing: CIDR CIDR: Classless InterDomain Routing m subnet portion of address of arbitrary length m address format: a.b.c.d/x, where x is # bits in subnet portion of address subnet part 11001000 00010111 00010000 00000000 200.23.16.0/23 host part IP addresses: how to get one? Q: How does a host get IP address? r Static IP: hard-coded by system admin in a file m Windows: control-panel->network->configuration->tcp/ip->properties m Traditional UNIX: /etc/rc.config m Linux: /etc/network/interfaces r DHCP: Dynamic Host Configuration Protocol: dynamically get address from as server m plug-and-play

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 and on ) Support for mobile users who want to join network (more shortly) DHCP overview: m host broadcasts DHCP discover msg [optional] m DHCP server responds with DHCP offer msg [optional] m host requests IP address: DHCP request msg m DHCP server sends address: DHCP ack msg DHCP client-server scenario A 223.1.1.1 DHCP server 223.1.2.1 B 223.1.1.2 223.1.1.4 223.1.2.9 223.1.2.2 223.1.1.3 223.1.3.27 223.1.3.1 223.1.3.2 E arriving DHCP client needs address in this network

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 DHCP offer time 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 src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 654 Lifetime: 3600 secs 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 Other DHCP functionality DHCP can return more than just allocated IP address on subnet: m address of first-hop router for client m name and IP address of DNS sever m network mask (indicating network versus host portion of address)

NAT: Network Address Translation rest of Internet local network (e.g., home 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 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) NAT: Network Address Translation r Motivation: local network uses just one IP address as far as outside world is concerned: m range of addresses not needed from ISP: just one IP address for all devices m can change addresses of devices in local network without notifying outside world m can change ISP without changing addresses of devices in local network m devices inside local net not explicitly addressable, visible by outside world (a security plus).

NAT: Network Address Translation Implementation: NAT router must: m 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. m remember (in NAT translation table) every (source IP address, port #) to (NAT IP address, new port #) translation pair m 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 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 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 1 S: 128.119.40.186, 80 D: 10.0.0.1, 3345 4 1: host 10.0.0.1 sends datagram to 128.119.40.186, 80 10.0.0.1 10.0.0.2 10.0.0.3 4: NAT router changes datagram dest addr from 138.76.29.7, 5001 to 10.0.0.1, 3345

NAT: Network Address Translation r 16-bit port-number field: m 60,000 simultaneous connections with a single LANside address! r Problem with this approach??? r NAT is controversial: m routers should only process up to layer 3 m violates end-to-end argument NAT possibility must be taken into account by app designers, eg, P2P applications m address shortage should instead be solved by IPv6 NAT traversal problem r client wants to connect to server with address 10.0.0.1 m server address 10.0.0.1 local to LAN (client can t use it as destination addr) m only one externally visible NATted address: 138.76.29.7 r One solution: statically configure NAT to forward incoming connection requests at given port to server m e.g., (123.76.29.7, port 2500) always forwarded to 10.0.0.1 port 25000 Client? 138.76.29.7 NAT router 10.0.0.4 10.0.0.1

NAT traversal problem r Yet another: relaying (used in Skype) m NATed client establishes connection to relay m External client connects to relay m relay bridges packets between to connections Client 2. connection to relay initiated by client 3. relaying established 1. connection to relay initiated by NATted host 138.76.29.7 NAT router 10.0.0.1 IP Fragmentation & Reassembly r network links have MTU (max.transfer size) - largest possible link-level frame. r m different link types, different MTUs large IP datagram divided ( fragmented ) within net m one datagram becomes several datagrams m reassembled only at final destination m IP header bits used to identify, order related fragments reassembly fragmentation: in: one large datagram out: 3 smaller datagrams

IP Fragmentation and Reassembly Example r 4000 byte datagram r MTU = 1500 bytes length =4000 ID =x fragflag =0 offset =0 One large datagram becomes several smaller datagrams 1480 bytes in data field offset = 1480/8 length =1500 length =1500 length =1040 ID =x ID =x ID =x fragflag =1 fragflag =1 fragflag =0 offset =0 offset =185 offset =370 ICMP: Internet Control Message Protocol r IP is actually a large distributed system r ICMP isused by hosts & routers to communicate network-level information merror reporting: unreachable host, network, port, protocol m echo request/reply (used by ping) r Technically a network-layer above IP: micmp msgs carried in IP datagrams

ICMP Codes Type Code description 0 0 echo reply (ping) 3 0 dest. network unreachable 3 1 dest host unreachable 3 2 dest protocol unreachable 3 3 dest port unreachable 3 6 dest network unknown 3 7 dest host unknown 4 0 source quench (congestion control - not used) 8 0 echo request (ping) 9 0 route advertisement 10 0 router discovery 11 0 TTL expired 12 0 bad IP header ICMP message content r ICMP message: type, code plus IP header and first 8 bytes of payload in datagram causing error. Why the payload???

Traceroute and ICMP r Source sends series of UDP segments to dest m First has TTL =1 m Second has TTL=2, etc. m Unlikely port number r When nth datagram arrives to nth router: m Router discards datagram m And sends to source an ICMP message (type 11, code 0) m Message includes name of router& IP address r When ICMP message arrives, source calculates RTT r Traceroute does this 3 times Stopping criterion r UDP segment eventually arrives at destination host with bogus port number r Destination returns ICMP host unreachable packet (type 3, code 3) r When source gets this ICMP, stops.