Communication Protocols - Computer and Information Science

Download Report

Transcript Communication Protocols - Computer and Information Science

Communication Protocols
• Protocol: a standard set of rules for
communicating
• Standards evolve over time
• International agreements make Internet
possible
• Internet Society makes standards and
promotes research: www.isoc.org
• Protocol hierarchy/protocol stack
– layers of protocols
– physical transmission to end application rules and
standards
Invitation to Computer
Science, 6th Edition
1
Invitation to Computer
Science, 6th Edition
2
Communication Protocols
Physical Layer
Physical layer protocols
• Rules for exchange of binary data across physical
channel (fiber-optic, twisted-pair, wireless, etc.)
–
–
–
–
–
How to know when a bit is present on the line
How much time the bit will remain on the line
Whether the bit is digital or analog in form
What physical quantities represent 0 and 1
Shape of the connector between computer and
transmission line
• Create abstract “bit pipe” for higher layers to use
Invitation to Computer
Science, 6th Edition
3
Invitation to Computer
Science, 6th Edition
4
Communication Protocols
Data Link Layer
Data Link protocols
• Ensure reliable transmission of bits
• Error detection and correction: notice
failures in transmission and fix them
• Framing: determine which bits belong to
one message
• Two parts:
– Layer 2a: Medium Access Control
– Layer 2b: Logical Link Control
Invitation to Computer
Science, 6th Edition
5
Communication Protocols
Data Link Layer
Medium Access Control protocols
• Rules for communicating on shared lines
• Ethernet: Contention-based protocol
• When node wants to send a message
–
–
–
–
Listen to the line and wait until it is free
Begin transmitting as soon as it is free
If collision results, wait a random amount of time
Repeat
• Advantage: distributed, no master bottleneck
Invitation to Computer
Science, 6th Edition
6
Communication Protocols
Data Link Layer
Logical Link Control protocols
• Rules for detecting and correcting errors
• ARQ algorithm (Automatic Repeat Request)
Receiver:
If no error, return acknowledgement
message (ACK)
Otherwise, return nothing
Sender:
Transmit packet and wait for ACK or
time out
If receive ACK, go on to next packet
Otherwise, repeat on current packet
Invitation to Computer
Science, 6th Edition
8
Communication Protocols
Data Link Layer
• Packet contains:
– Markers for start and end of packet (SOP and
EOP)
– Sequence number for packet (e.g., 2 of 5)
– Packet data
– Error-checking bits (e.g., parity)
Invitation to Computer
Science, 6th Edition
9
Communication Protocols
Data Link Layer
• Purpose of Data Link layer
– Create virtual error-free message pipe
• Messages go in one end
• Come out the other correct and in the right order
Invitation to Computer
Science, 6th Edition
10
Communication Protocols
Network Layer
Network layer protocols
• Transmit message across multiple nodes in
a network
• “Good faith” transmission
• Requirements:
– Standard for addressing all network nodes
– Routing method for finding route from any node
to any other node
• Internet network layer: IP (Internet
Protocol)
Invitation to Computer
Science, 6th Edition
11
Communication Protocols
Network Layer
Addressing
• Host name: human-friendly name for node
• IP address: unique numerical address used
by computer, 141.140.1.5
• Domain Name Service (DNS): map host
names to IP addresses
– Symbolic host name goes to local DNS server
– If it has no record, goes to remote servers until
one has the host name and retrieves the IP
address
Invitation to Computer
Science, 6th Edition
12
Communication Protocols
Network Layer
Routing
• Picking a path through network from source
to destination
• Seek shortest/best path: fastest travel
• Massive network requires efficient pathseeking
• Networks are dynamic: nodes come online
and go offline all the time. Routing must
adapt quickly
Invitation to Computer
Science, 6th Edition
13
Communication Protocols
Transport Layer
Transport layer protocols
• Application-to-application, reliable packet
delivery
• Port number: unique identifier for
program
Invitation to Computer
Science, 6th Edition
14
Communication Protocols
Transport Layer
• Application types have standard port
numbers
– Web server: port 80
– Domain Name Service: port 42
– SMTP, sending e-mail: port 25
• TCP (Transport Control Protocol)
– Ensures no errors
– Establishes ordered delivery of packets
– Another version of ARQ algorithm
Invitation to Computer
15
Science,
Edition
–6thVirtual
direct, quality connection between
Invitation to Computer
Science, 6th Edition
16
Communication Protocols
Application Layer
Application layer protocols
• Handle formatted data transmitted
between application programs
Invitation to Computer
Science, 6th Edition
17
Communication Protocols
Application Layer
Hypertext Transfer Protocol (HTTP)
• Web page/service identified by unique
URL (Uniform Resource Locator)
– protocol://host name/page
– Multiple protocols: http, mailto, news, ftp
• Web browser uses TCP to send formatted
messages to Web server, and vice versa
– TCP uses network layer (IP), data link layer,
and physical layer
Invitation to Computer
Science, 6th Edition
18
Communication Protocols
Application Layer
Process: http://hostname/page
• Browser reads protocol, extracts host
name (and requests IP address from DNS
server)
• Sends a connect message to port 80 on
that machine
• After connection established, sends “Get”
message with page information
•Invitation
Server
responds with message containing
to Computer
19
Science, 6th Edition
page contents, size, and indicates
Network Services and Benefits
Interpersonal Communications
• Electronic mail (e-mail)
– Send message to be read at recipient’s
convenience
– Fast, multimedia, broadcast medium
• Bulletin board system (BBS)
– Public forum for shared communications
– Evolved into Internet forums, chat rooms
• Instant messaging and texting
Invitation to Computer
Science, 6th Edition
21
Network Services and Benefits
Resource sharing
• Print server serves all computers on a
LAN
• File server provides storage to all users
• Client/server computing
– Some nodes provide services, other nodes
use those services
• Distributed databases and data
warehouses
Invitation to Computer
Science, 6th Edition
22
Invitation to Computer
Science, 6th Edition
23
Network Services and Benefits
Electronic commerce (e-commerce)
• Early applications
– Automatic paycheck deposit
– ATMs
– Checkout scanners and inventory systems
• Current applications
– Online stores for everything
– Electronic bill payment
– Online payment systems (Paypal)
Invitation to Computer
Science, 6th Edition
24
A Brief History of the Internet
and the World Wide Web
• “A Brief History of the Internet”, 1997, by
some of the founders
• Early years
– Licklider’s “Galactic Network”, 1962
– ARPA-funded ARPANET, 1966
– E-mail, 1972
– Many networks (e.g., HEPNet, DECNet)
1970s/80s
• Internetworking: standards for
Invitation to Computer
25
Science,
6th Edition
communication
Invitation to Computer
Science, 6th Edition
26
A Brief History of the Internet
and the World Wide Web
• Middle years
– TCP/IP established standard
– Telnet, FTP (File Transfer Protocol)
– NSFNet, broadens access (1984)
• ARPANET only open to ARPA grant recipients
• NSFNet open to universities, government
agencies, libraries, museum, schools
– Networks begin to connect, late 1980s
• ARPANET ceases to be as separate network
• NSFNet turns over to
private
providers,
27
Invitation to Computer
Science, 6th Edition
A Brief History of the Internet
and the World Wide Web
World Wide Web
• High-energy physicist at CERN: Tim
Berners-Lee
• Wanted user-friendly information and data
exchange
• Hypertext: documents containing links to
other documents
• Web protocols made public; rapid
Invitation to Computer
29
Science,
6th Edition
expansion
Invitation to Computer
Science, 6th Edition
30
Summary
• Computing devices can communicate
through various wired and wireless media
• Computer networks vary in size and form,
including LANs, WANs, WLANs, and
WWANs
• LANs are configured differently from
WANs, and use different communication
methods
• The Internet is a WAN of WANs
Invitation to Computer
31
Science, 6th Edition
• Protocols are necessary to standardize
Summary
• The protocol hierarchy breaks down
network communications into different
layers of abstraction
– physical, data link, network, transport, and
application
• Protocols like the ARQ algorithm and
TCP/IP provide rules for the transfer of
information
• The Internet has permitted new kinds of
Invitation to Computer
connections among 32people: e-mail, eScience, 6th Edition