55
Prof. Alfio Lombardo LA RISOLUZIONE DEGLI INDIRIZZI NELL’ARCHITETTURA TCP/IP

Prof. Alfio Lombardo

  • Upload
    osanna

  • View
    59

  • Download
    0

Embed Size (px)

DESCRIPTION

LA RISOLUZIONE DEGLI INDIRIZZI NELL’ARCHITETTURA TCP/IP. Prof. Alfio Lombardo. Indirizzi nell’ architettura TCP/IP. Indirizzo logico (livello applicativo). Indirizzo di porta locale (livello di trasporto). Indirizzo di host (livello di rete). Indirizzo hardware (livello di linea). - PowerPoint PPT Presentation

Citation preview

Page 1: Prof. Alfio Lombardo

Prof. Alfio Lombardo

LA RISOLUZIONE DEGLI INDIRIZZI NELL’ARCHITETTURA TCP/IP

Page 2: Prof. Alfio Lombardo

Indirizzo logico (livello applicativo)

Indirizzo di porta locale (livello di trasporto)

Indirizzo di host (livello di rete)

Indirizzo hardware (livello di linea)

Indirizzi nell’ architettura TCP/IP

Page 3: Prof. Alfio Lombardo

LA RISOLUZIONE DEGLI INDIRIZZI

NELL’ARCHITETTURA TCP/IP

Risoluzione degli indirizzi del sistema chiamato

Risoluzione dell’indirizzo di host del sistema chiamante

Page 4: Prof. Alfio Lombardo

Indirizzo logico (livello applicativo)

Risoluzione degli indirizzi del sistema chiamato

Indirizzo di host (livello di rete)

Indirizzo hardware (livello di linea)

Indirizzo di porta locale (livello di trasporto)

Page 5: Prof. Alfio Lombardo

Esempio di indirizzo logico: ftp.sun90.cdc.unict.it

Esempio di indirizzo di host (IP): 192.5.48.7

Esempio di indirizzo di porta locale (TCP/UDP): 21

Esempio di indirizzo hardware (Ethernet): 00 9A 87 44 B8 C2

Page 6: Prof. Alfio Lombardo

Indirizzamento IP

A

B

C

D

E

Page 7: Prof. Alfio Lombardo

Internet: quanti indirizzi?

Indirizzi di tipo A: (0.0.0.0 - 127.255.255.255)

126 reti con 16 milioni di host ciascuna

Indirizzi di tipo B: (128.0.0.0 - 191.255.255.255)16382 reti con oltre 64000 hostsciascuna.

Indirizzi di tipo C: (192.0.0.0 - 223.255.255.255)

2 milioni di reti con più di 256 hosts

Page 8: Prof. Alfio Lombardo

L’indirizzo IP:

10000000 00000011 00000010 00000011

Classe B rappresentato come 128.3.2.3

I network numbers vengono assegnati dal Network Information Center (NIC) per evitare conflitti.

Esempio

Page 9: Prof. Alfio Lombardo

Esempio

R

128.10.2.8 128.10.2.26

host host

192.5.48.1

192.5.48.6

RTokenRing

192.5.48.0

Ethernet 128.10.0.0

128.10.2.3Multi homed

host

host

192.5.48.7

128.10.2.70

192.5.48.3

Page 10: Prof. Alfio Lombardo
Page 11: Prof. Alfio Lombardo
Page 12: Prof. Alfio Lombardo

Indirizzo logico

Indirizzo di host

Domain Name System(DNS)

Page 13: Prof. Alfio Lombardo

Il DNS espleta due funzioni concettualmente indipendenti:

specifica della sintassi dei nomi logici e delle regole per delegare l'autorità sui nomi stessi (funzione astratta); implementazione di un sistema distribuito di database che mappa in modo efficiente i nomi logici negli indirizzi di rete (funzione concreta).

Funzioni del DNS

Page 14: Prof. Alfio Lombardo

Domini DNSDomain

nameMeaning

COM Organizzazioni commerciali

EDU Istituzioni educative

GOV Istituzioni governative

MIL Gruppi militari

NET Centri di supporto per la rete

ORG Altre organizzazioni

INT Organizzazioni interne

USA IT

Assegnazioni di tipo geografico

... ...

Page 15: Prof. Alfio Lombardo

int comedu

govmil

orgnet

jpnl

itus

mitunict

iit

pclombardo

Esercizio consigliato:

DNS

151.97.6.5

yale

cs eng

pcsmith

Page 16: Prof. Alfio Lombardo

Pclombardo.iit.unict.it ??

Applicazione Resolver

TCP/UDP

IP

Network interface Richiesta Al DNS ServerLocale

Procedura per la risoluzione dei nomi

Page 17: Prof. Alfio Lombardo

                                                                                                                                                                                      

                                 

Page 18: Prof. Alfio Lombardo

                                                                                                                                                                                      

                                 

Risoluzione dei nomi con modalitànon ricorsiva

Page 19: Prof. Alfio Lombardo

Caching

Memoria cache Memoria cache

Rispostaunauthoritative

Rispostaauthoritative

Rispostaauthoritative

Page 20: Prof. Alfio Lombardo
Page 21: Prof. Alfio Lombardo

Indirizzo di host

Indirizzo hardware

Address Resolution Protocol(ARP)

Page 22: Prof. Alfio Lombardo

E1151.97.6.1

E2151.97.6.2

E3151.97.6.3

E4151.97.6.4

A B C D

Address Resolution Protocol

E1 E_broadcast 151.97.6.1 151.97.6.3 E1E1 E3 151.97.6.1 151.97.6.3 E1 E3

Page 23: Prof. Alfio Lombardo

Forwarding diretto: esempio

Subnet 192.168.10.0

MAC-D 000060AD8744MAC-S 00082C785852IP-D 192.168.10.35IP-S 192.168.10.10

MAC-D 000060AD8744MAC-S 00082C785852IP-D 192.168.10.35IP-S 192.168.10.10

MAC 00082C785852 MAC 000060AD8744

192.168.10.35192.168.10.10

ARP procedure

Page 24: Prof. Alfio Lombardo

Forwarding indiretto: esempioProxi ARP

Subnet 192.168.10.0 Subnet 192.168.11.0.10 .1 .1 .90

MAC 00082C785852 MAC 00000C87654A MAC 00000CAB22A7 MAC 009A8744B8C2

Default Gateway192.168.10.1

Default Gateway192.168.10.1

Default Gateway192.168.11.1

Default Gateway192.168.11.1

MAC-D 00000C87654AMAC-S 00082C785852IP-D 192.168.11.90IP-S 192.168.10.10

MAC-D 00000C87654AMAC-S 00082C785852IP-D 192.168.11.90IP-S 192.168.10.10

MAC-D 009A8744B8C2MAC-S 00000CAB22A7IP-D 192.168.11.90IP-S 192.168.10.10

MAC-D 009A8744B8C2MAC-S 00000CAB22A7IP-D 192.168.11.90IP-S 192.168.10.10

ARP procedure ARP procedure

Page 25: Prof. Alfio Lombardo

Forwarding indiretto: esempio

Subnet 192.168.10.0 Subnet 192.168.11.0.10 .1 .1 .90

MAC 00082C785852 MAC 00000C87654A MAC 00000CAB22A7 MAC 009A8744B8C2

Default Gateway192.168.10.1

Default Gateway192.168.10.1

Default Gateway192.168.11.1

Default Gateway192.168.11.1

MAC-D 00000C87654AMAC-S 00082C785852IP-D 192.168.11.90IP-S 192.168.10.10

MAC-D 00000C87654AMAC-S 00082C785852IP-D 192.168.11.90IP-S 192.168.10.10

MAC-D 009A8744B8C2MAC-S 00000CAB22A7IP-D 192.168.11.90IP-S 192.168.10.10

MAC-D 009A8744B8C2MAC-S 00000CAB22A7IP-D 192.168.11.90IP-S 192.168.10.10

ARP procedure

Page 26: Prof. Alfio Lombardo
Page 27: Prof. Alfio Lombardo

Address Resolution Protocol (Reverse Address Resolution Protocol)

Page 28: Prof. Alfio Lombardo

ARP e trama data linK

MR 125

hardtype

protsize

hardsize

prottype

operationsender

Ethernet Addresssender

IP Address

targetEthernet Address

targetIP Address

2 12 1 2 6 4

INFOHEADER FCS

ARP: formato della trama

Page 29: Prof. Alfio Lombardo

Entita’ IP Entita’ ARP Entita’ RARP

Interfaccia

(demux)

Trame in arrivoEsercizio consigliato:

ARP

Page 30: Prof. Alfio Lombardo

Indirizzamento TCP

Port number– identificativo di un

utente TCP (programmi applicativi e/o utenti che fanno uso di uno stesso host)

– è rappresentato da un intero

Appl. 1Appl. 1 Appl. 2Appl. 2 Appl. nAppl. n

TCPTCP

IPIP

Network InterfaceNetwork Interface

• • •

Page 31: Prof. Alfio Lombardo

Indirizzamento TCP

• L’assegnazione del numero di porta può essere– statico

• sono identificativi staticamente associati ad applicazioni largamente utilizzate

• sono utilizzati identificativi inferiori a 256

– dinamico• sono identificativi assegnati direttamente dal sistema operativo

al momento dell’apertura della connessione

Numero Numero7 37

21 5323 10325

ApplicazioneEcho

FTP (File Transfer Protocol)TELNET

SMTP (Simple Mail Transport Protocol 119

ApplicazioneTime

Domain Name ServerX400 Mail Service

NNTP (USENET New Transfer Prot.)

Page 32: Prof. Alfio Lombardo

ServizioServizio PortaPorta TCPTCP UDPUDP

FTP 21 Telnet 23 SMTP 25 TFTP 69 DNS 53 HTTP 80 POP 109 SNMP 161

Well Known Port

Page 33: Prof. Alfio Lombardo

ProcessServer

User

TSAP

(a)

Host 1 Host 2

Time

Server

ProcessServer

Host 2

User

Host 1

(b)

Page 34: Prof. Alfio Lombardo

User

TSAP

(a)

Host 1

User

Host 1

(b)

NameServer

Host 2

Time

Server

NameServer

Host 2

Time

Server

Page 35: Prof. Alfio Lombardo

Risoluzione dell’indirizzo di host

del sistema chiamante

Necessaria per tutti quei sistemi che non conoscono il proprio IP address

Disklesssystems

Assegnazione dinamicadell’indirizzo IP

Page 36: Prof. Alfio Lombardo

Problems a diskless computer faces during system startup:

The startup program (in ROM) does not contain

•IP address

•Bootstap program

•The file server address

•The nearest IP router address

Indirizzo di host

RARP,BOOTP,DHCP

Indirizzo hardware

Page 37: Prof. Alfio Lombardo

Reverse Address Resolution Protocol (Address Resolution Protocol)

Page 38: Prof. Alfio Lombardo

RARP related problems

•RARP operates at a low level

•The RARP replay contains the IP address only

•RARP cannot be used when address is dynamically assigned

BOOTP

DHCP

Page 39: Prof. Alfio Lombardo

RFC 951 : Bootstrap Protocol (BOOTP)

A client/server based protocol allowing for bootstrapping

BOOTPclient

BOOTPserver

UDP68

UDP67

Page 40: Prof. Alfio Lombardo

BOOTP uses UDP

BOOTP Server is implemented as an Application program

A single BOOTP message specifies many items

BUT…...

UDP uses IP!!

Page 41: Prof. Alfio Lombardo

Using IP to determine IP address

•BOOTP Client uses Limited broadcast (255.255.255.255)

•BOOTP Server uses Limited broadcast too for its replay

BOOTP client has to use a well known port number (68)to avoid different clients using the same OS assigned port number receive the server response

Page 42: Prof. Alfio Lombardo

BOOTP Protocol

•Require UDP checksum

•Require Dont Fragment bit setting

•Uses timeout and retransmission

Random delayRandom timeoutDouble timeout after retrasmission

Page 43: Prof. Alfio Lombardo

Bootstrap Procedure

TFTP is used to obtain the memory image from the server

BOOTP Server provides client with informationneeded to obtain the memory image

Page 44: Prof. Alfio Lombardo

BOOTP Message

OP=request, replayHtype=Hardware t.Hlen=HardAddr len.Hops= 0Trans.Id=IntegerSec=sec. since boot

Page 45: Prof. Alfio Lombardo

Vendor Specific Area (Options)

99 9983130

Magic cookie

Type Length ValueValue ……..

Type Length ValueValue

.

.

.

Page 46: Prof. Alfio Lombardo

Items in the Vendor Specific Area

Item Type

Default RoutersTime ServerIEN16 ServerDomain ServerLog ServerQuote ServerLpr ServerImpressRLP ServerHostnameBoot sizeReserved

Item Code

345678910111213128-254

Variab.LengthValueNNNNNNNNNN2-

Contentof Value

Ip address of N/4 routers “ “ “ related ser. “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ Host name reserved

Page 47: Prof. Alfio Lombardo

Items in the Vendor Specific Area

Item Type

PaddingSubnet MaskTime of dayEnd

Item Code

012255

FixedLengthValue-44-

Contentof Value

0000..0Subnet musk for local netTime of day

Page 48: Prof. Alfio Lombardo

IP router

BOOTP Server

Why Dynamic Configuration

Page 49: Prof. Alfio Lombardo

Why Dynamic Configuration

IP router

BOOTP Server

LAN 1

LAN 2

Page 50: Prof. Alfio Lombardo

Dynamic Host Configuration Protocol

•Allows a computer to acquire all the configuration information it needs in a single message

•Allows a computer to obtain an IP address dynamically

•DHCP Server has to be configured with a number of IP addresses

Page 51: Prof. Alfio Lombardo

Address Assignement Types

•Manual Configuration

•Automatic Configuration

•Dynamic Configuration

Manager chooses how DHCP will response for each netand for each host (like BOOTP, DHCP uses the hardware address as client identifier)

Static assignment db

Dynamic assignment db

Page 52: Prof. Alfio Lombardo

client serverUDP67

client UDP68

client UDP68

client UDP68

client UDP68

client UDP68

client UDP68

client UDP68

client UDP68

server

server

server

server

server

server

server

server

UDP67

UDP67

UDP67

UDP67

UDP67

UDP67

UDP67

UDP67

DHCP Discover

DHCP Offer

DHCP Request

DHCP Ack

DHCP Request

DHCP Request

DHCP Ack/Nack

DHCP Release

T=50%

T=85%

…………

Passive open

DHCP Protocol

Page 53: Prof. Alfio Lombardo

Address Acquisition States

Nota:Rec/Send

Page 54: Prof. Alfio Lombardo

DHCP Message

flag unused

Page 55: Prof. Alfio Lombardo