Thursday, 18 July 2019

RSVP with BGP (Next-Hop Self)


BGP Next-Hop

For IBGP routes, one major requirement is to resolve their next-hop. Generally the next-hop are resolve by IGP, however we can resolve the next-hop via MPLS LSP.

RSVP/LDP MPLS LSPs are installed in inet.3 routing table whereas IGP (OSPF/IS-IS) routes are installed in inet.0 routing table. BGP will consult both inet.0 and inet.3 routing table to resolve its protocol next-hop. As the BGP next-hop can be resolved via both IGP and RSVP/LDP, the router will prefer the RSVP/LDP because of their lower protocol preference. Hence BGP will use the inet.3 routing table to resolve its next-hop. Note that even the in case of protocol preferences are same the BGP will preferred the inet.3 routing table.

Following diagram explain the BGP next-hop route resolution process without MPLS LSP.


Here we can see that the PE1 forward the route to PE2 with next-hop self. Applying the next-hop self policy on PE1, IBGP session will change the next-hop of the route to be the loop-back address of PE1. PE2 will receive the route with protocol next-hop PE1 (192.168.2.21) and it will resolve the next-hop via the OSPF route install in its inet.0 routing table.

Lets check the same process with MPLS LSP.


Bidirectional RSVP sessions and LSPs are establish between two PE routers. PE2 can resolve the protocol next-hop via both RSVP (install in inet.3) or OSPF (install in inet.0). However it will prefer the RSVP route since it has the lower route preference (7) as compare to OSPF (10). Thus PE2 will use the RSVP MPLS LSP to forwarding traffic for route 192.168.15.0/24. This will ensure that the P routers have the number of prefixes to minimum and it also give opportunity to use MPLS RSVP traffic engineering.

CONFIGURATION



PE-1

Interface IP Configuration
set interfaces ge-0/0/0 unit 0 family inet address 10.0.10.1/24
set interfaces ge-0/0/8 unit 0 family inet address 172.22.211.1/24
set interfaces ge-0/0/9 unit 0 family inet address 172.22.210.1/24
set interfaces lo0 unit 0 family inet address 192.168.1.1/32

Interface MPLS Configuration
set interfaces ge-0/0/9 unit 0 family mpls
set interfaces ge-0/0/8 unit 0 family mpls

OSPF Configuration
set protocols ospf area 0.0.0.0 interface ge-0/0/8.0
set protocols ospf area 0.0.0.0 interface ge-0/0/9.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set routing-options autonomous-system 65512

RSVP Configuration
set protocols rsvp interface ge-0/0/8.0
set protocols rsvp interface ge-0/0/9.0

MPLS Configuration
set protocols mpls no-cspf
set protocols mpls label-switched-path pe1-to-pe2 from 192.168.1.1
set protocols mpls label-switched-path pe1-to-pe2 to 192.168.1.2
set protocols mpls interface ge-0/0/8.0
set protocols mpls interface ge-0/0/9.0

BGP Configuration
set protocols bgp group EBGP-CEA type external
set protocols bgp group EBGP-CEA as-override
set protocols bgp group EBGP-CEA neighbor 10.0.10.2 peer-as 65101
set protocols bgp group IBGP-PE2 type internal
set protocols bgp group IBGP-PE2 local-address 192.168.1.1
set protocols bgp group IBGP-PE2 neighbor 192.168.1.2
set protocols bgp group IBGP-PE2 export NHS

Nest Hop Self Policy
set policy-options policy-statement NHS term 10 from protocol bgp
set policy-options policy-statement NHS term 10 from neighbor 10.0.10.2
set policy-options policy-statement NHS term 10 then next-hop self
set policy-options policy-statement NHS term 10 then accept

PE-2

Interface IP Configuration
set interfaces ge-0/0/0 unit 0 family inet address 10.0.11.1/24
set interfaces ge-0/0/8 unit 0 family inet address 172.22.213.1/24
set interfaces ge-0/0/9 unit 0 family inet address 172.22.212.1/24
set interfaces lo0 unit 0 family inet address 192.168.1.2/32

Interface MPLS Configuration
set interfaces ge-0/0/8 unit 0 family mpls
set interfaces ge-0/0/9 unit 0 family mpls

OSPF Configuration
set protocols ospf area 0.0.0.0 interface ge-0/0/8.0
set protocols ospf area 0.0.0.0 interface ge-0/0/9.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set routing-options autonomous-system 65512

RSVP Configuration
set protocols rsvp interface ge-0/0/8.0
set protocols rsvp interface ge-0/0/9.0

MPLS Static LSP Configuration
set protocols mpls no-cspf
set protocols mpls label-switched-path pe2-to-pe1 from 192.168.1.2
set protocols mpls label-switched-path pe2-to-pe1 to 192.168.1.1
set protocols mpls interface ge-0/0/8.0
set protocols mpls interface ge-0/0/9.0

BGP Configuration
set protocols bgp group EBGP-CEB type external
set protocols bgp group EBGP-CEB as-override
set protocols bgp group EBGP-CEB neighbor 10.0.11.2 peer-as 65101
set protocols bgp group IBGP-PE1 type internal
set protocols bgp group IBGP-PE1 local-address 192.168.1.2
set protocols bgp group IBGP-PE1 neighbor 192.168.1.1
set protocols bgp group IBGP-PE1 export NHS

Nest Hop Self Policy
set policy-options policy-statement NHS term 10 from protocol bgp
set policy-options policy-statement NHS term 10 from neighbor 10.0.11.2
set policy-options policy-statement NHS term 10 then next-hop self
set policy-options policy-statement NHS term 10 then accept


P-1

Interface IP Configuration
set interfaces ge-0/0/0 unit 0 family inet address 172.22.201.1/24
set interfaces ge-0/0/1 unit 0 family inet address 172.22.202.1/24
set interfaces ge-0/0/9 unit 0 family inet address 172.22.210.2/24
set interfaces lo0 unit 0 family inet address 192.168.5.1/32

Interface MPLS Configuration
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/9 unit 0 family mpls

OSPF Configuration
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/9.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set routing-options autonomous-system 65512

RSVP Configuration
set protocols rsvp interface all

MPLS Configuration
set protocols mpls no-cspf
set protocols mpls interface all


P-2

Interface IP Configuration
set interfaces ge-0/0/0 unit 0 family inet address 172.22.203.1/24
set interfaces ge-0/0/1 unit 0 family inet address 172.22.202.2/24
set interfaces ge-0/0/8 unit 0 family inet address 172.22.211.2/24
set interfaces lo0 unit 0 family inet address 192.168.5.2/32

Interface MPLS Configuration
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/8 unit 0 family mpls

OSPF Configuration
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/8.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set routing-options autonomous-system 65512

RSVP Configuration
set protocols rsvp interface all

MPLS Configuration
set protocols mpls no-cspf
set protocols mpls interface all

P-3

Interface IP Configuration
set interfaces ge-0/0/0 unit 0 family inet address 172.22.201.2/24
set interfaces ge-0/0/1 unit 0 family inet address 172.22.204.1/24
set interfaces ge-0/0/9 unit 0 family inet address 172.22.212.2/24
set interfaces lo0 unit 0 family inet address 192.168.5.3/32

Interface MPLS Configuration
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/9 unit 0 family mpls

OSPF Configuration
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/9.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive

RSVP Configuration
set protocols rsvp interface all

MPLS Static LSP Configuration
set protocols mpls no-cspf
set protocols mpls interface all

P-4

Interface IP Configuration
set interfaces ge-0/0/0 unit 0 family inet address 172.22.203.2/24
set interfaces ge-0/0/1 unit 0 family inet address 172.22.204.2/24
set interfaces ge-0/0/8 unit 0 family inet address 172.22.213.2/24
set interfaces lo0 unit 0 family inet address 192.168.5.3/32

Interface MPLS Configuration
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/8 unit 0 family mpls

OSPF Configuration
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/8.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive

RSVP Configuration
set protocols rsvp interface all

MPLS Static LSP Configuration
set protocols mpls no-cspf
set protocols mpls interface all

CE-A

set interfaces ge-0/0/7 unit 0 family inet address 10.0.10.2/24
set interfaces lo0 unit 1 family inet address 192.168.11.1/32
set protocols bgp group EBGP-CEA type external
set protocols bgp group EBGP-CEA export adv-bgp
set protocols bgp group EBGP-CEA peer-as 65512
set protocols bgp group EBGP-CEA neighbor 10.0.10.1
set policy-options policy-statement adv-bgp term 10 from protocol direct
set policy-options policy-statement adv-bgp term 10 from route-filter 192.168.11.1/32 exact
set policy-options policy-statement adv-bgp term 10 then accept
set policy-options policy-statement adv-bgp term 20 from protocol static
set policy-options policy-statement adv-bgp term 20 then accept
set policy-options policy-statement adv-bgp term 30 then reject
set routing-options static route 172.16.1.0/24 reject
set routing-options static route 172.16.2.0/24 reject
set routing-options autonomous-system 65101

CE-B

set interfaces ge-0/0/7 unit 0 family inet address 10.0.11.2/24
set interfaces lo0 unit 1 family inet address 192.168.11.2/32
set protocols bgp group EBGP-CEB type external
set protocols bgp group EBGP-CEB export export-bgp
set protocols bgp group EBGP-CEB neighbor 10.0.11.1 peer-as 65512
set policy-options policy-statement export-bgp term 10 from protocol direct
set policy-options policy-statement export-bgp term 10 from route-filter 192.168.11.2/32 exact
set policy-options policy-statement export-bgp term 10 then accept
set policy-options policy-statement export-bgp term 20 from protocol static
set policy-options policy-statement export-bgp term 20 then accept
set policy-options policy-statement export-bgp term 30 then reject
set routing-options static route 192.168.11.1/32 lsp-next-hop pe2-to-pe1
set routing-options static route 172.17.1.0/24 reject
set routing-options static route 172.17.2.0/24 reject
set routing-options autonomous-system 65101


VERIFICATION

PE-1 Route Table




PE-2 Route Table 



__________________________________________________

No comments:

Post a Comment