eecs122 midterm review department of electrical engineering and computer sciences university of...
Post on 19-Dec-2015
216 Views
Preview:
TRANSCRIPT
EECS122Midterm Review
Department of Electrical Engineering and Computer Sciences
University of CaliforniaBerkeley
EECS 122 - UCB 2
TOC: Midterm Review
NetworkWeb BrowsingLayers & ProtocolsInside a RouterCheck List
EECS 122 - UCB 3
Review: Network
WAN
MAN
EECS 122 - UCB 4
Review: Network
WAN
MANLAN
EECS 122 - UCB 5
WAN
LAN
Review: Network
EECS 122 - UCB 6
Review: Web Browsing
ExampleLocating Resource: DNSConnectionEnd-to-endPacketsBitsPoints to remember
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
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?
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
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
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
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
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
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
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
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}
EECS 122 - UCB 17
TCP Algorithm: AIMD
C
x
y
A Bx
C
D Ey
Limit rates:x = y
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 | …]
EECS 122 - UCB 19
Layers: IP – Internet Protocol
Addressing Class-Based Fixed Prefix – M-
tree Classless: CIDR LPM-Patricia Trie
Routing
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
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
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
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
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
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
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
top related