Do you like this site? Remember to share it to all your friends on Facebook and Twitter!

Thursday, March 18, 2010

Using "peer-group" shutdown to prepare BGP peer configurations without bothering

I was doing a BGP lab with my students.

I wanted to pre-configure some BGP neighbors, and I wanted all neighbor sessions to start at once only by some simple commands. Furthermore, I do not want to bother my students by retrying BGP neighbor connections before they completed their BGP neighbor configurations.

I came up this small trick to achieve above goals:

router bgp 65001
!...
 neighbor IBGP peer-group
 neighbor IBGP remote-as 65001
 neighbor IBGP shutdown
 neighbor IBGP update-source Loopback0
 neighbor 10.200.200.11 peer-group IBGP
 neighbor 10.200.200.12 peer-group IBGP
 neighbor 10.200.200.13 peer-group IBGP

As you can see, I used "peer-group" to create a "shutdown" template. Then, I assigned each neighbors into this peer group.

After above configurations, all neighbors are configured but not activated.

R4#show ip bgp summ
BGP router identifier 10.200.200.14, local AS number 65001
BGP table version is 2, main routing table version 2
1 network entries using 97 bytes of memory
1 path entries using 36 bytes of memory
1 BGP path attribute entries using 60 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 193 total bytes of memory
BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

10.200.200.11   4 65001       0       0        0    0    0 never    Idle (Admin)
10.200.200.12   4 65001       0       0        0    0    0 never    Idle (Admin)
10.200.200.13   4 65001       0       0        0    0    0 never    Idle (Admin)
R4#

When I wanted to activate all neighbors, I use this command:
router bgp 65001
 no neighbor IBGP shutdown

And yes, all neighbor sessions fire at once!

R4#show ip bgp summ
BGP router identifier 10.200.200.14, local AS number 65001
BGP table version is 3, main routing table version 3
2 network entries using 194 bytes of memory
2 path entries using 72 bytes of memory
2 BGP path attribute entries using 120 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 386 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

10.200.200.11   4 65001       0       0        0    0    0 never    Active
10.200.200.12   4 65001       0       0        0    0    0 never    Active
10.200.200.13   4 65001       4       5        2    0    0 00:00:00        1
R4#
00:33:28: %BGP-5-ADJCHANGE: neighbor 10.200.200.13 Up
R4#

What do you think of this small trick?
Do you like this post? You really should consider Subscribing by Email!


Related Posts with Thumbnails

2 comments:

  1. I liked that thanks, just used it to fix a problem in production!

    ReplyDelete
    Replies
    1. I am really glad to know it helps! Thanks a lot for your feedback!

      Delete

Tip: you can also anonymously comment here.

Popular Posts