Sunday, December 13, 2015

BGP advanced task #4. BGP & DMVPN

Topology: 

Router R1 represents the central site, and routers R3, R4 & R5 represent branch routers.
Router R2 is Service Provider router.
Service provider owns prefix 192.168/16.
Link between R1 and R2 is 192.168.12.x/24.
R2 allocates IP addresses using DHCP  to routers R3, R4 and R5 from range 192.168.2.x/24.
Head office is allocated prefix 1/8, branches are allocated prefixes 3/8, 4/8 and 5/8.
Number of branches is expected to increase from 3 to 200.

Requirements:

1. Configure DMVPN Phase I, to provide connectivity between Central site to Branches. There is no need to provide branch to branch connectivity. Use network 1.0.0.x/24 for the tunnel. 
2. Use eBGP to provide routing between the central site to branches.
3. BGP configuration of central site router R1 should provide connectivity for existing and future sites, without need for additional configuration. Use minimal amount of configuration lines to achieve this requirement. 

Solution: 

Highlight the text below to reveal the solution.

DMVPN configuration is simple with multipoint GRE tunnel on R1, and GRE tunnels on R3, R4 and R5. 

In order to achieve requirement #3, use BGP Dynamic Neighbors feature. This allows R1 to accept and establish BGP sessions with branch routers without explicitly listing each neighbor (which would required 200 lines of configuration on R1). 

BGP Dynamic Neighbors feature is not supported in IOS-XR. 

R1: 


!
router bgp 65001
 bgp log-neighbor-changes
 bgp listen range 1.0.0.0/24 peer-group DYNAMIC
 network 1.0.0.0
 neighbor DYNAMIC peer-group
 neighbor DYNAMIC remote-as 65101
!
!
interface Tunnel1
 ip address 1.0.0.1 255.255.255.0
 no ip redirects
 ip nhrp map multicast dynamic
 ip nhrp network-id 1
 tunnel source Ethernet0/0
 tunnel mode gre multipoint
!

R3:

!
router bgp 65101
 bgp log-neighbor-changes
 network 3.0.0.0
 neighbor 1.0.0.1 remote-as 65001
!
interface Tunnel1
 ip address 1.0.0.3 255.255.255.0
 ip nhrp map 1.0.0.1 192.168.12.1
 ip nhrp map multicast 192.168.12.1
 ip nhrp network-id 1
 ip nhrp nhs 1.0.0.1
 tunnel source Ethernet0/0
 tunnel destination 192.168.12.1
!

Configuration of R4 and R5 is similar to configuration of R3. 

Verification:  

Note dynamically created neighbors on R1 marked with *. 

R1#show bgp sum
BGP router identifier 1.1.1.1, local AS number 65001
BGP table version is 7, main routing table version 7
4 network entries using 592 bytes of memory
4 path entries using 256 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1144 total bytes of memory
BGP activity 4/0 prefixes, 5/1 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
*1.0.0.3          4            65101      37      39           7           0     0        00:29:47    1
*1.0.0.4          4            65101      36      40           7           0     0        00:29:43    1
*1.0.0.5          4            65101      35      40           7           0     0        00:28:15    1
* Dynamically created based on a listen range command
Dynamically created neighbors: 3, Subnet ranges: 1

BGP peergroup DYNAMIC listen range group members:
  1.0.0.0/24

Total dynamically created neighbors: 3/(100 max), Subnet ranges: 1

No comments:

Post a Comment