networks (cs438) review! high level concepts *with suggestions for topics to study in detail

19
Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

Upload: brian-harmon

Post on 19-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

Networks (CS438) Review!

High Level Concepts

*with suggestions for topics to study in detail

Page 2: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

LayersApplication

Transport

Network

Link

Physical

• Do things (web browsing, ssh, video chat, …)

• Clean abstraction for talking to partner

• Get packets anywhere in the world

• Deliver packets on local network

• Medium sharing• Use physics to send

data bits

*How do the layers relate to headers?

Page 3: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

networklink

physical

linkphysical

Router

Switch

Application data

TCPSeg-ment

IPPacket

Ethernet Frame

Source

Destination

Page 4: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

End-to-End Principle

• Keep high-performance parts that everyone uses (the internet) simple.

• If you want a job done right, do it yourself.

*Circuit vs packet switching. Why does End-to-End Principle demand packet switching?

Page 5: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

Application Layer: HTTP

• Just for simple, individual file transfers

• Fundamentally stateless– (Cookies add state, though)

• All complexity in HTML, JavaScript, etc. logic

*We now optimize for multi-file sessions: exactly how much does parallel/persistent help?*Caching: local, proxy caching*CDNs! Help performance a lot! How exactly do they function?

Page 6: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

Application Layer: DNS

• Maps “illinois.edu” 192.17.13.36

• Distributed, hierarchical database– Root, com, example.com, www.example.com, …

each’s nameserver knows about the next’s

• Resolving a query: old results are cached. We go all the way to root servers rarely.

*Iterative vs. recursive resolvers

Page 7: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

Transport Layer

• Multiplexing: the one thing transport must do• Other characteristics:

– Reliable or not?– Stream or packets?– Congestion control or not?

• UDP: unreliable packets, no congestion control– “Drops are ok, don’t waste time recovering”:

video chat, games; all real-time things

*Ports. And, why do we also need to look at IP addr for full multiplexing? *5-tuple, sockets

Page 8: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

Transport Layer: TCP

• Reliable delivery

• Congestion control

*Flow control*SYN and FIN handshakes*TCP states: e.g. waiting after shutdown with FIN/ACK

Page 9: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

Reliable Transport

• Sequence numbers to identify segments

• ACKs: ACK 7 reaches sender segment 7 safe.

• Cumulative ACKs: ACK 7 segments ≤ 7 safe.*Know Go-back-N and Selective Repeat in addition to real-world TCP*Byte- vs segment-based seq. #s*Exact sliding window mechanics.*Sequence numbers, wraparound.

Page 10: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

Congestion Control

• “Slow start”: exponential growth, for rough estimate of channel capacity.

• “Congestion avoidance”: dynamics of hosts’ behavior automatically converge to fairness!– No coordination or central control needed– The mechanism: AIMD:

additive increase,multiplicative decrease

*What is “fair”? Max-min fair? Bonus: look up congestion pricing.*Understand how AIMD converges!!*Glance at that 3 state diagram (SS/CA/FR) in the textbook*Why does cwnd+=mss2/cwnd work for additive increase?

Page 11: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

AIMD

• Linearly grow while everything is fine• Cut in half at congestion event

cwnd:

TC

P s

end

er

cong

estio

n w

indo

w s

ize

timeReal world alert: Linux has used Cubic, not Reno, for a long time. Not on the test, though.

Page 12: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

Congestion Events

• Router gets too many packets; must drop some• Dropped packets duplicate ACKs• 3dup ACK dropped packet congestion• Timeout everything dropped broken

• Single dup ACK means out of order packet. This never happens; forget it can even happen!

*How is the timeout timer set?*Explicit congestion notification (ECN), random early drop (RED)*Basic queuing theory: what happens when in rate = out rate?

Page 13: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

Network Layer

• Deliver packets from anywhere, to anywhere.

• This is the internet!

Page 14: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

Routing

• A distributed system solving all-pairs shortest path

• Link State: give everyone the same view of the network, run Dijkstra’s algorithm

• Distance/Path Vector: neighbor tells you it can handle delivery to some node X

*DV’s count to infinity; how does PV solve it?*Work through Dijkstra and DV examples!

Page 15: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

Autonomous Systems

• Companies that own groups of routers.– Network infrastructure (Level 3, AT&T)– Consumer ISP (AT&T, Comcast)– Group with big network (universities, companies)

• AS-level topology– Route at AS level: 1 AS = 1 hop– Border Gateway Protocol (BGP)– Economic routing policy:

prefer customers over peers over providers(or: only use a path to or from a customer)

• The Tier 1 AS clique: global all-to-all connectivity*Why can’t inter-AS routing use link state?

Page 16: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

IP Addresses

• Identify your current location in the internet

• Nearby addresses grouped into prefixes– Save internet routers from being overwhelmed– Your prefix = your subnet (next slide)

• IPv6: IPv4’s ~4billion addressesnot enough

*IPv4/6 tunneling, dual stack*NAT*DHCP*What is a default gateway? How does it relate to subnets and the link layer?*Contrast IP addresses with MAC addresses. Why can’t MAC addresses do the same job as IP?

Page 17: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

Data Link Layer

• Deliver packets locally (within IP subnet)

• No fancy routing: learning switches

*Do a learning switch example!*How exactly does a network interface know if a packet can be sent just as a link level frame? What has to happen if not?*ARP*Spanning Tree Protocol

Page 18: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

Shared Medium Access

• Collision detection: exponential backoff

• Collision avoidance: RTS/CTS

*Hidden terminal problem*Exposed terminal problem

Page 19: Networks (CS438) Review! High Level Concepts *with suggestions for topics to study in detail

Security Fundamentals

• Symmetric keys

• Asymmetric (public/private) keys– How do I know who’s on the other end? (MitM)

Signatures certificates certificate chains Certificate Authorities’ root certs