network systems spring 2002 csci 4273/5273 professor rick han university of colorado at boulder...
Post on 21-Dec-2015
216 views
TRANSCRIPT
Network SystemsSpring 2002
CSCI 4273/5273
Professor Rick HanUniversity of Colorado at Boulder
Prof. Rick Han, University of Colorado at Boulder
Network Systems
• Goals: – Learn how the Internet works under the
covers!– Learn general “computer networking”
concepts and principles– Obtain practical experience in network
programming– Have fun in the process
• Information for CSCI 4273/5273:– http://www.cs.colorado.edu/~rhan, then– follow the Network Systems link at the top
Prof. Rick Han, University of Colorado at Boulder
Announcements
• Textbooks: • Colorado book store had 19 as of 1/7/2002• CU book store’s order of 40 should arrive
this/next week
• Waiting List• Students who have not satisfied the OS
prerequisite should drop• Admit students from wait list• Fire regulations limit class size
• Questions so far?• Next, a preview and Chapter 1
Prof. Rick Han, University of Colorado at Boulder
Historical Perspective on Computer Networking
• 1957: USSR launches Sputnik. In response, US forms Advanced Research Projects Agency (ARPA) with Department of Defense (DoD)
• 1969: ARPANET commissioned by DoD for research into networking.• Kleinrock, 4 nodes, packet-
switched, 50 kbps links• “Do you see the L?”
• “Yes, we can see the L,”• “Do you see the O?”
• Yes, we see the O”• “Then we typed the G, and the system crashed”
Prof. Rick Han, University of Colorado at Boulder
Historical Perspective on Computer Networking (2)
• 1971: Logical map of the ARPANET
• 1972: ARPA renamed to DARPA
Prof. Rick Han, University of Colorado at Boulder
Historical Perspective on Computer Networking (3)
• 1971: email invented, “@” sign chosen• 1973: ARPANET becomes global with addition of
nodes in England and Norway.• 1976: UUCP (Unix-to-Unix copy) developed at
AT&T Bell Labs and distributed with Unix.• 1981: IBM PC introduced• 1982: TCP and IP defined as a protocol suite• 1984: > 1,000 hosts, DNS introduced, Cisco
founded• 1989-90: > 100,000 hosts, ARPANET
decommissioned• 1991: 727,000 unique hosts on Internet, CERN’s
Berners-Lee invents Web (HTML, HTTP, URL)• 1993: Mosaic developed by Andreessen at NCSA• 2001: 175,000,000 unique hosts on Internet
Prof. Rick Han, University of Colorado at Boulder
Bottom-Up Approach to Computer Networking
• Approach taken by the textbook• Two hosts want to communicate with each
other• First, how do I send a “bit” from host A to
host B?
Host A Host B
“1” or “0” ?
Prof. Rick Han, University of Colorado at Boulder
Layer 1: The Physical Layer
• Solution: Host A encodes the bit into an analog signal. Host B decodes the analog signal into a received bit.
• Physical Layer, also called Layer 1, ensures that host B can decode a digital bit from an analog representation of the digital bit sent by host A• Modem has advanced DSP to achieve 56 kbps
Host A Host B
“1” or “0” over wire
Prof. Rick Han, University of Colorado at Boulder
Layer 2: The Data Link Layer
• Next Problem: How do I send a message from Host A to Host B?
• Data Link Layer, also called Layer 2, ensures that host B can decode a digital message from a stream of bits sent by host A
Host A Host B
1011000…?
Prof. Rick Han, University of Colorado at Boulder
The Data Link Layer (cont.)
• A Data Link Layer Protocol implements:• Delimiting/framing of a message• Fragmenting of a long message• Retransmission of a lost message• …
Host A Host B
1011000
Prof. Rick Han, University of Colorado at Boulder
Defining a Protocol
• A protocol is an agreement between two parties or endpoints as to how information is to be transmitted
• A protocol implements this agreement via:• A Header• How each endpoint responds to control
info in the header (& external input)
Host A Host B
1011000
Prof. Rick Han, University of Colorado at Boulder
How Physical and Data-Link Layers Interact…
Layer 1 Layer 1
Layer 2 Layer 2
Host A Host B1011000 1011000
1011000
1011000
1011000
Prof. Rick Han, University of Colorado at Boulder
Defining a Service
Layer 1
Layer 2
Host A1011000
1011000
• A Service Interface separates two layers • Acts as standard API
• Lower layer promises to support API primitives
• Isolates Physical Layer’s implementation from DL Layer Protocol
• e.g. mail envelope• e.g. socket API
Prof. Rick Han, University of Colorado at Boulder
Communication Across a Network of Hosts
Host CHost A Host B
• Suppose there is a link connecting A to B, and B to C
• How does Host B know that a message from Host A should be forwarded to Host C?
• Therefore, the intermediate Host B needs:• Address information• Topology information
1011000
Prof. Rick Han, University of Colorado at Boulder
Layer 3: The Network Layer
• The Network layer is responsible for routing a message across an interconnected mesh of hosts
Host A
• Network often represented as a “cloud”• Routers have specialized hardware & OS’s,
but initially were just computer hosts
Host C
Host D
Host B
Host E
Host F
Prof. Rick Han, University of Colorado at Boulder
Internet: Communication Across a Network of
Networks• The Internet is a network of heterogeneous networks
Host A
• The Internet Protocol, or IP, is an example of a Network Layer protocol
• IP routers at entry/exit to cloud (& possibly within cloud)
Host F
Network B
Network C
Network ENetwork
D
Prof. Rick Han, University of Colorado at Boulder
Design Considerations for the Internet
• Correctness – can IP route a packet correctly from source to destination?
• Reliability – if a router crashes/joins, can the Internet adapt to changes in topology?
• Scalability – can IP routing scale to support millions of nodes?
• Performance – can the packet quickly be routed to its destination?
• Efficiency – how much overhead does the routing take?
• …
Prof. Rick Han, University of Colorado at Boulder
Design Philosophies for the Internet
• Early (and winning) design philosophy: keep the network simple• Smart clients + “dumb” network = Internet• In contrast, telephone network: dumb clients,
smart network – hard to introduce new services
• A second design philosophy: share the wealth• Bandwidth is statistically multiplexed, or
shared• In contrast, telephone network sets up a
dedicated circuit that is not shared.
Host A
Host B
Router Host CMultiplexedTime slots
Prof. Rick Han, University of Colorado at Boulder
Layer 4: The Transport Layer
Host A
Host F
Network B
Network C
Network ENetwork
D
• The Transport Layer offers end-to-end delivery of packets across a network• Packets may be lost due to stat mux
congestion or router failure
Prof. Rick Han, University of Colorado at Boulder
Internet Transport Layers: TCP and UDP
• The Transmission Control Protocol, or TCP, is a reliable Transport Layer protocol above IP• Reliable delivery• In-order or stream delivery
• The User Datagram Protocol, or UDP is an unreliable protocol above IP• Unreliable packet delivery• Out-of-order packet delivery
• Why would you ever want unreliable out-of-order delivery?
Prof. Rick Han, University of Colorado at Boulder
Layer 5: The Internet Application Layer
• Given reliable in-order delivery by TCP, the Internet Application Layer builds application-level protocols above TCP like:• HTTP – Hypertext Transfer Protocol• SMTP – Simple Mail Transfer Protocol• FTP – File Transfer Protocol• NNTP – Network News Transfer Protocol
• The Open Systems Interconnection (OSI) model expands its Application Layer into 3 sub-layers: Application, Presentation, and Session
Prof. Rick Han, University of Colorado at Boulder
The Layered Network Stack
Physical Layer
Application Layer
Transport Layer (TCP/UDP)
Network Layer (IP)
Data Link Layer
Internet Stack
Physical Layer
Session Layer
Transport Layer
Network Layer
Data Link Layer
OSI StackPresentation Layer
Application Layer