politecnico di milanohome.deib.polimi.it/redondi/fcn/01b-networking basics.pdf · human and network...

70
Politecnico di Milano Scuola di Ingegneria Industriale e dell’Informazione Networking basics

Upload: trankhuong

Post on 28-Jul-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Politecnico di MilanoScuola di Ingegneria Industriale e dell’Informazione

Networking basics

Communication networks

o N nodeso Mesh

n # of links, E, N<E<N(N-1)/2n Cost = o(N2-N) n Special case: Full mesh

o All direct linkso Cost = #links = a(N(N-1)/2) = o(N2)o Shortest paths Lmin=1

o Treen Cost = a(N-1) = o(N) n Paths of variable length

o Ringn Cost = aN = o(N)

Communication networks

o Starn N links, one per noden 1 switching noden Cost = aN + bnode = o(N)n Path length L=2

o Busn Shared communication mediumn Access control to the mediumn Cost = aN + bbus = o(N)n Path length L=2

o Mesh + starn 2 layersn 2 class of nodes

Communication networkso Types of networks

n LAN: Local Area Networko Small size networks (building, campus)

n MAN: Metropolitan Area Networko Medium size networks up to a few tens of km

n WAN: Wide Area Networko 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

Network of networkso Internet is designed to interconnect

networks of different types

Politecnico di MilanoScuola di Ingegneria Industriale e dell’Informazione

Internet basics

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

companynetwork

regional ISP

router workstationserver

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

BrowserWeb Server

Web

10

Example: EmailS: 220 hamburger.edu C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: <[email protected]>S: 250 [email protected]... Sender ok C: RCPT TO: <[email protected]>S: 250 [email protected] ... Recipient ok C: DATAS: 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 edgeso Terminals (hosts):

n Execute application software (Web, email, etc.).

n Remote processes exchange information

o Client/servern Client asks for a service,

server provide itn 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

Communication resources reserved for a call

o Example: old telephone network

16

Circuit switching

1122

33441) 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 layern Frequency

divisionn Time division

18

Packet switching

terminale

router

pacchetto

informazioneheader

19

Packet switching

Header Data

Destination address: A

Routing tableDest. address Next router

A R2R3B

A

B

R1

R2

R3C

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 contentiono 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 Mbpso Each user:

n Asks for web pages of 50KB every 62.5s on average

o Circuit switching:n 1 channel of 64 kbps

per usern 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 ProviderBSP = Backbone Service ProviderNAP = Network (Neutral) Access PointPOP = Point of PresenceCN = Customer Network

POP

POP

POP

ISPPOP

BSPPOP

BSPPOP

POP

CN

CN

CN

CNCN

CN

CN

CN

23

Internet access: Dialup

o Dialup via modemn Up to 56Kbpsn Direct access to ISP router with a telephone

circuitn Digital transmission in the analog telephone band

Telephone network

Mod

em

Internet access: ADSLo ADSL: asymmetric digital subscriber line

n Up to 1 Mbps upstreamn Up to 20 Mbps downstreamn Telephone twisted pair shared with the telephone

network up to the first stationn 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 networkn Partial of full replacement of the

twisted pair with a fibera

n Fiber To The Homen Fiber To The Basementn Fiber To The Curbn Fiber To The Neighborhood

Internet access: Next Generation Network

o Optical access networksn Point to pointn Passive optical networks

Internet access: Wireless access

o Wireless networksn Shared access channel

(wireless)n Base station or access point

o Cellular networksn GPRS ~ 56 kbpsn UMTS ~ 384 kbpsn HSPA ~ 28 Mbpsn LTE ~ 100 Mbpsn 5G ~ 1 Gbps

o Wireless LAN:n 802.11b/g/n (WiFi): up to 300

Mbps

basestation

mobilehosts

router

Politecnico di MilanoScuola di Ingegneria Industriale e dell’Informazione

29

Functional modelsFundamentals of Communication Networks

30

Communication service

o Given two remote entitieso We can describe the communication service

for the exchange of messages as:“the service provider for the information

transport”

EntityA

EntityB

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 messagesn bitsn groups of bits (frames or packets)n filesn multimedia flows

EntityA

EntityB

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 receiveinformation on the service by the provider

o Service primitives are characterized by parameters, including:n Information to transfern Destinationn Characteristics of the requested servicen etc.

33

Service primitives

EntityA

EntityB

Bidirectional channel

Service primitives

conversation

Node A Node B

34

Characteristics of the communication service

o Connection mode

n Connection setupn Information transfern Connection tear down

o Connection-lessn Single phase of communication

35

Connection setup

Information transfer

Connection tear down

EntityA

EntityB

Connection service

36

EntityA

EntityB

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

Layerso Two entities that communicate using

a communication service can offer a communication service themselves to other entities of “upper layer”

EntityA1

EntityB1

Bidirectional channel

Node A Node B

conversationEntity

A2Entity

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

EntityA1

EntityB1

Bidirectional channel

Node A Node B

conversationEntity

A2Entity

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 layero Message formatso Service informationo Transfer algorithmso 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 architectureo Complex communication services

are typically based on a number of layersn From a low layer for bit transfern To a top layer for the support of user

applicationslayer 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 UnitSDU: Service Data UnitPCI: Protocol Control Information

N+1 - PDU

N - SDUN - PCI

N-SAP

Layer N+1

Layer N

N-PDU

44

Relation between layers

2 - PDU

1-SAP

Layer 2

Physicallayer

o At lower layer we have the physical layero PDUs are flows of bits

bit

2 - PDU2 - 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

5432

543

54

5 layer 5

layer 4

layer 3

layer 2

layer 1

5

54

543

5432

54321

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

departureairport

arrivalairport

intermediate air-trafficcontrol 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 servicen Through internal operationsn 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 multiplexingn segmentation

n Enriching functionso Examples:

n Error controln Frame reordering

50

Function: segmentationN+1-PDU

N-PDU

N-SDU

51

Functions: Multiplexing

entitàliv. N

52

Entity ASelects SAPs Entity CEntity 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

Entityrouting

o Problem: identify conversation partner

o Routing can be implemented by the lower layer if we introduce ADDRESSING

Routing

54

Entity N+1

Routing Entity

Routing Entity

Routing Entity

Identify destination N-SAP

Addressing

55

PDU is passed to lower layer with the ADDRESSas parameter

The ADDRESS is used toroute 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 typeso unicast: single SAPo multicast: group of SAPso 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

CBA

58

Routing tables

o Selection of the output SAP based on a table stored in the node

Routing tabledestination Output SAP

o To write routing tables it is possible to gather information from other nodesn Routing protocols

59

Path to destinationo Many nodes can be crossed before reaching

destinationo 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

PhysicalNetwork

Data Link

Physical

ExampleIP Router IP:Network function at layer 3!!!

RouterHost

60

Path to destination (2)o There are devices that implement network

function at different layerso We’ll see later on: LAN Switch

Application

Transport

Network

Data Link

Physical

Data Link

Physical

Application

Transport

Network

Data Link

PhysicalData Link

Physical

ExampleSwitch:Network function at layer 2!!!

HostSwitch

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

ExampleProxy: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 bitso Coding and error controlo Multiplexing (in physical channels)o Multiple access (in physical channels)o Synchronization

63

Link LayerFunctions:o Aggregation of bits in groups (frame)o Error control and retrasmissiono Flow controlo Multiplexing (logical among information flows)

o Point-to-point links:

64

Physical

Data Link

Physical

Data Link

bits

frame

Link layero In case of shared transmission medium

n Multiple access (logical among multiple transmitting stations)

n Link layer divided into two sub layers

65

MAC

LLCMedium Access Control

Logical Link Control

Link layer

Physical

MAC

LLC

Physical

MAC

LLC

Physical

MAC

LLC

Network layerFunctions:o Addressingo Forwardingo Routingo Fragmentation/reassemblyo Based on technology also:

n Congestion controln 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 controlo Congestion controlo 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 layersSession:o Organizes dialogue among applications coordinating the

exchange of sets of dataPresentation:o Manages the data formats to facilitate the dialogue between

applicationsApplication:o Defines the format of messages exchanged by applications

68Physical

Data Link

Network

Transport

DataApplication

Presentation

Session

Physical

Data Link

Network

Transport

Application

Presentation

Session

69

Suite TCP/IP and OSI model

SMTP,FTP, TFTP, Telnet, RloginSNMP, DNS

TCP, UDP

IP, ARP, RARP,ICMP, IGMP

Reference

o Tanenbaum book: Chapter 1o Kurose-Ross: Chapter 1