1-Introduction 1
1-Introduction 1
1
Highlights
2
Computer Networks
Computer Networks
A collection of autonomous computers
interconnected by a single technology
Users are exposed to the actual machines
If the machines have different hardware and
different operating systems, that is fully visible
to the users
3
Distributed system
Distributed system
A collection of independent computers appears
to its users as a single coherent system
A layer of software on top of the operating
system, called middleware, is responsible for
implementing this model
A well-known example of a distributed system is
the World Wide Web, in which everything looks
like a document (Web page)
4
Definition of Computer Networks
Components of CN
Computers/Hosts/End Systems
Communication Links
Switches/Routers
5
1.1 Uses of Computer
Networks
6
Business Applications
7
Resource Sharing
Sharing physical resources
Printers
Scanners
CD burners
Sharing computerized information
Database
Documents
8
Client-Server Model
A network with two clients and one server
9
Communication Medium
E-mail
Makes cooperation among far-flung groups
of people easy
Videoconferencing
10
Electronic Commerce
Doing business electronically with other
companies, especially suppliers and
customers
Reduces the need for large inventories and
enhances efficiency
Doing business with consumers over the
Internet
Airlines, bookstores, and music vendors …
11
Home Network Applications
12
Access to remote information
Surfing the World Wide Web for information
Newspapers, magazines, scientific journals
On-line digital library
13
Person-to-person communication
Instant messaging
Chat room
Newsgroups
Peer-to-peer system
Carry telephone calls, video phone, radio
14
Interactive entertainment
Video on demand
Game playing
15
E-commerce
Some forms of e-commerce
16
Mobile Network Users
17
Mobile Network Users
Combinations of wireless networks and
mobile computing.
18
Mobile Network Users
Portable office
Trucks, taxis, …, keeping in contact with
home
Meter reading
RFID
19
Social Issues
20
1.2 Network Hardware
21
Transmission technology and
scale
22
Transmission technology
Broadcast networks
Sending a packet to all destinations, each
machine checks the address field
If the packet is intended for the receiving
machine, that machine processes the packet
If the packet is intended for some other
machine, it is just ignored.
Broadcasting
Multicasting (subscribe)
Point-to-point networks
To go from the source to the destination, a
packet may visit one or more intermediate
machines (Often multiple routes are possible,
finding good ones is important) 23
Broadcast vs. Point-to-point
A broadcast network
A point-to-point network
24
Classification by scale
25
PAN
26
Local Area Networks
27
Topology
28
802.11/Switched LAN
29
Channel allocation
Static & Dynamic
A typical static allocation
Divide time into discrete intervals and use a
round-robin algorithm, allowing each machine to
broadcast only when its time slot comes up
Dynamic allocation methods
Centralized
Decentralized
30
MAN and WAN
31
Metropolitan Area Networks
A metropolitan area network based on cable
TV
32
WAN
WAN: telecommunication network that
covers a broad area
Providing connections from a LAN to the
Internet
33
Communication subnet
Transmission lines
Switching elements (Router)
Store-and-forward (packet-switched)
reassembled
Routing decisions: Routing algorithm
34
Wireless Networks
35
Categories of wireless networks
System interconnection
Bluetooth
In the simplest form, system interconnection
networks use the master-slave paradigm
Wireless LANs(802.11-WiFi)
Wireless MANs(802.16 WiMax)
Wireless WANs
36
Internetworks
37
Internet & internet
A collection of
interconnected
networks is called an
internetwork or internet
Gateway: provide the
necessary translation,
both in terms of
hardware and software
38
Subnet, Network, internet
Subnet
The collection of routers and communication
lines
Network
The combination of a subnet and its hosts
forms a network
internetwork
An internetwork is formed when distinct
networks are interconnected
39
1.3 Network Software
40
Protocol Hierarchies
41
Network architecture
Networks are organized as a stack of layers
Reduce design complexity
The purpose of each layer is to offer certain
services to the higher layers, shielding those
layers from the details of how the offered
services are actually implemented
Each layer is a kind of virtual machine, offering
certain services to the layer above it
Object-oriented programming
A particular piece of software (or hardware)
provides a service to its users but keeps the
details of its internal state and algorithms
hidden from them
42
Layers, Peers, Protocols, and Interfaces
43
Layers, Peers, protocols, and interfaces
Protocol
An agreement between the communicating parties on how
communication is to proceed
Peers
The entities comprising the corresponding layers on
different machines are called peers
The peers may be processes, hardware devices
Interface
Defines which primitive operations and services the lower
layer makes available to the upper one
Physical medium
Network architecture
A set of layers and protocols
Neither the details of the implementation nor the
specification of the interfaces is part of the architecture
44
Philosopher-Translator-Secretary
Interfaces
Protocols
Translator: A neutral language known to both of them
Secretary: communication method 45
Information flow
Example information flow supporting virtual
communication in layer 5.
46
Virtual Communication of Layer 5 Peers(1)
Layer 5
A message, M, is produced by an application
process and given to layer 4 for transmission
Layer 4
Puts a header in front of the message to identify
the message and passes the result to layer 3
Header: control information, such as sequence
numbers (In some layers, headers can also
contain sizes, times, and other control fields)
47
Virtual Communication of Layer 5 Peers(2)
Layer 3
There is limit to the size of messages
transmitted in the layer 3 protocol
Break up the incoming messages into smaller
units (packets)
Prepend a layer 3 header to each packet
Decides which of the outgoing lines to use and
passes the packets to layer 2
Layer 2
Adds a header & trailer to each piece
Gives the resulting unit to layer 1
Layer 1
Physical transmission
48
source
A Practical Case
message M application
segment Ht M transport
datagram Hn Ht M network
frame Hl Hn Ht M link
physical
Hl Hn Ht M link Hl Hn Ht M
physical
switch
destination Hn Ht M network Hn Ht M
Hl Hn Ht M link Hl Hn Ht M
M application
Ht M transport physical
Hn Ht M network
Hl Hn Ht M link router
physical
49
Design Issues for the Layers
50
Design Issues for the Layers
Reliability
Error detection and error correction
Routing: find a path through a netwrok
Network evolution
Protocol layering
Addressing or naming: identifying senders and receivers
Internetworking(⽹络互通性)
Scalability(可扩展性)
Resource allocation
Statistical multiplexing(统计复⽤:按需分配)
Flow Control(流量控制)
QoS(服务质量)
Security
51
Error Control
Physical lines are not perfect
Error-detecting & Error-correcting codes
How the receiver tells the sender which messages
have been correctly received and which have not
Messages may be out of sequence
How the sender numbers the messages
How the receiver deals with the messages arriving
out of order
52
Addressing
53
Flow Control
A fast sender may swamp a slow
receiver with data
Method 1: some kind of feedback from the
receiver to announce it’s current situation
Method 2: limit the sender’s transmission
rate
54
Routing
When multiple paths exist, a route
must be chosen
55
Service Primitives
56
Connection-Oriented and
Connectionless Services
Connection-oriented: telephone system
Connection-less: postal system
58
Service Primitives
A service is formally specified by a set of primitives
(operations) available to a user process to access
the service
Example
CONNECT.request - request a connection to be established
CONNECT.indication - signal the called party
CONNECT.response - used by the called to accept/reject
calls
CONNECT.confirm – tell the caller whether the call was
accepted
DATA.request – request that data be sent
DATA.indication – signal the arrival of data
DISCONNECT.request – request that a connection be
released
DISCONNECT.indication – signal the peer about the request
59
Service Primitives: Example
1. CONNECT.request 7. DATA.request
2. CONNECT.indication
8. DATA.indication
3. CONNECT.response
9. DISCONNECT.request
4. CONNECT.confirm
10.DISCONNECT.indication
5. DATA.request
6. DATA.indication
60
A Simple Connection-oriented Service
If the protocol stack is located in the operating
system, the primitives are normally system calls
61
A Simple Connection-oriented Service
62
The Relationship of Services to Protocols
Service
Defines what operations the layer is prepared to perform
on behalf of its users, but it says nothing at all about how
these operations are implemented
Relates to an interface between two layers, with the lower
layer being the service provider and the upper layer being
the service user
Protocol
A set of rules governing the format and meaning of the
messages that are exchanged by the peer entities
Entities use protocols to implement their service definitions
Service and protocol are completely decoupled
They are free to change their protocols provided they do
not change the service
63
The Relationship of Services to Protocols
64
1.4 Reference Models
65
The OSI Reference Model
66
The OSI reference model
67
Physical layer
Transmitting raw bits over a communication
channel
how many volts should be used to represent a 1
and how many for a 0
how many nanoseconds a bit lasts
whether transmission may proceed
simultaneously in both directions
how the initial connection is established and how
it is torn down when both sides are finished
68
Data link layer
Transform a raw transmission facility into a
logic channel (Point-to-Point: the protocols
are between each machine and its
immediate neighbors)
Sender break up the input data into data frames
and transmit the frames
If the service is reliable, the receiver confirms
correct receipt of each frame by sending back an
acknowledgement frame
Flow control: Keep a fast transmitter from
drowning a slow receiver in data
Broadcast networks: how to control access to
the shared channel
69
Network layer
Controls operation of subnet
Forwarding
Routing: How packets are routed from source to
destination (route table)
Static
Be determined at start of each conversation
Highly dynamic
Congestion
QoS (Quality of service)
delay, transit time, jitter, etc.
Heterogeneous networks interconnection
Broadcast networks, routing is simple
70
Transport Layer
Transport Layer: end-to-end layer
Accept data from above, split it up into smaller
units if need be, pass these to the network layer,
and ensure that the pieces all arrive correctly at
the other end
Determines what type of service to provide to
the session layer
an error-free end-to-end channel
transporting of isolated messages, with no
guarantee about the order of delivery
broadcasting of messages to multiple
destinations
71
Session Layer
The session layer allows users on different
machines to establish sessions
Dialog control
keeping track of whose turn it is to transmit
Token management
preventing two parties from attempting the
same critical operation at the same time
Synchronization
checkpointing long transmissions to allow them
to continue from where they were after a crash
72
Presentation Layer
The syntax and semantics of the
information transmitted
the data structures to be exchanged can be
defined in an abstract way
73
Application Layer
Application layer contains a variety of
protocols that are commonly needed by
users.
HTTP (HyperText Transfer Protocol)
File transfer
Electronic mail
Network news
…….
74
The TCP/IP Reference Model
75
The TCP/IP Reference Model
76
The Internet Layer
A packet-switching network based on a
connectionless internetwork layer
Defines an official packet format and
protocol called IP (Internet Protocol)
The job of the internet layer is to deliver IP
packets where they are supposed to go
Packet routing
Avoiding congestion
77
The Transport Layer: TCP
TCP (Transmission Control Protocol)
Reliable connection-oriented protocol that allows
a byte stream originating on one machine to be
delivered without error on any other machine in
the internet
Fragments incoming byte stream into discrete
messages
Reassembles the received messages into the
output stream
Flow control to make sure a fast sender cannot
swamp a slow receiver with more messages than
it can handle
78
The Transport Layer: UDP
UDP (User Datagram Protocol)
Unreliable, connectionless protocol
For applications that do not want TCP's
sequencing or flow control and wish to provide
their own (i.e. NFS)
For applications in which prompt delivery is more
important than accurate delivery, such as
transmitting speech or video, DNS
79
TCP/IP Model: in Details
80
Protocols & networks in the TCP/IP
Protocols and networks in the TCP/IP model
initially.
81
Comparing OSI and TCP/IP
Models
82
3 Concepts are Central to OSI Model
Services
What the layer does, not how entities above it
access it or how the layer works. It
Interfaces
Tells the processes above it how to access it.
Protocols
83
A Critique of the OSI Model & Protocols
Why OSI did not take over the
world
Bad timing
Bad technology
Bad implementations
Bad politics
84
Bad Timing
The apocalypse of the two elephants.
85
Bad Technology
The choice of seven layers was more
political than technical, and two of the
layers (session and presentation) are
nearly empty, whereas two other ones
(data link and network) are overfull
Service definitions and protocols are
extraordinarily complex and difficult to
implement and inefficient in operation
Some functions, such as addressing, flow
control, and error control, reappear again
and again in each layer
86
A Critique of the TCP/IP Reference Model
Problems
Service, interface, and protocol not
distinguished
Not a general model
Host-to-network “layer” not really a
layer
No mention of physical and data link
layers
Minor protocols deeply entrenched,
hard to replace
87
Hybrid Model
The hybrid reference model to be used in
this book.
88
1.5 Example Networks
89
Example Networks
The Internet
The mobile phone network
Wireless LANs: 802.11
RFID/ Sensor networks
90
The ARPANET
(a) Structure of the telephone system
(b) Baran’s proposed distributed
switching system
91
The Original ARPANET Design
92
Growth of the ARPANET
94
Internet Usage
Traditional applications (1970 – 1990)
E-mail
News
Remote login
File transfer
1990-
WWW (World Wide Web) brought millions of
new, nonacademic users to the net
95
Architecture of the Internet
Overview of the Internet.
96
The mobile phone network
97
Wireless LANs
99
RFID / Sensor network
100
Connection-Oriented Networks
X.25 (2.4K~64K)
a computer first established a connection to
the remote computer (Virtual Circuit)
Data packet consists of a 3-byte header
(VC#/seq#/ACK#) and up to 128 bytes of
data.
Frame Relay (9.6K~2M)
a connection-oriented network with no error
control and no flow control
ATM (155M/622M)
Transmit information in fixed-size packets
called cells
The cells are 53 bytes long, of which 5 bytes
are header and 48 bytes are payload
101
1.6 Network Standardization
102
Network Standardization
Telecommunications World
ITU (International Telecommunication Union)
Main sectors
Radio communications(ITU-R)
Telecommunications Standardization(ITU-T)
CCITT, Comité Consultatif International Télégraphique et Téléphonique
(1956-1993)
Development(ITU-D)
International Standards World
ISO (International Standards Organization)
ANSI (American National Standards Institute)
IEEE (Institute of Electrical and Electronics Engineers)
103
Internet Standards World
Internet协会(ISOC,Internet Society)
推动、⽀持和促进Internet不断增⻓和发展的专业组织
它把Internet作为全球研究通信的基础设施
体系结构委员会(IAB,Internet Architecture Board)
技术监督和协调的机构。它由国际上来⾃不同专业的1 5个志愿者组成,
其职能是负责Internet标准的最后编辑和技术审核
⼯程任务组(IETF,Internet Engineering Task Force)
⾯向近期标准的组织,它分为9个领域(应⽤、寻径和寻址、安全等
等)。IETF开发成为Internet标准的规范
研究任务组(IRTF,Internet Research Task Force)
主要对⻓远的项⽬进⾏研究
IRTF和IETF⾪属于IAB, IAB⾪属于ISOC
所有关于Internet的标准都以RFC(Request for Comment)⽂档出版
Proposed Standard->Draft Standard->Internet Standard
104
IEEE 802 Standards
106
Highlights
purpose
subnet
classification
layer
protocol architecture
ISO OSI/rm
service primitive
connect 、connectless
famous architecture/Organization
107