Saturday, November 17, 2012

Juniper RSVP Signaled LSP

RSVP Signaled LSP

Verifying RSVP on R2
root@Olive# run show rsvp interface logical-system r2   
RSVP interface: 3 active
                  Active Subscr- Static      Available   Reserved    Highwater
Interface   State resv   iption  BW          BW          BW          mark
em2.12      Up         0   100%  1000Mbps    1000Mbps    0bps        0bps      
em2.23      Up         0   100%  1000Mbps    1000Mbps    0bps        0bps      
em2.24      Up         1   100%  1000Mbps    1000Mbps    0bps        0bps      


root@Olive# run show rsvp neighbor logical-system r2    
RSVP neighbor: 2 learned
Address            Idle Up/Dn LastChange HelloInt HelloTx/Rx MsgRcvd
192.168.24.4          0  1/0          19        9     5/5    3
192.168.12.1          0  1/0          19        9     5/5    2


Because R1 and R4 in different OSPF area, so it must disable cspf when creating RSVP path between R1 and R4 in LSP ingress and egress, check RSVP session state

root@Olive# run show rsvp session ingress logical-system r1
Ingress RSVP: 2 sessions
To              From            State   Rt Style Labelin Labelout LSPname
4.4.4.4         1.1.1.1         Up       2  1 FF       -   299840 r1-r4
4.4.4.4         1.1.1.1         Up       1  1 FF       -   299840 r1-r4-prime
Total 2 displayed, Up 2, Down 0


root@Olive# run show rsvp session egress logical-system r4    
Egress RSVP: 2 sessions
To              From            State   Rt Style Labelin Labelout LSPname
4.4.4.4         1.1.1.1         Up       0  1 FF       3        - r1-r4
4.4.4.4         1.1.1.1         Up       0  1 FF       3        - r1-r4-prime
Total 2 displayed, Up 2, Down 0


RSVP session path record
root@Olive# run show rsvp session ingress logical-system r1 detail
Ingress RSVP: 2 sessions

4.4.4.4
  From: 1.1.1.1, LSPstate: Up, ActiveRoute: 2
  LSPname: r1-r4, LSPpath: Primary
  LSPtype: Static Configured
  Suggested label received: -, Suggested label sent: -
  Recovery label received: -, Recovery label sent: 299840
  Resv style: 1 FF, Label in: -, Label out: 299840
  Time left:    -, Since: Mon Nov 12 00:28:08 2012
  Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500
  Port number: sender 1 receiver 60342 protocol 0
  PATH rcvfrom: localclient
  Adspec: sent MTU 1500
  Path MTU: received 1500
  PATH sentto: 192.168.12.2 (em1.12) 8 pkts
  RESV rcvfrom: 192.168.12.2 (em1.12) 9 pkts
  Explct route: 2.2.2.2 4.4.4.4
  Record route: 192.168.12.2 192.168.24.4 

4.4.4.4
  From: 1.1.1.1, LSPstate: Up, ActiveRoute: 1
  LSPname: r1-r4-prime, LSPpath: Primary
  LSPtype: Static Configured
  Suggested label received: -, Suggested label sent: -
  Recovery label received: -, Recovery label sent: 299840
  Resv style: 1 FF, Label in: -, Label out: 299840
  Time left:    -, Since: Mon Nov 12 00:28:08 2012
  Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500
  Port number: sender 1 receiver 60343 protocol 0
  PATH rcvfrom: localclient
  Adspec: sent MTU 1500
  Path MTU: received 1500
  PATH sentto: 192.168.13.3 (em1.13) 8 pkts
  RESV rcvfrom: 192.168.13.3 (em1.13) 9 pkts
  Explct route: 3.3.3.3 4.4.4.4
  Record route: 192.168.13.3 192.168.34.4 
Total 2 displayed, Up 2, Down 0


In order to use the special LSP to destination, create nex-hop policy in ingress,
In this case R1 To R5 will use r1-r4 LSP and R1 To R6 will use r1-r4-prime LSP
root@Olive# show r1 policy-options policy-statement rsvp   
term 1 {
    from {
        protocol bgp;
        neighbor 4.4.4.4;
        route-filter 5.5.5.5/32 exact;
    }
    then {
        install-nexthop lsp r1-r4;
    }
}
term 2 {
    from {
        protocol bgp;
        neighbor 4.4.4.4;
        route-filter 6.6.6.6/32 exact;
    }
    then {
        install-nexthop lsp r1-r4-prime;
    }
}


root@Olive# show r1 routing-options
autonomous-system 100;
forwarding-table {
    export rsvp;
}


Traceroute path
root@Olive# run traceroute 5.5.5.5 logical-system r1
traceroute to 5.5.5.5 (5.5.5.5), 30 hops max, 40 byte packets
 1  192.168.12.2 (192.168.12.2)  0.559 ms  0.725 ms  0.683 ms
     MPLS Label=299840 CoS=0 TTL=1 S=1
 2  192.168.24.4 (192.168.24.4)  0.863 ms  0.799 ms  0.623 ms
 3  5.5.5.5 (5.5.5.5)  1.046 ms  0.835 ms  0.814 ms

root@Olive# run traceroute 6.6.6.6 logical-system r1   
traceroute to 6.6.6.6 (6.6.6.6), 30 hops max, 40 byte packets
 1  192.168.13.3 (192.168.13.3)  1.683 ms  1.666 ms  1.548 ms
     MPLS Label=299840 CoS=0 TTL=1 S=1
 2  192.168.34.4 (192.168.34.4)  2.473 ms  2.291 ms  2.117 ms
 3  6.6.6.6 (6.6.6.6)  2.444 ms  2.939 ms  2.519 ms


R1 Protocols Configuration
root@Olive# show r1 protocols     
rsvp {
    interface all;
}
mpls {
    traffic-engineering mpls-forwarding;
    label-switched-path r1-r4 {
        to 4.4.4.4;
        no-cspf;
        primary r1-r4;
    }
    label-switched-path r1-r4-prime {
        to 4.4.4.4;
        no-cspf;
        primary r1-r4-prime;
    }
    path r1-r4 {
        2.2.2.2; --> Strict to next-hop neighbor directly connected
        4.4.4.4 loose; --> Will find another path
    }
    path r1-r4-prime {
        3.3.3.3;

        4.4.4.4 loose;
    }
    interface all;
}
bgp {
    group ibgp {
        type internal;
        local-address 1.1.1.1;
        neighbor 2.2.2.2;
        neighbor 3.3.3.3;
        neighbor 4.4.4.4;
    }
}
ospf {
    area 0.0.0.1 {
        stub;
        interface em1.12;
        interface em1.13;
        interface lo0.1 {
            passive;
        }
    }
}