internetworking livello iii prof. alfio lombardo
TRANSCRIPT
Internetworking livello III
Prof. Alfio Lombardo
Il sistema Internet: Architettura protocollare
IP
network interface
IP
network interface
application
transport
IP
network interface
rete 1 rete 3
application
transport
IP
network interface
rete 2
Router Router
Host A Host B
NODO
NODO
NODO
NODO
CIRCUITO VIRTUALE
Protocolli di rete orientati alla connessione (virtual circuit switching: esempio X.25)
DATAGRAM
Nodo
Nodo
Nodo
Nodo D
A
B
C
Protocolli di rete orientati al datagramma (datagram switching:
esempio IP)
Servizi di Rete Connectionlesstrasferimento di piccole quantità di dati in tempi limitati
robustezza e flessibilità dei path
efficienza nell'uso delle risorse di rete
necessità di controllo del traffico offerto dalla sorgente
processamento durante il trasferimento dei dati
Componenti funzionali routing IP
Componente Componente DatiDati
Protocollo di Routing IPProtocollo di Routing IP Scambio delle informazioni di routing con gli altri router
Componente di Componente di ControlloControllo
Creazione e aggiornamento delle tabelle di lookup
Tabella di Routing IPTabella di Routing IP
Pacchetti uscenti
Pacchetti entranti
Decisione di Instradamento
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
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
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.7
30.0.0.7
20.0.0.6
Tabelle di routing: statiche dinamiche
algoritmi isolati
algoritmi centralizzati
algoritmi distribuiti
Tabella di routingP1# show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 8 subnets, 2 masksO 172.16.23.0/24 [110/128] via 172.16.13.3, 5d00h, Serial0/1C 172.16.12.0/24 is directly connected, Serial0/0C 172.16.13.0/24 is directly connected, Serial0/1C 172.16.1.0/24 is directly connected, FastEthernet0/0O IA 172.16.2.0/24 [110/74] via 172.16.12.2, 5d00h, Serial0/0O IA 172.16.3.0/24 [110/74] via 172.16.13.3, 5d00h, Serial0/1 192.168.0.0/32 is subnetted, 9 subnetsO 192.168.0.12 [110/11] via 172.16.1.12, 5d01h, FastEthernet0/0C 192.168.0.1 is directly connected, Loopback0O 192.168.0.2 [110/65] via 172.16.12.2, 5d00h, Serial0/0O 192.168.0.3 [110/65] via 172.16.13.3, 5d00h, Serial0/1O IA 192.168.0.31 [110/75] via 172.16.13.3, 5d00h, Serial0/1O IA 192.168.0.21 [110/75] via 172.16.12.2, 5d00h, Serial0/0
Destinazione Next-Hop Interfaccia di uscitaMetrica IGPDistanza amministrativa
Address Boundary
Ma non sempre e’ cosi’:IPv6 Base Header Format
IPv6Addressing Model
An example of a Unicast address format
| 128 - 48 bits | 48 bits | +--------------------------------+-----------+--------------------+ | subnet ID | interface ID | +--------------------------------+-----------+--------------------+
Where the 48-bit Interface ID is an IEEE-802 MAC address.
IPv6 Addresses of all types are assigned to interfaces, not nodes
Auto- configuration of addresses:A node may discover a subnet ID by listening messages sent by a router on its attached link(s), and then fabricating an IPv6 address for itself by using its IEEE MAC address as the interface ID on that subnet.
- RouteDatagram(Datagram, RoutingTable) - Extract destination IP address, D, from the datagram and compute the network prefix, N; if N matches any directly connected network address deliver datagram to destination D over that network (This involes resolving D to a physical address, encapsulating the datagram and sending the frame) else if the table contains a host-specific route for D send datagram to next-hop specified in table else if the table contains a route for network N send datagram to next-hop specified in table else if the table contains a default route send datagram to the default router specified in table else declare a routing error;
IP routing algorithm
More specific prefix preferred over lessspecific prefix
example: packet with destination of 10.1.1.1is sent to the router announcing 10.1/16 ratherthan the router announcing 10/8.
“Longest match” routing
Architetture di routing:
la circolazione stradale!
C
D E
F
G
HA
B
A,B
G,H,E,F
C,D
A
B
Altre
dir
C
D
Altre dir
C,D
G,H
,B,A
E,F
F
E
Altre dir
E,FA,B,C,D
G,H
G,H
C,D
,E,F
A,B
H
G
Altre dir
Architettura gerarchica:I livelloII livello……….
MR 215
Routing gerarchico
R
RR R
R
R
R
R
Area 1
Area 3
Area 2
R
R
R Border arearouter (livello 2)
R Internal arearouter (livello 1)
R
R
RR
R4
Area2
Area1:backbone
BorderRouter
MR 216
Dominio di routing
Dominio AR R
Dominio BR R
RR
RR
Dominio C
R
R
R
R
R
RIP
OSPF
IGRP
R
RR
Dominio D
MR 217
Autonomous System
AutonomusSystem
Dominio AR R
Dominio BR R
RR
RR
Dominio C
R
R
R
R
R
Autonomous System (AS) è una porzione di rete amministrata da un unico gestore o comunque da un gruppo di persone che decidono una particolare ‘politica di routing’ per lo scambio di informazioni di routing con il resto della rete
Autonomous System Number (ASN)
• An ASN is a 16 bit number1-64511 are assigned by the RIRs64512-65534 are for private use and should never appear onthe Internet0 and 65535 are reserved• 32 bit ASNs are coming soonwww.ietf.org/internet-drafts/draft-ietf-idr-as4bytes-07.txt• ASNs are distributed by the Regional Internet RegistriesCurrent ASN allocations up to 32767 have been made to theRIRs
Tipi di AS
• STUB: Un AS che ha un singolo punto di accesso a Internet; non ha bisogno di partecipare alla diffusione di messaggi di routing (BGP)
• Non transit: un AS multi-homed che non permette traffico di transito
• Transit: un AS multi-homed che permette traffico di transito
MR 218
EGP e I GP
AS3
AS1
AS2
R
Dominio A
R RDominio B
R R
R
R
R
R
R
R R
R
RR
R
R
R
R
IGPEGP
No defaultrouter
Router
n.1
(Partial core)
Router
n.2
(Partial core)
Default route
to sites beyond
AS 2
Default route
to sites beyond
AS 1
Default route
from sites
behind AS 1Default route
from sites
behind AS 2
Esempio di Architettura fisica
del sistema di routing
AS1: Backbone serviceProvider (core system)
AS2: ISP
AS3: piccola azienda
AS4: grande azienda
ASn:..
Internet Structure: yesterday
AS1: Backbone serviceProvider (core system)
AS..: IPS
AS..: piccola azienda
AS4: grande azienda
ASn: ISP..
Internet Structure: today
AS..:grande azienda