Zhang Xin , Zhao Xiang, Liu Suhong Beijing Normal University
ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.
-
date post
22-Dec-2015 -
Category
Documents
-
view
220 -
download
0
Transcript of ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu liu/152B/152b.html.
ECS152B Xin Liu
1
ECS 152BComputer Networks
Fall 2003
Prof. Xin Liuwww.cs.ucdavis.edu/~liu/152B/152b.html
ECS152B Xin Liu
2
Highlights• prerequisites:
ECS150 and ECS152A
• make sure to follow up the newsgroup messages
ucd.class.ecs152bucd.class.ecs152b.d
• grading• Projects 40% • Midterm 20%• Homework 10%• Final 30%
ECS152B Xin Liu
3Road Map
I. Introduction• Computer Networks Overview
• Layered architecture
II. IP Protocols • Internet Protocol
• Routing protocols
• ICMP and IGMP
III. Transport Layer• UDP• TCP
ECS152B Xin Liu
4
Road Map
IV. Transport Layer Interfaces • Socket • Socket related system calls • I/O Multiplexing
V. Networking Applications • Network Library Routines • File Transfer Protocol (FTP) • HyperText Transfer Protocol
(HTTP) • Telnet / Remote Login • Domain Name System (DNS)• Remote Procedure Calls (RPC)
V. Other Topics
ECS152B Xin Liu
5
Computer Networks
local network
localnetwork
Core network
internet: network of networks
ECS152B Xin Liu
6
Protocols
• A protocol defines: – the format and the order of the messages exchanged– the actions on receipt/transmission of a message
host
Network Adapter
host
Network Adapter
ComputerNetwork
ECS152B Xin Liu
7
Protocol Example
hello
yes?
2:30pm
time?
Time request:
TCP connection request
TCP connection reply
index.html
get http:www.cs.ucdavis.edu/~liu/
URL request:
(not necessarily typical:)
ECS152B Xin Liu
8
Protocols
• Why use a protocol?
– to provide a common language
• There are so many protocols!
• Rules:
– must be unambiguous and followed exactly
• e.g., TCP/IP, IP (Internet Protocol)
ECS152B Xin Liu
9
The Protocol Stack
Physical
Transport
Network
Link
Presentation
Session
Application
Old Saying: If you know what you are doing, four layers is enough; if you don’t seven won’t help.
Physical
Transport
Network
Link
Presentation
Session
Application
TCP, UDP
IPv4, IPv6
Ethernet…
HTTP, FTP…
OSI - 7 layers TCP/IP Suite – 4 layers
ECS152B Xin Liu
10
Internet Protocol Suite• Layers provide information hiding
doesn’t matter what lower level layers use as long as higher layers use the same protocol
Link
Transport
Network
Application
Link
Transport
Network
Applicatione.g., supports network applications
e.g., transports application-layer messages
e.g., routes datagrams from one host to another
e.g., transmits individual bits within the frame
ECS152B Xin Liu
11
Link Layer: review
• Transfer datagram from one node to adjacent node over a link
• Involves device driver in OS and network interface card
• Physically connecting hosts: encoding, framing, error detection/correction, reliable delivery, access control
• Example: Ethernet, token rings, etc.
“link”
ECS152B Xin Liu
12
Network Layer
• Transport packet from sending to receiving hosts
• Network layer protocols in every host, router
• IP (Internet protocol): addressing, routing, forwarding
• Best effort, unreliable
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
application
transportnetworkdata linkphysical
application
transportnetworkdata linkphysical
ECS152B Xin Liu
13
Transport Layer• provide logical
communication between app processes running on different hosts
• transport protocols run in end systems
– segments, reassembles
• more than one transport protocol available to apps
• Internet: TCP and UDP
application
transportnetworkdata linkphysical
application
transportnetworkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysicalnetwork
data linkphysical
logical end-end transport
ECS152B Xin Liu
14
Household analogy
• 12 kids sending letters to 12 kids
• processes = kids
• app messages = letters in envelopes
• hosts = houses
• transport protocol = Alice to Bob
• network-layer protocol = postal service
ECS152B Xin Liu
15
Protocol Layers
Network
Link
Transport
Network
Link
Application
Transport
Network
Link
Application
HostA router HostB
• Simplifies implementationsegmentation/reassembly, error control, flow control,multiplexing, connection setup in different layers
• There also are some potential disadvantages
may duplicate functionality may need info in a non-adjacent layer (e.g., timestamp)
Network
Link
router
ECS152B Xin Liu
16
Encapsulation
source destination
original message
Transport
Network
Link
Application
Transport
Network
Link
Application
ECS152B Xin Liu
17
Demultiplexing
source destination
original message
Transport
Network
Link
Application
ECS152B Xin Liu
18
The Internet Protocol Stack
source
original message
Transport
Network
Link
Application
Protocol Data Units
(PDU)
message
frame
segment
datagram
software
networkinterface card
software
mixed
Implementation
ECS152B Xin Liu
19
Client-Server Model
server client
client = host that initiates the session (e.g., asks for a Web page; browser) server = host that gives the requested service
A typical network has two components: client and server
ECS152B Xin Liu
20
Client-Server Model
• Client-server model:– Web, email, file transfer, remote login, news
group, p2p, etc.
• SETI@home project– SETI: Search for ExtraTerrestrial Intelligence– 3 million participants
ECS152B Xin Liu
21
Our Class
• Upper layer protocols– Internet protocols– Transport protocols– Transport layer interface– Networking application
• Hands-on experience
Transport
Network
Application
clientserver
ECS152B Xin Liu
22
Acronym
• Standardization – Internet Society (ISOC)– Internet Architecture Board (IAB)– Internet Engineering Task Force (IETF)– Internet Research Task Force (IRTF)
• RFC – Request for comments
ECS152B Xin Liu
23
Suggested Reading
• TCP/IP Illustrated, Vol. 1, Chp. 1
• Review ECS 150, 152A