EECS122 Midterm Review

26
EECS122 Midterm Review Department of Electrical Engineering and Computer Sciences University of California Berkeley

description

EECS122 Midterm Review. Department of Electrical Engineering and Computer Sciences University of California Berkeley. TOC : Midterm Review. Network Web Browsing Layers & Protocols Inside a Router Check List. Review : Network. WAN. MAN. Review : Network. WAN. LAN. MAN. - PowerPoint PPT Presentation

Transcript of EECS122 Midterm Review

Page 1: EECS122 Midterm Review

EECS122Midterm Review

Department of Electrical Engineering and Computer Sciences

University of CaliforniaBerkeley

Page 2: EECS122 Midterm Review

EECS 122 - UCB 2

TOC: Midterm Review

NetworkWeb BrowsingLayers & ProtocolsInside a RouterCheck List

Page 3: EECS122 Midterm Review

EECS 122 - UCB 3

Review: Network

WAN

MAN

Page 4: EECS122 Midterm Review

EECS 122 - UCB 4

Review: Network

WAN

MANLAN

Page 5: EECS122 Midterm Review

EECS 122 - UCB 5

WAN

LAN

Review: Network

Page 6: EECS122 Midterm Review

EECS 122 - UCB 6

Review: Web Browsing

ExampleLocating Resource: DNSConnectionEnd-to-endPacketsBitsPoints to remember

Page 7: EECS122 Midterm Review

EECS 122 - UCB 7

Click Link or URL get content from localor remote computerURL:

http://www.google.com/stringSpecifies- Protocol: http- Computer: www.google.com- StringComputer (server) selects contents based on string

Web: Example

Page 8: EECS122 Midterm Review

EECS 122 - UCB 8

Web: Locating Resource

www.google.com is the name of a computerNetwork uses IP addressesTo find the IP address, the application uses a hierarchical directory service called theDomain Name System

local

com

host

www.google.com?IP = a.b.c.d

IP = a.b.c.d

www.google.com?

Page 9: EECS122 Midterm Review

EECS 122 - UCB 9

Web: Connection

The protocol (http) sets up a connection between the host and cnn.com to transfer the pageThe connection transfers the page as a byte stream, without errors: pacing + error control

H ost cnn.com

Page 10: EECS122 Midterm Review

EECS 122 - UCB 10

Web: End-to-end

The byte stream flows from end to end across many links and switches: routing (+ addressing)That stream is regulated and controlled by both ends: retransmission of erroneous or missing bytes; flow control

End-to-end pacing andflow control

Routing

www.google.com

host

Page 11: EECS122 Midterm Review

EECS 122 - UCB 11

Web: Packets

The network transports bytes grouped into packetsThe packets are “self-contained” and routers handle them one by oneThe end hosts worry about errors and flow control:

Destination checks packet for errors (using error detection code CKS) and sends ACKs with sequence number #

Source retransmits packets that were not ACKed and adjusts rate of transmissions

C

A | B | # , CKS | bytes

B C

www.google.comIP address: A

HostIP address: B

Destination

Next Hop

Page 12: EECS122 Midterm Review

EECS 122 - UCB 12

Web: BitsEquipment in each node sends the packets as a string of bitsThat equipment is not aware of the meaning of the bits

01011...011...110

Transmitter Physical Medium Receiver

01011...011...110

OpticalCopperWireless

Page 13: EECS122 Midterm Review

EECS 122 - UCB 13

HTTP, FTP, …

IP

UDP - TCP

Review: Layers & Protocols

PhysicalInterface

PhysicalInterface

Synchronous unreliable bit pipe

Data LinkControl

Data LinkControl

Asynchronous reliable bit pipe

Physical Link

Network NetworkAsynchronous routed path

FH Data

PhysicalInterface

Synchronous unreliable bit pipe

Data LinkControl

Asynchronous reliable bit pipe

Physical Link

Network

Asynchronous routed path

FH Data

Transport Transport

PH Data PH Data

TH Data

End Node Router End Node

Application ApplicationData

Page 14: EECS122 Midterm Review

EECS 122 - UCB 14

Mapping Layers to Network Devices

Two broad classes of devices Hosts Routers

Both sets of devices run applications Hosts mainly run “user applications” Routers run “infrastructure applications”

E.g. Topology discovery, Network Management Protocols, BGP etc.

Don’t be confused by thinking that routers don’t run application protocols because they are layer 3 devices

Page 15: EECS122 Midterm Review

EECS 122 - UCB 15

Layers: Transport Services

IP

Transport

A B C

[A | B | p1 | p2 | …]

p1 p2 p1 p2 p3 p1 p2

portsApplication

HTTP DNSRA

UDP: Not reliableTCP: Ordered, reliable, well-paced

Page 16: EECS122 Midterm Review

EECS 122 - UCB 16

Layers - TCP: MPX, Error, Flow and Congestion Control

W

1

65KB

X0.5

TO

3DA

X0.5

3DA TO

X0.5 X0.5

SS CA SS CA

3 3

window = min{RAW - OUT, W}window = min{RAW - OUT, W}

Page 17: EECS122 Midterm Review

EECS 122 - UCB 17

TCP Algorithm: AIMD

C

x

y

A Bx

C

D Ey

Limit rates:x = y

Page 18: EECS122 Midterm Review

EECS 122 - UCB 18

Flow ControlObjective: Avoid saturating destinationAlgorithm: Receiver avertizes window RAW

RAW

window = min{RAW – OUT, W}where OUT = Oustanding = Last sent – last ACKed W = Cong. Window from AIMD + refinements

[ACK | RAW | …]

Page 19: EECS122 Midterm Review

EECS 122 - UCB 19

Layers: IP – Internet Protocol

Addressing Class-Based Fixed Prefix – M-

tree Classless: CIDR LPM-Patricia Trie

Routing

Page 20: EECS122 Midterm Review

EECS 122 - UCB 20

Addressing reflects internet hierarchy

32 bits divided into 2 parts:

Class A

Class B

Class C

Class-base Addressing

network host 0

0

network host 1

160

network host 1

240~2 million nets256 hosts

8

0

1 0

Page 21: EECS122 Midterm Review

EECS 122 - UCB 21

Classless Internet Domain Routing

Suppose fifty computers in a network are assigned IP addresses 128.23.9.0 - 128.23.9.49 Range is

01111111 00001111 00001001 00000000

to 01111111 00001111 00001001 00110001

They share the first 26 bits of 128.23.9.0: Convention: 128.23.9.0/26 = prefix There are 32-27=6 bits for the 50

computers 26 = 64 addresses

Page 22: EECS122 Midterm Review

EECS 122 - UCB 22

IP: Routing

B

C

6

7

8

5

4

31

2

12

10

13

11

6

4

3

2

13

2

4

3

6

13

OSPF

RIP

IGRP

BGP

IntraDomain

IntraDomain

IntraDomain

Intradomain Formulate the routing

problem as a Shortest Path Problem

Link State v/s Distance Vector

Both work reasonably well in a well engineered network

Interdomain BGP Path Vector,

Policies

Page 23: EECS122 Midterm Review

EECS 122 - UCB 23

Route ComputationDijkstra: 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) = minjεN(i) {c(i,j) + D(j,d)}

BGP: Path Vector Policy routing: Receive and advertise entire routes AS numbers describe the path to a CIDR address

ImportPolicyEngine

Decisionprocess

Routesused byrouter

Routesreceived from neighbors

Routessent toneighbors

BGP table

Choosebest route

accept,deny, set preferences

forward,not forwardset MEDs

ExportPolicyEngine

IP Routingtable

Page 24: EECS122 Midterm Review

EECS 122 - UCB 24

Review: Inside RouterInput and output interfaces are connected through an interconnectA interconnect can be implemented by

Shared memory low capacity routers

(e.g., PC-based routers) Shared bus

Medium capacity routers

Point-to-point (switched) bus

High capacity routers

input interface output interface

Inter-connect

Scheduling

GPSWFQ

Page 25: EECS122 Midterm Review

EECS 122 - UCB 25

Router: GPS/WFQ

Why service disciplines? Understand GPS and WFQ well

GPS properties WFQ tracking result No later than one packet transmission

Page 26: EECS122 Midterm Review

EECS 122 - UCB 26

Review: Check ListBig Picture

Layers Network Structure (L2, L3) Where protocols are implemented Switching Techniques

Applications DNS HTTP

Transport TCP: Service; Go Back N; Flow Control; Congestion Control;

AIMD; SS; 3DA; Phases UDP: Service

Network Class-Based; Classless Addressing Dijkstra; Bellman-Ford Hierarchical routing

Inside Router Architecture: Input, Output Scheduling: Fairness, GPS, WFQ