Post on 28-Jul-2018
Communication networks
o N nodes o Mesh
n # of links, E, N<E<N(N-1)/2 n Cost = o(N2-N) n Special case: Full mesh
o All direct links o Cost = #links = α(N(N-1)/2) = o(N2) o Shortest paths Lmin=1
o Tree n Cost = α(N-1) = o(N) n Paths of variable length
o Ring n Cost = αN = o(N)
Communication networks
o Star n N links, one per node n 1 switching node n Cost = αN + βnode = o(N) n Path length L=2
o Bus n Shared communication medium n Access control to the medium n Cost = αN + βbus = o(N) n Path length L=2
o Mesh + star n 2 layers n 2 class of nodes
Communication networks o Types of networks
n LAN: Local Area Network o Small size networks (building, campus)
n MAN: Metropolitan Area Network o Medium size networks up to a few tens of km
n WAN: Wide Area Network o Large size networks
102101 103 104 105 106 107
Distanza (m)
Frequenzadicifra(bit/s)
LAN ad altavelocità
105
104
106
107
108
109
1010
WAN a bassaveloacità
MAN ad altavelocità WAN ad alta
velocità
Connessionicon modem
MAN a bassavelocitàLAN a bassa
velocità
Access and Backbone networks
o Backbone (geographical networks with long distance links)
o Access network for interconnecting user terminals
What is the Internet?
o Millions of computers connected to the network host = terminal
o On which network applications are executed
o Links (Fiber, cable, radio, satellite, ...)
o Network nodes router
local ISP
company network
regional ISP
router workstation server
mobile
What is the Internet? …continue
o Communication infrastructure allows distributed applications: n Web, email, games,
e-commerce, file sharing
o Communication protocols for sending and receiving application messages
What is a protocol?
Human and network protocols
Hello
Hello
What’s the time now?
2:00pm
TCP connection request
TCP connection acknowledgment
Get http://polimi.it!
<file> time
Browser Web Server
Web
10
Example: Email S: 220 hamburger.edu C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: <alice@crepes.fr> S: 250 alice@crepes.fr... Sender ok C: RCPT TO: <bob@hamburger.edu> S: 250 bob@hamburger.edu ... Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: Do you like ketchup? C: How about pickles? C: . S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection
Network edges o Terminals (hosts):
n Execute application software (Web, email, etc.).
n Remote processes exchange information
o Client/server n Client asks for a service,
server provide it n Clients asks questions,
servers reply
o Peer-to-peer: n All terminals cooperate
without (almost) any differentiation in roles
12
Applications use the network
o The network provides a communication service to applications for the transport of information among remote processes
o The transport service offered by the network can be of different types
_________________________
Application process
_________________________
The network transports
information
Application process
Transport of information
o The network can transport short messages in an unreliable way (examples: DNS, signaling, etc.)
o It can also transport long sequences of bytes in a reliable way (web, email, file transfer, etc.)
_________________________
Application process
_________________________
The network transports
information
Application process
In the heart of the network
o Set of interconnected routers
o The cruciual question: how the information is transferred in the network? n Circuit switching:
physical circuit dedicated to an entire communication session
n Packet switching: information cut in pieces delivered one by one
15
Circuit switching
1122
3344 1) Want call 3344!
2) Look for a circuit
4) ringing!
3) Open circuit
5) Conversation
17
Circuit switching
o Network resources cut in “pieces”
o Each “piece” (= circuit) is allocated to calls
o Resources remain inactive if not used (no sharing during call)
o Link division in “pieces” = multiplexing at physical layer n Frequency
division n Time division
18
Packet switching
Header Data
Destination address: A
Routing table Dest. address Next router
A R2 R3 B
A
B
R1
R2
R3 C
20
Packet switching
Flow of data cut in packets
o All packets share network resources
o Each packet uses the full channel during transmission
o Resources used according to needs
Resource contention o store and forward:
the network node receive the entire packet before transmitting it to the output link
o Statistical multiplexing: packet queuing when the output link is busy with another packet transmission
21
Packet vs Circuit switching
o 1 link of 2.048 Mbps o Each user:
n Asks for web pages of 50KB every 62.5s on average
o Circuit switching: n 1 channel of 64 kbps
per user n Average web page
download delay : 6.25s
32 users
Link 2.048 Mbps
o Packet switching: n Average download delay:
0.22s
22
Physical Internet architecture
NAP
NAP
NAP
BSP
ISP
ISP
ISP = Internet Service Provider BSP = Backbone Service Provider NAP = Network (Neutral) Access Point POP = Point of Presence CN = Customer Network
POP
POP
POP
ISP POP
BSP POP
BSP POP
POP
CN
CN
CN
CN CN
CN
CN
CN
23
Internet access: Dialup
o Dialup via modem n Up to 56Kbps n Direct access to ISP router with a telephone
circuit n Digital transmission in the analog telephone band
Telephone network
Mod
em
Internet access: ADSL o ADSL: asymmetric digital subscriber line
n Up to 1 Mbps upstream n Up to 20 Mbps downstream n Telephone twisted pair shared with the telephone
network up to the first station n Direct access to the ISP network or through an
intermediate high speed network of another provider
Internet access: Next Generation Network
o Fiber optic access network n Partial of full replacement of the
twisted pair with a fibera
n Fiber To The Home n Fiber To The Basement n Fiber To The Curb n Fiber To The Neighborhood
Internet access: Next Generation Network
o Optical access networks n Point to point n Passive optical networks
Internet access: Wireless access
o Wireless networks n Shared access channel
(wireless) n Base station or access point
o Cellular networks n GPRS ~ 56 kbps n UMTS ~ 384 kbps n HSPA ~ 28 Mbps n LTE ~ 100 Mbps
o Wireless LAN: n 802.11b/g/n (WiFi): up to 300
Mbps
base station
mobile hosts
router
Politecnico di Milano Scuola di Ingegneria Industriale e dell’Informazione
29
Functional models
Fundamentals of Communication Networks
30
Communication service o Given two remote entities o We can describe the communication service
for the exchange of messages as: “the service provider for the information
transport”
Entity A
Entity B
Communication service
conversation
Node A Node B
31
Communication service
o The communication service manages the exchange of information between two entities
o It is a service for the exchange of information units that can be: n messages n bits n groups of bits (frames or packets) n files n multimedia flows
Entity A
Entity B
32
Service primitives
o The communication service can be described through service calls that are named service primitives
o Service primitives are used to describe the service, to request it, and to receive information on the service by the provider
o Service primitives are characterized by parameters, including: n Information to transfer n Destination n Characteristics of the requested service n etc.
33
Service primitives
Entity A
Entity B
Bidirectional channel
Service primitives
conversation
Node A Node B
34
Characteristics of the communication service
o Connection mode
n Connection setup n Information transfer n Connection tear down
o Connection-less n Single phase of communication
36
Entity A
Entity B
trasfer
trasfer
trasfer
Connection-less service
o Data transfer does not require a preliminary handshake
o Transfers between same entities of different pieces of information are autonomous and not linked together
37
Layers
o Two entities that communicate using a communication service can offer a communication service themselves to other entities of “upper layer”
Entity A1
Entity B1
Bidirectional channel
Node A Node B
conversation Entity
A2 Entity
B2
conversation
header Dati PDU
38
Functions at layers
o The communication service offered at upper layer can be richer and more complex thanks to the functions implemented at lower layer
Entity A1
Entity B1
Bidirectional channel
Node A Node B
conversation Entity
A2 Entity
B2
conversation
header Dati PDU
39
Communication protocols
o The entities that cooperate to offer a communication service at upper layer exchange messages through the service of the lower layer
o Protocol: n Set of rules that manages the conversation
(exchange of messages) between entities of the same layer o Message formats o Service information o Transfer algorithms o etc.
40
Packet Data Units (PDU)
o A protocol uses information transfer units named PDUs or protocol messages/frames
o PDUs can include:
header data
■ Data coming from upper layer
■ Service information for the coordination among entities
41
Stack architecture o Complex communication services
are typically based on a number of layers n From a low layer for bit transfer n To a top layer for the support of user
applications layer 5
layer 4
layer 3
layer 2
layer 1
layer 5
layer 4
layer 3
layer 2
layer 1
Advantages of stack architectures
o Reduces complexity
o Standardizes interfaces
o Allows interoperability between technologies
o OSI model (1974)
43
Relation between layers
o The offered service is represented by a Service Access Point (SAP)
PDU: Packet Data Unit SDU: Service Data Unit PCI: Protocol Control Information
N+1 - PDU
N - SDU N - PCI
N-SAP
Layer N+1
Layer N
N-PDU
44
Relation between layers
2 - PDU
1-SAP
Layer 2
Physical layer
o At lower layer we have the physical layer o PDUs are flows of bits
bit
2 - PDU 2 - PDU
1-SAP is a physical port
Upper layers enrich the bit transfer service with more advanced functions
45
Complete architecture
layer 5
layer 4
layer 3
layer 2
layer 1
5 4 3 2
5 4 3
5 4
5 layer 5
layer 4
layer 3
layer 2
layer 1
5
5 4
5 4 3
5 4 3 2
5 4 3 2 1
46
Example: Air transport
ticket (purchase) baggage (check) gates (load) runway takeoff airplane routing
ticket (complain) baggage (claim) gates (unload) runway landing airplane routing
airplane routing
Source: Computer Networking: A Top Down Approach Featuring the Internet, Jim Kurose, Keith Ross, Addison-Wesley, July 2004. All material copyright 1996-2004. J.F Kurose and K.W. Ross, All Rights Reserved
47
ticket (purchase)
baggage (check)
gates (load)
runway (takeoff)
airplane routing
departure airport
arrival airport
intermediate air-traffic control centers
airplane routing airplane routing
ticket (complain)
baggage (claim
gates (unload)
runway (land)
airplane routing
ticket
baggage
gate
takeoff/landing
airplane routing
Example: Air transport
Layer: each layer implements a service n Through internal operations n Using lower layer services
Source: Computer Networking: A Top Down Approach Featuring the Internet, Jim Kurose, Keith Ross, Addison-Wesley, July 2004. All material copyright 1996-2004. J.F Kurose and K.W. Ross, All Rights Reserved
48
Why a stack architecture?
Complex systems: o Easy to identify services (implementation,
discussion) o Easy management and update
n Changes in a layer are transparent to others
49
Functions
o Multiple functions can be provided by a layer
o They can be divided into: n Adaptation functions
o examples: n multiplexing n segmentation
n Enriching functions o Examples:
n Error control n Frame reordering
52
Entity A Selects SAPs Entity C Entity B
Function: network
o We have a network function when the conversion between more than two entities of the same layer is enabled
o ROUTING is the main component of the network function (SAP selection)
53
SAP connecting different entities
Entity N+1
Entity routing
o Problem: identify conversation partner
o Routing can be implemented by the lower layer if we introduce ADDRESSING
Routing
55
PDU is passed to lower layer with the ADDRESS as parameter
The ADDRESS is used to route PDU (select output SAP) And it is encapsulated in the header so as to be used by other entities
Entity N+1
Routing entity
PDU
SDU
Addressing & routing
56
Addressing
o Address: identified of the SAP through which the destination entity can be reached; must be unique among all SAPs of the same layer
o Addressing types o unicast: single SAP o multicast: group of SAPs o broadcast: all SAPs
57
Forwarding or switching
o It’s the information forwarding service that an entity provides to others of the same layer
o The SAP is already selected and the service operates the information forwarding
C B A
58
Routing tables
o Selection of the output SAP based on a table stored in the node
Routing table destination Output SAP
o To write routing tables it is possible to gather information from other nodes n Routing protocols
59
Path to destination o Many nodes can be crossed before reaching
destination o Intermediate nodes just implement network
function and not upper layer
Application
Transport
Network
Data Link
Physical
Network
Data Link
Physical
Application
Transport
Network
Data Link
Physical Network
Data Link
Physical
Example IP Router IP: Network function at layer 3!!!
Router Host
60
Path to destination (2) o There are devices that implement network
function at different layers o We’ll see later on: LAN Switch
Application
Transport
Network
Data Link
Physical
Data Link
Physical
Application
Transport
Network
Data Link
Physical Data Link
Physical
Example Switch: Network function at layer 2!!!
Host Switch
61
Path to destination (3) o There are even nodes (proxy) that implement
network function at application layer
Application
Transport
Network
Data Link
Physical
Data Link
Physical
Application
Transport
Network
Data Link
Physical
Example Proxy: Network function at layer 5!!!
Application
Transport
Network
Host
Proxy
OSI model
o Even if the assignment of functions to layers depends on technologies, there is a standard description of the layers
62
Physical layer
Functions: o Modulation and Transmission of bits o Coding and error control o Multiplexing (in physical channels) o Multiple access (in physical channels) o Synchronization
63
Link Layer Functions: o Aggregation of bits in groups (frame) o Error control and retrasmission o Flow control o Multiplexing (logical among information flows)
o Point-to-point links:
64
Physical
Data Link
Physical
Data Link
bits
frame
Link layer o In case of shared transmission medium
n Multiple access (logical among multiple transmitting stations)
n Link layer divided into two sub layers
65
MAC
LLC Medium Access Control
Logical Link Control
Link layer
Physical
MAC
LLC
Physical
MAC
LLC
Physical
MAC
LLC
Network layer Functions: o Addressing o Forwarding o Routing o Fragmentation/reassembly o Based on technology also:
n Congestion control n Quality of service management
66
Physical
Data Link
Network
Physical
Data Link
Interface 1 Interface 2
Note: we’ll focus on the Internet network layer
Physical
Data Link
Network
Physical
Data Link
Interface 1 Interface 2
Physical
Data Link
Network
Physical
Data Link
Interface 1 Interface 2
packets
Transport layer
Functions: o Flow control o Congestion control o Multiplexing (between multiple applications) Implemented only in terminals and not in
intermediate routing nodes
67
Physical
Data Link
Network
Transport
Physical
Data Link
Network
Transport
Physical
Data Link
Network
Physical
Data Link
Interface 1 Interface 2
segments
Data layers Session: o Organizes dialogue among applications coordinating the
exchange of sets of data Presentation: o Manages the data formats to facilitate the dialogue between
applications Application: o Defines the format of messages exchanged by applications
68 Physical
Data Link
Network
Transport
Data Application
Presentation
Session
Physical
Data Link
Network
Transport
Application
Presentation
Session
69
Suite TCP/IP and OSI model
SMTP, FTP, TFTP, Telnet, Rlogin SNMP, DNS TCP, UDP
IP, ARP, RARP, ICMP, IGMP