MPLS-LDP-RSVP-TE protocol difference between JUNOS and CISCO
24.11 2020 | by massimilianoMPLS-LDP-RSVP-TE protocol difference between JUNOS and CISCO LDP Label distribution protocol LDP (RFC 5036) è un protocollo di […]
https://www.ingegnerianetworking.com/wp-content/uploads/2020/11/junos-cisco-ex-design-mpls-401.PNG
MPLS-LDP-RSVP-TE protocol difference between JUNOS and CISCO
LDP Label distribution protocol
LDP (RFC 5036) è un protocollo di segnalazione (non è un protocollo di routing) con il compito di distribuire un label-mapping ed in grado di poter creare i seguenti LSP (label switch path):
– MP2P: Multipoint to Point (from any to one) con LSP di tipo unidirezionali
– P2MP: Point to Multipoint (from one to any) con LSP di tipo unidirezionale
– MP2MP: Multipoint to Multipoint (from any to any) con LSP non di tipo unidirezionale
Viceversa da RSVP, LDP non crea LSP di tipo P2P (Point to Point) e non implementa funzionalità di TE (Traffic Engineering);
Traffico unicast quindi, viene trasportato generalmente in un LSP di tipo MP2P dove parte da Ingress Router Edge (PE head-end) per arrivare ad un dato Egress Router Edge (PE tail-end).
Si riporta per completezza una configurazione base sia Junos che Cisco:
PE1 JUNOS | PE3 CISCO |
set interfaces em0 unit 0 family mpls set interfaces em1 unit 0 family inet address 10.0.0.13/30 set interfaces em1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.255.11/32 ! set routing-options router-id 10.255.255.11 ! set protocols mpls interface em0.0 set protocols mpls interface em1.0 ! set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface em0.0 set protocols ospf area 0.0.0.0 interface em1.0 ! set protocols ldp track-igp-metric set protocols ldp interface em0.0 set protocols ldp interface em1.0 |
ip cef mpls label protocol ldp mpls ldp router-id Loopback0 ! interface Loopback0 ip address 10.255.255.33 255.255.255.255 ip ospf 1 area 0 ! interface GigabitEthernet0/0 ip address 10.0.0.17 255.255.255.252 ip ospf 1 area 0 mpls ip ! interface GigabitEthernet0/1 ip address 10.0.0.14 255.255.255.252 ip ospf 1 area 0 mpls ip ! router ospf 1 router-id 10.255.255.33 ! |
Il comando track-igp-metric accoppia LDP ed IGP ad utilizzare lo stesso valore di metrica (route metric default LDP = 1) ed è una best practice per loop avoidance.
E’ importante poi configurare il router-ID con lo stesso valore della loopback che deve essere raggiungibile altrimenti la sessione LDP non può attivarsi.
E un’architettura di test lab:
Partendo dallo stato fase 0 in cui abbiamo attivato la sola configurazione ospf / mpld / ldp, possiamo verificare la condizione di LDP Discovery ed LDP Session:
LDP Discovery and Session
Appena LDP è configurato per-interface un processo di discovery inizia; pertanto i router su cui è abilitato LDP trasmettono e ricevono LDP Hello incapsulati come di seguito:
1) in UDP header con source e destination port 646
2) in IPv4 header con TTL=1 e destination address 224.0.0.2 (all-router multicast address)
Questi pacchetti hanno il solo compito di creare adiacenze (non sono ruotabili) tra neighbors direttamente connessi.
NOTA: un secondo metodo per stabilire adiacenze conosciuto come extended-discovery or targeted-LDP permette di creare neighborship tra peer remoti multihop percui gli hello message sono unicast e con TTL>1
Verifica LDP hello adjacencies (UDP):
root@PE1>; show ldp neighbor
Address Interface Label space ID Hold time
10.0.0.2 em0.0 10.255.255.1:0 12
10.0.0.14 em1.0 10.255.255.33:0 14
root@PE1>; show ldp neighbor extensive
Address Interface Label space ID Hold time
10.0.0.2 em0.0 10.255.255.1:0 12
Transport address: 10.255.255.1, Configuration sequence: 1
Up for 00:24:10
Reference count: 1
Hold time: 15, Proposed local/peer: 15/15
Hello flags: none
Neighbor types: discovered
Address Interface Label space ID Hold time
10.0.0.14 em1.0 10.255.255.33:0 14
Transport address: 10.255.255.33, Configuration sequence: 0
Up for 00:25:46
Reference count: 1
Hold time: 15, Proposed local/peer: 15/15
Hello flags: none
Neighbor types: discovered
Transport address significa che LDP discovery innesca (trigger) la creazione di una sessione LDP-over-TCP tra ogni coppia di neighboring; l’indirizzo endpoint di queste sessioni sono precisamente il transport-address encoded in UDP Hellos message.
root@PE1>; show system connections | match “proto|646”
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 10.255.255.11.59789 10.255.255.1.646 ESTABLISHED
tcp4 0 0 10.255.255.11.646 10.255.255.33.62370 ESTABLISHED
tcp4 0 0 *.646 *.* LISTEN
udp4 0 0 *.646 *.*
Verifica LDP Session (TCP):
root@PE1>; show ldp session
Address State Connection Hold time
10.255.255.1 Operational Open 21
10.255.255.33 Operational Open 21
root@PE1>; show ldp session extensive
Address: 10.255.255.1, State: Operational, Connection: Open, Hold time: 21
Session ID: 10.255.255.11:0–10.255.255.1:0
Next keepalive in 1 seconds
Active, Maximum PDU: 4096, Hold time: 30, Neighbor count: 1
Neighbor types: discovered
Keepalive interval: 10, Connect retry interval: 1
Local address: 10.255.255.11, Remote address: 10.255.255.1
Up for 00:38:30
Last down 00:38:31 ago; Reason: connection error
Capabilities advertised: none
Capabilities received: none
Protection: disabled
Local – Restart: disabled, Helper mode: enabled
Remote – Restart: disabled, Helper mode: enabled
Local maximum neighbor reconnect time: 120000 msec
Local maximum neighbor recovery time: 240000 msec
Nonstop routing state: Not in sync
Next-hop addresses received:
10.0.0.2
10.0.0.5
Queue depth: 0
Message type Total Last 5 seconds
Sent Received Sent Received
Initialization 1 1 0 0
Keepalive 230 230 0 1
Notification 0 0 0 0
Address 1 1 0 0
Address withdraw 0 0 0 0
Label mapping 10 11 0 0
Label request 0 0 0 0
Label withdraw 0 1 0 0
Label release 1 0 0 0
Label abort 0 0 0 0
Address: 10.255.255.33, State: Operational, Connection: Open, Hold time: 27
Session ID: 10.255.255.11:0–10.255.255.33:0
Next keepalive in 0 seconds
Passive, Maximum PDU: 4096, Hold time: 30, Neighbor count: 1
Neighbor types: discovered
Keepalive interval: 10, Connect retry interval: 1
Local address: 10.255.255.11, Remote address: 10.255.255.33
Up for 00:40:07
Capabilities advertised: none
Capabilities received: none
Protection: disabled
Local – Restart: disabled, Helper mode: enabled
Remote – Restart: disabled, Helper mode: disabled
Local maximum neighbor reconnect time: 120000 msec
Local maximum neighbor recovery time: 240000 msec
Nonstop routing state: Not in sync
Next-hop addresses received:
10.0.0.14
10.255.255.33
10.0.0.17
Queue depth: 0
Message type Total Last 5 seconds
Sent Received Sent Received
Initialization 1 1 0 0
Keepalive 239 276 0 0
Notification 0 0 0 0
Address 1 1 0 0
Address withdraw 0 0 0 0
Label mapping 10 18 0 0
Label request 0 0 0 0
Label withdraw 0 0 0 0
Label release 0 0 0 0
Label abort 0 0 0 0
From P1 Junos point of view:
Adjacencies:
root@P1>; show ldp neighbor extensive
Address Interface Label space ID Hold time
10.0.0.1 em0.0 10.255.255.11:0 12
Transport address: 10.255.255.11, Configuration sequence: 1
Up for 00:48:48
Reference count: 1
Hold time: 15, Proposed local/peer: 15/15
Hello flags: none
Neighbor types: discovered
Address Interface Label space ID Hold time
10.0.0.6 em1.0 10.255.255.2:0 13
Transport address: 10.255.255.2, Configuration sequence: 1
Up for 00:48:48
Reference count: 1
Hold time: 15, Proposed local/peer: 15/15
Hello flags: none
Neighbor types: discovered
Session:
root@P1>; show ldp session extensive
Address: 10.255.255.2, State: Operational, Connection: Open, Hold time: 24
Session ID: 10.255.255.1:0–10.255.255.2:0
Next keepalive in 4 seconds
Passive, Maximum PDU: 4096, Hold time: 30, Neighbor count: 1
Neighbor types: discovered
Keepalive interval: 10, Connect retry interval: 1
Local address: 10.255.255.1, Remote address: 10.255.255.2
Up for 00:51:02
Capabilities advertised: none
Capabilities received: none
Protection: disabled
Local – Restart: disabled, Helper mode: enabled
Remote – Restart: disabled, Helper mode: enabled
Local maximum neighbor reconnect time: 120000 msec
Local maximum neighbor recovery time: 240000 msec
Nonstop routing state: Not in sync
Next-hop addresses received:
10.0.0.6
10.0.0.9
Queue depth: 0
Address: 10.255.255.11, State: Operational, Connection: Open, Hold time: 24
Session ID: 10.255.255.1:0–10.255.255.11:0
Next keepalive in 4 seconds
Passive, Maximum PDU: 4096, Hold time: 30, Neighbor count: 1
Neighbor types: discovered
Keepalive interval: 10, Connect retry interval: 1
Local address: 10.255.255.1, Remote address: 10.255.255.11
Up for 00:51:47
Capabilities advertised: none
Capabilities received: none
Protection: disabled
Local – Restart: disabled, Helper mode: enabled
Remote – Restart: disabled, Helper mode: enabled
Local maximum neighbor reconnect time: 120000 msec
Local maximum neighbor recovery time: 240000 msec
Nonstop routing state: Not in sync
Next-hop addresses received:
10.0.0.1
10.0.0.13
Queue depth: 0
Possiamo vedere ora la stessa cosa dal punto di vista CISCO:
Verifica LDP hello adjacencies (UDP):
PE3#show mpls ldp discovery
Local LDP Identifier:
10.255.255.33:0
Discovery Sources:
Interfaces:
GigabitEthernet0/0 (ldp): xmit/recv
LDP Id: 10.255.255.3:0
GigabitEthernet0/1 (ldp): xmit/recv
LDP Id: 10.255.255.11:0
PE3#
PE3#show mpls ldp discovery detail
Local LDP Identifier:
10.255.255.33:0
Discovery Sources:
Interfaces:
GigabitEthernet0/0 (ldp): xmit/recv
Enabled: Interface config
Hello interval: 5000 ms; Transport IP addr: 10.255.255.33
LDP Id: 10.255.255.3:0
Src IP addr: 10.0.0.18; Transport IP addr: 10.255.255.3
Hold time: 15 sec; Proposed local/peer: 15/15 sec
Reachable via 10.255.255.3/32
Password: not required, none, in use
Clients: IPv4
GigabitEthernet0/1 (ldp): xmit/recv
Enabled: Interface config
Hello interval: 5000 ms; Transport IP addr: 10.255.255.33
LDP Id: 10.255.255.11:0
Src IP addr: 10.0.0.13; Transport IP addr: 10.255.255.11
Hold time: 15 sec; Proposed local/peer: 15/15 sec
Reachable via 10.255.255.11/32
Password: not required, none, in use
Clients: IPv4
PE3#
Verifica LDP Session (TCP):
PE3#show mpls ldp neighbor
Peer LDP Ident: 10.255.255.3:0; Local LDP Ident 10.255.255.33:0
TCP connection: 10.255.255.3.646 – 10.255.255.33.53156
State: Oper; Msgs sent/rcvd: 108/110; Downstream
Up time: 01:15:12
LDP discovery sources:
GigabitEthernet0/0, Src IP addr: 10.0.0.18
Addresses bound to peer LDP Ident:
10.255.255.3 10.0.0.18 10.0.0.21
Peer LDP Ident: 10.255.255.11:0; Local LDP Ident 10.255.255.33:0
TCP connection: 10.255.255.11.646 – 10.255.255.33.62370
State: Oper; Msgs sent/rcvd: 475/408; Downstream
Up time: 01:06:04
LDP discovery sources:
GigabitEthernet0/1, Src IP addr: 10.0.0.13
Addresses bound to peer LDP Ident:
10.0.0.1 10.0.0.13
PE3#
PE3#show mpls ldp neighbor detail
Peer LDP Ident: 10.255.255.3:0; Local LDP Ident 10.255.255.33:0
TCP connection: 10.255.255.3.646 – 10.255.255.33.53156
Password: not required, none, in use
State: Oper; Msgs sent/rcvd: 111/113; Downstream; Last TIB rev sent 37
Up time: 01:17:50; UID: 2; Peer Id 1;
LDP discovery sources:
GigabitEthernet0/0; Src IP addr: 10.0.0.18
holdtime: 15000 ms, hello interval: 5000 ms
Addresses bound to peer LDP Ident:
10.255.255.3 10.0.0.18 10.0.0.21
Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab
Capabilities Sent:
[Dynamic Announcement (0x0506)]
[Typed Wildcard (0x050B)]
Capabilities Received:
[Dynamic Announcement (0x0506)]
[Typed Wildcard (0x050B)]
Peer LDP Ident: 10.255.255.11:0; Local LDP Ident 10.255.255.33:0
TCP connection: 10.255.255.11.646 – 10.255.255.33.62370
Password: not required, none, in use
State: Oper; Msgs sent/rcvd: 493/423; Downstream; Last TIB rev sent 37
Up time: 01:08:42; UID: 3; Peer Id 0;
LDP discovery sources:
GigabitEthernet0/1; Src IP addr: 10.0.0.13
holdtime: 15000 ms, hello interval: 5000 ms
Addresses bound to peer LDP Ident:
10.0.0.1 10.0.0.13
Peer holdtime: 30000 ms; KA interval: 10000 ms; Peer state: estab
Capabilities Sent:
[Dynamic Announcement (0x0506)]
[Typed Wildcard (0x050B)]
Capabilities Received:
[None]
PE3#
From P3 Cisco point of view:
Adjacencies:
P3#show mpls ldp discovery detail
Local LDP Identifier:
10.255.255.3:0
Discovery Sources:
Interfaces:
GigabitEthernet0/0 (ldp): xmit/recv
Enabled: Interface config
Hello interval: 5000 ms; Transport IP addr: 10.255.255.3
LDP Id: 10.255.255.33:0
Src IP addr: 10.0.0.17; Transport IP addr: 10.255.255.33
Hold time: 15 sec; Proposed local/peer: 15/15 sec
Reachable via 10.255.255.33/32
Password: not required, none, in use
Clients: IPv4
GigabitEthernet0/1 (ldp): xmit/recv
Enabled: Interface config
Hello interval: 5000 ms; Transport IP addr: 10.255.255.3
LDP Id: 10.255.255.4:0
Src IP addr: 10.0.0.22; Transport IP addr: 10.255.255.4
Hold time: 15 sec; Proposed local/peer: 15/15 sec
Reachable via 10.255.255.4/32
Password: not required, none, in use
Clients: IPv4
P3#
Session:
P3#show mpls ldp neighbor detail
Peer LDP Ident: 10.255.255.33:0; Local LDP Ident 10.255.255.3:0
TCP connection: 10.255.255.33.53156 – 10.255.255.3.646
Password: not required, none, in use
State: Oper; Msgs sent/rcvd: 121/119; Downstream; Last TIB rev sent 39
Up time: 01:24:43; UID: 1; Peer Id 0;
LDP discovery sources:
GigabitEthernet0/0; Src IP addr: 10.0.0.17
holdtime: 15000 ms, hello interval: 5000 ms
Addresses bound to peer LDP Ident:
10.0.0.14 10.255.255.33 10.0.0.17
Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab
Capabilities Sent:
[Dynamic Announcement (0x0506)]
[Typed Wildcard (0x050B)]
Capabilities Received:
[Dynamic Announcement (0x0506)]
[Typed Wildcard (0x050B)]
Peer LDP Ident: 10.255.255.4:0; Local LDP Ident 10.255.255.3:0
TCP connection: 10.255.255.4.57530 – 10.255.255.3.646
Password: not required, none, in use
State: Oper; Msgs sent/rcvd: 119/117; Downstream; Last TIB rev sent 39
Up time: 01:24:24; UID: 2; Peer Id 1;
LDP discovery sources:
GigabitEthernet0/1; Src IP addr: 10.0.0.22
holdtime: 15000 ms, hello interval: 5000 ms
Addresses bound to peer LDP Ident:
10.0.0.25 10.0.0.22 10.255.255.4
Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab
Capabilities Sent:
[Dynamic Announcement (0x0506)]
[Typed Wildcard (0x050B)]
Capabilities Received:
[Dynamic Announcement (0x0506)]
[Typed Wildcard (0x050B)]
P3#
LDP Label Mapping
Appena una coppia di neighbour stabilisce una sessione LDP comincia uno scambio di label mapping che associa una determinata IP Prefix ad una Label MPLS; questa associazione forma il Label Information Base (LIB) in ogni router
IP Prefix è corrispondente ad una FEC (Forwarding Equivalent Class)
La verifica di questa LIB per i Junos è attraverso questi comandi:
root@PE1>; show ldp database
Input label database, 10.255.255.11:0–10.255.255.1:0
Label Prefix
299792 10.0.0.16/30
299824 10.0.0.20/30
299936 10.0.0.24/30
3 10.255.255.1/32 # implicit-null equivale ad una istruzione di forwarding che permette una funzione di pop label
299888 10.255.255.2/32
299808 10.255.255.3/32
299840 10.255.255.4/32
299776 10.255.255.11/32
299904 10.255.255.22/32
299792 10.255.255.33/32
299936 10.255.255.44/32
Output label database, 10.255.255.11:0–10.255.255.1:0
Label Prefix
299776 10.0.0.16/30
299808 10.0.0.20/30
299840 10.0.0.24/30
299872 10.255.255.1/32
299888 10.255.255.2/32
299792 10.255.255.3/32
299824 10.255.255.4/32
3 10.255.255.11/32
299904 10.255.255.22/32
299776 10.255.255.33/32
299856 10.255.255.44/32
Input label database, 10.255.255.11:0–10.255.255.33:0
Label Prefix
24 10.0.0.0/30
23 10.0.0.4/30
22 10.0.0.8/30
3 10.0.0.12/30
3 10.0.0.16/30
26 10.0.0.20/30
28 10.0.0.24/30
30 10.0.0.28/30
21 10.255.255.0/30
19 10.255.255.1/32
18 10.255.255.2/32
25 10.255.255.3/32
27 10.255.255.4/32
17 10.255.255.11/32
16 10.255.255.22/32
3 10.255.255.33/32
29 10.255.255.44/32
Output label database, 10.255.255.11:0–10.255.255.33:0
Label Prefix
299776 10.0.0.16/30
299808 10.0.0.20/30
299840 10.0.0.24/30
299872 10.255.255.1/32
299888 10.255.255.2/32
299792 10.255.255.3/32
299824 10.255.255.4/32
3 10.255.255.11/32
299904 10.255.255.22/32
299776 10.255.255.33/32
299856 10.255.255.44/32
From P1 JUNOS router
root@P1>; show ldp database
Input label database, 10.255.255.1:0–10.255.255.2:0
Label Prefix
300064 10.0.0.16/30
300000 10.0.0.20/30
300080 10.0.0.24/30
299936 10.255.255.1/32
3 10.255.255.2/32
299984 10.255.255.3/32
300016 10.255.255.4/32
299952 10.255.255.11/32
300032 10.255.255.22/32
300064 10.255.255.33/32
300080 10.255.255.44/32
Output label database, 10.255.255.1:0–10.255.255.2:0
Label Prefix
299792 10.0.0.16/30
299824 10.0.0.20/30
299936 10.0.0.24/30
3 10.255.255.1/32
299888 10.255.255.2/32
299808 10.255.255.3/32
299840 10.255.255.4/32
299776 10.255.255.11/32
299904 10.255.255.22/32
299792 10.255.255.33/32
299936 10.255.255.44/32
Input label database, 10.255.255.1:0–10.255.255.11:0
Label Prefix
299776 10.0.0.16/30
299808 10.0.0.20/30
299840 10.0.0.24/30
299872 10.255.255.1/32
299888 10.255.255.2/32
299792 10.255.255.3/32
299824 10.255.255.4/32
3 10.255.255.11/32
299904 10.255.255.22/32
299776 10.255.255.33/32
299856 10.255.255.44/32
Output label database, 10.255.255.1:0–10.255.255.11:0
Label Prefix
299792 10.0.0.16/30
299824 10.0.0.20/30
299936 10.0.0.24/30
3 10.255.255.1/32
299888 10.255.255.2/32
299808 10.255.255.3/32
299840 10.255.255.4/32
299776 10.255.255.11/32
299904 10.255.255.22/32
299792 10.255.255.33/32
299936 10.255.255.44/32
Possiamo vedere ora la stessa cosa dal punto di vista CISCO:
PE3#show mpls forwarding-table
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or Tunnel Id Switched interface
16 299904 10.255.255.22/32 1516 Gi0/1 10.0.0.13
17 10.255.255.22/32 0 Gi0/0 10.0.0.18
17 Pop Label 10.255.255.11/32 0 Gi0/1 10.0.0.13
18 299888 10.255.255.2/32 0 Gi0/1 10.0.0.13
19 299872 10.255.255.1/32 0 Gi0/1 10.0.0.13
22 No Label 10.0.0.8/30 0 Gi0/1 10.0.0.13
23 No Label 10.0.0.4/30 0 Gi0/1 10.0.0.13
24 No Label 10.0.0.0/30 0 Gi0/1 10.0.0.13
25 Pop Label 10.255.255.3/32 0 Gi0/0 10.0.0.18
26 Pop Label 10.0.0.20/30 0 Gi0/0 10.0.0.18
27 27 10.255.255.4/32 0 Gi0/0 10.0.0.18
28 28 10.0.0.24/30 0 Gi0/0 10.0.0.18
29 29 10.255.255.44/32 0 Gi0/0 10.0.0.18
30 30 10.0.0.28/30 0 Gi0/0 10.0.0.18
PE3#
From P3 CISCO router
P3#show mpls forwarding-table
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or Tunnel Id Switched interface
16 Pop Label 10.255.255.33/32 0 Gi0/0 10.0.0.17
17 17 10.255.255.22/32 0 Gi0/1 10.0.0.22
18 17 10.255.255.11/32 0 Gi0/0 10.0.0.17
19 18 10.255.255.2/32 0 Gi0/0 10.0.0.17
20 10.255.255.2/32 0 Gi0/1 10.0.0.22
20 19 10.255.255.1/32 0 Gi0/0 10.0.0.17
23 24 10.0.0.8/30 0 Gi0/1 10.0.0.22
24 23 10.0.0.4/30 0 Gi0/0 10.0.0.17
25 24 10.0.0.0/30 0 Gi0/0 10.0.0.17
26 Pop Label 10.0.0.12/30 182 Gi0/0 10.0.0.17
27 Pop Label 10.255.255.4/32 0 Gi0/1 10.0.0.22
28 Pop Label 10.0.0.24/30 0 Gi0/1 10.0.0.22
29 29 10.255.255.44/32 702 Gi0/1 10.0.0.22
30 30 10.0.0.28/30 0 Gi0/1 10.0.0.22
P3#
WORK IN PROGRESS……..