Sunday, November 25, 2012

Juniper BGP Route Reflector MPLS/VPN

BGP Route Reflector MPLS/VPN
The IBGP neighbor is configured among the 3 PE's and RR. The cluster-id of RR is 1.1.1.1.
There are two path from R3 to 7.7.7.7/32, and R3 chooses the path via R2 to the next hop R6, and R6 chooses RR to the next hop of R3 VPN route.
Why not all the path via RR ? The reason is that RR just advertise VPNv4 route to PE.
When PE received the VPN route from VPN RR, it will check the next-hop of PE lo0 interface address in inet.3 route table. If using LDP for MPLS signal, the path of inet.3 route item will depend on inet.0 route table, it means if IGP path use R3-R2-R6,VPNv4 path will use the same IGP path. In this case R3 to R6 will across R1 or R2 in random.
In order to know the result more clearly, check the path from R2 to 7.7.7.7/32.
root@Olive# run show route 7.7.7.7/32 logical-system r2 detail 
< output omitted >
bgp.l3vpn.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)

100:1:7.7.7.7/32 (1 entry, 0 announced)
        *BGP    Preference: 170/-101
                Route Distinguisher: 100:1
                Next hop type: Indirect
                Next-hop reference count: 6
                Source: 1.1.1.1
                Next hop type: Router, Next hop index: 1075
                Next hop: 192.168.26.6 via em1.26, selected
                Label operation: Push 16
                Label TTL action: prop-ttl
                Protocol next hop: 6.6.6.6
                Push 16
                Indirect next hop: 8f845a0 131075
                State:
                Local AS:   100 Peer AS:   100
                Age: 4:04       Metric2: 1
                Task: BGP_100.1.1.1.1+179
                AS path: 700 I (Originator) Cluster list:  1.1.1.1
                AS path:  Originator ID: 6.6.6.6
                Communities: target:100:1
                Import Accepted
                VPN Label: 16
                Localpref: 100
                Router ID: 1.1.1.1
                Secondary Tables: vpn-a.inet.0

The traffic not always via RR, but to the next-hop PE of VPN route by the IGP shortest path, and the next-hop is not RR as well. R2 transfer traffic to R6 directly, check the label on R6.
root@Olive# run show route label 16 logical-system r6

mpls.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

16                 *[VPN/0] 00:12:42
                      to table vpn-a.inet.0, Pop

The function of RR is just advertise the VPNv4 routing to all PE's belong to this cluster, and will not change the next-hop (Because there is no any VPN customer on RR, and it can’t generate VPN label,
and can’t work as VPNv4 next-hop as well).
Check the BPG neighbor summary information on R2, there is no IBGP neighbor relationship between R2 and R6.
It means that the routing control plane is transferred by RR, but R2 not learn from R6 in directly. While in forwarding plane, it will not via RR, and transferred to R6 directly.
root@Olive# run show bgp summary logical-system r2
Groups: 2 Peers: 2 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
bgp.l3vpn.0            4          4          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
1.1.1.1                 100         42         42       0       0       16:56 Establ
  bgp.l3vpn.0: 4/4/4/0
  vpn-a.inet.0: 4/4/4/0
192.168.24.4            400         44         47       0       0       18:07 Establ
  vpn-a.inet.0: 1/2/2/0

The reachable between CE's
root@Olive# run ping 7.7.7.7 logical-system r4 source 4.4.4.4 rapid
PING 7.7.7.7 (7.7.7.7): 56 data bytes
!!!!!
--- 7.7.7.7 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.792/1.219/2.385/0.593 ms

root@Olive# run ping 5.5.5.5 logical-system r4 source 4.4.4.4 rapid
PING 5.5.5.5 (5.5.5.5): 56 data bytes
!!!!!
--- 5.5.5.5 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.502/3.315/4.997/1.165 ms