BGP question

redgoblinredgoblin Member Posts: 57 ■■□□□□□□□□
Hey guys,

I've got a quick BGP question. Basically I'm using BGP as a failover solution on Primary and Secondary routers so that if the primary goes down, BGP will kick in and route LAN subnets down the secondary.

When I test this (by shutting down the primary) the BGP kicks in and routes down the secondary as intended. Problem is, when I unshut the secondary, the BGP doesn't kick back to the primary until I do a 'Soft Reconfig' to clear the session which then rightfully recognises the primary as having the weightier route and starts routing down it.

My question is, instead of having to do a manual 'soft-reconfig' command, is there some sort of dynamic command that can be used to automatically refresh a BGP session when it goes down?

Comments

  • tmlerdaltmlerdal Member Posts: 80 ■■□□□□□□□□
    I've got this sort of scenario setup in my network. What we've done is prepend the as path to the secondary path.

    Sadly I don't know BGP well enough right now to explain the specifics on how we did it, but here is a snippet of the config:
    router bgp 1031
    no synchronization
    bgp always-compare-med
    bgp log-neighbor-changes
    bgp redistribute-internal
    network 10.31.0.0 mask 255.255.0.0
    timers bgp 3 9
    neighbor 10.31.254.252 remote-as 1031
    neighbor 10.31.254.252 description Router1
    neighbor 10.31.254.252 ebgp-multihop 2
    neighbor 10.31.254.252 update-source Loopback0
    neighbor 10.31.254.252 next-hop-self
    neighbor 10.31.254.252 password 7 06141B335F5C1C0A44
    neighbor 10.32.254.253 remote-as 1032
    neighbor 10.32.254.253 description Router2
    neighbor 10.32.254.253 ebgp-multihop 2
    neighbor 10.32.254.253 update-source Loopback0
    neighbor 10.32.254.253 route-map AddR1toR2AS out
    neighbor 10.32.254.253 password 7 13170300181E11396A
    maximum-paths 4

    route-map AddR1toR2AS permit 10
    set as-path prepend 1031

    route-map AddASnumbers permit 10
    set as-path prepend 1031 1031
  • EdTheLadEdTheLad Member Posts: 2,112 ■■■■□□□□□□
    BGP should do this automatically, how long have you been waiting for the routing table to be populated? The bgp scan process runs every 60 seconds, this can be decreased using "bgp scan-time" by decreasing this value the bgp process will use more processing power but converge faster.Bgp also uses batched updates, check "bgp update-delay" command, default is minimum 5 sec.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • dtlokeedtlokee Member Posts: 2,381
    redgoblin wrote:
    Hey guys,

    I've got a quick BGP question. Basically I'm using BGP as a failover solution on Primary and Secondary routers so that if the primary goes down, BGP will kick in and route LAN subnets down the secondary.

    When I test this (by shutting down the primary) the BGP kicks in and routes down the secondary as intended. Problem is, when I unshut the secondary, the BGP doesn't kick back to the primary until I do a 'Soft Reconfig' to clear the session which then rightfully recognises the primary as having the weightier route and starts routing down it.

    My question is, instead of having to do a manual 'soft-reconfig' command, is there some sort of dynamic command that can be used to automatically refresh a BGP session when it goes down?

    What attributes are you using to modify the path selection process?
    The only easy day was yesterday!
  • cristi.grigorecristi.grigore Member Posts: 18 ■□□□□□□□□□
    tmlerdal wrote:
    I've got this sort of scenario setup in my network. What we've done is prepend the as path to the secondary path.

    Sadly I don't know BGP well enough right now to explain the specifics on how we did it, but here is a snippet of the config:
    router bgp 1031
    no synchronization
    bgp always-compare-med
    bgp log-neighbor-changes
    bgp redistribute-internal
    network 10.31.0.0 mask 255.255.0.0
    timers bgp 3 9
    neighbor 10.31.254.252 remote-as 1031
    neighbor 10.31.254.252 description Router1
    neighbor 10.31.254.252 ebgp-multihop 2
    neighbor 10.31.254.252 update-source Loopback0
    neighbor 10.31.254.252 next-hop-self
    neighbor 10.31.254.252 password 7 xxxxxxxxx
    neighbor 10.32.254.253 remote-as 1032
    neighbor 10.32.254.253 description Router2
    neighbor 10.32.254.253 ebgp-multihop 2
    neighbor 10.32.254.253 update-source Loopback0
    neighbor 10.32.254.253 route-map AddR1toR2AS out
    neighbor 10.32.254.253 password 7 xxxxxxxxx
    maximum-paths 4

    route-map AddR1toR2AS permit 10
    set as-path prepend 1031

    route-map AddASnumbers permit 10
    set as-path prepend 1031 1031

    tmlerdal, I think you should edit your post and delete the passwords for th BGP neighbors. You are using type 7 encryption, which is weak, and everyone can find out what the password is.

    As a word of advice, when posting real router configs, try to eliminate any sensitive information form the config first :)
  • tmlerdaltmlerdal Member Posts: 80 ■■□□□□□□□□
    thanks..wasn't paying attention to that in the configs...I renamed the routers, but didn't pay attention to the passwords.
Sign In or Register to comment.