Saturday, February 25, 2012

*************************************************************************  LDP ****************************************************************************************************
42> Two types of LDP:-
Link LDP is used to establish transport tunnnels and T_LDP is used to transport service tunnels.
43> During the initial discovery phase LDP sends hello messages to the destination multicast address of 224.0.0.2 and the well known udp port of 646. After the routers discover each other hellos are sent to keep the adjacency alive.
44> A single LDP session exists between two peers although there might be multiple peers.
45> Link ldp sessions are created between all the adjacent routers leading to a full mesh of ldp tunnels.
46> config router ldp#
Interface-parameters
Interface x
47> The hello messages are sent to 224.0.0.2 to ensure that if several routers are attached to the same broadcast domain everone should receive that.
48>  Parameters included in the hello messages:-
Version=1
LDP ID (explained later)
Message type:- Hello
Hello Timeout=15 secs
Transport address
Configuration Sequence number
49> LDP identifier is a six octet field the first 4 octets identify the LSR and is globally unique generally the system ip address of the router the last two octets identify the label space and is set to 0 for platform wide. Per interface label space is used if we are using ATM or FR or a combination of Ethernet and ATM/FR.
----------------------------------------------------------------
|                                    |                                    |
|LSR-id (4 bytes)               |  Label space ID (2 bytes)  |
----------------------------------------------------------------
50> Example :-
| Router 1| ------------------------------------------- | Router 2|
10.10.10.4                                                        10.10.10.6
LDP id:- 10.10.10.4:0                                         LDP-ID 10.10.10.6:0
Transport address:- 10.10.10.4                            Transport address:- 10.10.10.6
Message Type:- Hello                                           Message Type:- Hello
Hello Timeout=15 secs                                         Hello Timeout=15 secs
Configration Sequence number                              Configuration Sequence number

51>Hello Timeout:- Routers continue to exchange hellos the neighbor is considered down if no hellos are received within the timeout period.
52> Configuration Sequence number is used to detect configuration changes on the sending LSR.
53> Hello Timeout by default is 15 secs and the hello factor is 3 so 15/3=5 hence each hello messages are sent after 5 secs.
54> If the router have multiple interfaces a separate set of hello messages are sent for each of the interfaces.
Config>router>ldp
Hello <timeout> <factor>  <============= Global applies for all the interfaces
Interface parameters
Interface xxx
Hello <timeout> < factor> <================ Applied at the interface level over-rides the global setting
55> The hellos on both sides of the peer need not match, a negotiation takes place where the lower value is selected.
56>  The status of the discovery message can be seen from show router ldp discovery detail.
State of the discovery message
Hold Time Remaining
Hello Sent and Hello Received
Local and Remote ip address
57>  After the discovery process is completed, one side of the peer assumes the active role and initiates a TCP session with the neighbouring peer transport address, always the peer with the higher transport address takes that role.
58> The TCP port used is 646
59>  Which ip address the routers choose to establish the session with this is also exchanged during the exchange of the hello message.
60> Two cell mode interfaces two sessions are established
Frame mode and Cell mode interface two sessions
Frame mode & Frame mode one session is established.
61> By default the transport address is set to the system ip address however this can be modified this is generally done for interoperability reasons.
62>  config > router>ldp#
Interface xxx
  transport address xxx <========== xxx is the name of the interface ???
63> show router ldp session <========= Provides the status of the LDP session
      show router ldp session detail 
64> The TCP session is established with the init messages
R1----------------------------------------------------------- R2
Dest ip = R2 transport address                  Dest ip =R1 transport address
TCP dest port= 646                                    Dst port= Any random
Source port=Any source port                       Source port=646
LDP-Id
Keepalive timeout                                     Same as in R2
Message Type
Session Parameters                           
65> The session is established only after it receives a keep-alive message from R2.
66> Link failure lower layer protocols generally detect and inform the upper layer protocols however in case of corner case situations keepalives are also sent between the nodes hence  
Keepalive are generally sent and received to maintain the TCP session.
67> config> router> ldo#
      keepalive 90 3
     interface parameters
        interface abc
         keepalive 30 3
By default it 30/3=10 seconds ie keepalive are by default sent every 10 seconds.
68> LDP sessions will be established even if the keep-alive between the routers do not match the lower one is considered.
69> By default once an LDP is established labels are generated for the system ip address and are advertised to the neighbor.
70> Link ldp sessions are created between the adjacent routers labels will be flooded and a full mesh of transport tunnels will be created.
71> show router ldp parameters
Downstream Unsolicited:- Labels are distributed to all LDP peers
Ordered Control:- A peer generates its own label for the system ip address by default, and it will also generate its own label for the peer system ip address only after it receves one from its peer.
Liberal Label retention:- All the labels are retained in the control plane, however one label is used in the  data plane.
72>   R4------------- R5 (5.5.5.5/32)
                         |
                             |
                             |
                            R6
For the system ip address 5.5.5.5/32 this is advertised to R4 and R6 with the same label space.
73> DU mode hence no requests are required from R4 or R6 the labels are advertised with the help of the label mapping message.
74> Labels are stored in the control plane in show router ldp bindings
   Egress label:- Label which it has received from its peer for a particular FEC
   Ingress Label:- Label which is locally generated.
75> If there is no ingress label for a particular prefix it means that the tunnel terminates on that particular PE.
76> Label Mapping messagE:-
Version
LDP-id
FeC
Label
Message Type:- Label maping (ox400)
77> The fib entries contains the active ip next hop information, it does not contain any redundant entries, the labels for the active next hop are placed in LFIB.
78> LIB:-
 show router ldp bindings========> LIB
  show router fib 1 =============> FIB entries on IOM 1
  show router ldp bindings active  ===========> LFIB
79>    R4------------- R5 (5.5.5.5/32)
                         |
                             |
                             |
                            R6 (6.6.6.6/32)
R6 will advertise a label mapping message to R5, R5 after receiving the label mapping message will generate its own label for the FEC 6.6.6.6/32 and advertise it to R4.
Label advertised by R6 will be the ingress label for R6 and ingress label for R5.
A:R4# show router ldp bindings
===============================================================================
LDP Prefix Bindings
===============================================================================
Prefix Peer IngLbl EgrLbl EgrIntf/ EgrNextHop
-------------------------------------------------------------------------------
10.10.10.6/32 10.10.10.2 131070 -- -- --
10.10.10.6/32 10.10.10.5 131070 -- -- --
10.10.10.6/32 10.10.10.6 -- 131071 1/1/4 10.4.6.6
-------------------------------------------------------------------------------


80> In LDP the labels are flooded hence R4 receives a label from both R5 and R2 as seen in the above topology these labels are present in LIB as it works Liberal label retention mode, this helps to decrease the failure times, in case an interface becomes unavailable.
81> All the labels are present in the LIB however the labels from the active next hop are present in the ldp bindings active.
82> All the traffic hitting a particular SAP,which belongs to a service will always be label switched.
83> 
As we can see in the above output R1 uses R2 as the next hop to reach 10.10.10.6 hence the Egress label used is 131068, however R1 also advertises a label to R2 for the prefix 10.10.10.6/32 however presently the label will not be in use as R2 will already the next hop to reach that prefix, this label will only be used if all the links from R2 to R6 is not available.
84> Since R3 is not the preferred next hop to reach R6 it is marked as used with an U.

85> R1 will also install a label with the swap option, ie if it becomes an LSR for a particular prefix.
86>Given below is an example where R1 can act as an LSR:-

87> show router tunnel-table displays all the tunnels that are available on a particular node the Metric displayed is the IGP metric.

88> LSP-Ping:- Checks the reachability of the prefix through the LDP tunnel unidirectionally in one direction only.
89> oam lsp-ping prefix 10.10.1.6/32
By default only 1 packets are sent this can be increased by using the send-count command
90> This contains MPLS echo request and MPLs echo reply packets, the echo request packets are encapsulated within the MPLS labels. The TTL is set to 255.
91> MPLS echo request are sent over UDP with a destination port of 3503.
92> Echo reply does not use the tunnel and is ip routed the source port used is 3503 and a destination port is arbitarily chosen.
93> 
RTT===> Round trip delay this is the time taken between sending the echo request and getting a reply back.
94> RC==> Return code used by the egress router to indicate the status of the prefix, RC=3 the egress router has learned that it has this prefix.
95> oam lsp-trace prefix x.x.x.x/32
96> Used to gather hop information along the LSP path.
97> Separate request packets are sent per downstream router the MPLS TTL value is incremented at each request.
98> RC=8 (DSR Match label):- This is seen in the intermediate routers ie the intermediate routers is able to locate an downstream label for the incoming label.
99> RC=3 This is the owner of the prefix.

100> 
R1 first MPLS echo request with a TTL=1, R2 consumes the packet and gives a reply back to R1. The echo reply sent by R2 is ip-routed.
101> R1 again sends a Echo request with a TTL=2, this is consumed by R4.
102>  If ecmp is not enabled and we have redundant paths to a destination address with the same cost the lowest next hop for the directly connected interface address is used.
103> config>router>ecmp < number of routes>
Multiple entries for the LFIB is installed for a particular prefix.


Two different labels are installed for the same prefix
104> A hashing algorithm distrbutes the traffic between the two links.
105> Only a label is distributed for the system address by default, if need be an export policy can be created to distribute labels for the other interfaces also.
106> config router policy-options
              begin
           prefix-list prefix x.x.x.x/24 longer /exact
Policy-statement export
Entry 1
  from prefix-lisr prefix
 exit
   action accept
Commit
Config router ldp
Export export
From protocol direct
Action accept can also be used.
107>  Certain label bindings can be rejected upon receipt for this we need to create an export policy.
108> Generally still the routers keep the labels but do not generate its own bindings foethose labels,
109>Hence the labels will be present in the LIB but not the LFIB.
110>  The following is used to reject all the prefixes.

111> An LDP router can instruct its peers to release a particular label which it has advertised before this is done with the help of label withdraw message.
112> When a label withdraw message is received from the peer, the peer responds with the label release message as provided in the below snapshot:-

113> As seen a network goes down beyond R6 hence a label withdraw message is advertised by R6.
114> Label withdraw message can be sent for the folllowing reasons:-
An MTU change on the interface causes a router to withdrawal the previously assigned label and re-signal the FEC
with the new MTU.
 A network change, such as a failed interface, causes the router to remove a FEC from its FIB. The router had
previously generated and advertised a label for this FEC.
 The router is configured to stop generating labels for specified FECs (for example, the removal of the export
policy).
 A service manager command is issued to clear the labels, the labels are withdrawn, and new label mappings are
issued (for example, clear router ldp instance).
115>  Label Release message is generated for the folowing reasons:-
The LSR receives a label withdraw message from a peer.
 The LSR operates in Conservative label retention mode, and receives a label from a peer that is not the next-hop
router for the FEC.
 The LSR operates in Conservative label retention mode, and the peer from whom it received the label for a FEC is
no longer the next-hop router for that FEC (for example, the result of a network failure or topological change).
 There is no more memory to store a received label and the label is released.
116>
In the above scenario there are 2 /32 prefixes which are being advertised and we are summarizing the routes to 192.168.6.0/24 before being advertised to area 0.
117> Hence only 1 label will be generated for the prefix 192.168.6.0. Hence the traffic will not be able to reach the prefixes mentioned above.
118> Labels will be present in LIB, however none of them will be advertised in LFIB
119> The following command can be used to fix such situations.
Config router ldp aggregate-prefix-match
Given below is an exampls:-

***************************************************************** Targeted LDP*************************************************************************************************

120 > T-LDP is used to create the service tunnels, T_LDP advertises the service labels which is used to demultiplex the traffic and based on the labels associate them to proper services.
121> Peers do not have to be directly connected (typically established
between 2 PE routers that have services configured)
 Also used in the LDP over RSVP solution.
122> For a Layer 3 (IP) VPN Service, the service labels are signaled via the MP-BGP (Multi-Protocol Border Gateway Protocol).
Targeted LDP is not utilized in pure Layer 3 VPN service environments.
123> The following snapshot provides a view of session establishment between two LDP peers:-

124> 
The above command is used during the configuration of L3 VPN.
125> Targeted session can be automatically created during the configuration of SDP or can also be created manually.

The above command should be executed both the sides or the sdp should be configured both the sides for the session to establish.
126>These are the reasons for which T_LDP can also be configured manually.
The operator may want to modify the session parameters (such as hello or keepalive timeout) from the default
values (see the example on the next page).
 The operator may want to avoid peering with certain routers, probably those under a different administration (see
the example on the next page).
 The targeted LDP session might be required for a special feature called LDP over RSVP-TE (discussed in Module 5 of
this course).
 The targeted LDP session might have to be manually specified for interoperability reasons, if required by another
router vendor.
127> Given below is a snapshot of different LDP label types:-

128>
Given below are some of the commands used to verify the ldp session:-
       

Show router ldp peer
129>Auto Created:- No displays the ldp session is manually created.
130 >It also displays the KA interval and KA timeout
131> show router ldp peers displays the status of the LDP peers.
132>Link, Targeted or Both can be displayed depending upon the type of adjacency.
133>The show router ldp status command output displays the general statistics regarding the LDP process.
 “Active Adjacencies” indicates successfully discovered Link LDP and Targeted LDP peers (via Hello messages).
 “Active Sessions” indicates successfully established Link LDP and Targeted LDP sessions (via Init and Keepalive
messages).
 “Active Interfaces” indicates the number of core interfaces on which Link LDP is enabled.
 “Active Peers” indicates the number of active Targeted LDP peers that are provisioned via either manual or automatic
methods.
Again, note that a session does not need to be established for a peer to be listed.
Peers need not be established to be listed.
134> LDP authenticaion can be enabled to prevent LDP from TCP spoofing attacks

This is an MD5 based autthentication and the password are never sent through the wire as clear text.
*A:R1>config>router>ldp# info
----------------------------------------------
peer-parameters
peer 10.10.10.2
authentication-key "7ZooHlzw8OE8Hs6IKYJ1kiES27LcfN23" hash2
exit
Exit


*************************************************************************  LDP ****************************************************************************************************
42> Two types of LDP:-
Link LDP is used to establish transport tunnnels and T_LDP is used to transport service tunnels.
43> During the initial discovery phase LDP sends hello messages to the destination multicast address of 224.0.0.2 and the well known udp port of 646. After the routers discover each other hellos are sent to keep the adjacency alive.
44> A single LDP session exists between two peers although there might be multiple peers.
45> Link ldp sessions are created between all the adjacent routers leading to a full mesh of ldp tunnels.
46> config router ldp#
Interface-parameters
Interface x
47> The hello messages are sent to 224.0.0.2 to ensure that if several routers are attached to the same broadcast domain everone should receive that.
48>  Parameters included in the hello messages:-
Version=1
LDP ID (explained later)
Message type:- Hello
Hello Timeout=15 secs
Transport address
Configuration Sequence number
49> LDP identifier is a six octet field the first 4 octets identify the LSR and is globally unique generally the system ip address of the router the last two octets identify the label space and is set to 0 for platform wide. Per interface label space is used if we are using ATM or FR or a combination of Ethernet and ATM/FR.
----------------------------------------------------------------
|                                    |                                    |
|LSR-id (4 bytes)               |  Label space ID (2 bytes)  |
----------------------------------------------------------------
50> Example :-
| Router 1| ------------------------------------------- | Router 2|
10.10.10.4                                                        10.10.10.6
LDP id:- 10.10.10.4:0                                         LDP-ID 10.10.10.6:0
Transport address:- 10.10.10.4                            Transport address:- 10.10.10.6
Message Type:- Hello                                           Message Type:- Hello
Hello Timeout=15 secs                                         Hello Timeout=15 secs
Configration Sequence number                              Configuration Sequence number

51>Hello Timeout:- Routers continue to exchange hellos the neighbor is considered down if no hellos are received within the timeout period.
52> Configuration Sequence number is used to detect configuration changes on the sending LSR.
53> Hello Timeout by default is 15 secs and the hello factor is 3 so 15/3=5 hence each hello messages are sent after 5 secs.
54> If the router have multiple interfaces a separate set of hello messages are sent for each of the interfaces.
Config>router>ldp
Hello <timeout> <factor>  <============= Global applies for all the interfaces
Interface parameters
Interface xxx
Hello <timeout> < factor> <================ Applied at the interface level over-rides the global setting
55> The hellos on both sides of the peer need not match, a negotiation takes place where the lower value is selected.
56>  The status of the discovery message can be seen from show router ldp discovery detail.
State of the discovery message
Hold Time Remaining
Hello Sent and Hello Received
Local and Remote ip address
57>  After the discovery process is completed, one side of the peer assumes the active role and initiates a TCP session with the neighbouring peer transport address, always the peer with the higher transport address takes that role.
58> The TCP port used is 646
59>  Which ip address the routers choose to establish the session with this is also exchanged during the exchange of the hello message.
60> Two cell mode interfaces two sessions are established
Frame mode and Cell mode interface two sessions
Frame mode & Frame mode one session is established.
61> By default the transport address is set to the system ip address however this can be modified this is generally done for interoperability reasons.
62>  config > router>ldp#
Interface xxx
  transport address xxx <========== xxx is the name of the interface ???
63> show router ldp session <========= Provides the status of the LDP session
      show router ldp session detail 
64> The TCP session is established with the init messages
R1----------------------------------------------------------- R2
Dest ip = R2 transport address                  Dest ip =R1 transport address
TCP dest port= 646                                    Dst port= Any random
Source port=Any source port                       Source port=646
LDP-Id
Keepalive timeout                                     Same as in R2
Message Type
Session Parameters                           
65> The session is established only after it receives a keep-alive message from R2.
66> Link failure lower layer protocols generally detect and inform the upper layer protocols however in case of corner case situations keepalives are also sent between the nodes hence  
Keepalive are generally sent and received to maintain the TCP session.
67> config> router> ldo#
      keepalive 90 3
     interface parameters
        interface abc
         keepalive 30 3
By default it 30/3=10 seconds ie keepalive are by default sent every 10 seconds.
68> LDP sessions will be established even if the keep-alive between the routers do not match the lower one is considered.
69> By default once an LDP is established labels are generated for the system ip address and are advertised to the neighbor.
70> Link ldp sessions are created between the adjacent routers labels will be flooded and a full mesh of transport tunnels will be created.
71> show router ldp parameters
Downstream Unsolicited:- Labels are distributed to all LDP peers
Ordered Control:- A peer generates its own label for the system ip address by default, and it will also generate its own label for the peer system ip address only after it receves one from its peer.
Liberal Label retention:- All the labels are retained in the control plane, however one label is used in the  data plane.
72>   R4------------- R5 (5.5.5.5/32)
                         |
                             |
                             |
                            R6
For the system ip address 5.5.5.5/32 this is advertised to R4 and R6 with the same label space.
73> DU mode hence no requests are required from R4 or R6 the labels are advertised with the help of the label mapping message.
74> Labels are stored in the control plane in show router ldp bindings
   Egress label:- Label which it has received from its peer for a particular FEC
   Ingress Label:- Label which is locally generated.
75> If there is no ingress label for a particular prefix it means that the tunnel terminates on that particular PE.
76> Label Mapping messagE:-
Version
LDP-id
FeC
Label
Message Type:- Label maping (ox400)
77> The fib entries contains the active ip next hop information, it does not contain any redundant entries, the labels for the active next hop are placed in LFIB.
78> LIB:-
 show router ldp bindings========> LIB
  show router fib 1 =============> FIB entries on IOM 1
  show router ldp bindings active  ===========> LFIB
79>    R4------------- R5 (5.5.5.5/32)
                         |
                             |
                             |
                            R6 (6.6.6.6/32)
R6 will advertise a label mapping message to R5, R5 after receiving the label mapping message will generate its own label for the FEC 6.6.6.6/32 and advertise it to R4.
Label advertised by R6 will be the ingress label for R6 and ingress label for R5.
A:R4# show router ldp bindings
===============================================================================
LDP Prefix Bindings
===============================================================================
Prefix Peer IngLbl EgrLbl EgrIntf/ EgrNextHop
-------------------------------------------------------------------------------
10.10.10.6/32 10.10.10.2 131070 -- -- --
10.10.10.6/32 10.10.10.5 131070 -- -- --
10.10.10.6/32 10.10.10.6 -- 131071 1/1/4 10.4.6.6
-------------------------------------------------------------------------------


80> In LDP the labels are flooded hence R4 receives a label from both R5 and R2 as seen in the above topology these labels are present in LIB as it works Liberal label retention mode, this helps to decrease the failure times, in case an interface becomes unavailable.
81> All the labels are present in the LIB however the labels from the active next hop are present in the ldp bindings active.
82> All the traffic hitting a particular SAP,which belongs to a service will always be label switched.
83> 
As we can see in the above output R1 uses R2 as the next hop to reach 10.10.10.6 hence the Egress label used is 131068, however R1 also advertises a label to R2 for the prefix 10.10.10.6/32 however presently the label will not be in use as R2 will already the next hop to reach that prefix, this label will only be used if all the links from R2 to R6 is not available.
84> Since R3 is not the preferred next hop to reach R6 it is marked as used with an U.

85> R1 will also install a label with the swap option, ie if it becomes an LSR for a particular prefix.
86>Given below is an example where R1 can act as an LSR:-

87> show router tunnel-table displays all the tunnels that are available on a particular node the Metric displayed is the IGP metric.

88> LSP-Ping:- Checks the reachability of the prefix through the LDP tunnel unidirectionally in one direction only.
89> oam lsp-ping prefix 10.10.1.6/32
By default only 1 packets are sent this can be increased by using the send-count command
90> This contains MPLS echo request and MPLs echo reply packets, the echo request packets are encapsulated within the MPLS labels. The TTL is set to 255.
91> MPLS echo request are sent over UDP with a destination port of 3503.
92> Echo reply does not use the tunnel and is ip routed the source port used is 3503 and a destination port is arbitarily chosen.
93> 
RTT===> Round trip delay this is the time taken between sending the echo request and getting a reply back.
94> RC==> Return code used by the egress router to indicate the status of the prefix, RC=3 the egress router has learned that it has this prefix.
95> oam lsp-trace prefix x.x.x.x/32
96> Used to gather hop information along the LSP path.
97> Separate request packets are sent per downstream router the MPLS TTL value is incremented at each request.
98> RC=8 (DSR Match label):- This is seen in the intermediate routers ie the intermediate routers is able to locate an downstream label for the incoming label.
99> RC=3 This is the owner of the prefix.

100> 
R1 first MPLS echo request with a TTL=1, R2 consumes the packet and gives a reply back to R1. The echo reply sent by R2 is ip-routed.
101> R1 again sends a Echo request with a TTL=2, this is consumed by R4.
102>  If ecmp is not enabled and we have redundant paths to a destination address with the same cost the lowest next hop for the directly connected interface address is used.
103> config>router>ecmp < number of routes>
Multiple entries for the LFIB is installed for a particular prefix.


Two different labels are installed for the same prefix
104> A hashing algorithm distrbutes the traffic between the two links.
105> Only a label is distributed for the system address by default, if need be an export policy can be created to distribute labels for the other interfaces also.
106> config router policy-options
              begin
           prefix-list prefix x.x.x.x/24 longer /exact
Policy-statement export
Entry 1
  from prefix-lisr prefix
 exit
   action accept
Commit
Config router ldp
Export export
From protocol direct
Action accept can also be used.
107>  Certain label bindings can be rejected upon receipt for this we need to create an export policy.
108> Generally still the routers keep the labels but do not generate its own bindings foethose labels,
109>Hence the labels will be present in the LIB but not the LFIB.
110>  The following is used to reject all the prefixes.

111> An LDP router can instruct its peers to release a particular label which it has advertised before this is done with the help of label withdraw message.
112> When a label withdraw message is received from the peer, the peer responds with the label release message as provided in the below snapshot:-

113> As seen a network goes down beyond R6 hence a label withdraw message is advertised by R6.
114> Label withdraw message can be sent for the folllowing reasons:-
An MTU change on the interface causes a router to withdrawal the previously assigned label and re-signal the FEC
with the new MTU.
 A network change, such as a failed interface, causes the router to remove a FEC from its FIB. The router had
previously generated and advertised a label for this FEC.
 The router is configured to stop generating labels for specified FECs (for example, the removal of the export
policy).
 A service manager command is issued to clear the labels, the labels are withdrawn, and new label mappings are
issued (for example, clear router ldp instance).
115>  Label Release message is generated for the folowing reasons:-
The LSR receives a label withdraw message from a peer.
 The LSR operates in Conservative label retention mode, and receives a label from a peer that is not the next-hop
router for the FEC.
 The LSR operates in Conservative label retention mode, and the peer from whom it received the label for a FEC is
no longer the next-hop router for that FEC (for example, the result of a network failure or topological change).
 There is no more memory to store a received label and the label is released.
116>
In the above scenario there are 2 /32 prefixes which are being advertised and we are summarizing the routes to 192.168.6.0/24 before being advertised to area 0.
117> Hence only 1 label will be generated for the prefix 192.168.6.0. Hence the traffic will not be able to reach the prefixes mentioned above.
118> Labels will be present in LIB, however none of them will be advertised in LFIB
119> The following command can be used to fix such situations.
Config router ldp aggregate-prefix-match
Given below is an exampls:-

***************************************************************** Targeted LDP*************************************************************************************************

120 > T-LDP is used to create the service tunnels, T_LDP advertises the service labels which is used to demultiplex the traffic and based on the labels associate them to proper services.
121> Peers do not have to be directly connected (typically established
between 2 PE routers that have services configured)
 Also used in the LDP over RSVP solution.
122> For a Layer 3 (IP) VPN Service, the service labels are signaled via the MP-BGP (Multi-Protocol Border Gateway Protocol).
Targeted LDP is not utilized in pure Layer 3 VPN service environments.
123> The following snapshot provides a view of session establishment between two LDP peers:-

124> 
The above command is used during the configuration of L3 VPN.
125> Targeted session can be automatically created during the configuration of SDP or can also be created manually.

The above command should be executed both the sides or the sdp should be configured both the sides for the session to establish.
126>These are the reasons for which T_LDP can also be configured manually.
The operator may want to modify the session parameters (such as hello or keepalive timeout) from the default
values (see the example on the next page).
 The operator may want to avoid peering with certain routers, probably those under a different administration (see
the example on the next page).
 The targeted LDP session might be required for a special feature called LDP over RSVP-TE (discussed in Module 5 of
this course).
 The targeted LDP session might have to be manually specified for interoperability reasons, if required by another
router vendor.
127> Given below is a snapshot of different LDP label types:-

128>
Given below are some of the commands used to verify the ldp session:-
       

Show router ldp peer
129>Auto Created:- No displays the ldp session is manually created.
130 >It also displays the KA interval and KA timeout
131> show router ldp peers displays the status of the LDP peers.
132>Link, Targeted or Both can be displayed depending upon the type of adjacency.
133>The show router ldp status command output displays the general statistics regarding the LDP process.
 “Active Adjacencies” indicates successfully discovered Link LDP and Targeted LDP peers (via Hello messages).
 “Active Sessions” indicates successfully established Link LDP and Targeted LDP sessions (via Init and Keepalive
messages).
 “Active Interfaces” indicates the number of core interfaces on which Link LDP is enabled.
 “Active Peers” indicates the number of active Targeted LDP peers that are provisioned via either manual or automatic
methods.
Again, note that a session does not need to be established for a peer to be listed.
Peers need not be established to be listed.
134> LDP authenticaion can be enabled to prevent LDP from TCP spoofing attacks

This is an MD5 based autthentication and the password are never sent through the wire as clear text.
*A:R1>config>router>ldp# info
----------------------------------------------
peer-parameters
peer 10.10.10.2
authentication-key "7ZooHlzw8OE8Hs6IKYJ1kiES27LcfN23" hash2
exit
Exit


RSVP

 
 
                                                                   RSVP
1> Downstream on Demand (DOD) mode of label
2> The path message from the HE router contains the Label_Request object.
3> The path message
Src address:-System address of the sending router
Dest address:- Destination address of the tail end router.
IP header has Router Alert label set this in turn forces the intermediate routers to process the Path message and take appropriate action.
4>If the path message was defined with strict hops then it is present in the sequential hops section, or else the IGP table is consulted.
5> The hop object in the path message contains the ip address of the egress interface of the router, considering the topology is something like this
R1(10.1.1.1)-------->(10.1.1.2) R2--------->R4------>R6
So Hop object:- 10.1.1.1
This ip address is used by RESV message while creating the LSP.
6> After the path message was sent from R1 to R2 a path state block (PSB) is created PSB is required since R1 needs to know when it receives a RESV message to which LSP session it belongs, PSB and RSB are combined to form a RSVP session. The full path message is stored in the PSB.
7) The session formed after combining PSB and RSB also needs to be refreshed after certain intervals it stores timers to perform those function.
8) When R2 receives the path message it consults the routing table since no explicitly defined hops are present and forwards the path message to the next hop which corresponds to the destination address.
9) R6 responds with a RESV message with a label, from the dynamic range present in the label object field.
10) Resv message uses hop by hop forwarding ie RESV does not consult the Fib, instead it retrieves the address which is already present in the PSB in the HOP object.
11> RESV message source is the egress interface of the router
Dest ip is obtained from the HOP object of the path message hence ip address of the neighbouring router.
Hop object is again the Src ip of the egress interface.
12> Once a RESV message is sent an RSB is created, which contains all the information for the RESV message.
13>Once a router receives the Path message or RESV message it regenerates the message before it is forwarded to its peer.
14> show router rsvp session
Tunnel-ID :- Different LSP have different Tunnel-ID, same for similar LSP although it might have separate Path.
LSP-ID:- This takes into account the path, same LSP can have different path which is displayed here.
LSP name :: Path name
15> When an LSP is brought down then the resources reserved for that LSP on every intermediate routers should be released this is done with the help of Path tear message which travels from HE router to the TE router, and every intermediate hop after it receives the path tear message clears the related state blocks.
16> Similarly RESV tear messages are sent upstream nodes:-
R1(10.1.1.1)-------->(10.1.1.2) R2--------->R4------>R6
Suppose the link between R4 and R6 breaks.
17> The path message is sent downstream, if for any reason the downstream router is not able to send the path message further to downstream it sends a Path Error message to the originator(HE) router, this contains the error code which determines the source of the problem, R1 (HE ) router after receiving the Path Error message sends a Path Tear message downstream.
18> Similarly RESV error messages are sent to downstream to tail end, and then a RESV tear message follows
19> PSB and RSB are refreshed by the Path and RESV messages, the session times out if it is not periodically refreshed.
20> Path tear and RESV tear messages are sent if the path is not refreshed periodically and the session times out.
21> The path and RESV messages are sent by default every 30 seconds.
22> There is also a keep multiplier which determines how many missed messages a router can tolerate before bringing the session down.
23> Reducing the refresh time can help to speed up the convergence, however it may impact the processing performance as each Path/Resv message is processed by the CPU.
Hello protocol is used to speed up convergence without reducing refresh time.
24> Hence to alleviate the problems RSVP also uses the hello protocol, this is derived from the routing protocols ospf/isis.
25> The hello messages is only sent after the session is up with the neighbor and continues to run indefinitely even if the session goes down.
26> By default the Hello messages are sent every 3 seconds, the keep mulltiplier also governs how many hello messages can be missed before it brings the session down.
27> If the hello times out all the RSVP session on that particular interface is cleared.
28> All the sessions are cleared if hellos are not received for 9 seconds this is the default value and can be modified.
29> Hello Timeout= Hello interval x Keep multiplier
3000 ms x 3=9000 ms =9 sec
30> After sending a referesh message the interval to send the next refresh message is set to a random value which extends from 50-150%
Session Timeout >= ( keep multiplier+0.5) * 1.5*Refreshtime=========(3+0.5)*1.5*30
So after each successful path or RESV message the session should timeout after 157.5 seconds ie if it does not receive Path or Resv message till that duration.
Everytime a path message is received the timers are reset.
31> The above Session timeout is followed to avoid the synchronization of all the RSVP sessions at the same time.
32> To display the PSB for a particular router
Tools dump router rsvp psb detail
The PSB state Primary's Connected states that the session is currently connected ie the session is established.
33> Refresh Reduction feature can be enabled in RSVP, this is another way of reducing the messaging overhead of the RSVP protocol, this should be enabled on all the nodes ie all routers should agree to use refresh reduction before this can be implemented.
34> In the case of Refresh reduction the path and resv messages are replaced by Summary Refresh messages which contains a list of Message ID's of the active sessions.
35> Refresh reduction with reliable delivery ensures that the other end has received the message as the sender receives an acknowledgement.
36> When refresh reduction is enabled a Message-ID object is created for each RSVP session.
37> Each message ID object consists of 8 bytes message identifier(4 bytes), RSVP sessions are provided with message identifier values starting from 1. This changes if there is a change in operational or reservational state of a session.
8 bits are allocated to the Flags field if it is set to 0x01 it means an acknowledgement is requested.
Epoch field:- This indicates if the message identifier sequence have been reset this is a rendom value and only changes when the router reboots or the rsvp process changes.
38> Reliable delivery option the sending router waits for an ack message from its peer if it does not receive an ACK it again sends the refresh reduction message this is governed by rapid retransmit interval this can even timeout rapid-retry-limit is reached after which the reliable delivery messages are not sent, however in no way it pulls the session down.
39> Message Pacing is another feature which controls the rate of RSVP messages hitting the router refresh reduction cannot be enabled along with this feature by default 1000 RSVP messages can hit the CPU.
40> config > router > rsvp# interface x
Refresh-reduction
Reliable-delivery
41> config> router > rsvp# rapide-retransmit-time
Config>router>rsvp# rapid-retry-limit <limit>
Show router rsvp neighbor
Flags indicate the refresh reduction feature
LR:- Local flag has set the refresh reduction feature
LD:- Reliable delivery has been set by the local router.
RM:- Remote node supports refresh reduction feature.
RR:- Neighbor sets the refresh reduction capable bit.
distribution label is distributed when the HE router requests the label with the help of the path message.

Wednesday, February 22, 2012

Advance Design for L3 VPN

Full Mesh:- Achieves full redundancy between all the sites.


Hub and Spoke:- HQ and branch office scenarios


Extranet:- Share resources between the different customer sites or share resources between the customers and the suppliers.


Overlapping:- Typically used to access common resources like Firewalls or other servers


In the case of full mesh every site has a connection to the other sites.








The route distinguisher between the PE and the CE routers should be same and the import and the export route targets should be same.


In this design scalability issues might arise if the number of PE's is substantially large.


Route reflectors in VPRN:-


Here it is not mandatory to have a full mesh of ibgp sessions.


With RR's the PE forms adjacency only with the RR's and not with all the PE's



Classical iBGP split horizon rules mandate that updates
received on eBGP sessions should be forwarded to all iBGP and eBGP sessions, but updates
received on an iBGP session should be forwarded only to all eBGP sessions. This requires the BGP
edge router to send updates to all other BGP-enabled routers in its own AS directly through individual
iBGP sessions to each BGP router.


RRs modify the iBGP split horizon rule and allow a specific router,
under certain conditions, to forward all incoming iBGP updates to an outgoing iBGP session. This
router is called a route-reflector.


In the absence of RRs, whenever a new PE is introduced, every existing PE in the service provider
network will require an additional BGP neighbor command associating it with the new PE. In BGP,
updates received by a peer in an AS are not allowed to be forwarded to another peer within the same
AS. Therefore, a BGP network must be fully meshed, with all peers adjacent to one another, as far as
BGP routing updates are concerned. If the number of PEs becomes substantial enough to make this
operation impractical, BGP RRs are recommended. RRs avert the need to fully mesh the BGP peers
and avoid adding neighbor commands to each PE. With RRs, the PEs would only require neighbors
defined for each RR. Any updates, including VRF information, would be sent to the RR alone. The
RRs are then responsible for propagating information received from PEs to all the other PEs.
RRs are also useful in the event of a route change in the customer network. Without RRs, the PE that
locally terminates the portion of the customer network would have to update every PE peer
participating in that VPN. RRs, therefore, help remove the burden of BGP updates from the PE.


Hub and Spoke:-

The client sites requires direct connection to the HQ office but the client sites does not require connection with each other.




This design offers less redundancy and loss of a router will lead to loss of some services but the benefit is manifold as it reduces cost.


In this case the number of VPN tunnels are reduced, filtering or any policy can only be applied to the hub site.


The downside is spoke sites can only send and receive traffic through the hub site.


Spoke to spoke is possible but it should be passing through the hub site.


The rules that are followed are:-



The policies that are required to implement this topology are outlined
below. Any access not specifically mentioned is not to be permitted.
The hub site PE should learn all of the routes from the spoke sites.
The spoke sites should only learn routes from the hub site.





Given below is what it will happen the export route targets for all the spoke sites will be impoerted by the hub site while the export route target for the hub site will be imported by the spoke sites.






CE Hub and Spoke:-

In this case traffic from the remote sites passes through the central CE site.


This is generally useful if there is a firewall on the central CE site and all the traffic should pass through that device then this design should be beneficial.


when traffic between a pair of sites needs to be passed through a firewall device that is
located at the customer site, the CE hub and spoke design can be used. If CE-1 will be used as the CE
hub site, then there will be two connections (either physical or logical) required between CE-1 and PE-1.
This design allows the hub CE to filter or monitor the traffic that is being sent from spoke-to-spoke sites.
Any access not specifically mentioned is not to be permitted.
• Permit access between all CE devices, all sites participating in the same VRF, with the CE-1 as
the hub device.
• Traffic between spoke sites must go through the hub CE. The hub CE may or may not allow
traffic to traverse from one spoke site to another based on the policy configured on the hub CE.

In this case the following rules are applicable:-

The CE hub site should learn all the routes from the spoke site

The spoke site should not communicate directly with another spoke site but should do it through the CE hub site only.
The spoke sites should not learn of routes from other spoke sites.



All spoke-to-spoke traffic must go through the Hub CE1
and next-hop the appropriate CE.
and next-hop to the appropriate spoke PE.
PE1.
their respective CEs.







VRF1 uses 65100:1 and vrf 10 uses 65100:10, since a sap interface can be associated with 1 vrf interface there are two physical or two logical interfaces required and 2 vprn 's should be configured.

VRF 1 in the hub sites should import the route targets from the 3 sites.

VRF 10 should export a router target, which should be imported by VRF1 on the spoke sites.

Extranet Application:-

In this case the two locations of two different companies share the routes probably only the head offices and not the branch offices.




The Customer Blue VPN consists of CE-1 and CE-2. These sites use a route target shared
between only themselves. In the example in the slide, route target 65100:1 is used.
• The Customer Red VPN consists of CE-3 and CE-4. These sites use a route target shared
between only themselves. In the example in the slide, route target 65100:2 is used.
• The overlapping VPN consists of CE-1 and CE-3. These sites use a route target shared between
only themselves. In the example in the slide, route target 65100:3 is used. These sites also
participate in their respective Blue and Red Intranet VPRN.


Overlapping VPRN:-







In an overlapping VPRN, the following rules should be maintained:
The customer VRFs participating in the overlapping VPRN contain the server routes and routes from
the same customer VPRN, but do not contain routes from other customers.
The customer VRFs not participating in the overlapping VPRN only contains routes from the same
customer VPRN.
The server VRFs contain the server routes and the customer routes.
This topology limits network access to the following policy based on the diagram shown in the slide. Any
access not specifically mentioned is not to be permitted.
Permit access between CE-1 and CE-2
Permit access between CE-3 and CE-4
Permit access between CE-5 and CE-1
Permit access between CE-5 and CE-3




The Customer Blue VPN consists of CE-1 and CE-2. These sites use a route target shared
between only themselves. In the example above, route target 65100:1 is used.
• The Customer Red VPN consists of CE-3 and CE-4. These sites use a route target shared
between only themselves. In the example above, route target 65100:2 is used.
• The Overlapping VPN consists of CE-1 and CE-5 and CE-3 and CE-5. These sites use a route
target shared between only themselves. In the example in the slide, route target 65100:5 is used.


PE2 and PE3 advertise the routes received from the hub to
VRF-10 advertises its routes via MP-BGP to PE2 and PE3 nexthop
Hub CE-1 advertises the routes to VRF-10 in PE1 next-hop CE1.
The hub PE advertises the spoke routes to the hub CE1.
The spoke PEs advertise the spoke routes to the hub PE VRF-1
The spoke CEs advertise their routes to their respective PEs

Tuesday, February 21, 2012

Inter AS Model-C

In model B all vprn routes were present in the ASBR.

In option-C the ASBR distribute reachability information for the remote PE's system ip address only.

VPRN routing information is handled by the PE's or more appropriately by the RR's in the different AS's


/32 routes needs to be advertised in the peer AS, as it is not possible we need a label for that see the figure below:-







In this case PE1 appends the label V, BGP label z and ldp label.

LDP label is stripped by ASBR1 and swaps the label Z with a new label Y

ASBR2 attaches a new ldp label and transmits the packet to ASBR2


similar configuration exists on PE2 also.

Route target on PE1 and PE2 must match.

The above figure describes the advertisements of /32 system addresses between the AS's

Advertise-label ipv4 needs to be enabled to advertise labelled ipv4 packets.


In this case PE5 acts as an RR and all should peer with the RR, advertise label ipv4 should be enabled on all the routers.

Two groups needs to be enabled on ASBR's and all should be configured with family ipv4 vpn-ip4

Another common cli is advertise-label ipv4 command.

Verify the BGP session with ASBR2

Advertise Label : ipv4
Auth key chain : n/a
Bfd Enabled : Disabled L2 VPN Cisco Interop : Disabled
Local Capability : RtRefresh MPBGP 4byte ASN
Remote Capability : RtRefresh MPBGP 4byte ASN
Import Policy : None Specified / Inherited
Export Policy : None Specified / Inherited
-------------------------------------------------------------------------------
Neighbors : 1



In this case there are 3 labels that are used the top label is the ldp label use the following command to view the top label:-

A:PE1# show router ldp bindings active prefix 10.10.10.3/32
===============================================================================
Legend: (S) - Static
===============================================================================
LDP Prefix Bindings (Active)
===============================================================================
Prefix Op IngLbl EgrLbl EgrIntf/LspId EgrNextHop
-------------------------------------------------------------------------------
10.10.10.3/32 Push -- 131070 1/1/3 10.1.3.3
10.10.10.3/32 Swap 131069 131070 1/1/3 10.1.3.3
-------------------------------------------------------------------------------

The middle label is assigned by ASBR  to PE1 to reach the remote system address of 10.10.10.2 ie PE2

A:PE1# show router bgp routes 10.10.10.2/32 hunt
===============================================================================
BGP Router ID:10.10.10.1 AS:64496 Local AS:64496
===============================================================================
Legend -
Status codes : u - used, s - suppressed, h - history, d - decayed, * - valid
Origin codes : i - IGP, e - EGP, ? - incomplete, > - best
===============================================================================
BGP IPv4 Routes
===============================================================================
RIB In Entries
-------------------------------------------------------------------------------
Network : 10.10.10.2/32
Nexthop : 10.10.10.3
From : 10.10.10.6
Res. Nexthop : 10.10.10.3 (LDP)
Local Pref. : 100 Interface Name : toR3
Aggregator AS : None Aggregator : None
Atomic Aggr. : Not Atomic MED : 100
Community : No Community Members
Cluster : 0.0.0.1
Originator Id : 10.10.10.3 Peer Router Id : 10.10.10.6
IPv4 Label : 131064
Flags : Used Valid Best IGP
AS-Path : 64497
-------------------------------------------------------------------------------
RIB Out Entries
-------------------------------------------------------------------------------
Routes : 1

A:ASBR1# show router bgp inter-as-label
===============================================================================
BGP Inter-AS labels
===============================================================================
NextHop Received Advertised Label
Label Label Origin
-------------------------------------------------------------------------------
10.10.10.1 0 131071 Internal
10.10.10.3 0 131067 Edge
10.3.4.4 131066 131065 External
10.3.4.4 131067 131063 External
10.3.4.4
10.10.10.6 0 131066 Internal
===============================================================================
131069 131064 External
ASBR2 advertised label 131069 for 10.10.10.2/32 towards ASBR1
ASBR1 advertised label 131064 for 10.10.10.2/32 towards PE1 over RR1

Above output shows that the labels are interchanged by the ASBR's.

192.2.1.1/27 is the loopback address of CE1 the below output shows the vpn label assigned by PE1 to PE2  to reach 192.2.1.1

*A:PE2# show router bgp routes vpn-ipv4 192.2.1.1/27 hunt
===============================================================================
BGP Router ID:10.10.10.2 AS:64497 Local AS:64497
===============================================================================
BGP VPN-IPv4 Routes
===============================================================================
-------------------------------------------------------------------------------
RIB In Entries
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
RIB Out Entries
-------------------------------------------------------------------------------
Network : 192.2.1.0/27
Nexthop : 10.10.10.2
Route Dist. : 64496:1
VPN Label : 131071
To : 10.10.10.5
Res. Nexthop : n/a
Local Pref. : 100 Interface Name : NotAvailable
Aggregator AS : None Aggregator : None
Atomic Aggr. : Not Atomic MED : None
Community : target:64496:10
Cluster : No Cluster Members
Originator Id : None Peer Router Id : 10.10.10.5
Origin : IGP
AS-Path : No As-Path
-------------------------------------------------------------------------------
Routes : 1
===============================================================================

PE2 advertises the route to RR2 using the label 131071


*A:PE2# show router bgp neighbor 10.10.10.5 advertised-routes vpn-ipv4
===============================================================================
BGP Router ID:10.10.10.2 AS:64497 Local AS:64497
===============================================================================
BGP VPN-IPv4 Routes
===============================================================================
Flag Network LocalPref MED
Nexthop VPNLabel
As-Path
-------------------------------------------------------------------------------
i 64496:1:192.2.1.0/27 100 None
10.10.10.2 131071
No As-Path
-------------------------------------------------------------------------------
Routes : 1

RR2 advertises the route to RR1 :-

*A:RR2# show router bgp neighbor 10.10.10.6 advertised-routes vpn-ipv4
===============================================================================
BGP Router ID:10.10.10.5 AS:64497 Local AS:64497
===============================================================================
BGP VPN-IPv4 Routes
===============================================================================
Flag Network LocalPref MED
Nexthop VPNLabel
As-Path
-------------------------------------------------------------------------------
i 64496:1:192.2.1.0/27 n/a None
10.10.10.2 131071
64497
-------------------------------------------------------------------------------
Routes : 1

RR1 inturn advertises the route to PE1:-


*A:RR1# show router bgp neighbor 10.10.10.1 advertised-routes vpn-ipv4
===============================================================================
BGP Router ID:10.10.10.6 AS:64496 Local AS:64496
===============================================================================
BGP VPN-IPv4 Routes
===============================================================================
Flag Network LocalPref MED
Nexthop VPNLabel
As-Path
-------------------------------------------------------------------------------
i 64496:1:192.2.1.0/27 100 None
10.10.10.2 131071
64497
-------------------------------------------------------------------------------
Routes : 1


A:PE1# show router bgp routes vpn-ipv4 192.2.1.1/27 hunt
===============================================================================
BGP Router ID:10.10.10.1 AS:64496 Local AS:64496
===============================================================================
BGP VPN-IPv4 Routes
===============================================================================
RIB In Entries
-------------------------------------------------------------------------------
Network : 192.2.1.0/27
Nexthop : 10.10.10.2
Route Dist. : 64496:1
VPN Label : 131071
From : 10.10.10.6
Res. Nexthop : n/a
Local Pref. : 100 Interface Name : NotAvailable
Aggregator AS : None Aggregator : None
Atomic Aggr. : Not Atomic MED : None
Community : target:64496:10
Cluster : No Cluster Members
Originator Id : None Peer Router Id : 10.10.10.6
Flags : Used Valid Best IGP
AS-Path : 64497
VPRN Imported : 10
-------------------------------------------------------------------------------
RIB Out Entries
-------------------------------------------------------------------------------
Routes : 1



Model C advantages:-

Model C redistributes the /32 loopbacks via an eBGP session
between the ASBR’s
label together with the /32 loopback
MP-BGP extensions defined in RFC 3107 are used to announce a
A 3 label stack is used in the remote AS
ASBR’s do not have VPN-IPv4 Routes and label information
Scales the best among all the three Inter-AS IP-VPRN models
High Control through BGP policiesModel C typically deployed within a service provider network

A:ASBR1>config>router>policy-options# info
----------------------------------------------
prefix-list "PE_SYSTEM"
prefix 10.10.10.0/24 longer   <<-----  A policy needs to be created for advertising /32 routes between the AS
exit 
policy-statement "PE_SYS_TO_BGP"
entry 10
from
prefix-list "PE_SYSTEM"
exit
to
protocol bgp
exit
action accept
exit
exit
exit
----------------------------------------------



A:ASBR1>config>router>bgp# info
----------------------------------------------
group "Inter_AS"
family ipv4
peer-as 64497
neighbor 10.3.4.4
export "PE_SYS_TO_BGP"
advertise-label ipv4
exit
exit
----------------------------------------------



The advertised routes from ASBR2 to ASBR1 are as shown below:
*A:ASBR2# show router bgp neighbor 10.3.4.3 advertised-routes
===============================================================================
BGP Router ID:10.10.10.4 AS:64497 Local AS:64497
===============================================================================
BGP IPv4 Routes
===============================================================================
Flag Network LocalPref MED
Nexthop VPNLabel
As-Path
-------------------------------------------------------------------------------
i 10.10.10.2/32 n/a 100
10.3.4.4 -
64497
? 10.10.10.4/32 n/a None
10.3.4.4 -
64497
i 10.10.10.5/32 n/a 200
10.3.4.4 -
64497
-------------------------------------------------------------------------------
Routes : 3
===============================================================================

All the /32 routes are advertised.



Verification of routes in ASBR1:-

A:ASBR1# show router bgp routes
===============================================================================
BGP Router ID:10.10.10.3 AS:64496 Local AS:64496
===============================================================================
Legend -
Status codes : u - used, s - suppressed, h - history, d - decayed, * - valid
Origin codes : i - IGP, e - EGP, ? - incomplete, > - best
===============================================================================
BGP IPv4 Routes
===============================================================================
Flag Network LocalPref MED
Nexthop VPNLabel
As-Path
-------------------------------------------------------------------------------
u*>i 10.10.10.2/32 None 100
10.3.4.4 -
64497
u*>? 10.10.10.4/32 None None
10.3.4.4 -
64497
u*>i 10.10.10.5/32 None 100
10.3.4.4 -
64497
-------------------------------------------------------------------------------
Routes : 3

The actual labels can be seen with following command
A:ASBR1# show router bgp routes 10.10.10.2/32 hunt
===============================================================================
BGP Router ID:10.10.10.3 AS:64496 Local AS:64496
===============================================================================
Legend -
Status codes : u - used, s - suppressed, h - history, d - decayed, * - valid
Origin codes : i - IGP, e - EGP, ? - incomplete, > - best
===============================================================================
BGP IPv4 Routes
===============================================================================
RIB In Entries
-------------------------------------------------------------------------------
Network : 10.10.10.2/32
Nexthop : 10.3.4.4
From : 10.3.4.4
Res. Nexthop : 10.3.4.4
Local Pref. : None Interface Name : toR4
Aggregator AS : None Aggregator : None
Atomic Aggr. : Not Atomic MED : 100
Community : No Community Members
Cluster : No Cluster Members
Originator Id : None Peer Router Id : 10.10.10.4
IPv4 Label : 131069
Flags : Used Valid Best IGP
AS-Path : 64497
-------------------------------------------------------------------------------
RIB Out Entries
-------------------------------------------------------------------------------
Network : 10.10.10.2/32
Nexthop : 10.10.10.3
To : 10.10.10.6
Res. Nexthop : n/a
Local Pref. : 100 Interface Name : NotAvailable
Aggregator AS : None Aggregator : None
Atomic Aggr. : Not Atomic MED : 100
Community : No Community Members
Cluster : No Cluster Members
Originator Id : None Peer Router Id : 10.10.10.6
IPv4 Label : 131064
Origin : IGP
AS-Path : 64497
-------------------------------------------------------------------------------
Routes : 2

The Rib-in entries shows the label which is received from ASBR2 which is 131069 and rib out entries shows the ipv4 label as 131064.

A:ASBR1# show router bgp inter-as-label
===============================================================================
BGP Inter-AS labels
===============================================================================
NextHop Received Advertised Label
Label Label Origin
-------------------------------------------------------------------------------
10.10.10.1 0 131071 Internal
10.10.10.3 0 131067 Edge
10.3.4.4 131066 131065 External
10.3.4.4 131067 131063 External
10.3.4.4 131069 131064 External
10.10.10.6 0 131066 Internal
===============================================================================

For 3 different routes 3 different labels are generated as seen above.

A:ASBR1# show router route-table
===============================================================================
Route Table (Router: Base)
===============================================================================
Dest Prefix Type Proto Age Pref
Next Hop[Interface Name] Metric
-------------------------------------------------------------------------------
10.1.3.0/27 Local Local 13d21h21m 0
toR1 0
10.1.6.0/27 Remote OSPF 01d00h19m 10
10.1.3.1 200
10.3.4.0/27 Local Local 23h46m29s 0
toR4 0
10.3.6.0/27 Local Local 01d00h46m 0
toR6 0
10.10.10.1/32 Remote OSPF 06d01h56m 10
10.1.3.1 100
10.10.10.2/32 Remote BGP 23h25m19s 170
10.3.4.4 0
10.10.10.3/32 Local Local 13d21h24m 0
system 0
10.10.10.4/32 Remote BGP 23h25m19s 170
10.3.4.4 0
10.10.10.5/32 Remote BGP 23h25m19s 170
10.3.4.4 0
10.10.10.6/32 Remote OSPF 01d00h17m 10
10.3.6.6 100
-------------------------------------------------------------------------------
No. of Routes: 10
===============================================================================

The above command shows all the routes will be installed in the routing table ie all the /32 prefixes the prefixes received from the neighbouring AS will be advertised by BGP.

The routes should be further advertised to PE1 and the routes should be seen as tunnelled those routes which are received in ASBR as BGP. The routing table in PE1

A:PE1# show router route-table
===============================================================================
Route Table (Router: Base)
===============================================================================
Dest Prefix Type Proto Age Pref
Next Hop[Interface Name] Metric
-------------------------------------------------------------------------------
10.1.3.0/27 Local Local 13d21h23m 0
toR3 0
10.1.6.0/27 Local Local 01d00h38m 0
toR6 0
10.3.6.0/27 Remote OSPF 01d00h19m 10
10.1.3.3 200
10.10.10.1/32 Local Local 13d21h25m 0
system 0
10.10.10.2/32 Remote BGP 21h54m04s 170
10.10.10.3 (tunneled) 0
10.10.10.3/32 Remote OSPF 06d01h58m 10
10.1.3.3 100
10.10.10.4/32 Remote BGP 21h54m04s 170
10.10.10.3 (tunneled) 0
10.10.10.5/32 Remote BGP 21h54m04s 170
10.10.10.3 (tunneled) 0
10.10.10.6/32 Remote OSPF 01d00h19m 10
10.1.6.6 100
192.1.1.0/27 Local Local 01d01h33m 0
toVPN 0
-------------------------------------------------------------------------------
No. of Routes: 10

Between the RR's we need to configure MP-ebgp for exchanging vpn-ipv4 routes. Multihop 10 is also configured to increase the TTL value of ip header to 10 as they are not directly connected. Neighbor 10.10.10.5 is the system address of the neighbouring RR.


A:RR1>config>router>bgp# info
----------------------------------------------
group "Remote_AS_RR"
family vpn-ipv4
multihop 10
peer-as 64497
neighbor 10.10.10.5
exit
exit
----------------------------------------------

Verify the MP-EBGP session between the RR's

A:RR1# show router bgp neighbor 10.10.10.5
===============================================================================
BGP Neighbor
===============================================================================
Peer : 10.10.10.5
Group : Remote_AS_RR
-------------------------------------------------------------------------------
Peer AS : 64497 Peer Port : 179
Peer Address : 10.10.10.5
Local AS : 64496 Local Port : 50864
Local Address : 10.10.10.6
Peer Type : External
State : Established Last State : Active
Last Event : recvKeepAlive
Last Error : Unrecognized Error
Local Family : VPN-IPv4
Remote Family : VPN-IPv4
Hold Time : 90 Keep Alive : 30
Active Hold Time : 90 Active Keep Alive : 30
Cluster Id : None
Preference : 170 Num of Update Flaps : 1
Recd. Paths : 1
IPv4 Recd. Prefixes : 0 IPv4 Active Prefixes : 0
IPv4 Suppressed Pfxs : 0 VPN-IPv4 Suppr. Pfxs : 0
VPN-IPv4 Recd. Pfxs : 1 VPN-IPv4 Active Pfxs : 0
Advertise Label : None
Auth key chain : n/a
Bfd Enabled : Disabled L2 VPN Cisco Interop : Disabled
Local Capability : RtRefresh MPBGP 4byte ASN
Remote Capability : RtRefresh MPBGP 4byte ASN
Import Policy : None Specified / Inherited
Export Policy : None Specified / Inherited
-------------------------------------------------------------------------------
Neighbors : 1


VPRN routes and ping can be verified by using the following command:-

A:PE1# show router 10 route-table
===============================================================================
Route Table (Service: 10)
===============================================================================
Dest Prefix Type Proto Age Pref
Next Hop[Interface Name] Metric
-------------------------------------------------------------------------------
192.1.1.0/27 Local Local 01d00h49m 0
toVPN 0
192.2.1.0/27 Remote BGP VPN 22h12m56s 170
10.10.10.2 (tunneled) 0
-------------------------------------------------------------------------------
No. of Routes: 2
===============================================================================
A:PE1# ping router 10 192.2.1.1
PING 192.2.1.1 56 data bytes
64 bytes from 192.2.1.1: icmp_seq=1 ttl=64 time=2.42ms.
64 bytes from 192.2.1.1: icmp_seq=2 ttl=64 time=2.30ms.
64 bytes from 192.2.1.1: icmp_seq=3 ttl=64 time=2.30ms.
64 bytes from 192.2.1.1: icmp_seq=4 ttl=64 time=2.31ms.
64 bytes from 192.2.1.1: icmp_seq=5 ttl=64 time=2.31ms.
---- 192.2.1.1 PING Statistics ----
5 packets transmitted, 5 packets received, 0.00% packet loss
round-trip min = 2.30ms, avg = 2.33ms, max = 2.42ms, stddev = 0.064ms
A:PE1# show router route-table


A:ASBR1# show router bgp neighbor 10.3.4.4
===============================================================================
BGP Neighbor
===============================================================================
Peer : 10.3.4.4
Group : Inter_AS
-------------------------------------------------------------------------------
Peer AS : 64497 Peer Port : 49492
Peer Address : 10.3.4.4
Local AS : 64496 Local Port : 179
Local Address : 10.3.4.3
Peer Type : External
State : Established Last State : Established
Last Event : recvKeepAlive
Last Error : Cease
Local Family : IPv4
Remote Family : IPv4
Hold Time : 90 Keep Alive : 30
Active Hold Time : 90 Active Keep Alive : 30
Cluster Id : None
Preference : 170 Num of Update Flaps : 0
Recd. Paths : 0
IPv4 Recd. Prefixes : 0 IPv4 Active Prefixes : 0
IPv4 Suppressed Pfxs : 0 VPN-IPv4 Suppr. Pfxs : 0
VPN-IPv4 Recd. Pfxs : 0 VPN-IPv4 Active Pfxs : 0

A:PE1>config>service>vprn# info
----------------------------------------------
description "Customer A"
router-id 10.10.10.1
autonomous-system 64496
route-distinguisher 64496:1
auto-bind ldp
vrf-target target:64496:10
interface "toVPN" create
address 192.1.1.1/27
loopback
exit
exit
no shutdown
----------------------------------------------