Networks Final

¡Supera tus tareas y exámenes ahora con Quizwiz!

Pure ALOHA efficiency

(success by given node) = P(node transmits) . P(no other node transmits in [t0-1,t0] . P(no other node transmits in [t0-1,t0] = p . (1-p)^(N-1) . (1-p)^(N-1) = p . (1-p)^(2(N-1)) ... choosing optimum p and then letting n ➜ ∞ = 1/(2e) = .18 even worse than slotted Aloha!

Dijsktra's algorithm

1 Initialization: 2 N' = {u} 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(u,v) 6 else D(v) = ∞ 7 8 Loop 9 find w not in N' such that D(w) is a minimum 10 add w to N' 11 update D(v) for all v adjacent to w and not in N' : 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N'

OpenFlow: Flow Table Entries

1. Forward packet to port(s) 2. Encapsulate and forward to controller 3. Drop packet 4. Send to normal processing pipeline 5. Modify Fields

Hot Potato Routing

2d learns (via iBGP) it can route to X via 2a or 2c hot potato routing: choose local gateway that has least intra-domain cost (e.g., 2d chooses 2a, even though more AS hops to X): don't worry about inter-domain cost!

MAC addresses and ARP

32-bit IP address: network-layer address for interface used for layer 3 (network layer) forwarding MAC (or LAN or physical or Ethernet) address: function: used 'locally" to get frame from one interface to another physically-connected interface (same network, in IP-addressing sense) 48 bit MAC address (for most LANs) burned in NIC ROM, also sometimes software settable e.g.: 1A-2F-BB-76-09-AD hexadecimal (base 16) notation (each "numeral" represents 4 bits)

Internet inter-AS routing: BGP

BGP (Border Gateway Protocol): the de facto inter-domain routing protocol "glue that holds the Internet together" BGP provides each AS a means to: eBGP: obtain subnet reachability information from neighboring ASes iBGP: propagate reachability information to all AS-internal routers. determine "good" routes to other networks based on reachability information and policy allows subnet to advertise its existence to rest of Internet: "I am here"

Logically centralized control plane

A distinct (typically remote) controller interacts with local control agents (CAs) in routers to compute forwarding tables

Recall: logically centralized control plane

A distinct (typically remote) controller interacts with local control agents (CAs) in routers to compute forwarding tables

IP addresses: how to get one?

Q: How does a host get IP address? hard-coded by system admin in a file Windows: control-panel->network->configuration->tcp/ip->properties UNIX: /etc/rc.config DHCP: Dynamic Host Configuration Protocol: dynamically get address from as server "plug-and-play"

Routing algorithm classification

Q: global or decentralized information? global: all routers have complete topology, link cost info "link state" algorithms decentralized: router knows physically-connected neighbors, link costs to neighbors iterative process of computation, exchange of info with neighbors "distance vector" algorithms Q: static or dynamic? static: routes change slowly over time dynamic: routes change more quickly periodic update in response to link cost changes

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

BGP, OSPF, forwarding table entries

Q: how does router set forwarding table entry to distant prefix? recall: 1a, 1b, 1c learn about dest X via iBGP from 1c: "path to X goes through 1c" 1d: OSPF intra-domain routing: to get to 1c, forward over outgoing local interface 1 1a: OSPF intra-domain routing: to get to 1c, forward over outgoing local interface 2

DHCP: more than IP addresses

DHCP can return more than just allocated IP address on subnet: address of first-hop router for client name and IP address of DNS sever network mask (indicating network versus host portion of address) connecting laptop needs its IP address, addr of first-hop router, addr of DNS server: use DHCP DHCP request encapsulated in UDP, encapsulated in IP, encapsulated in 802.1 Ethernet Ethernet frame broadcast (dest: FFFFFFFFFFFF) on LAN, received at router running DHCP server Ethernet demuxed to IP demuxed, UDP demuxed to DHCP DCP server formulates DHCP ACK containing client's IP address, IP address of first-hop router for client, name & IP address of DNS server encapsulation of DHCP server, frame forwarded to client, demuxing up to DHCP at client client now knows its IP address, name and IP address of DSN server, IP address of its first-hop router

A link-state routing algorithm

Dijkstra's algorithm net topology, link costs known to all nodes accomplished via "link state broadcast" all nodes have same info computes least cost paths from one node ('source") to all other nodes gives forwarding table for that node iterative: after k iterations, know least cost path to k dest.'s notation: c(x,y): link cost from node x to y; = ∞ if not direct neighbors D(v): current value of cost of path from source to dest. v p(v): predecessor node along path from source to v N': set of nodes whose least cost path definitively known

Error detection

EDC= Error Detection and Correction bits (redundancy) D = Data protected by error checking, may include header fields Error detection not 100% reliable! protocol may miss some errors, but rarely larger EDC field yields better detection and correction

Generalized Forwarding and SDN

Each router contains a flow table that is computed and distributed by a logically centralized routing controller

Channel partitioning MAC protocols: FDMA

FDMA: frequency division multiple access channel spectrum divided into frequency bands each station assigned fixed frequency band unused transmission time in frequency bands go idle example: 6-station LAN, 1,3,4 have packet to send, frequency bands 2,5,6 idle

IPv6: adoption

Google: 8% of clients access services via IPv6 NIST: 1/3 of all US government domains are IPv6 capable Long (long!) time for deployment, use 20 years and counting! think of application-level changes in last 20 years: WWW, Facebook, streaming media, Skype, ... Why?

Per-router control plane

Individual routing algorithm components in each and every router interact with each other in control plane to compute forwarding tables

Recall: per-router control plane

Individual routing algorithm components in each and every router interact with each other in control plane to compute forwarding tables

Components of SDN controller

Interface layer to network control apps: abstractions API Network-wide state management layer: state of networks links, switches, services: a distributed database communication layer: communicate between SDN controller and controlled switches

BGP: achieving policy via advertisements

Suppose an ISP only wants to route traffic to/from its customer networks (does not want to carry transit traffic between other ISPs) A advertises path Aw to B and to C B chooses not to advertise BAw to C: B gets no "revenue" for routing CBAw, since none of C, A, w are B's customers C does not learn about CBAw path C will route CAw (not using B) to get to w A,B,C are provider networks X,W,Y are customer (of provider networks) X is dual-homed: attached to two networks policy to enforce: X does not want to route from B to C via X .. so X will not advertise to B a route to C

Channel partitioning MAC protocols: TDMA

TDMA: time division multiple access access to channel in "rounds" each station gets fixed length slot (length = packet transmission time) in each round unused slots go idle example: 6-station LAN, 1,3,4 have packets to send, slots 2,5,6 idle

Output ports

buffering required when datagrams arrive from fabric faster than the transmission rate scheduling discipline chooses among queued datagrams for transmission buffering when arrival rate via switch exceeds output line speed queueing (delay) and loss due to output port buffer overflow!

Graph abstraction: costs

key question: what is the least-cost path between u and z ? routing algorithm: algorithm that finds that least cost path

NAT: network address translation

motivation: local network uses just one IP address as far as outside world is concerned: range of addresses not needed from ISP: just one IP address for all devices can change addresses of devices in local network without notifying outside world can change ISP without changing addresses of devices in local network devices inside local net not explicitly addressable, visible by outside world (a security plus) 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 16-bit port-number field: 60,000 simultaneous connections with a single LAN-side address! NAT is controversial: routers should only process up to layer 3 address shortage should be solved by IPv6 violates end-to-end argument NAT possibility must be taken into account by app designers, e.g., P2P applications NAT traversal: what if client wants to connect to server behind NAT?

Scheduling mechanisms

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

Random access protocols

when node has packet to send transmit at full channel data rate R. no a priori coordination among nodes two or more transmitting nodes ➜ "collision", random access MAC protocol specifies: how to detect collisions how to recover from collisions (e.g., via delayed retransmissions) examples of random access MAC protocols: slotted ALOHA ALOHA CSMA, CSMA/CD, CSMA/CA

OSPF (Open Shortest Path First)

"open": publicly available uses link-state algorithm link state packet dissemination topology map at each node route computation using Dijkstra's algorithm router floods OSPF link-state advertisements to all other routers in entire AS carried in OSPF messages directly over IP (rather than TCP or UDP link state: for each attached link IS-IS routing protocol: nearly identical to OSPF

Ethernet CSMA/CD algorithm

1. NIC receives datagram from network layer, creates frame 2. If NIC senses channel idle, starts frame transmission. If NIC senses channel busy, waits until channel idle, then transmits. 3. If NIC transmits entire frame without detecting another transmission, NIC is done with frame ! 4. If NIC detects another transmission while transmitting, aborts and sends jam signal 5. After aborting, NIC enters binary (exponential) backoff: after mth collision, NIC chooses K at random from {0,1,2, ..., 2^m -1}. NIC waits K·512 bit times, returns to Step 2 longer backoff interval with more collisions

BGP path advertisement

AS2 router 2c receives path advertisement AS3,X (via eBGP) from AS3 router 3a Based on AS2 policy, AS2 router 2c accepts path AS3,X, propagates (via iBGP) to all AS2 routers Based on AS2 policy, AS2 router 2a advertises (via eBGP) path AS2, AS3, X to AS1 router 1c gateway router may learn about multiple paths to destination: AS1 gateway router 1c learns path AS3,X from 3a Based on policy, AS1 gateway router 1c chooses path AS3,X, and advertises path within AS1 via iBGP

CSMA/CD (collision detection)

CSMA/CD: carrier sensing, deferral as in CSMA collisions detected within short time colliding transmissions aborted, reducing channel wastage collision detection: easy in wired LANs: measure signal strengths, compare transmitted, received signals difficult in wireless LANs: received signal strength overwhelmed by local transmission strength human analogy: the polite conversationalist

CSMA (carrier sense multiple access)

CSMA: listen before transmit: if channel sensed idle: transmit entire frame if channel sensed busy, defer transmission human analogy: don't interrupt others!

SDN perspective: data plane switches

Data plane switches fast, simple, commodity switches implementing generalized data-plane forwarding (Section 4.4) in hardware switch flow table computed, installed by controller API for table-based switch control (e.g., OpenFlow) defines what is controllable and what is not protocol for communicating with controller (e.g., OpenFlow

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 recipe to determine the subnets, detach each interface from its host or router, creating islands of isolated networks each isolated network is called a subnet

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 Q: how are interfaces actually connected? A: we'll learn about that in chapter 5, 6. A: wired Ethernet interfaces connected by Ethernet switches For now: don't need to worry about how one interface is connected to another (with no intervening router) A: wireless WiFi interfaces connected by WiFi base station

Intra-AS Routing

also known as interior gateway protocols (IGP) most common intra-AS routing protocols: RIP: Routing Information Protocol OSPF: Open Shortest Path First (IS-IS protocol essentially same as OSPF) IGRP: Interior Gateway Routing Protocol (Cisco proprietary for decades, until 2016)

Scheduling policies: still more

Round Robin (RR) scheduling: multiple classes cyclically scan class queues, sending one complete packet from each class (if available) real world example? Weighted Fair Queuing (WFQ): generalized Round Robin each class gets weighted amount of service in each cycle real-world example?

Routing protocols

Routing protocol goal: determine "good" paths (equivalently, routes), from sending hosts to receiving host, through network of routers path: sequence of routers packets will traverse in going from given initial source host to given final destination host "good": least "cost", "fastest", "least congested" routing: a "top-10" networking challenge!

SDN perspective: SDN controller

SDN controller (network OS): maintain network state information interacts with network control applications "above" via northbound API interacts with network switches "below" via southbound API implemented as distributed system for performance, scalability, fault-tolerance, robustness

Path attributes and BGP routes

advertised prefix includes BGP attributes prefix + attributes = "route" two important attributes: AS-PATH: list of ASes through which prefix advertisement has passed NEXT-HOP: indicates specific internal-AS router to next-hop AS Policy-based routing: gateway receiving route advertisement uses import policy to accept/decline path (e.g., never route through AS Y). AS policy also determines whether to advertise path to other other neighboring ASes

Internet approach to scalable routing

aggregate routers into regions known as "autonomous systems" (AS) (a.k.a. "domains") intra-AS routing routing among hosts, routers in same AS ("network") all routers in AS must run same intra-domain protocol routers in different AS can run different intra-domain routing protocol gateway router: at "edge" of its own AS, has link(s) to router(s) in other AS'es inter-AS routing routing among AS'es gateways perform inter-domain routing (as well as intra-domain routing)

Dijkstra's algorithm, discussion

algorithm complexity: n nodes each iteration: need to check all nodes, w, not in N n(n+1)/2 comparisons: O(n2) more efficient implementations possible: O(nlogn) oscillations possible: e.g., support link cost equals amount of carried traffic: initially given these costs, find new routing.... resulting in new costs given these costs, find new routing.... resulting in new costs given these costs, find new routing.... resulting in new costs

Slotted ALOHA

assumptions: all frames same size time divided into equal size slots (time to transmit 1 frame) nodes start to transmit only slot beginning nodes are synchronized if 2 or more nodes transmit in slot, all nodes detect collision operation: when node obtains fresh frame, transmits in next slot if no collision: node can send new frame in next slot if collision: node retransmits frame in each subsequent slot with prob. p until success Pros: single active node can continuously transmit at full rate of channel highly decentralized: only slots in nodes need to be in sync simple Cons: collisions, wasting slots idle slots nodes may be able to detect collision in less than time to transmit packet clock synchronization

"Taking turns" MAC protocols

channel partitioning MAC protocols: share channel efficiently and fairly at high load inefficient at low load: delay in channel access, 1/N bandwidth allocated even if only 1 active node! random access MAC protocols efficient at low load: single node can fully utilize channel high load: collision overhead "taking turns" protocols look for best of both worlds! polling: master node "invites" slave nodes to transmit in turn typically used with "dumb" slave devices concerns: polling overhead latency single point of failure (master) token passing: control token passed from one node to next sequentially. token message concerns: token overhead latency single point of failure (token)

Summary of MAC protocols

channel partitioning, by time, frequency or code Time Division, Frequency Division random access (dynamic), ALOHA, S-ALOHA, CSMA, CSMA/CD carrier sensing: easy in some technologies (wire), hard in others (wireless) CSMA/CD used in Ethernet CSMA/CA used in 802.11 taking turns polling from central site, token passing Bluetooth, FDDI, token ring

Other changes from IPv4

checksum: removed entirely to reduce processing time at each hop options: allowed, but outside of header, indicated by "Next Header" field ICMPv6: new version of ICMP additional message types, e.g. "Packet Too Big" multicast group management functions

Bellman-Ford example

clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3 B-F equation says: du(z) = min { c(u,v) + dv(z), c(u,x) + dx(z), c(u,w) + dw(z) } = min {2 + 5, 1 + 3, 5 + 3} = 4 node achieving minimum is next hop in shortest path, used in forwarding table

CSMA collisions

collisions can still occur: propagation delay means two nodes may not hear each other's transmission collision: entire packet transmission time wasted distance & propagation delay play role in in determining collision probability

Link layer: context

datagram transferred by different link protocols over different links: e.g., Ethernet on first link, frame relay on intermediate links, 802.11 on last link each link protocol provides different services e.g., may or may not provide rdt over link transportation analogy: trip from Princeton to Lausanne limo: Princeton to JFK plane: JFK to Geneva train: Geneva to Lausanne tourist = datagram transport segment = communication link transportation mode = link layer protocol travel agent = routing algorithm

Input port functions

decentralized switching: using header field values, lookup output port using forwarding table in input port memory ("match plus action") goal: complete input port processing at 'line speed' queuing: if datagrams arrive faster than forwarding rate into switch fabric destination-based forwarding: forward based only on destination IP address (traditional) generalized forwarding: forward based on any set of header field values

Slotted ALOHA: efficiency

efficiency: long-run fraction of successful slots (many nodes, all with many frames to send) suppose: N nodes with many frames to send, each transmits in slot with probability p prob that given node has success in a slot = p(1-p)^(N-1) prob that any node has a success = Np(1-p)^(N-1) max efficiency: find p* that maximizes Np(1-p)^(N-1) for many nodes, take limit of Np*(1-p*)^(N-1) as N goes to infinity, gives: max efficiency = 1/e = .37 at best: channel used for useful transmissions 37% of time!

Q: What service model for "channel" transporting datagrams from sender to receiver?

example services for individual datagrams: guaranteed delivery guaranteed delivery with less than 40 msec delay in-order datagram delivery guaranteed minimum bandwidth to flow restrictions on changes in inter-packet spacing

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

OpenFlow data plane abstraction

flow: defined by header fields generalized forwarding: simple packet-handling rules Pattern: match values in packet header fields Actions: for matched packet: drop, forward, modify, matched packet or send matched packet to controller Priority: disambiguate overlapping patterns Counters: #bytes and #packets Flow table in a router (computed and distributed by controller) define router's match+action rules

Interconnected ASes

forwarding table configured by both intra- and inter-AS routing algorithm intra-AS routing determine entries for destinations within AS inter-AS & intra-AS determine entries for external destinations

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

Link layer services

framing, link access: encapsulate datagram into frame, adding header, trailer channel access if shared medium "MAC" addresses used in frame headers to identify source, destination different from IP address! reliable delivery between adjacent nodes we learned how to do this already (chapter 3)! seldom used on low bit-error link (fiber, some twisted pair) wireless links: high error rates Q: why both link-level and end-end reliability? flow control: pacing between adjacent sending and receiving nodes error detection: errors caused by signal attenuation, noise. receiver detects presence of errors: signals sender for retransmission or drops frame error correction: receiver identifies and corrects bit error(s) without resorting to retransmission half-duplex and full-duplex with half duplex, nodes at both ends of link can transmit, but not at same time

An ideal multiple access protocol

given: broadcast channel of rate R bps desiderata: 1. when one node wants to transmit, it can send at rate R. 2. when M nodes want to transmit, each can send at average rate R/M 3. fully decentralized: no special node to coordinate transmissions no synchronization of clocks, slots 4. simple

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/"on") support for mobile users who want to join network (more shortly) DHCP overview: host broadcasts "DHCP discover" msg [optional] DHCP server responds with "DHCP offer" msg [optional] host requests IP address: "DHCP request" msg DHCP server sends address: "DHCP ack" msg

Internet checksum (review)

goal: detect "errors" (e.g., flipped bits) in transmitted packet (note: used at transport layer only) sender: treat segment contents as sequence of 16-bit integers checksum: addition (1's complement sum) of segment contents sender puts checksum value into UDP checksum field receiver: compute checksum of received segment check if computed checksum equals checksum field value: NO - error detected YES - no error detected. But maybe errors nonetheless?

SDN: selected challenges

hardening the control plane: dependable, reliable, performance-scalable, secure distributed system robustness to failures: leverage strong theory of reliable distributed system for control plane dependability, security: "baked in" from day one? networks, protocols meeting mission-specific requirements e.g., real-time, ultra-reliable, ultra-secure Internet-scaling

Hierarchical addressing

hierarchical addressing allows efficient advertisement of routing information ISPs-R-Us has a more specific route to Organization 1

Router architecture overview

high-level view of generic router architecture: routing, management control plane (software) operates in millisecond time frame forwarding data plane (hardware) operates in nanosecond timeframe

Where is the link layer implemented?

in each and every host link layer implemented in "adaptor" (aka network interface card NIC) or on a chip Ethernet card, 802.11 card; Ethernet chipset implements link, physical layer attaches into host's system buses combination of hardware, software, firmware

IPv6: motivation

initial motivation: 32-bit address space soon to be completely allocated. additional motivation: header format helps speed processing/forwarding header changes to facilitate QoS IPv6 datagram format: fixed-length 40 byte header no fragmentation allowed priority: identify priority among datagrams in flow flow Label: identify datagrams in same "flow." (concept of"flow" not well defined). next header: identify upper layer protocol for data

Distance vector: link cost changes

link cost changes: node detects local link cost change updates routing info, recalculates distance vector if DV changes, notify neighbors t0 : y detects link-cost change, updates its DV, informs its neighbors. t1 : z receives update from y, updates its table, computes new least cost to x , sends its neighbors its DV. t2 : y receives z's update, updates its distance table. y's least costs do not change, so y does not send a message to z. link cost changes: node detects local link cost change bad news travels slow - "count to infinity" problem! 44 iterations before algorithm stabilizes: see text poisoned reverse: If Z routes through Y to get to X : Z tells Y its (Z's) distance to X is infinite (so Y won't route to X via Z) will this completely solve count to infinity problem?

Data plane

local, per-router function determines how datagram arriving on router input port is forwarded to router output port forwarding function

OpenFlow abstraction

match+action: unifies different kinds of devices Router match: longest destination IP prefix action: forward out a link Switch match: destination MAC address action: forward or flood Firewall match: IP addresses and TCP/UDP port numbers action: permit or deny NAT match: IP address and port action: rewrite address and port

Comparison of LS and DV algorithms

message complexity LS: with n nodes, E links, O(nE) msgs sent DV: exchange between neighbors only convergence time varies speed of convergence LS: O(n^2) algorithm requires O(nE) msgs may have oscillations DV: convergence time varies may be routing loops count-to-infinity problem robustness: what happens if router malfunctions? LS: node can advertise incorrect link cost each node computes only its own table DV: DV node can advertise incorrect path cost each node's table used by others error propagate thru network

Cyclic redundancy check

more powerful error-detection coding view data bits, D, as a binary number choose r+1 bit pattern (generator), G goal: choose r CRC bits, R, such that <D,R> exactly divisible by G (modulo 2) receiver knows G, divides <D,R> by G. If non-zero remainder: error detected! can detect all burst errors less than r+1 bits widely used in practice (Ethernet, 802.11 WiFi, ATM)

IP fragmentation, reassembly

network links have MTU (max.transfer size) - largest possible link-level frame different link types, different MTUs large IP datagram divided ("fragmented") within net one datagram becomes several datagrams "reassembled" only at final destination IP header bits used to identify, order related fragments

SDN perspective: control applications

network-control apps: "brains" of control: implement control functions using lower-level services, API provided by SND controller unbundled: can be provided by 3rd party: distinct from routing vendor, or SDN controller

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

Transition from IPv4 to IPv6

not all routers can be upgraded simultaneously no "flag days" how will network operate with mixed IPv4 and IPv6 routers? tunneling: IPv6 datagram carried as payload in IPv4 datagram among IPv4 routers

Dijkstra's algorithm: example

notes: construct shortest path tree by tracing predecessor nodes ties can exist (can be broken arbitrarily)

Making routing scalable

our routing study thus far - idealized all routers identical network "flat" ... not true in practice scale: with billions of destinations: can't store all destinations in routing tables! routing table exchange would swamp links! administrative autonomy internet = network of networks each network admin may want to control routing in its own network

Why different Intra-, Inter-AS routing ?

policy: inter-AS: admin wants control over how its traffic routed, who routes through its net. intra-AS: single admin, so no policy decisions needed scale: hierarchical routing saves table size, reduced update traffic performance: intra-AS: can focus on performance inter-AS: policy may dominate over performance

Scheduling policies: priority

priority scheduling: send highest priority queued packet multiple classes, with different priorities class may depend on marking or other header info, e.g. IP source/dest, port numbers, etc. real world example?

Inter-AS tasks

suppose router in AS1 receives datagram destined outside of AS1: router should forward packet to gateway router, but which one? AS1 must: learn which dests are reachable through AS2, which through AS3 propagate this reachability info to all routers in AS1 job of inter-AS routing!

Link layer: introduction

terminology: hosts and routers: nodes communication channels that connect adjacent nodes along communication path: links wired links wireless links LANs layer-2 packet: frame, encapsulates datagram data-link layer has responsibility of transferring datagram from one node to physically adjacent node over a link

Longest prefix matching

when looking for forwarding table entry for given destination address, use longest address prefix that matches destination address. we'll see why longest prefix matching is used shortly, when we study addressing 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

CRC example

want: D.2^r XOR R = nG equivalently: D.2^r = nG XOR R equivalently: if we divide D.2^r by G, want remainder R to satisfy: R = remainder[D.2^r /G]

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

BGP messages

BGP messages exchanged between peers over TCP connection BGP messages: OPEN: opens TCP connection to remote BGP peer and authenticates sending BGP peer UPDATE: advertises new path (or withdraws old) KEEPALIVE: keeps connection alive in absence of UPDATES; also ACKs OPEN request NOTIFICATION: reports errors in previous msg; also used to close connection

BGP basics

BGP session: two BGP routers ("peers") exchange BGP messages over semi-permanent TCP connection: advertising paths to different destination network prefixes (BGP is a "path vector" protocol) when AS3 gateway router 3a advertises path AS3,X to AS2 gateway router 2c: AS3 promises to AS2 it will forward datagrams towards X

Distance vector algorithm

Bellman-Ford equation (dynamic programming) let dx(y) := cost of least-cost path from x to y then dx(y) = min {c(x,v) + dv(y) } Dx(y) = estimate of least cost from x to y x maintains distance vector Dx = [Dx(y): y є N ] node x: knows cost to each neighbor v: c(x,v) maintains its neighbors' distance vectors. For each neighbor v, x maintains Dv = [Dv(y): y є N ] key idea: from time-to-time, each node sends its own distance vector estimate to neighbors when x receives new DV estimate from neighbor, it updates its own DV using B-F equation: Dx(y) ← minv{c(x,v) + Dv(y)} for each node y ∊ N under minor, natural conditions, the estimate Dx(y) converge to the actual least cost dx(y) iterative, asynchronous: each local iteration caused by: local link cost change DV update message from neighbor distributed: each node notifies neighbors only when its DV changes neighbors then notify their neighbors if necessary each node: wait for (change in local link cost or msg from neighbor) recompute estimates if DV to any dest has changed, notify neighbors

Software defined networking (SDN)

Internet network layer: historically has been implemented via distributed, per-router approach monolithic router contains switching hardware, runs proprietary implementation of Internet standard protocols (IP, RIP, IS-IS, OSPF, BGP) in proprietary router OS (e.g., Cisco IOS) different "middleboxes" for different network layer functions: firewalls, load balancers, NAT boxes, .. ~2005: renewed interest in rethinking network control plane Why a logically centralized control plane? easier network management: avoid router misconfigurations, greater flexibility of traffic flows table-based forwarding (recall OpenFlow API) allows "programming" routers centralized "programming" easier: compute tables centrally and distribute distributed "programming: more difficult: compute tables as result of distributed algorithm (protocol) implemented in each and every router open (non-proprietary) implementation of control plane

Traffic engineering: difficult traditional routing

Q: what if network operator wants u-to-z traffic to flow along uvwz, x-to-z traffic to flow xwyz? A: need to define link weights so traffic routing algorithm computes routes accordingly (or need a new routing algorithm)! Link weights are only control "knobs": wrong! Q: what if network operator wants to split u-to-z traffic along uvwz and uxyz (load balancing)? A: can't do it (or need a new routing algorithm) Q: what if w wants to route blue and red traffic differently? A: can't do it (with destination based forwarding, and LS, DV routing)

Network-layer functions

Recall: two network-layer functions: forwarding: move packets from router's input to appropriate router output routing: determine route taken by packets from source to destination Two approaches to structuring network control plane: per-router control (traditional) logically centralized control (software defined networking)

CSMA/CD efficiency

Tprop = max prop delay between 2 nodes in LAN ttrans = time to transmit max-size frame efficiency = 1/(5 tprop/ttrans) efficiency goes to 1 as tprop goes to 0 as ttrans goes to infinity better performance than ALOHA: and simple, cheap, decentralized!

BGP route selection

router may learn about more than one route to destination AS, selects route based on: local preference value attribute: policy decision shortest AS-PATH closest NEXT-HOP router: hot potato routing additional criteria

OSPF "advanced" features

security: all OSPF messages authenticated (to prevent malicious intrusion) multiple same-cost paths allowed (only one path in RIP) for each link, multiple cost metrics for different TOS (e.g., satellite link cost set low for best effort ToS; high for real-time ToS) integrated uni- and multi-cast support: Multicast OSPF (MOSPF) uses same topology data base as OSPF hierarchical OSPF in large domains.

Adaptors communicating

sending side: encapsulates datagram in frame adds error checking bits, rdt, flow control, etc. receiving side looks for errors, rdt, flow control, etc. extracts datagram, passes to upper layer at receiving side

Parity checking

single bit parity: detect single bit errors two-dimensional bit parity: detect and correct single bit errors

MAC protocols: taxonomy

three broad classes: channel partitioning divide channel into smaller "pieces" (time slots, frequency, code) allocate piece to node for exclusive use random access channel not divided, allow collisions "recover" from collisions "taking turns" nodes take turns, but nodes with more to send can take longer turns

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

Multiple access links, protocols

two types of "links": point-to-point PPP for dial-up access point-to-point link between Ethernet switch, host broadcast (shared wire or medium) old-fashioned Ethernet upstream HFC 802.11 wireless LAN single shared broadcast channel two or more simultaneous transmissions by nodes: interference collision if node receives two or more signals at the same time multiple access protocol distributed algorithm that determines how nodes share channel, i.e., determine when node can transmit communication about channel sharing must use channel itself! no out-of-band channel for coordination

Hierarchical OSPF

two-level hierarchy: local area, backbone. link-state advertisements only in area each nodes has detailed area topology; only know direction (shortest path) to nets in other areas. area border routers: "summarize" distances to nets in own area, advertise to other Area Border routers. backbone routers: run OSPF routing limited to backbone. boundary routers: connect to other AS'es.

Pure (unslotted) ALOHA

unslotted Aloha: simpler, no synchronization when frame first arrives transmit immediately collision probability increases: frame sent at t0 collides with other frames sent in [t0-1,t0+1]


Conjuntos de estudio relacionados

Chapter 25: Nursing Care of a Family Experiencing a Postpartum Complication

View Set

FAR - Financial Statement Accounts

View Set

Which of the following statements are true of the horizontal motion of projectiles? List all that apply.

View Set

Network Operations (3.0) study set

View Set

204 PrepU Chapter 51: Assessment and Management of Patients With Diabetes

View Set

Art History Dual Enrollment Final Exam

View Set

English 10 Provincial Terms & Definitions

View Set