Routers. Session 12 INST 346 Technologies, Infrastructure and Architecture

Similar documents
TCP (Part 2) Session 10 INST 346 Technologies, Infrastructure and Architecture

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

Chapter 4 Network Layer: The Data Plane

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

Chapter 3 outline. 3.5 connection-oriented transport: TCP segment structure reliable data transfer flow control connection management

10 minutes survey (anonymous)

Topic 4a Router Operation and Scheduling. Ch4: Network Layer: The Data Plane. Computer Networking: A Top Down Approach

Chapter 3 Transport Layer

Chapter 4 Network Layer: The Data Plane

Computer Networking Introduction

Chapter 3- parte B outline

Chapter III: Transport Layer

Chapter 3 Transport Layer

Network Layer: Router Architecture, IP Addressing

CSC 401 Data and Computer Communications Networks

CS 4390 Computer Networks. Pointers to Corresponding Section of Textbook

CSC 401 Data and Computer Communications Networks

Network Layer: Data Plane 4-2

COMP211 Chapter 4 Network Layer: The Data Plane

CS Lecture 1 Review of Basic Protocols

32 bits. source port # dest port # sequence number acknowledgement number not used. checksum. Options (variable length)

Pipelined protocols: overview

Chapter 4: network layer

Chapter 4 Network Layer: The Data Plane

Network Layer: Control/data plane, addressing, routers

Chapter 3 Transport Layer

NETWORK LAYER DATA PLANE

CS450 Introduc0on to Networking Lecture 14 TCP. Phu Phung Feb 13, 2015

Transport Layer: outline

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

Lecture 08: The Transport Layer (Part 2) The Transport Layer Protocol (TCP) Dr. Anis Koubaa

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

Lecture 16: Network Layer Overview, Internet Protocol

Chapter III: Transport Layer

Computer Communication Networks Midterm Review

CSE 4213: Computer Networks II

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, Development of reliable protocol Sliding window protocols

Chapter 4 Network Layer

Correcting mistakes. TCP: Overview RFCs: 793, 1122, 1323, 2018, TCP seq. # s and ACKs. GBN in action. TCP segment structure

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

CSCE 463/612 Networks and Distributed Processing Spring 2018

Lecture 12: Transport Layer TCP again

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

Network Layer PREPARED BY AHMED ABDEL-RAOUF

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, steam: r Development of reliable protocol r Sliding window protocols

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

The Network Layer Forwarding Tables and Switching Fabric

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer: The Data Plane

internet technologies and standards

TCP. TCP: Overview. TCP Segment Structure. Maximum Segment Size (MSS) Computer Networks 10/19/2009. CSC 257/457 - Fall

Chapter 4 Network Layer: The Data Plane

internet technologies and standards

TCP: Overview RFCs: 793,1122,1323, 2018, 2581

Master Course Computer Networks IN2097

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

Transport Layer: Outline

CSC 4900 Computer Networks: Network Layer

Chapter 4: Network Layer

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

Computer Networks LECTURE 10 ICMP, SNMP, Inside a Router, Link Layer Protocols. Assignments INTERNET CONTROL MESSAGE PROTOCOL

TDTS06: computer Networks

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

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

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

CSE 3214: Computer Network Protocols and Applications Network Layer

Lecture 8. TCP/IP Transport Layer (2)

Chapter 3 Transport Layer

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

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

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

Router Architecture Overview

Chapter 3 Transport Layer

Fall 2012: FCM 708 Bridge Foundation I

CSC 4900 Computer Networks: TCP

Suprakash Datta. Office: CSEB 3043 Phone: ext Course page:

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

Course on Computer Communication and Networks. Lecture 5 Chapter 3; Transport Layer, Part B

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

Network Layer: Internet Protocol

CSC 401 Data and Computer Communications Networks

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

COMP 431 Internet Services & Protocols. Transport Layer Protocols & Services Outline. The Transport Layer Reliable data delivery & flow control in TCP

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

CMSC 332 Computer Networks Network Layer

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

TCP reliable data transfer. Chapter 3 outline. TCP sender events: TCP sender (simplified) TCP: retransmission scenarios. TCP: retransmission scenarios

Network Layer: outline

CSCD 330 Network Programming

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

Chapter 3 outline. Chapter 3: Transport Layer. Transport vs. network layer. Transport services and protocols. Internet transport-layer protocols

CS 43: Computer Networks. 18: Transmission Control Protocol October 12-29, 2018

CSCI Computer Networks Fall 2016

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

CC451 Computer Networks

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

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control

CSE 4/589 Midterm Review. Hengtong Zhang SUNY Buffalo 10/30/2018

Network layer: Overview. Network Layer Functions

Computer Communication Networks Midterm Review

Transcription:

Routers Session 12 INST 346 Technologies, Infrastructure and Architecture

Goals for Today Finish up TCP Flow control, timeout selection, close connection Network layer overview Structure of a router Getahead: IPv4 addresses

TCP segment structure 32 bits ACK: ACK # valid RST, SYN, FIN: connection estab (setup, teardown commands) Internet checksum (as in UDP) source port # dest port # head len sequence number acknowledgement number not used UAP R S F checksum receive window application data (variable length) Urg data pointer options (variable length) counting by bytes of data (not segments!) # bytes rcvr willing to accept

TCP flow control application may remove data from TCP socket buffers. slower than TCP receiver is delivering (sender is sending) application process TCP socket receiver buffers TCP code application OS flow control receiver controls sender, so sender won t overflow receiver s buffer by transmitting too much, too fast from sender IP code receiver protocol stack

TCP round trip time, timeout Q: how to set TCP timeout value? longer than RTT but RTT varies too short: premature timeout, unnecessary retransmissions too long: slow reaction to segment loss Q: how to estimate RTT? SampleRTT: measured time from segment transmission until ACK receipt ignore retransmissions SampleRTT will vary, want estimated RTT smoother average several recent measurements, not just current SampleRTT

TCP round trip time, timeout EstimatedRTT = (1- α)*estimatedrtt + α*samplertt exponential weighted moving average influence of past sample decreases exponentially fast typical value: α = 0.125 RTT: gaia.cs.umass.edu to fantasia.eurecom.fr 350 RTT: gaia.cs.umass.edu to fantasia.eurecom.fr RTT (milliseconds) RTT (milliseconds) 300 250 200 150 samplertt EstimatedRTT 100 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106 time (seconnds) time (seconds) SampleRTT Estimated RTT

TCP round trip time, timeout timeout interval: EstimatedRTT plus safety margin large variation in EstimatedRTT -> larger safety margin estimate SampleRTT deviation from EstimatedRTT: DevRTT = (1-β)*DevRTT + β* SampleRTT-EstimatedRTT (typically, β = 0.25) TimeoutInterval = EstimatedRTT + 4*DevRTT estimated RTT safety margin * Check out the online interactive exercises for more examples: http://gaia.cs.umass.edu/kurose_ross/interactive/

TCP flow control receiver advertises free buffer space by including rwnd value in TCP header of receiver-to-sender segments RcvBuffer size set via socket options (typical default is 4096 bytes) many operating systems autoadjust RcvBuffer sender limits amount of unacked ( in-flight ) data to receiver s rwnd value guarantees receive buffer will not overflow RcvBuffer rwnd to application process buffered data free buffer space TCP segment payloads receiver-side buffering

TCP: closing a connection client, server each close their side of connection send TCP segment with FIN bit = 1 respond to received FIN with ACK on receiving FIN, ACK can be combined with own FIN simultaneous FIN exchanges can be handled

TCP: closing a connection client state server state ESTAB ESTAB clientsocket.close() FIN_WAIT_1 FIN_WAIT_2 can no longer send but can receive data wait for server close FINbit=1, seq=x ACKbit=1; ACKnum=x+1 can still send data CLOSE_WAIT TIMED_WAIT timed wait for 2*max segment lifetime FINbit=1, seq=y ACKbit=1; ACKnum=y+1 can no longer send data LAST_ACK CLOSED CLOSED

Network layer transport segment from sending to receiving host on sending side encapsulates segments into datagrams on receiving side, delivers segments to transport layer network layer protocols in every host, router router examines header fields in all IP datagrams passing through it application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical application transport network data link physical

Two key network-layer functions network-layer functions: forwarding: move packets from router s input to appropriate router output routing: determine route taken by packets from source to destination routing algorithms analogy: taking a trip forwarding: process of getting through single interchange routing: process of planning trip from source to destination

Network layer: data plane, control plane Data plane local, per-router function determines how datagram arriving on router input port is forwarded to router output port forwarding function values in arriving packet header 0111 3 1 2 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

Router architecture overview high-level view of generic router architecture: routing processor high-seed switching fabric routing, management control plane (software) operates in millisecond time frame forwarding data plane (hardware) operttes in nanosecond timeframe router input ports router output ports

IP addressing: introduction IP address: 32-bit identifier for host, 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) IP addresses associated with each interface 223.1.1.2 223.1.1.1 223.1.1.3 223.1.1.4 223.1.2.9 223.1.3.27 223.1.3.1 223.1.2.1 223.1.2.2 223.1.3.2 223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 1 1

Subnets IP address: subnet part - high order bits host part - low order bits what s a subnet? device interfaces with same subnet part of IP address can physically reach each other without intervening router 223.1.1.1 223.1.1.2 223.1.2.1 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

IP addressing: CIDR 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 subnet part host part 11001000 00010111 00010000 00000000 200.23.16.0/23

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

IP addressing: the last word... Q: how does an ISP get block of addresses? A: ICANN: Internet Corporation for Assigned Names and Numbers http://www.icann.org/ allocates addresses manages DNS assigns domain names, resolves disputes

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.... Fly-By-Night-ISP Send me anything with addresses beginning 200.23.16.0/20 Internet 200.23.30.0/23 ISPs-R-Us Send me anything with addresses beginning 199.31.0.0/16

IP 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? 20 bytes of TCP 20 bytes of IP = 40 bytes + app layer overhead ver head. len 16-bit identifier time to live type of service upper layer 32 bits 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.

Input port functions line termination link layer protocol (receive) lookup, forwarding queueing switch fabric physical layer: bit-level reception data link layer: e.g., Ethernet decentralized switching: using header field values, lookup output port using forwarding table in input port memory goal: complete input port processing at line speed queuing: if datagrams arrive faster than forwarding rate into switch fabric

Destination-based forwarding forwarding table Destination Address Range 11001000 00010111 00010000 00000000 through 11001000 00010111 00010111 11111111 11001000 00010111 00011000 00000000 through 11001000 00010111 00011000 11111111 11001000 00010111 00011001 00000000 through 11001000 00010111 00011111 11111111 otherwise Link Interface 0 1 2 3 Q: but what happens if ranges don t divide up so nicely?

Longest prefix matching longest prefix matching when looking for forwarding table entry for given destination address, use longest address prefix that matches destination address. Destination Address Range 11001000 00010111 00010*** ********* 11001000 00010111 00011000 ********* 11001000 00010111 00011*** ********* otherwise examples: DA: 11001000 00010111 00010110 10100001 DA: 11001000 00010111 00011000 10101010 Link interface 0 1 2 3 which interface? which interface?

Longest prefix matching 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

Switching fabrics transfer packet from input buffer to appropriate output buffer 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

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 speed for access and enterprise routers bus

Input port queuing 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 fabric switch fabric output port contention: only one red datagram can be transferred. lower red packet is blocked one packet time later: green packet experiences HOL blocking

Output ports This slide in HUGELY important! switch fabric datagram buffer queueing link layer protocol (send) line termination buffering required when datagrams arrive from fabric faster than the transmission rate scheduling discipline chooses among queued datagrams for transmission performance, network neutrality Datagram (packets) can be lost due to congestion, lack of buffers Priority scheduling who gets best

Output port queueing switch fabric switch fabric at t, packets more from input to output one packet time later buffering when arrival rate via switch exceeds output line speed queueing (delay) and loss due to output port buffer overflow!

How much buffering? RFC 3439 rule of thumb: average buffering equal to typical RTT (say 250 msec) times link capacity C e.g., C = 10 Gpbs link: 2.5 Gbit buffer recent recommendation: with N flows, buffering equal to RTT. C N

Scheduling policies scheduling: choose next packet to send on link FIFO (first in first out) scheduling: send in order of arrival to queue real-world example? discard policy: if packet arrives to full queue: who to discard? tail drop: drop arriving packet priority: drop/remove on priority basis random: drop/remove randomly packet arrivals queue (waiting area) link (server) packet departures

Scheduling policies Weighted Fair Queuing (WFQ): generalized Round Robin each class gets weighted amount of service in each cycle

Before You Go On a sheet of paper, answer the following (ungraded) question (no names, please): What one or two possible improvements to the way the class is being taught would make the most difference?