indirizzamento in ipv4 prof.: alfio lombardo. internetworking protocol vers.4 indirizzamento...

Post on 01-May-2015

223 Views

Category:

Documents

4 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Indirizzamento in IPv4 prof.: Alfio Lombardo

Internetworking Protocol vers.4

Indirizzamento

Instradamento

Frammentazione

Il pacchetto IP

Network Address Host Address

Indirizzamento IP

Identifica la rete a cui e’ Connessa la macchina (host o router)

Identifica la macchina all’interno della rete

Convenzioni

Identificativo di rete

00…0000000 host

11111111.11111111.11111111.11111111

127 host

netid

Host su questa rete

Broadcast limitato

111……….…111 Broadcast diretto

Loopback

netid 0000…….00000

Indirizzi IP privati

IANA-Allocated, Non-Internet Routable, IP Address Schemes

Class Network Address Range

A 10.0.0.0-10.255.255.255

B 172.16.0.0-172.31.255.255

C 192.168.0.0-192.168.255.255

Network Address Translation (NAT)

Rete “Interna” Rete “Esterna”

10.0.0.2

10.0.0.3

NAT Table

Inside Local IP Address

Inside Global IP Address

10.0.0.210.0.0.3

192.69.1.1192.69.1.2

SA = Source Address

NAT

Internet/Intranet

SA

10.0.0.2

SA

192.69.1.1

Un server NAT associa a ciascun indirizzo privato un indirizzo pubblico tra quelli disponibili.

Port Address Translation (PAT)

10.0.0.1

10.2.0.5

PAT Table

Inside Local IP Address

Public IP Address

192.69.1.1192.69.1.1

10.0.0.210.0.0.3

SA = Source Address

PAT

Internet/Intranet

SA

10.0.0.2

SA

192.69.1.1

Rete “Interna” Rete “Esterna”

Port

50015002

•Un server PAT consente di tradurre gli indirizzi IP (privato) della rete interna con un singolo indirizzo esterno (pubblico).•Per individuare il reale mittente/destinatario del pacchetto, vengono utilizzate le porte presenti nell’intestazione del protocollo di trasporto

151.97.3.4

151.97.3.4

Instradamento

router

router router

151.97.3.4

? 151.97.3.4

151.97.3.4

151.97.3.4

? 151.97.3.4

Modalità di Instradamento•Direct delivery: sorgente e destinazione sono direttamente

connesse alla stessa sottorete; non coinvolge routers •Indirect delivery: sorgente e destinazione non sono

connesse alla stessa sottorete, coinvolge routers

ReteRete

router

Internet

Direct delivery

routerReteRete

ReteRete

router

Direct delivery

Indirect delivery

Per inviare a Instrada verso

20.0.0.0 direct delivery

30.0.0.0 direct delivery

40.0.0.0 30.0.0.7

10.0.0.0 20.0.0.5

Routing table router R

Attraverso l’interfaccia

20.0.0.6

30.0.0.6

30.0.0.6

20.0.0.6

Direct routing Indirect routing

SubnetworkingPermette di estendere lo schema di indirizzamento per indirizzare sottoreti appartenenti ad una stessa rete

Esempio:

10 Rete Sottorete Host

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0

Maschera di sottorete:

Esercizio consigliato:

Indirizzi IP

Esempio

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0

255 255 255 248

1 1

1 1 0 0 0 0 0 1 1 1 0 0 1 1 1 1 10 0 1 1 0 0 0 1 0 0 1 0 00 1

193 205 102 36

Network HostSubnet

Indirizzo

Maschera (NetMask)

Notazione decimale puntata:193.205.102.32/29(il valore 32 corrisponde a 00100000; 29 indica che 3 (=32-29) sono i bit dedicati all’host

A

x-net-2192.168.2.32/27(33-62, 30 host)

x-net-1192.168.2.64/27(65-94, 30 host)

Reti logiche vs. reti fisiche

L’ indirizzamento indiretto viene utilizzato anche tra User appartenenti diverse reti logiche nella stessa rete fisica

indirizzamento indirettoIndirizzamentodiretto

Subnetting: esempio (1)

A

C

B

pc-net

100 host

ws-net

20 host

x-net-1

20 host

x-net-2

10 host

Link-1

Link-2

Link-3

7 sottoreti!

192.168.1.0 192.168.2.0

Subnetting: esempio (2) maschere di lunghezza fissa

A

C

B

pc-net192.168.1.(0xxxxxxx)

(1-126> 100 host)

ws-net192.168.1. (1xxxxxxx)

(129-254 > 20 host)

x-net-1192.168.2. .(110xxxxx)

(193-223> 20 host)

x-net-2192.168.2. .(001xxxxx)

(33-62> 10 host)

192.168.2. .(010xxxxx)Link-1

Link-2192.168.2. .(011xxxxx)

192.168.2. .(101xxxxx)Link-1

A

C

B

pc-net192.168.1. (0xxxxxxx)

(1 -126> 100 host)

ws-net192.168.1. (100xxxxx)

(129 -158> 20 host)

x-net-1192.168.1. (101xxxxx)

(161 -190> 20 host)

x-net-2192.168.1. (1100xxxx)

(193 -206> 10 host)

192.168.1. (1111xxxx)Link-1

Link-2192.168.1. (1110xxxx)

Link-3192.168.1. (1101xxxx)

192.168.1.0

Subnetting: esempio (3)maschere di lunghezza variabile: VLSM

Configurazione IP (windows 98)

Frammentazione

MTUHeader Trailer

MTU= Maximum Transfer Unit

Level II

Level III

DatagrammaDatagramma

MTU per alcuni protocolli

Token Ring (16 Mbit/s) : 17914Token Ring (4 Mbit/s): 4464FDDI: 4352Ethernet: 1500X25: 576PPP: 296

Frammentazione

Il pacchetto IP-campo Fragm_Offset

400014567 0000

140014567 0001

140014567 1751

120014567 3500600

14567 2751

80014567 1751

Il pacchetto IP-campo Protocol

Level IIIHeader

ICMP:1 IGMP:2 EGP:8OSPF:89

TCP:6 UDP:17Level IV

Sez 1 16 bits

Sez 2 16 bits

Checksum 16 zero

Sez k 16 bits

Somma 16 bits

16 bitsChecksum

complementare

Mittente

Sez 1 16 bits

Sez 2 16 bits

Checksum 16 bits

Sez k 16 bits

Somma 16 bits

16 bitsRisultato

complementare

Destinatario

Header Checksum

Accettato se Risultato = 0…..………0

Opt.Class Opt.Num. Length Description

0 0 End of Option list 0 1 No operation

0 2 11 Securiy/hadling restict.

0 3 var Loose source routing

0 7 var Record route

0 9 var Strict source routing

0 4 var Timestamp

Il pacchetto IP-campo Option

Debugging and measurment

Option class

01

2

3

Datagram or netw. control

reserved

reserved

codice Dati (lungh var)Dimensione (8 bit)

Copy (1 bit) Class(2bit) Code

0= solo I framm

1=copia in tutti i framm

Figura : Formato dell’opzione strict source routing

Formato campo Option

Figura : Formato dell’opzione Record Route

Formato campo Option

Figura : Formato dell’opzione Timestamp

Formato campo Option

Mod. per aggiunta

header

Modulo di Processing

Modulo di riassemblaggio

Modulo di instradamento

Modulo di frammentazione

Pac IP

Da prot liv superiore

Pac IP

Pac IP,Interfaccia hop successivo

Pac IP

Dallo strato di Data link

Tab riassemblaggio

Tab MTU

Tab Instradamento

Dati versoun protocollo superiore

Componenti modulo IP

Pac IP,Interfaccia hop successivo

Allo strato di Data link

Pac IP

Macrolezione 6:L’interconnessione di reti eterogenee

top related