david mazier˚ es 715 broadway, #708 - stanford university · - don’t need lab manual or opnet...
Post on 17-Apr-2020
1 Views
Preview:
TRANSCRIPT
V22.0480-005 – Networks
David Mazieres715 Broadway, #708
200203041606.g24G60795304@scs.cs.nyu.edu
Networks class
• Instructor: David Mazieres
• TA: Michael Freedman
• Goal: Teach the concepts underlying networks- How do networks work? What can one do with them?
- Give you the tools to understand new protocols & systems
• What this class will not do- Train you on all the latest “hot” technologies
• Prerequisites:- V22.0202 (or equiv) – class assumes basic OS concepts
(kernel/user, processes, I/O, scheduling)
- C programming (all the labs will be in C)
Administrivia
• All assignments are on the web pagehttp://www.scs.cs.nyu.edu/V22.0480-005/
• Text: Peterson & Davie, Computer Networks ASystems Approach, 3rd edition
- Don’t need lab manual or OPNET software (so usedtextbook ok)
• Syllabus on web page- Gives which textbook chapters correspond to lectures
(Lectures and book topics will mostly overlap)
- Also contains papers, to make concepts more concrete
- Read the papers before class for discussion
- Subject to change! (Reload before checking assignments)
Grading
• Quizes: Midterm & Final
• Homework- ∼ 9 lab assignments implemented in C
- May be a problem set, or other kind of lab
Lab machines
• You will have dedicated machines for the lab
• Fill out account information form today- Will give you access to dedicated class machines for lab
- Accounts will be created Thursday
- Email me if you don’t hear from us by then
• First lab goes on-line Thursday (on web page)- Due one week later
Topics
• Network programming (sockets, RPC)
• Network (esp. Internet) architecture- Switching, Routing, Congestion control, TCP/IP, Multicast,
Wireless networks
• Using the network- Interface hardware & low-level implementation issues,
Naming (DNS), Error detection, compression
• Higher level issues- Encryption and Security, caching & replication, Peer-to-peer
systems
Networks• What is a network?
- A system of lines/channels that interconnect
- E.g., railroad, highway, plumbing, communication,telephone, computer
• What is a computer network?- A form of communication network—moves information
- Nodes are general-purpose computers
• Why study computer networks?- Many nodes are general-purpose computers
- You can program the nodes
- Very easy to innovate and develop new uses of network
- Contrast: Telephone network—can’t program most phones,need FCC approval for new devices, etc.
Building blocks
• Nodes: Computers, dedicated routers, . . .
• Links: Coax, twisted pair, fibers, radio . . .(a) point-to-point
(b) multiple access – every node sees every packet
(a)
(b)…
Switched networks
• To scale to more nodes, use switching- nodes can connect multiple other nodes, or
- Recursively, one node can connect multiple networks
Switching strategies
• Circuit switching – virtual link between two nodes- Set up circuit (e.g., dialing, signaling) – maybe fails if links
are busy
- Transfer data
- Tear down circuit
• Packet switching- Forward bounded-size messages
- Each message can be between a different sender receiver
- This class will concentrate on packet switched networks
Addressing
• Each node typically has unique address- (or at least is made to think it does when there is shortage)
• Routing is process of delivering data to destination- For packet switched networks, each packet must have
destination address
- For circuit switched, use address to set up circuit
• Special addresses can exist for broadcast/multicast
Multiplexing
L2
L3
R2
R3
L1 R1
Switch 1 Switch 2
• What to do when multiple flows must share a link?
STDM
4 521 631 4 52
Frames
6Slots: 3
• Synchronous time-division multiplexing- Divide time into equal sized quanta, round-robin
- Provide illusion of direct link for circuit switched net
- But also wastes capacity if not enough flows
- And doesn’t degrade gracefully when run out of slots
FDM
• Frequency-devision multiplexing: Everybodytransmits on a different frequency
- Same way radio and TV stations each have separatefrequency
• Similar drawbacks to STDM- Wastes bandwidth if someone not sending (ok for TV and
radio with constant transmission rate, but might want todownload audio faster than you can play).
- Can run out of spectrum (e.g., limited # of radio stations)
Statistical multiplexing
…
• Idea: Like STDM w/o pre-determined time slots
• Maximizes link utilization- Link never goes idle when packet to send
Internet protocol• Most computer nets connected by Internet protocol
- Runs over a variety of physical networks, so can connectEthernet, Wireless, people behind modem lines, etc.
• Every host hasa a unique 4-byte IP address- E.g., www.ietf.org → 132.151.6.21
- Given a node’s IP address, the network knows how to routea packet (we will discuss in much more detail)
• But how do you build something like the web?- Need naming (look up www.ietf.org) – DNS (later lecture)
- Need interface for browser & server software (next lecture)
- Need demultiplexing within a host—E.g., which packetsare for web server, which for mail server, etc.?
aor thinks it has
Inter-process communication
Host
HostHost
Channel
Application
Host
Application
Host
• Want abstraction of inter-process (not justinter-node) communication
• Solution: Encapsulate another protocol within IP
UDP and TCP
• UDP and TCP most popular protocols on IP- Both use 16-bit port number as well as 32-bit IP address
- Applications bind a port & receive traffic to that port
• UDP – unreliable datagram protocol- Exposes packet-switched nature of Internet
- Sent packets may be dropped, reordered, even duplicated(but generally not corrupted)
• TCP – transmission control protocol- Provides illusion of a reliable “pipe” between to processes
on two different machines
- Handles congestion & flow control
Failure
• Several types of error can affect packet delivery- Bit errors (e.g., electrical interference, cosmic rays)
- Packet loss (overload)
- Link and node failure
• In addition, properly delivered frames can bedelayed and reordered
Uses of TCP
• Most applications use TCP- Easier interface to program to (reliability)
- Automatically avoids congestion (don’t need to worryabout taking down network)
• Servers typically listen on well-known ports- SSH: 22
- Email: 25
- Finger: 79
- Web / HTTP: 80
• Example: Interacting with www.nyu.edu
IP layering
TCP UDP
IP
Network
Application
• Can view network encapsulation as a stack- Each layer produces packets that become the payload of the
lower-layer’s packets
- This is almost correct, but TCP/UDP “cheat” to detectcertain errors in IP-level information like address
Hourglass
…
FTP
TCP UDP
IP
NET1 NET2 NETn
HTTP NV TFTP
• Many application protocols over TCP & UDP
• IP works over many types of network
• This is “Hourglass” philosophy of Internet- Idea: If everybody just supports IP, can use many different
applications over many different networks
OSI layers
One or more nodeswithin the network
End host
Application
Presentation
Session
Transport
Network
Data link
Physical
Network
Data link
Physical
Network
Data link
Physical
End host
Application
Presentation
Session
Transport
Network
Data link
Physical
• Layers typically fall into 1 of 7 categories
Layers• Physical – sends individual bits
• Data link – sends frames, handles access control toshared media (e.g., coax)
• Network – delivers packets, using routing
• Transport – demultiplexes, provides reliability &flow control
• Session – can tie together multiple streams (e.g.,audio & vidio)
• Presentation – crypto, conversion betweenrepresentations
• Application – what end user gets, e.g., HTTP (web)
top related