Network Systems

Download Report

Transcript Network Systems

Network Systems
Spring 2002
CSCI 4273/5273
Professor Rick Han
University of Colorado at Boulder
[email protected]
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
–
–
http://www.cs.colorado.edu/~rhan, then
follow the Network Systems link at the top
–
• Information for CSCI 4273/5273:
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”
Rick Han,
University
of system crashed”
“Then we typedProf.the
G,
and
the
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?
“1” or “0” ?
Host A
Host B
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.
Host A
“1” or “0”
over wire
Host B
• 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
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?
1011000…?
Host A
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
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
…
1011000
Host A
Host B
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)
1011000
Host A
Host B
Prof. Rick Han, University of
Colorado at Boulder
How Physical and Data-Link
Layers Interact…
1011000
Host A
Host B
Layer 2
Layer 2
1011000
1011000
1011000
Layer 1
Layer 1
1011000
Prof. Rick Han, University of
Colorado at Boulder
Defining a Service
1011000
Host A
• A Service Interface
separates two layers
•
Layer 2
1011000
•
Layer 1
•
•
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
1011000
Host A
Host B
Host C
• 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
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 C
Host A
Host B
Host F
Host D
Host E
• Network often represented as a “cloud”
• Routers have specialized hardware & OS’s,
Prof. Rick
Han, University
of
but initially were
just
computer
hosts
Colorado at Boulder
Internet: Communication
Across a Network of Networks
• The Internet is a network of heterogeneous
networks
Host A
Network
B
Network
D
Network
C
Host F
Network
E
• The Internet Protocol, or IP, is an example of
a Network Layer protocol
• IP routers at entry/exit to cloud (& possibly
Rick Han, University of
within cloud) Prof.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
Router
Host B
Multiplexed
slots
Prof. Rick Han, UniversityTime
of
Colorado at Boulder
Host C
Layer 4: The Transport Layer
• 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
Network
C
Network
Host A
B
Host F
Network
D
Network
E
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
•
•
Unreliable packet delivery
Out-of-order packet delivery
• The User Datagram Protocol, or UDP is an
unreliable protocol above IP
• Why would you ever want unreliable out-oforder 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 applicationlevel 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
Application Layer
OSI Stack
Internet Stack
Presentation Layer
Application Layer
Session Layer
Transport Layer (TCP/UDP)
Transport Layer
Network Layer (IP)
Network Layer
Data Link Layer
Data Link Layer
Physical Layer
Prof. Rick Han, University of
Colorado at Boulder
Physical Layer