Midterm Review EECS University of California Berkeley
Topics Network Architecture Network hierarchy Layering Performance Link Layer Ethernet Wi-Fi Network Layer Addressing Routing EECS Midterm Review
Review: Network WAN MAN EECS Midterm Review 3
Review: Network WAN MAN LAN EECS Midterm Review 4
Review: Network WAN LAN EECS Midterm Review 5
Layers & Protocols Application Transport TH Data Data HTTP, FTP, UDP - TCP Application Transport Network Asynchronous routed path Asynchronous routed path IP Network PH Data PH Data Network Data Link Control Asynchronous reliable bit pipe FH Data Eth. Data Link Control Asynchronous reliable bit pipe FH Data Data Link Control Physical Interface Synchronous unreliable bit pipe Fiber, Wires, WL Physical Link Physical Interface Synchronous unreliable bit pipe Physical Link Physical Interface End Node Router End Node EECS Midterm Review 6
Timing: Queuing Link: P bits Q R bps T seconds Q/R Q/R = queuing delay (load-dependent) T P/R Time EECS Midterm Review 7
Timing: Store & Forward - Multiple System: 0Mbps 5Mbps 00Mbps 0Mbps EECS Midterm Review 8
Performance Metrics Throughput Delay Jitter EECS Midterm Review 9
Connection Throughput Connection: Send W bits (window size) Wait for ACKs Repeat Assume that the round-trip time is RTT seconds Throughput = W/RTT bps Source RTT K Destination Numerical Example: W = 64KBytes = 5 kbits = 5x,04 = 54,88 bits RTT = 00ms Throughput = W/T =.6Mbps RTT Time K EECS Midterm Review 0
Little s Result N S D X(t) T(N) T(N - ) S = area S = T() + + T(N) = integral of X(t) T() + + T(N) N X(t)dt = S =. T T N T T Average occupancy = (average delay)x(average arrival rate) EECS Midterm Review
Ethernet Random Multiple Access Switching Bridged Ethernet 80. EECS Midterm Review
Random Multiple Access How to share a channel? Multiple Access Multiplexing ALOHA: First random multiple access system Efficient for many users, each with low utilization Try; If collide, wait random time then repeat (CD) Analysis: Slotted Aloha efficiency /e = 36% p, indpdt. Slot N nodes P(success) = Np( p) N- /e if p = /N EECS Midterm Review 3
Random Multiple Access Ethernet: First version CSMA/CD Wait until channel is idle; try; if collide, stop, wait, repeat Idea: CS should improve efficiency if fast enough Wait random multiple of 5 bit times (exponential back off) Analysis: Efficiency /( + 5a), a = PROP/TRANS A B EECS Midterm Review 4
Switching Ethernet: Later versions Switched Larger aggregate throughput VLANs: partition in disjoint logical LANs Link Aggregation Each port is in its own collision domain as opposed to a hub where all ports are in the same collision domain Fast, GE, 0GE Improved modulation schemes EECS Midterm Review 5
Bridged Ethernet Flat Addressing Learning Watch source addresses Avoiding Loops Spanning Tree Protocol (ID, presumed root ID, distance to presumed root ID) Note: Not very efficient; Not very fast EECS Midterm Review 6
Spanning Tree Example 4 [ ] B B 3 [ 0] [3 3 0] 5 [3 ] B3 B4 B6 6 [6 ] B5 [5 3 ] Format: [my ID presumed root ID distance to presumed root] EECS Midterm Review 7
Ethernet Service? Operations: Addresses, MAC, Hub, Switch, Learning, Spanning Tree MAC: Why not Aloha? Why Switch? Why Loops? EECS Midterm Review 8
80. a - 5GHz, up to 54Mbps b -.5GHz, up to Mbps g -.5GHz, up to 54Mbps MAC: CSMA/CA with or without RTS/CTS Distributed (DCF): CSMA/CA using different Interframe Gaps maintain network allocation vector Centralized (PCF): access point polls nodes EECS Midterm Review 9
80. Basic mode: Wait until idle; Transmit (cannot listen while transmitting) If collision, backoff (exponential; decrements when idle) RTS/CTS mode: (Hidden & Exposed Terminal) RTS / CTS / DATA / ACK R = RTS: silences 3 C = CTS: silences 4 R C NAV: time until completion of exchange R/C/D/A 3 4 EECS Midterm Review 0
80. MAC If medium is idle for DIFS interval after a correctly received frame and backoff time has expired, transmission can begin immediately If previous frame contained errors, medium must be free for EIFS If medium is busy, access is deferred until medium is idle for DIFS and exponential backoff Backoff counter is decremented by one if a time slot is determined to be idle Unicast data must be acknowledged as part of an atomic exchange EECS Midterm Review
80. Virtual Carrier Sensing Virtual Carrier Sensing using Network Allocation Vector (NAV) EECS Midterm Review
80. Why not CSMA/CD? Objectives of new MAC? Why RTS/CTS? How does NAV work? Why different IFS? Why more than addresses? Why different PHYs? Why multiple channels? EECS Midterm Review 3
Layers: IP Internet Protocol Internetworking Subnets Addressing Class-Based Classless: CIDR Routing EECS Midterm Review 4
Internetworking Goal: Connect different networks a c.. X. a a b.. Y. b.0 c ROUTER.0 d. f. e d f.. X Router looks at IP addresses (., ) Each network uses local addresses (e.g., a, b, c, ) EECS Midterm Review 5
Subnets 8.3.7.5/4 IP H e H: Is H3 on same subnet as I am? Yes if IP3/4 = IP/4 Yes Ethernet frame to destination No Ethernet frame to R Use ARP to find needed MAC addresses e.g., [all e who is IP6?] [e e4 I am IP6] 8.3.34./4 e3 IP3 H3 H e IP 8.3.7.34/4 e4 R IP 6 8.3.7./4 R e5 IP 8 8.3.34./4 EECS Midterm Review 6
Internetworking Direct Delivery IP H e e e IP IP X e3 H3 all e e: Who is IP? IP3 H e IP e4 R R e5 e e e: I am IP EECS Midterm Review 7
Internetworking Indirect Delivery e5 e3 I am IP3 IP H e4 e e IP IP3 X e3 H3 H e SH IP IP3 X e3 e5 IP3 IP IP3 X IP e4 R R e5 all e5 Who is IP3? Note: Fragmentation may be required at R EECS Midterm Review 8
Class-base Addressing Addressing reflects internet hierarchy 3 bits divided into parts: Class A 0 0 network 8 host Class B 0 0 network 6 host Class C 0 0 network 4 host ~ million nets 56 hosts EECS Midterm Review 9
Classless Internet Domain Routing Suppose fifty computers in a network are assigned IP addresses 8.3.9.0-8.3.9.49 Range is 0 0000 000000 00000000 to 0 0000 000000 00000 They share the first 6 bits of 8.3.9.0: Convention: 8.3.9.0/6 = prefix There are 3-6=6 bits for the 50 computers 6 = 64 addresses EECS Midterm Review 30
IP: Routing 3 BGP 4 4 RIP 6 B 5 6 8 7 IntraDomain 3 Intradomain 0 Formulate the routing problem as a Shortest Path Problem Link State v/s Distance Vector Both work reasonably well in a well engineered network IntraDomain 3 IGRP Interdomain 3 BGP Path Vector, Policies IntraDomain C OSPF EECS Midterm Review 3
Route Computation Dijkstra: Link State Use a flooding protocol to discover the entire topology Find the shortest paths in order of increasing path length from node i. Bellman Ford: Distance Vector D(i,d) = min jεn(i) {c(i,j) + D(j,d)} Finds the shortest path of up to n hops increasing values of n BGP: Path Vector Policy routing: Receive and advertise entire routes AS numbers describe the path to a CIDR address EECS Midterm Review 3
Algorithms LINK STATE AA AA BB BB CC CC 3 DISTANCE VECTOR 3 PATH VECTOR AA BB CC ) Exchange Link States ) Each node computes A: [B, ], [C, ] the shortest paths to B: [A, ], [D, ] the others DD C: [A, ], [D, 3] D: [B, ], [C, 3] 3 0 DD 0 D DD D AA AA BB CC 3 3 B,D BB CC C,D EECS Midterm Review 33 TOC IP Routing Types Overview 3 DD 0 DD AA BB Don t like B AA CC BB CC 3 3 DD DD
Network Structure BGP C C{,,3} C{,,3} D AC {,,3} AD {4,5} A D{4,5} DC{,,3} E B BAC{,,3} BAD{4,5} F 3 4 5 Transit; Peering Agreements; Customer-Provider EECS Midterm Review 34
IP Service? Operations: Addresses, Routing Glue L/L3: ARP Addressing: Why CIDR? How? Why DHCP, NAT? Routing: Why Domains? Why different algorithms? Pros/Cons of each algorithm? EECS Midterm Review 35
Class-base Addressing Addressing reflects internet hierarchy 3 bits divided into parts: Class A 0 0 network 8 host Class B 0 0 network 6 host Class C 0 0 network 4 host ~ million nets 56 hosts EECS Midterm Review 36
Classless Internet Domain Routing Suppose fifty computers in a network are assigned IP addresses 8.3.9.0-8.3.9.49 Range is 0 0000 000000 00000000 to 0 0000 000000 00000 They share the first 6 bits of 8.3.9.0: Convention: 8.3.9.0/6 = prefix There are 3-7=6 bits for the 50 computers 6 = 64 addresses EECS Midterm Review 37
CIDR Longest prefix match routing 00, 0, 0 a 0 d 000, 000 b c 0 00, 0, 00 Dest. a b c d 0 00 00 3 0 0 4 3 0 EECS Midterm Review 38 TOC IP Notes - CIDR
NAT Trick: Use TCP port to distinguish computers There are 64k port numbers, the first k are reserved [IPb IPx TCPm TCPn ] IPa [IPa IPx TCPb TCPn ] [IPx IPa TCPn TCPb ] IPx NAT [IPx IPb TCPn TCPm ] IPb [TCPb IPb, TCPm] IPc EECS Midterm Review 39
Multicast Ethernet NIC knows if it is member of group Switches flood multicast packets With IGMP: router sends requests; report suppression Tree pruned tree of shortest paths Forward if on shortest path Shared tree in sparse mode Group Management Join group G Soft state (refresh before timeout) Reliability Many proposals EECS Midterm Review 40
Multicast 5 7 4 8 6 3 3 5 3 7 0 EECS Midterm Review 4
Multicast Least weight spanning tree = 5 Tree of shortest paths: weight = 6 EECS Midterm Review 4 TOC IP Multicast Approaches Tree Computation
Check List Network hierarchy Layering Performance: Timing & Metrics Layer Ethernet MAC Wi-Fi MAC Repeaters, hubs, bridges, switches, routers Internet addressing Routing EECS Midterm Review 43
Review: Check List Big Picture Layers Network Structure (L, L3) Where protocols are implemented Switching Techniques Models Link rate; throughput; delay (mean, jitter) Store-and-forward; W/RTT Little s Result Ethernet CSMA/CD Learning bridge; Spanning tree EECS Midterm Review 44
Review: Check List 80. Hidden and Exposed Terminal RTS/CTS; NAV Network Class-Based; Classless Addressing; Subnets DHCP; NAT Dijkstra; Bellman-Ford Hierarchical routing Multicating: tree; group management; prune shortest paths EECS Midterm Review 45