Sunday, November 25, 2012

Juniper LDP over RSVP Tunnel MPLS/VPN

LDP over RSVP Tunnel MPLS




Create RSVP LSP between R6 and r7, make sure the LDP signal can across the RSVP LSP
root@Olive# show r6 protocols                       
rsvp {
    interface em2.16;
}
mpls {
    label-switched-path r6-r7 {
        to 7.7.7.7;
        ldp-tunneling;
    }
    interface em2.16;
    interface em2.26;
}
ospf {
    traffic-engineering;
    area 0.0.0.0 {
        interface all;
        interface lo0.6 {
            passive;
        }
    }
}
ldp {
    interface em2.26;
    interface lo0.6;
}

root@Olive# show r7 protocols    
rsvp {
    interface em2.17;
}
mpls {
    label-switched-path r7-r6 {
        to 6.6.6.6;
        ldp-tunneling;
    }
    interface em2.17;
    interface em2.37;
}
ospf {
    traffic-engineering;
    area 0.0.0.0 {
        interface all;
        interface lo0.7 {
            passive;
        }
    }
}
ldp {
    interface em2.37;
    interface lo0.7;
}

Enable OSPF TE on r1
root@Olive# run show mpls lsp logical-system r6   
Ingress LSP: 1 sessions
To              From            State Rt P     ActivePath       LSPname
7.7.7.7         6.6.6.6         Up     0 *                      r6-r7
Total 1 displayed, Up 1, Down 0

Egress LSP: 1 sessions
To              From            State   Rt Style Labelin Labelout LSPname
6.6.6.6         7.7.7.7         Up       0  1 FF       3        - r7-r6
Total 1 displayed, Up 1, Down 0

Transit LSP: 0 sessions
Total 0 displayed, Up 0, Down 0

CE Routing Table
root@Olive# run show route protocol ospf logical-system r4

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

5.5.5.5/32         *[OSPF/10] 00:23:51, metric 2
                    > to 192.168.24.2 via em2.24
192.168.35.0/24    *[OSPF/150] 00:23:51, metric 0, tag 3489661028
                    > to 192.168.24.2 via em2.24
224.0.0.5/32       *[OSPF/10] 00:25:33, metric 1
                      MultiRecv

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 = 2.000/2.671/4.021/0.845 ms

Check label from R2 To 5.5.5.5
root@Olive# run show route table vpn-a.inet.0 5.5.5.5/32 logical-system r2 detail | match "Label|Protocol next hop" 
                Label operation: Push 16, Push 299808(top)
                Label TTL action: prop-ttl, prop-ttl(top)
                Protocol next hop: 3.3.3.3
                VPN Label: 16

root@Olive# run show route table inet.3 3.3.3.3/32 logical-system r2 detail

inet.3: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
3.3.3.3/32 (1 entry, 1 announced)
        State:
        *LDP    Preference: 9
                Next hop type: Router
                Next-hop reference count: 2
                Next hop: 192.168.26.6 via em1.26, selected
                Label operation: Push 299808
                Label TTL action: prop-ttl
                State:
                Local AS:   100
                Age: 27:19      Metric: 1
                Task: LDP
                Announcement bits (1): 2-Resolve tree 1
                AS path: I

The label 16 is VPN label which is generate by R3, and the outside lebel is 299808 that is generated
by R6.
Check the label 299808 on R6.
root@Olive# run show route label 299808 logical-system r6 detail

mpls.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
299808 (1 entry, 1 announced)
        *LDP    Preference: 9
                Next hop type: Router, Next hop index: 1033
                Next-hop reference count: 2
                Next hop: 192.168.16.1 via em2.16 weight 0x1, selected
                Label-switched-path r6-r7
                Label operation: Swap 299776, Push 299792(top)
                Label TTL action: prop-ttl, prop-ttl(top)
                State:
                Age: 30:51      Metric: 1
                Task: LDP
                Announcement bits (1): 1-KRT
                AS path: I
                Prefixes bound to route: 3.3.3.3/32

R6 swap the label into 299776, and this swap label is distributed by R7 RSVP LSP.
And R6 will distribute outside label 299776 for r7, and this one is distributed by R1.
root@Olive# run show route label 299776 logical-system r1 detail     

mpls.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
299776 (1 entry, 1 announced)
        *RSVP   Preference: 7/1
                Next hop type: Router, Next hop index: 1027
                Next-hop reference count: 3
                Next hop: 192.168.16.6 via em1.16 weight 0x1, selected
                Label-switched-path r7-r6
                Label operation: Pop     
                State:
                Local AS:   100
                Age: 33:20      Metric: 1
                Task: RSVP
                Announcement bits (1): 1-KRT
                AS path: I


R1 will pop the label 299776 once it receive it. Then forward the label 299776 to R7.
root@Olive# run show route label 299776 logical-system r1 detail     

mpls.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
299776 (1 entry, 1 announced)
        *RSVP   Preference: 7/1
                Next hop type: Router, Next hop index: 1027
                Next-hop reference count: 3
                Next hop: 192.168.16.6 via em1.16 weight 0x1, selected
                Label-switched-path r7-r6
                Label operation: Pop     
                State:
                Local AS:   100
                Age: 38:29      Metric: 1
                Task: RSVP
                Announcement bits (1): 1-KRT
                AS path: I

R1 will pop the label 299776 once it receive it. Then forward the label 299776 to R7.
root@Olive# run show route label 299776 logical-system r7 detail     

mpls.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
299776 (1 entry, 1 announced)
        *LDP    Preference: 9
                Next hop type: Router, Next hop index: 1023
                Next-hop reference count: 2
                Next hop: 192.168.37.3 via em2.37, selected
                Label operation: Pop     
                State:
                Age: 39:14      Metric: 1
                Task: LDP
                Announcement bits (1): 1-KRT
                AS path: I
                Prefixes bound to route: 3.3.3.3/32


R7 will pop the label 299776 once it receive, and then forward the only one layer VPN label l6 to R3.
root@Olive# run show route label 16 logical-system r3

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

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