Lecture #2.pdf
Document Details
Uploaded by CuteWatermelonTourmaline
Kangwon National University
Full Transcript
Computer Networks Lecture #2 In the last lecture Introduction to the course Introduction to the Internet Principles Terminologies Trend Recap: stu in “Data Communications” course ff Today Introduction to the network layer What’s inside a router I...
Computer Networks Lecture #2 In the last lecture Introduction to the course Introduction to the Internet Principles Terminologies Trend Recap: stu in “Data Communications” course ff Today Introduction to the network layer What’s inside a router Input ports, switching, output ports bu er management, scheduling ff Introduction to the network layer Network layer service and protocols Transport segment from sender to receiver Sender: encapsulates segments into datagrams, passes to link layer Receiver: delivers segments to transport layer Network layer protocols in every Internet devices: hosts, routers Routers Examines header elds in all IP datagrams passing through it Moves datagram from input ports to output ports to transfer datagrams along end-to-end path fi Two key network-layer functions Key network-layer functions Forwarding: move packets from a router’s input link to appropriate router’s output link Routing: determine route taken by packets from source to destination Routing algorithm Analogy: taking a trip Forwarding: process of getting through a 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’s input port is forwarded to router’s output port Control plane Network-wide logic Determine how datagram is routed among routers along end-to-end path from source host to destination host Two control-plane approaches Traditional routing algorithms: implemented in every single router Software-De ned Networking (SDN): implemented in (remote) servers called controller fi Per-router control plane Individual routing algorithm components in each and every router interact in the control plane Software-Define Networking (SDN) control plane Remote controller computes, install forwarding tables in routers Network service model Q) What service model for “channel” transporting datagrams from sender to receiver Example services for individual datagrams Guaranteed delivery Guaranteed delivery with less than 40ms delay Example services for a ow of datagram In-order datagram delivery Guaranteed minimum bandwidth to ow Restrictions on changes in inter-packet spacing fl fl Network service model Network service model Reflections on best-effort service Simplicity of mechanism has allowed Internet to be widely deployed/adopted Su cient provisioning of bandwidth allows performance of real-time applications (e.g., interactive voice, video) to be “good enough” for “most of the time” Replicated, application-layer distributed services (datacenter, content distribution networks) connecting close to clients’ networks, allow services to be provided from multiple locations Congestion control of “elastic” services helps It’s hard to argue with success of best-e ort service model ! ffi ff What’s inside a router Router architecture overview High-level view of generic router architecture Input port functions Input port functions Destination-based forwarding Q) what happens if ranges don’t divide up so nicely? Destination-based forwarding Longest prefix matching Longest pre x matching When looking for forwarding table entry for given destination address, use longest address pre x that matches destination address fi fi Longest prefix matching Longest pre x matching When looking for forwarding table entry for given destination address, use longest address pre x that matches destination address fi fi Longest prefix matching Longest pre x matching When looking for forwarding table entry for given destination address, use longest address pre x that matches destination address fi fi Longest prefix matching Longest pre x matching When looking for forwarding table entry for given destination address, use longest address pre x that matches destination address fi fi Longest prefix matching We’ll see why longest pre x matching is used shortly, when we study addressing Longest pre x matching Often performed using ternary content addressable memory (TCAMs) Content addressable: present address to TCAM Retrieve address in one clock cycle, regardless of table size Cisco Catalyst: ~1M routing table entries in TCAM fi fi Switching fabrics Transfer packet from input link to appropriate output link Switching rate Rate at which packets can be transferred from inputs to output Often measured as multiple of input/output line rate N inputs: switching rate N times line rate desirable Switching fabrics Transfer packet from input link to appropriate output link Switching rate Rate at which packets can be transferred from inputs to output Often measured as multiple of input/output line rate N inputs: switching rate N times line rate desirable Three major types of switching fabrics Switching via memory First generation routers Traditional computers with switching under direct control of CPU Packet copied to system’s memory Speed limited by memory bandwidth (2 bus crossing per datagram) Switching via a bus Datagram from input port memory to output port memory via shared bus Bus contention Switching speed limited by bus bandwidth 32Gbps bus, Cisco 5600: su cient speed for access routers ffi Switching via interconnection network Crossbar, Clos networks, other interconnection nets initially developed to connect processors in multiprocessor Multistage switch: n × n switch from multiple stages of smaller switches Exploring parallelism Fragment datagram into xed length cells on entry Switch cells through the basic, reassemble datagram at exit fi Switching via interconnection network Scaling, using multiple switching “planes” in parallel Speedup, scaleup via parallelism Cisco CRS router Basic unit: 8 switching planes Each plane: 3-stage interconnection network Up to 100’s Tbsp switching capacity Input port queuing If switch fabric slower than input ports combined → queueing may occur at input queues Queuing delay and loss due to input bu er over ow! Head-of-the-Line (HOL) blocking Queued datagram at front of queue prevents others in queue from moving forward ff fl Output port queuing Bu ering Required when datagrams arrive from fabric faster than Datagrams can be lost link transmission rate due to congestion, lack Drop policy: which datagrams to drop if no free bu ers? of bu ers Scheduling discipline Priority scheduling: who Chooses among queued datagrams for transmission gets best performance, network neutrality ff ff ff Output port queuing Bu ering when arrival rate via switch exceeds output line speed Queueing (delay) and loss due to output port bu er over ow! ff ff fl How much buffering? RFC 3439 rule of thumb Average bu ering equal to typical RTT (say 250ms) × C (link capacity) e.g., C = 10Gbps link → 2.5Gbit bu er RTT × C More recent recommendation: with N ows, N But too much bu ering can increase delays (particularly in home routers) Long RTTs: poor performance for realtime apps, sluggish TCP response Recall delay-based congestion control “keep bottleneck link just full enough (busy) but no fuller” ff ff ff fl Buffer management Bu er management Drop Which packet to add, drop when bu ers are full Tail drop: drop arriving packet Priority: drop/remove on priority basis Marking Which packets to mark to signal congestion (ECN, RED) ff ff Packet scheduling Packet scheduling Deciding which packet to send next on link First Come, First Serve (FCFS) Priority Round Robin Weighted fair queuing Packet scheduling: FCFS First Come, First Serve (FCFS) Packets transmitted in the order of arrival to output port Also known as: First-In-First-Out (FIFO) Problem? Scheduling policies: Priority Priority scheduling Arriving tra c classi ed, queued by class Any header elds can be used for classi cation Send packet from highest priority queue that has bu ered packets FCFS within a priority class Limitation? ff ffi fi fi fi Scheduling policies: Round Robin Round Robin (RR) scheduling Arriving tra c classi ed, queued by class Any header elds can be used for classi cation Server cyclically, repeatedly scans class queues, sending one complete packet from each class (if available) in turn ffi fi fi fi Scheduling policies: Weighted Fair Queuing Weighted Fair Queuing (WFQ) Generalized Round Robin Each class, i, has weight, wi, and gets weighted amount of service in each cycle wi ∑j wj Minimum bandwidth guarantee (per tra c class) ffi Network neutrality What is network neutrality? Technical: how an ISP should share/allocate its resources Packet scheduling, bu er management are the mechanisms Social, economic principles Protecting free speech Encouraging innovation, competition Enforced legal rules and policies Di erent countries have di erent “takes” on network neutrality ff ff ff Network neutrality 2015 US FCC Order on Protecting and Promoting an Open Internet (three “clear, bright line” rules: No blocking … “shall not block lawful content, applications, services, or non-harmful devices, subject to reasonable network management.” No throttling … “shall not impair or degrade lawful Internet tra c on the basis of Internet content, application, or service, or use of a non-harmful device, subject to reasonable network management.” No paid prioritization … “shall not engage in paid prioritization” ffi ISP: telecommunications or information service? Is an ISP a “telecommunications service” or an “information service” provider? The answer really matters from a regulatory standpoint! US Telecommunication Act of 1934 and 1996: Title II Imposes “common carrier duties” on telecommunications services Reasonable rates, non-discrimination Requires regulation Title I Applies to information services No common carrier duties (not regulated) But grants FCC authority “… as may be necessary in the execution of its functions” Questions?