multi protocol label switching (mpls) alfio lombardo
TRANSCRIPT
MultiProtocol
LabelSwitching(MPLS)
Alfio Lombardo
Background: integrazione del trasporto del traffico
• ISDN
• B-ISDN
ATM (Asynchronous Transfer Model)
- Elevata velocità di commutazione- Possibilità differenziare QoS- Meccanismi di gestione e controllo traffico (Traffic engineering)
• http://www2.rad.com/networks/1994/atm/tutorial.htm
• http://www.iec.org/online/tutorials/atm_fund/
• http://www.cne.gmu.edu/modules/atm/Texttut.html
• http://www.lanl.gov/lanp/atm.tutorial.html• http://usuario.cicese.mx/~aarmenta/
frames/redes/atm/tutorial1/tute.html
Background: Asynchronous Transfer Mode
Background: Asynchronous Transfer Mode
Assumptions ATM is a cell-based, connection-oriented transferMethodology (label switching)
ATM cell flow
5+48 bytes
ATM net1 12 23 3
• ATM works on fiber optic fabric with extremely low error rates
Background: Asynchronous Transfer Mode
No error correction on data
GFC: Generic Flow ControlVPI: Virtual Path IdVCI: Virtul Circuit IdPT: Payload TypeCLP: Cell Loss PriorityHEC: Header Error Control
Background: Asynchronous Transfer ModeATM uses Virtual Connection divided in two levels (required for switching) :
Virtual PathVirtual Circuit
Background: Virtual ChannelThere are many types of virtual channel connections:
• User-to-user applications. Between customer equipment at each end of the connection.
• User-to-network applications. Between customer equipment and network node.
• Network-to-network applications. Between two network nodes and includes traffic management and routing.
Virtual channel connections have the following properties:
• A VCC user is provided with a quality of service specifying parameters such as cell-loss ratio, CLR, and cell-delay variation, CDV.
• VCCs can be switched or semi-permanent.
• Cell sequence integrity is maintained within a VCC.
• Traffic parameters can be negotiated.
Background: Virtual Path
• Virtual paths are used to simplify the ATM addressing structure
• Within an ATM cross-connect, information about individual virtual channels within a virtual path is not required, as all VCs within one path follow the same route as that path
Background: virtual channels and paths relationship
Cross connect node
Background: Asynchronous Transfer Mode
• ATM can dynamically allocate bandwidth• ATM can dynamically manage QoS
specifications• The devices to be connected to ATM
networks might be very simple, like a telephone
• ATM is organized in a hierarchy, like today’s phone network
Background: ATM Service Classes Service Class Quality of Service Parameter
constant bit rate (CBR) This class is used for emulating circuit switching. The cell rate is constant with time. CBR applications are quite sensitive to cell-delay variation. Examples of applications that can use CBR are telephone traffic (i.e., nx64 kbps), videoconferencing, and television.
variable bit rate–non-real time (VBR–NRT)
This class allows users to send traffic at a rate that varies with time depending on the availability of user information. Statistical multiplexing is provided to make optimum use of network resources. Multimedia e-mail is an example of VBR–NRT.
variable bit rate–real time (VBR–RT)
This class is similar to VBR–NRT but is designed for applications that are sensitive to cell-delay variation. Examples for real-time VBR are voice with speech activity detection (SAD) and interactive compressed video.
available bit rate (ABR) This class of ATM services provides rate-based flow control and is aimed at data traffic such as file transfer and e-mail. Although the standard does not require the cell transfer delay and cell-loss ratio to be guaranteed or minimized, it is desirable for switches to minimize delay and loss as much as possible. Depending upon the state of congestion in the network, the source is required to control its rate. The users are allowed to declare a minimum cell rate, which is guaranteed to the connection by the network.
unspecified bit rate (UBR) This class is the catch-all, other class and is widely used today for TCP/IP.
Background: QoS parameters.
Technical Parameter Definition
cell loss ratio (CLR) CLR is the percentage of cells not delivered at their destination because they were lost in the network due to congestion and buffer overflow.
cell transfer delay (CTD) The delay experienced by a cell between network entry and exit points is called the CTD. It includes propagation delays, queuing delays at various intermediate switches, and service times at queuing points.
cell delay variation (CDV) CDV is a measure of the variance of the cell transfer delay. High variation implies larger buffering for delay-sensitive traffic such as voice and video.
peak cell rate (PCR) The maximum cell rate at which the user will transmit. PCR is the inverse of the minimum cell inter-arrival time.
sustained cell rate (SCR) This is the average rate, as measured over a long interval, in the order of the connection lifetime.
burst tolerance (BT) This parameter determines the maximum burst that can be sent at the peak rate. This is the bucket-size parameter for the enforcement algorithm that is used to control the traffic entering the network.
Class of Service
CBR VBR–NRT
VBR–RT
ABR
UBR
CLR yes yes yes yes no
CTD yes no yes no no
CDV yes yes yes no no
PCR yes yes yes no yes
SCR no yes yes no no
BT no yes yes no no
flow control
no no no yes no
Background: QoS vs. Service class
Background: ATM Architecture
Modelli di integrazione IP/ATM
• Modello overlay
• Modello integrato
Modello overlay (rfc 1483)
• Utilizzato a partire dalla meta’ anni 90
• Utlizza PVC (Permanent Virtual Circuit)
• PVC di tipo UBR o ABR tra gli IP_Router
• Trasporto pacchetti su celle ATM attraverso AAL5
PVC ATM
N(N-1)/2 PVC per maglia completa
Modello overlay: topologia fisica
Rete ATM
Switch ATM
Router IP
PVC setup:Segnal. ATM
1
3
Intf In
VPI/VCIIn
Intf Out
VPI/VCI Out
1 0/40 3 0/50
1 Switch interface
Modello overlay: instradamento
Segmentazione
Commutazione ATM
Riassemblaggio
Intf In
VPI/VCIIn
Intf Out
VPI/VCI Out
1 0/40 3 0/50
Host195.31.235.88
195.31.235.88
VPI/VCI=0/40
VPI/VCI=0/50 VPI/VCI=0/60R1S1 S2
R2
ATM 0/0/1
ATM 0/0/2321 3
Intf In
VPI/VCIIn
Intf Out
VPI/VCI Out
2 0/50 3 0/60
195.31.235.88
atm 0/0/1VPI/VCI=0/40
Rete
195.31.235.0/24
Next Hop Interface
R2
172.16.12.10
Modello overlay: configurazione interfaccia router
R1(config) # interface atm 0/0/1R1(config) # ip address 172.16.12.1 255.255.255.252 R1(config) # pvc 0/40R1(config) # abr 1000 500R1(config) # encapsulation aal5snap
Parametri PVC:PCR= 1 Mb/sMCR= 500 kb/s
Modello overlay:Segmentazione e riassembraggio
Fisico
ATM
IP
AAL5
Fisico
ATM
IP
AAL5
Fisico
ATM
IP
AAL5
Fisico
ATM
IP
AAL5
IP IP IP IP
PVC ATM
Ricostruzione pacchetti in tutti i router
Reti completamente magliate
ATM cell
Modello overlay: vantaggi
• Allocazione di banda sui PVC ATM
• Differenziazione dei flussi di traffico ATM
Possibilità di ingegnerizzare il traffico in rete
Modello overlay: ingegnerizzare il traffico in rete
Rete ATM
Switch ATM
Router IP
PVC setup:Segnal. ATM
1 Switch interface
atm 0/0/1VPI/VCI=0/40atm 0/0/2VPI/VCI=0/90
Rete
195.31.235.0/24195.31.233.0/24
Next Hop Interface
R2R2
Modello overlay: svantaggi• Gestione di 2 reti differenti (ATM e IP)
• Limitata scalabilità (interfaccia SAR-ATM 622 Mbit/s)
• Cell tax
• Stress del protocollo di routing IP (elevato numero adiacenze elevato numero di messaggi di segnalaz. per configurare le tabelle dei router)
Ridurre il numero di adiacenze: Modello Integrato
Modello integrato
Switch ATMSwitch ATM Router IPRouter IP Intelligenza:
routing IP
Inoltro: Commutazione di
etichetta
Intelligenza: SW ATM forum
Inoltro: Longest-match
lookup
Switch IP+ATMSwitch IP+ATM
Gli switch ATM implementano funzioni di instradamento IP
- Esegue funzioni di routing IP (es.: RIP, OSPF, …)- Forwarding con modalità ATM
Risultato: rete IP dove i pacchetti vengono trasportati in celle ATM su collegamenti virtuali che seguono un percorso determinato da un protocollo di routing IP (es. RIP, OSPF, …)
Modello integrato: associazione delle etichette (label binding)
• Nel modello integrato il collegamento virtuale non puo’ essere realizzato dalla segnalazione ATM ….
Quindi e’ necessario integrare nella componente di controllo dello Switch IP+ATM un meccanismo per associare al percorso individuato dal routing IP le etichette VPI/VCI
Modello integrato: associazione delle etichette (label binding)
Definisce un circuito virtuale tra R1 e R2 assegnando delle etichette ATM al percorso individuato dall’instradamento IP
R1
IA1 IA2
R2Richiesta: 195.31.235.0/24
Richiesta: 195.31.235.0/24
Richiesta: 195.31.235.0/24
VPI/VCI: 0/60
VPI/VCI: 0/50
VPI/VCI: 0/40
195.31.235.0/24
IA2IA1
Prot. Routing IP: per raggiungere 195.31.235.0/24 R1 – IA1 – IA2 – R2
Modello integrato:
Segmentazione
Commutazione ATM
Riassemblaggio
Intf In
VPI/VCIIn
Intf Out
VPI/VCI Out
1 0/40 3 0/50
Host195.31.235.88
195.31.235.88195.31.235.88
VPI/VCI=0/40 VPI/VCI=0/50 VPI/VCI=0/60R1IA1 IA2
R2
ATM 0/0/1
ATM 0/0/2
Intf In
VPI/VCIIn
Intf Out
VPI/VCI Out
2 0/50 3 0/60
atm 0/0/1VPI/VCI: 0/40
Rete
195.31.235.0/24
Next Hop Interface
IA1
Modelli overlay e integrato: confronto
Overlay• PVC tra R1 e R2
realizzato con segnalazione ATM
• Coesitenza 2 protocolli di routing
• Adiacenza con router R2
Integrato• PVC tra R1 e R2
realizzato con label binding protocol
• Protocollo di routing IP• Adiacenza con switch
IP+ATM
Nota: nel modello Integrato il pacchetto IP viene riassemblato solo nei router IP “reali” , non negli swithc IP+ATM….
Adiacenze IP
Modello “overlay”Modello “integrato”
Open issues
• Spreco di banda introdotto dalla segmentazione ATM
• Scalabilità interfaccia SAR ATM (segmentazione solo ai bordi della rete)
• Mancanza di uno standard multivendor
MultiProtocol Label Switching protocol: MPLS
MPLS target
• Recepire il modello integrato
• Utilizzare diverse tecnologie di livello 2
• Possibilità di ingegnerizzare traffico IP
• Supportare QoS in reti IP in accordo a DiffServ
• Offrire RVP
MPLS: concetti base
• Introduce nelle reti IP (backbone) la commutazione di etichetta tipico del circuito virtuale
• Non è legato alla tecnologia di trasporto• Non è conscio del contenuto dl trasporto
. . .
Et h
ern
et
Fra
me
R
ela
y
AT
M
PP
P
Commutazione di Etichetta
Pacchetti di livello 3 (IPv4, IPv6, IPX, …) . . .
Trame di livello 2 (PPP, Ethernet, …)
Tipo di pacchetti/trame trasportati
Livello 2 (Data Link)
MPLS
La decisione di instradamento di un router può essere vista come appartenente a due passi logici:
• Ricavare dalle intestazioni del pacchetto le informazioni per classificare il pacchetto in una data FEC
• Utilizzare la FEC per ottenere il next hop dalla tabella FEC - NH
Forwarding Equivalent Class
FEC: esempi
FEC 1: pacchetti destinati alla rete 195.31.235.0
. . . . . .
FEC 2: pacchetti destinati alla rete 195.31.235.0 con IP PRECEDENCE=111
FEC n: pacchetti destinati al terminale 145.50.1.2 con indirizzo sorgente 195.35.4.5
FEC NH
FEC 1 1
FEC 2 2
. . . . . .
1
2
n
Tabella di routing IP(FEC-To-Next-Hop)
IP•Ricavare dalle intestazioni del pacchetto il Destination Address (FEC)•Utilizzare la FEC per ottenere il next hop sulla base del Longest Match Prefix Applicato alla tabella di routing
Generalizzazione FEC: Policy based routing
FEC: granularità
FEC a: pacchetti destinati alla rete 195.31.235.0
FEC b: pacchetti destinati al terminale 145.50.1.2, porta 80, con indirizzo IP sorgente 195.35.4.5, porta sorgente 11782Granularità finefine
Granularità grossagrossa
Generalizzazione FEC: Policy based routing
• Ricavare dalle intestazioni del pacchetto la FEC: dest addr.+ sourceadd.+ IP_TOS +... (Policy base routing)
• Utilizzare la FEC per ottenere il next hop
Analizzare tutti i campi che determinano la FEC è molto oneroso se effettuato in tutti i router
• Analisi dei campi necessari solo nei router di accesso alla rete
• Associazione di una label alla FEC nei router di accesso• Istradare in accordo alla label nei router interni alla rete
MPLS: modalità di funzionamento
IGP IGP IGP
IGP IGP
Il nodo in ingresso al dominio MPLS assegna l’etichetta in accordo alla
FEC(Label ImpositionLabel Imposition)
Pacchetto L1
Pacchetto
Classificazione dei pacchetti all’entrata del Dominio MPLS (assegnazione ad una FEC)
Pacchetto L2 Pacchetto L3
I nodi intermedi analizzano I nodi intermedi analizzano solosolo l’intestazione MPLS ed eseguono la l’intestazione MPLS ed eseguono la traslazione di etichetta (traslazione di etichetta (label label switchingswitching))
Pacchetto
Il nodo in uscita dal dominio MPLS rimuove
l’etichetta(Label DispositionLabel Disposition)
Consegna dei pacchetti al Livello 3 all’uscita dal Dominio MPLS
Router MPLS
MPLS: inoltro dei pacchetti
197.26.15.94
195.31.235.78 & 195.31.235.15 sono associati alla FEC
195.31.235.0/24
195.31.235.15
195.31.235.78FEC 195.31.235.0/24
I pacchetti IP arrivano alla rete MPLS e vengono etichettati
195.31.235.78 98
195.31.235.15 98
I pacchetti MPLS arrivano a un nodo intermedio il quale cambia l’etichetta; il pacchetto viene quindi inoltrato al Next-Hop
195.31.235.78 56
195.31.235.15 56R1R1 R2R2 R3R3
Rete MPLS
MPLS non viene implementato nel dominio dei clienti
Architettura di un router MPLS
• L’architettura di un router MPLS (LLabel SSwitching RRouter) è divisa in due distinte componenti – ControlloControllo– Dati (Forwarding) Dati (Forwarding)
LLabel abel SSwitching witching RRouterouter
Componente Componente DatiDati
Componente diComponente di ControlloControllo
= +
Label Switch Router:componente di controllo
Criteri per la definizione Criteri per la definizione delle associazionidelle associazionitra etichette e FECtra etichette e FEC
(label bindings)(label bindings)
Protocollo di Routing IPProtocollo di Routing IP(es. OSPF, IS-IS, BGP, PIM)(es. OSPF, IS-IS, BGP, PIM)
Distribuzione delle Distribuzione delle associazioni tra associazioni tra etichette e FECetichette e FEC
Creazione/aggiornamento delle Tabelle di InstradamentoCreazione/aggiornamento delle Tabelle di InstradamentoGestione delle associazioni etichette-FECGestione delle associazioni etichette-FEC
consigliati
29 64
45
29
1
2
Label Switch Router:componente dati
MPLS: architettura di rete
ATM/FR
ATM/FR
LSRLSR
Edge-LSREdge-LSR
Sito ClienteSito Cliente
SDH
POPPOP
POPPOP
MPLS: tab di routing e gestione etichette
Edge-LSR
29 64
LSR
FTN + LIBFTN + LIBILM + LIBILM + LIB
45
29Pacchetti di livello 3 (non etichettati)
FTN: Fec To NHLFE (Next Hop Label Forwarding Entry)ILM: Incoming Label MapLIB: Label Information Base
Tabelle di Routing IP
MPLS:LIB
FEC Prov.
. . .. . .
LabelLoc.
LabelRem.
6464 2929 172.16.1.4172.16.1.4192.106.248.0/24
172.16.5.270172.16.1.4172.16.1.4
172.16.5.2172.16.5.2
LIBLIB
Ehi tu, 172.16.0.1, guarda che ho associato l’etichetta 4545 alla FEC 195.31.235.0/24195.31.235.0/24. . Vedi di memorizzarlo nella
tua LIB LIB
195.31.235.0/24 175.16.5.2175.16.5.229 45
Label Label 45 45 FEC FEC 195.31.235.0/24195.31.235.0/24
Ehi tu, 175.16.0.1, guarda che ho associato l’etichetta 5050 alla FEC 195.31.235.0/24195.31.235.0/24. . Vedi di memorizzarlo nella
tua LIB LIB
172.16.1.450
Label Label 50
50 FEC FEC 195.31.235.0/24
195.31.235.0/24
172.16.0.1172.16.0.1
IGP
Interfaccia IP172.16.5.2172.16.5.2 Identificativo LSR (una
delle interfacce IP
Ho associato l’etichetta 2929 alla FEC 195.31.235.0/24. 195.31.235.0/24.
Lab 29 ….
LIB (Cisco 3640)
P1# show mpls ldp bindings192.168.0.22/32, rev 53
local binding: label: 24remote binding: lsr: 192.168.1.3:0, label: 25remote binding: lsr: 192.168.1.2:0, label: 22remote binding: lsr: 192.168.0.11:0, label: 27remote binding: lsr: 192.168.0.12:0, label: 34
192.168.0.31/32, rev 31local binding: label: 25remote binding: lsr: 192.168.1.3:0, label: 21remote binding: lsr: 192.168.1.2:0, label: 24remote binding: lsr: 192.168.0.11:0, label: 28remote binding: lsr: 192.168.0.12:0, label: 35
192.168.0.32/32, rev 33local binding: label: 26remote binding: lsr: 192.168.1.3:0, label: 22remote binding: lsr: 192.168.1.2:0, label: 25remote binding: lsr: 192.168.0.11:0, label: 29remote binding: lsr: 192.168.0.12:0, label: 36
FEC
Etichetta locale
Etichette remote
Provenienze
FTN (negli Edge_LSR)
FEC1
FEC2
NHLFENHLFE NHLFENHLFE. . .
NHLFENHLFE NHLFENHLFE. . .
FECn
NHLFENHLFE NHLFENHLFE. . .
(1) (k)FFEC-EC-TTo-o-NNHLFEHLFE
. . .
. . .
. . .
Classificazionein FEC
Multicast/load bal.
ILM (nei LSR)
L1
L2
Ln
IIncoming ncoming LLabel abel MMapap. .
.
Etichettaentrante
NHLFENHLFE NHLFENHLFE. . .
NHLFENHLFE NHLFENHLFE. . .
NHLFENHLFE NHLFENHLFE. . .
(1) (k)
. . .
. . .
Multicast/load bal.
Next Hop Label Forwarding Entry
FEC/Label - Next-Hop (interfaccia di uscita, label)Next-Hop (interfaccia di uscita, label)
- OperazioniOperazioni sulla pila delle etichettesulla pila delle etichette- Swap- Pop- Push
- ((opzionaleopzionale)) - Informazioni per il livello 2 - Modalità di trattamento del pacchetto - . . .
NHLFENHLFE
E adesso come e a chi li inoltro questi pacchetti ?
64
Ehi tu, guarda che le istruzioni per l’inoltro sono contenute nel NHLFE delle tabelle
FTN/ILM
Tabella FTN/ILM
Costruzione ILM
• dinamica: la ILM viene costruita a partire dalla tabella di routing IP presente nel LSR e dalla LIB; in questo caso l’indicazione del Next-Hop proviene dal protocollo di routing adottato dalla rete (OSPF, IS-IS, ecc.).
• esplicita: la ILM viene costruita tramite un protocollo di segnalazione che permette di scrivere la riga corrispondente a ciascuna FEC; in questo caso il Next-Hop viene determinato esplicitamente (da un Operatore o automaticamente) attraverso un protocollo di segnalazione (es. RSVP-TE, CR-LDP, vedi capitolo su “Traffic Engineering”).
P1# show mpls forwarding-tableLocal Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interface 16 Untagged 10.1.1.2/32 0 Se0/0 point2point 17 Pop tag 192.168.0.12/32 0 Fa0/0 172.16.1.12 18 Untagged 172.16.2.0/24 0 Fa0/0 172.16.1.1 19 Untagged 172.16.3.0/24 0 Fa0/0 172.16.1.1 20 Untagged 172.16.12.0/24 0 Fa0/0 172.16.1.1 21 Untagged 172.16.13.0/24 0 Fa0/0 172.16.1.1 22 Untagged 172.16.23.0/24 0 Fa0/0 172.16.1.1 23 Pop tag 192.168.1.1/32 0 Fa0/0 172.16.1.1 24 19 192.168.1.2/32 0 Fa0/0 172.16.1.1 25 20 192.168.1.3/32 0 Fa0/0 172.16.1.1 26 28 192.168.0.21/32 0 Fa0/0 172.16.1.1 27 24 192.168.0.22/32 0 Fa0/0 172.16.1.1 28 25 192.168.0.31/32 0 Fa0/0 172.16.1.1 29 26 192.168.0.32/32 0 Fa0/0 172.16.1.1 30 Untagged 10.10.0.0/24 0 Se0/0 point2point 31 Untagged 10.1.11.0/24 0 Se0/0 point2point 32 Untagged 10.11.0.0/24 0 Se0/0 point2point
Etichetta entrante
Etichetta uscente
FEC Interfaccia uscenteFa=Fast EthernetSe=Seriale
Next-Hop
ILM CISCO 3640
Costruzione ILM (dinamica)
ILMILM
Etichetta NHLFE
2929
52
6464
72
Label: 4545Interfaccia: s0s0Next Hop: 192.168.1.1192.168.1.1operazioni:….operazioni:….Label: 99Interfaccia: s1Next Hop: 192.168.6.7
Label: 2929Interfaccia: e0e0Next Hop: 192.168.5.5192.168.5.5
Label: 44Interfaccia: s0Next Hop: 192.168.1.1
. . . . . .
Rete Dest. Next-Hop
195.31.235.0/24 Interfaccia: s0s0Next Hop: 192.168.1.1192.168.1.1
. . .. . .
192.106.248.0/24 Interfaccia: e0e0Next Hop: 192.168.5.5192.168.5.5
FEC Prov.
195.31.235.0/24 172.16.5.2172.16.5.2172.16.1.4
. . .. . .
EtichettaLoc.
EtichettaRem.
2929 4545
172.16.5.26464 2929 172.16.1.4172.16.1.4192.106.248.0/24
70
50
LIBLIB
Tabella di routing IPTabella di routing IP
Next-Hop Identificativo LSR192.168.1.1
. . .. . .192.168.5.5
172.16.5.2
172.16.1.4
P1#show mpls forwarding-tableP1#show mpls forwarding-table
Local Outgoing Prefix Bytes tag Outgoing Next Hop Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface tag tag or VC or Tunnel Id switched interface
28 30 192.168.0.32/32 876 Se0/1 point2point28 30 192.168.0.32/32 876 Se0/1 point2point
P1#P1#sh ip routesh ip route. . . . . . . . . . . . . . . . O IA O IA 192.168.0.32192.168.0.32 [110/75] via [110/75] via 172.16.13.3172.16.13.3, 2d23h, , 2d23h, Serial0/1Serial0/1
P1#P1#sh mpls ldp neighborsh mpls ldp neighborPeer LDP Ident: Peer LDP Ident: 192.168.1.3192.168.1.3:0; Local LDP Ident 192.168.1.1:0:0; Local LDP Ident 192.168.1.1:0
TCP connection: 192.168.1.3.11006 - 192.168.1.1.646TCP connection: 192.168.1.3.11006 - 192.168.1.1.646State: Oper; Msgs sent/rcvd: 15116/15088; ; DownstreamState: Oper; Msgs sent/rcvd: 15116/15088; ; DownstreamUp time: 1w2dUp time: 1w2dLDP discovery sources:LDP discovery sources: Serial0/1, Src IP addr: 172.16.13.3Serial0/1, Src IP addr: 172.16.13.3
Addresses bound to peer LDP Ident:Addresses bound to peer LDP Ident:
192.168.1.3 172.16.23.3 172.16.3.3 192.168.1.3 172.16.23.3 172.16.3.3 172.16.13.3172.16.13.3
P1#P1#sh mpls ldp bindingssh mpls ldp bindings192.168.0.32/32, rev 40192.168.0.32/32, rev 40
local binding: label: 28local binding: label: 28remote binding: lsr: 192.168.0.12:0, label : 36remote binding: lsr: 192.168.0.12:0, label : 36remote binding: lsr: 192.168.0.11:0, label : 35remote binding: lsr: 192.168.0.11:0, label : 35remote binding: lsr: remote binding: lsr: 192.168.1.3192.168.1.3:0, label : :0, label : 3030
Tabella di routing IP
Elenco delle interfacce di
un LSR remoto
LIB
ILM
Operazioni sulle etichette
64 8888… 64 9999…
64 8888… 64 88… 99
64 8888… 64 99… 67
swap
pop
push
X
Rimpiazza 88 con 99
Elimina 99
Rimpiazza 88 con 99e inserisci 67
Label Switched Path
45
29
54
67
58
79R[i]
R[u]R[1]
R[2]
R[3]
R[4]
LSP:• Hop To Hop• Esplicito (RSVP-TE; CR-LDP)
Limiti del routing IP convenzionale e dell’LSP Hop to Hop
Ra
Rb
Percorso Ra R3
Percorso Rb R3
Percorso Sottoutilizzato
1,5 Mbit/s
1,5 Mbit/s
Congestione !Congestione !
R1
R2
R3
R4 R5
Rete195.31.235.0/24
LSP Nidificati
29 55
29 45 29 35
19
29R[i]
R[u]
R[2]
R[3]
R[4]
72
swap
push
pop
Un LSP di livello m (m>1) e’ una sequenza di LSR - Che inizia con un LSR di ingresso che inserisce l’m-esima label della pila-I cui router intermedi eseguono la commutazione di etichetta sulla
etichetta aggiunta-Che termina con un LSR di uscita dove la decisione di inoltro e’ basata
sull’etichetta di livelli m-1 (o sull indirizzo IP se M=1)
Aggregazione indirizzi IP (CIDR):annunci delle reti/etichette
195.31.40.0/24195.31.40.0/24
195.31.41.0/24195.31.41.0/24195.31.40.0/23195.31.40.0/23
Annunciaticome
Rete =Rete = 195.31.40.0/24 195.31.40.0/24Etichetta =Etichetta = 24 24
Rete =Rete = 195.31.41.0/24 195.31.41.0/24Etichetta =Etichetta = 48 48
Rete =Rete = 195.31.40.0/23 195.31.40.0/23Etichetta =Etichetta = POP POP
Punto di aggregazione/disaggregazionedei prefissi
LSR-BLSR-B
LSR-ALSR-A
LSR-CLSR-CLSR-DLSR-D
Rete =Rete = 195.31.40.0/23 195.31.40.0/23Etichetta =Etichetta = 44 44
Aggregazione indirizzi IP (CIDR): inoltro pacchetti
Terminazione dell’LSP
Lookup alivello 3
LSR-BLSR-B
LSR-ALSR-A
LSR-CLSR-CLSR-DLSR-D
4444195.31.40.1195.31.40.1 195.31.40.1195.31.40.1
2424195.31.40.1195.31.40.1
XX
POP
4444195.31.41.195.31.41.11 XX 195.31.41.195.31.41.
11195.31.41.195.31.41.
11 4848
195.31.40.0/24195.31.40.0/24
195.31.41.0/24195.31.41.0/24195.31.40.0/23195.31.40.0/23
Annunciaticome
Egress-Targeted Label Assignment(LSP basati su edge LSR di uscita)
L’LSR di ingresso dell’LSP sa che le due FEC devono seguire lo stesso LSP fino al LSR R[u]
Le due FEC vengono aggregate; viene utilizzato Le due FEC vengono aggregate; viene utilizzato lo stesso LSP e quindi ai pacchetti viene lo stesso LSP e quindi ai pacchetti viene associata una unica etichettaassociata una unica etichetta
Rete MPLSRete MPLS
190.30.20.10195.35.25.15
195.35.25.15 98 190.30.20.10 98
195.35.25.0/24
190.30.20.0/24
RR[[ii]]
RR[[uu]]
Etichette
Pacchetto MPLS consegnato al livello 2 (Eth., ATM, F.R., PPP, ecc.)
Livello 11
. . .Pacchetto/Trama
Livello 22 Livello mm
LabelExpTTL S
8 3 201
Trasporto dei pacchetti MPLS su trama
Liv. fisico
Liv. 2
Pacchetto
MPLS
Liv. fisico
Liv. 2
Pacchetto
MPLS
Liv. fisico
Liv. 2
Pacchetto
MPLS
MPLS Pacch. MPLS Pacch. MPLS Pacch.
MPLS Pacch. H 2 T 2 MPLS Pacch. H 2 T 2
H 2
T 2
Header Livello 2
Trailer Livello 2
Trasporto dei pacchetti MPLS su ATM
Liv. fisico
ATM
MPLS
AAL5
Liv. fisico
ATM
Liv. fisico
ATM
MPLS
AAL5
64 99
64 36
Etich. NHLFE
36 Etich. 45Int. 1
… …
… …
64 0
VPI/VCI = 0/45 VPI/VCI = 0/55
Etich. NHLFE
45 Etich. 55Int. 2
… …
… …
Int.
1
Etich. NHLFE
55 Etich. 99Int. 2
… …
… …
Int.
1
RR[3][3]RR[1][1]RR[2][2]
ILM
ILMILM
Idetificazione del tipo di protocollo trasportato
• Il campo protocol del livello 2 indica “MPLS”
• MPLS non ha un campo “protocol”
• A ciascun tipo di protocollo trasportato viene dedicato un set di etichette
Distribuzione delle associazioni FEC/Etichette
Possibili opzioni:incapsulare le etichette nei messaggi di protocolli di
routing esistentiutilizzare uno specifico protocollo
LDP: Label Distribution ProtocolCR_LDPRVSP_TE
Carring Label Information in BGP-4
LSP Esplicito
Modalità di distribuzione e mantenimento delle associazioni
Diverse modalità di distribuzione in accordo a:•Direzione della distribuzione•A quali LSR inviare le associazioni•Quando inviare le associazioni
Diverse modalità di mantenimento delle associazioni nella LIB•Mantenere nella LIB tutte le associazioni•Mantenere nella LIB le associazioni necessarie per l’inoltro dei pacchetti
Direzione della distribuzione : modalità downstream/upstream
R[1]R[1]
R[2]R[2]
Distribuzione FEC: 195.31.235.0/24
Etichetta: 80
Associazione localeFEC: 195.31.235.0/24
Etichetta: 80
Pacchetto 80
R[1]R[1]
R[2]R[2]
R[2]R[2]
R[3]R[3]
DistribuzioneFEC: 195.31.235.0/24
Etichetta: 80
Associazione localeFEC: 195.31.235.0/24
Etichetta: 80
(a): downstream
Pacchetto 80
R[2]R[2]
R[3]R[3]
(b): upstream
R[1]R[1]
R[2]R[2]
R[3]R[3]
195.31.235.0/24
Modalità downstream
Pacchetto 35Pacchetto 80
R[1]R[1]
R[2]R[2]
R[3]R[3]
R[4]R[4]
Pacchetto 72
195.31.235.0/24
(b)
R[1]R[1]
R[2]R[2]
R[3]R[3]
R[4]R[4]
DistribuzioneFEC: 195.31.235.0/24
Etichetta: 35
DistribuzioneFEC: 195.31.235.0/24
Etichetta: 72
Distribuzione FEC: 195.31.235.0/24
Etichetta: 80
Associazione localeFEC: 195.31.235.0/24
Etichetta: 35
Associazione localeFEC: 195.31.235.0/24
Etichetta: 72
Associazione localeFEC: 195.31.235.0/24
Etichetta: 80
195.31.235.0/24
(a)
LSR 1LSR 1 LSR 2LSR 2
Ehi tu, guarda che mi serve una etichetta per la FEC 195.31.235.0/24
Associazione
Richiesta
A quali LSR inviare le associazioni? Distribuzione con richiesta
Downstream on demand
195.31.235.0/24
Distribuzione senza richiesta
LSR 1LSR 1 LSR 2LSR 2
Associazione
Ehi tu, guarda che ti stò inviando una etichetta per la FEC 195.31.235.0/24
Downstream unsolecited
195.31.235.0/24
Controllo:
- indipendente: l’annuncio puo’ essere inviato in qualsiasi momento;
- ordinato: l’annuncio puo’ essere inviato solo dopo aver ricevuto l’annuncio
da parte degli LSR next hop.
Quando inviare le associazioni
R[1]R[1]
R[2]R[2]R[3]R[3]
Richiesta: FEC 50.1/16(1)
Richiesta: FEC 50.1/16
(3)
Etichetta: 40
(5)
Etichetta : 50
(7)
(2)
Allocazione Etichetta(50) per FEC 50.1/16
(4)
Allocazione Etichetta(50)
per FEC 40.1/16
(6)
Inserimento nella ILM(8)
Inserimento nella ILM
Downstream on-demand con controllo ordinato
Esempio: Controllo ordinato
R[1]R[1]
R[2]R[2]R[3]R[3]
Richiesta: FEC 50.1/16(1)
Etichetta: 40
(5)
Richiesta: FEC 50.1/16
(3)
Etichetta : 50
(3)
(2)
Allocazione Etichetta(50) per FEC 50.1/16
(6)
Inserimento nella ILM
(4)
Allocazione Etichetta(40)
per FEC 50.1/16
(4)
Inserimento nella ILM
Downstream on-demand con controllo indipendente
Esempio: Controllo indipendente
1
Etich.entrante
I/Fuscita
Etich.uscente
5050 1 4040
R[1]R[1]
R[2]R[2]
R[3]R[3]1
1
Dest.I/F
uscitaEtich.
uscente
50.1/1650.1/16 1 5050
Etich.entrante
I/Fuscita
Dest.
4040 1 50.1/1650.1/16
1
ILM
ILM
FTN
50.1/16
50
40
Esempio: LSP
Modalità di mantenimento nella LIB
Modalita:- Liberale (Tutte le associazioni nella LIB)- Conservativa (Solo le associazioni ricevute dai Next Hop)
Compatibilità tra le varie opzioni
Downstream unsolecited + mod indipendente + mantenimento liberale
Downstream on-demand + mod ordinata + mantenimento conservativo
Label Distribution Protocol
Meccanismo di discoveryUtilizzo di TCP (UDP per Hello) con porta 646 Uso codifica TLV
Etichetta 94 Etichetta 94 FEC FEC 195.31.235.0/24/24LSR ALSR A LSR BLSR B
Rete MPLS LSR BLSR B LSR ALSR A
Sessione LDPSessione LDP
Sessione LDPSessione LDP
Fig. 3.5 (a)
Etichetta 94 Etichetta 94 FEC FEC 195.31.235.0/24/24
Due LSR che utilizzano il protocollo LDP per lo scambio di associazioni
etichetta-FEC vengono detti “LDP Peers” e si parla di “sessione LDP”
esistente tra i due LSR per lo scambio delle associazioni.
Usato per i LSP nidificati!
Messaggi LDP
SessioneSessione
INITIALIZATIONINITIALIZATION KEEPALIVEKEEPALIVE
DiscoveryDiscovery
HELLOHELLO
AnnunciAnnunci
ADDRESSADDRESS ADDRESS WITHDRAWADDRESS WITHDRAW LABEL MAPPINGLABEL MAPPING LABEL REQUESTLABEL REQUEST LABEL ABORT REQUEST LABEL ABORT REQUEST LABEL WITHDRAWLABEL WITHDRAW LABEL RELEASELABEL RELEASE
NotificaNotifica
NOTIFICATIONNOTIFICATION
Meccanismo di discovery
LSR ALSR A LSR BLSR B
LSR DLSR D
ReteMPLS
Hello
Hello
HelloHello HelloHello
HelloHello
LSR CLSR C
BaseBase
EstesoEsteso
Meccanismo base: utilizza IP address 224.0.0.2 e Hold Timer 15 s.
Meccanismo esteso: utilizza indirizzo IP del router target e Hold Timer 45 s.
Sessioni LDP: apertura connessione TCP
SYN, Seq=m, ACK=n+1
ACK=m+1
SYN, Seq=n
LSR 1LSR 1(attivo)(attivo)
LSR 2LSR 2(passivo)(passivo)
Ehi tu, guarda che per aprire la sessione LDP dobbiamo prima stabilire una connessione TCP
SE IP1>IP2 LSR1 attivo
Sessioni LDP: inizializzazione sessione
LSR 1LSR 1 LSR 2LSR 2
Ehi tu, guarda che dobbiamo metterci d’accordo sui parametri della
sessione LDP
Initialization
Initialization
Versione protocolloModalità di distribuzioneKeepalive TimerSpazio VPI/VCI (ATM)
Sessioni LDP: KeepAlive
LSR 1LSR 1 LSR 2LSR 2LDP-PDU/Keepalive
LDP-PDU/Keepalive
Keepalive Timer Keepalive Timer
HoldTimer= K * KeepAlive Timer K=3Allo scadere di HoldTimer LSR chiude la connessione TCP
Annunci LDP: Address
IPIPIPIP TCPTCPTCPTCP
Porta TCP dest.: 646646
HHHH ADDRESSADDRESSADDRESSADDRESS
Ehi tu, guarda che ti stò inviando un messaggio di ADDRESSADDRESS per comu-nicarti gli indirizzi di tutte le mie interfacce
Annunci LDP: Label Mapping
IPIPIPIP TCPTCPTCPTCP
Porta TCP dest.: 646646
HHHH LABEL MAPPINGLABEL MAPPINGLABEL MAPPINGLABEL MAPPING
Ehi tu, guarda che ti stò inviando un messaggio di LABEL MAPPINGLABEL MAPPING per comunicarti che ho associato l’etichetta 35 alla FEC 195.31.235.0/24
LSR DownStrLSR DownStr LSR UpStrLSR UpStr
Annunci LDP: Label Request
LABEL REQUESTLABEL REQUESTLABEL REQUESTLABEL REQUEST HHHH IPIPIPIPTCPTCPTCPTCP
Porta TCP dest.: 646646
Ehi tu, guarda che ti stò inviando un messaggio di LABEL REQUESTLABEL REQUEST perché mi serve una etichetta per la FEC 195.31.235.0/24
LSR DownStrLSR DownStr LSR UpStrLSR UpStr
Annunci LDP: Label Withdraw
IPIPIPIP TCPTCPTCPTCP
Porta TCP dest.: 646646
HHHH LABEL WITHDRAWLABEL WITHDRAWLABEL WITHDRAWLABEL WITHDRAW
Ehi tu, ritiro quanto fatto in precedenza per la FEC 195.31.235.0/24; devi cancellare l’associazione FEC-etichetta che ti avevo inviato
LSR DownStrLSR DownStr LSR UpStrLSR UpStr
Annunci LDP: Label Release
LSR DownStrLSR DownStr LSR UpStrLSR UpStr
LABEL RELEASELABEL RELEASELABEL RELEASELABEL RELEASE
Porta TCP dest.: 646646
HHHH IPIPIPIPTCPTCPTCPTCP
Ehi tu, guarda che ti stò inviando un messaggio di LABEL RELEASELABEL RELEASE perché mi è cambiato il Next-Hop per la FEC 195.31.235.0/24 e quindi l’associazione FEC- etichetta che mi hai inviato non mi serve più
IPIPIPIPTCP/UDPTCP/UDPTCP/UDPTCP/UDPMSG 1MSG 1MSG 1MSG 1 HHHHMSG 2MSG 2MSG 2MSG 2MSG nMSG nMSG nMSG n
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version | PDU Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LDP Identifier | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |U| Message Type | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | Mandatory Parameters | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | Optional Parameters | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
UDP solo per i messaggi “Hello”
++
LDP PDULDP PDU
LDP - PDU
Identificativo LSRIdentificativo LSRIdentificativo LSRIdentificativo LSR Spazio di Spazio di etichetteetichette
Spazio di Spazio di etichetteetichette
4 byte 2 byte
192.168.0.11 : 0
LDP Identifier
ATMATM
Eth.
Ser.
Eth. Eth.
R[2]R[1]
R[4]R[3]
R[5]
Hello R1:0 Hello R1:1
Hello R1:0 Hello R3:0Hello R4:0
Hello R5:0 Hello R2:4
LDP Identifier
+---------------------------------------------------------+ +---------------------------------------------------------+ | Address Family Identifier (2 octets) | | Address Family Identifier (2 octets) | +---------------------------------------------------------+ +---------------------------------------------------------+ | Subsequent Address Family Identifier (1 octet) | | Subsequent Address Family Identifier (1 octet) | +---------------------------------------------------------+ +---------------------------------------------------------+ | Length of Next Hop Network Address (1 octet) | | Length of Next Hop Network Address (1 octet) | +---------------------------------------------------------+ +---------------------------------------------------------+ | Network Address of Next Hop (variable) | | Network Address of Next Hop (variable) | +---------------------------------------------------------+ +---------------------------------------------------------+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +---------------------------------------------------------+ +---------------------------------------------------------+ | Network Layer Reachability Information (variable) | | Network Layer Reachability Information (variable) | +---------------------------------------------------------++---------------------------------------------------------+
+---------------------------+ +---------------------------+ | Length (1 octet) | | Length (1 octet) | +---------------------------+ +---------------------------+ | Label (3 octets) | | Label (3 octets) | +---------------------------++---------------------------+. . . . . . . . . . . . . . .. . . . . . . . . . . . . . .+---------------------------+ +---------------------------+ | Prefix (variable) | | Prefix (variable) | +---------------------------++---------------------------+
Attributo “MP_REACH_NLRI”
Distribuzione tramite BGP
Integrazione DiffServ-MPLS
N flussi Dominio DiffServ/MPLSEdge-LSR
LSR
Edge-LSR
DiffServaggregazione dei flussi all’ingressoaggregazione dei flussi all’ingressopiù flussi associati con una classe più flussi associati con una classe (identificata dal DSCP)(identificata dal DSCP)
MPLSaggregazione dei flussi all’ingressoaggregazione dei flussi all’ingressopiù flussi associati con una FEC più flussi associati con una FEC (identificata da una sequenza di (identificata da una sequenza di etichette)etichette)
Integrazione DiffServ-MPLS
DiffServ: modello per la fornitura di QoS IP
MPLS: Tecnica di inoltro pacchetti
MPLS Support for DiffServ: rfc 3270•DSCP nel pacchetto IP; •LSR analizzano solo intestazione MPLS
PHB deducibile da •Campo Label•Campo Exp
LabelExpTTL S
8 3 201
Integrazione DiffServ-MPLS
• L-LSP
Un LSP per ciascuna Classe di Servizio:
Il PHB viene dedotto dal valore della Label
(campo Exp per determinare livello priorita’ di scarto )
• E-LSP
Un unico LSP per tutte le Classi di Servizio:
Il PHB viene dedotto dal valore del campo Exp
E-LSP
Dominio DiffServ/MPLS
PHB 2
PHB 1
Campo “EXP”
1 L1 2 L1
. . .
ILMILM
Label NHLFE
L1 Label: L2L2Interfaccia: s0s0Next Hop: p.to – p.to
Tipo LSP: E-LSPMappa EXPPHB. . .
. . . . . .
EXP L1
s0
EXP PHB
0
. . .. . .1
Best-Effort
AF11
E-LSP
Dominio DiffServ/MPLS
AF11
EF
000 L1
Campo “EXP”
AF12
001 010 L2 L2
L1: etichetta per l’L-LSP che supporta il PHB EFL2: etichetta per l’L-LSP che supporta la PSC AF1x
L-LSP
LSR DiffServ
Informazioni aggiuntive nel Next Hop Label Forwarding Entry:-Tipo di LSP (E-LSP; L-LSP)- PHB supportati-Corrispondenza tra l’informazione di classificazione nel pacchetto entrante e un PHB-Modalità di codifica dell’informazione di classificazione nel pacchetto uscente
D2
D1 D3
x yx x
DSCP=“x” DSCP=“x”DSCP tunnel=“y”
Tunnel DiffServ
Background: Tunnel DiffServ
LSP vs Tunnel DiffServ
Un LSP ha caratteristiche analoghe ad un Tunnel:
• LSR intermedi al LSP lavorano solo sull’ elemento esterno dell’intestazione MPLS; l’informazione DiffServ del pacchetto non viene considerata
• LSP unidirezionali• L’informazione DiffServ contenuta nell’elemento
esterno dell’intestazione MPLS (EXP) puo’ essere variata dai router intermedi a causa di riclassificazione
Rete MPLS
D1 D3
x L1x x
DSCP=“x” DSCP=“x”Intestazione MPLS
LSP
x L2
PHB determinato sulla base del contenuto dell’elemento esterno
dell’intestazione MPLS
LSP: modello PIPE
LSP: modello short PIPE
Rete MPLS
D1 D3
x L1x x
DSCP=“x” DSCP=“x”Intestazione MPLS
LSP
x
PHB determinato sulla base del contenuto del campo DSCP del
pacchetto IP