2

I am trying to build resilient core networking by using BGP. I have two routers, R1 and R2, which are connected to the single ISP. ISP has two routers (let's call them R3 and R4). My have successfully configured BGP peering with R3 from R1 and R4 from R2. The ISP is announcing the default gateway via both links. However, I am having difficulties with BGP not reannouncing the default gateway over iBGP session between R1 and R2. My topology looks like this.

I am attaching config files (relevant information is replaced):

R1 config

hostname Router
log file /var/log/quagga.log
log stdout
log timestamp precision 6
hostname bgpd
bgp config-type cisco
!
debug bgp as4
debug bgp events
debug bgp keepalives
debug bgp updates
debug bgp fsm
debug bgp filters
debug bgp zebra
!
password zebra
enable password zebra
!
interface bge0
 ipv6 nd suppress-ra
 no link-detect
!
interface bge1
 ipv6 nd suppress-ra
 no link-detect
!
interface igb0
 ipv6 nd suppress-ra
 no link-detect
!
interface igb1
 ipv6 nd suppress-ra
 no link-detect
!
interface igb2
 ipv6 nd suppress-ra
 no link-detect
!
interface igb3
 ipv6 nd suppress-ra
 no link-detect
!
interface lagg0
 ipv6 nd suppress-ra
 no link-detect
!
interface lo0
 no link-detect
!
interface lo1
 no link-detect
!
interface pfsync0
 ipv6 nd suppress-ra
 no link-detect
!
interface vlan3
 ipv6 nd suppress-ra
 no link-detect
!
interface vlan4
 ipv6 nd suppress-ra
 no link-detect
!
interface vlan5
 ipv6 nd suppress-ra
 no link-detect
!
interface vlan101
 ipv6 nd suppress-ra
 no link-detect
!
interface vlan106
 ipv6 nd suppress-ra
 no link-detect
!
interface vlan107
 ipv6 nd suppress-ra
 no link-detect
!
interface vlan109
 ipv6 nd suppress-ra
 no link-detect
!
router bgp 6001
 no synchronization
 bgp router-id 1.1.2.253
 bgp log-neighbor-changes
 network 1.1.1.0
 network 1.1.2.0
 neighbor 2.1.1.249 remote-as 6000
 neighbor 2.1.1.249 soft-reconfiguration inbound
 neighbor 2.1.1.249 prefix-list 3 in
 neighbor 2.1.1.249 route-map R1-DC-MAP out
 neighbor 1.1.2.254 remote-as 6001
 neighbor 1.1.2.254 next-hop-self
 neighbor 1.1.2.254 soft-reconfiguration inbound
 maximum-paths 2
 no auto-summary
!
ip route 1.1.1.0/24 Null0
ip route 1.1.2.0/24 Null0
!
ip prefix-list 1 seq 5 permit 1.1.1.0/24
ip prefix-list 2 seq 5 permit 1.1.2.0/24
ip prefix-list 3 seq 5 deny 1.1.1.0/23
ip prefix-list 3 seq 10 permit any
!
route-map R1-DC-MAP permit 10
 match ip address prefix-list 1
 set as-path prepend 6001 6001 6001
!
route-map R1-DC-MAP permit 20
 match ip address prefix-list 2
!
ip forwarding
!
line vty
!
end

R2 config:

hostname Router
log timestamp precision 6
hostname bgpd
log file /var/log/quagga.log
log stdout
bgp config-type cisco
!
debug zebra events
debug zebra packet
debug zebra rib
debug bgp as4
debug bgp events
debug bgp updates
!
password zebra
enable password zebra
!
interface bge0
 ipv6 nd suppress-ra
 no link-detect
!
interface bge1
 ipv6 nd suppress-ra
 no link-detect
!
interface igb0
 ipv6 nd suppress-ra
 no link-detect
!
interface igb1
 ipv6 nd suppress-ra
 no link-detect
!
interface igb2
 ipv6 nd suppress-ra
 no link-detect
!
interface igb3
 ipv6 nd suppress-ra
 no link-detect
!
interface lagg0
 ipv6 nd suppress-ra
 no link-detect
!
interface lo0
 no link-detect
!
interface lo1
 ipv6 nd suppress-ra
 no link-detect
!
interface pfsync0
 ipv6 nd suppress-ra
 no link-detect
!
interface vlan3
 ipv6 nd suppress-ra
 no link-detect
!
interface vlan4
 ipv6 nd suppress-ra
 no link-detect
!
interface vlan5
 ipv6 nd suppress-ra
 no link-detect
!
interface vlan101
 ipv6 nd suppress-ra
 no link-detect
!
interface vlan106
 ipv6 nd suppress-ra
 no link-detect
!
interface vlan107
 ipv6 nd suppress-ra
 no link-detect
!
interface vlan109
 ipv6 nd suppress-ra
 no link-detect
!
router bgp 6001
 no synchronization
 bgp router-id 1.1.2.254
 bgp log-neighbor-changes
 network 1.1.1.0
 network 1.1.2.0
 neighbor 3.1.1.25 remote-as 6000
 neighbor 3.1.1.25 soft-reconfiguration inbound
 neighbor 3.1.1.25 prefix-list 3 in
 neighbor 3.1.1.25 route-map R2-SIX-MAP out
 neighbor 1.1.2.253 remote-as 6001
 neighbor 1.1.2.253 next-hop-self
 neighbor 1.1.2.253 soft-reconfiguration inbound
 no auto-summary
!
ip route 1.1.1.0/24 Null0
ip route 1.1.2.0/24 Null0
!
ip prefix-list 1 seq 5 permit 1.1.2.0/24
ip prefix-list 2 seq 5 permit 1.1.1.0/24
ip prefix-list 3 seq 5 deny 1.1.1.0/23
ip prefix-list 3 seq 10 permit any
!
route-map R2-SIX-MAP permit 10
 match ip address prefix-list 1
 set as-path prepend 6001 6001 6001
!
route-map R2-SIX-MAP permit 20
 match ip address prefix-list 2
!
ip forwarding
!
line vty
!
end

I am using Quagga with latest FreeBSD (10.2).

  • 2
    How do you know the route isn't announced in iBGP? If you just issued a show ip route, it is normal you don't see the other default route. – Xavier Nicollet Dec 9 '15 at 19:15
  • If both the ISP routers are announcing the default route, then it will fail over when one link goes down. You really do not want per-packet load balancing because that will cause out-of-order packet delivery that can cause slowdowns and kill real-time protocols. – Ron Maupin Mar 21 at 23:38
1

...I have two routers, R1 and R2, which are connected to the single ISP. ISP has two routers (let's call them R3 and R4).

Router R1 and R2 would form a iBGP neighborship via the loopback interface. The quagga configs are lacking information about the used IGP (OSPF/IS-IS/RIP). Without working IGP it might not work, static routing will make only things more complicated and is not a proper IGP for this solution.

The ISP is announcing the default gateway via both links. However, I am having difficulties with BGP not reannouncing the default gateway over iBGP session between R1 and R2. My topology looks like this.

Since the ISP is announcing default-network to your eBGP neighbors R1/R2, via directly connected links, ask the ISP if they have load-sharing enabled on their BGP routers that are connected to your routers. The ISP would see 2 paths to your announced IP prefixes on their side.

Second, if routers R1/R2 are receiving the "default-network" these both routers R1/R2 would need to redistribute the 0.0.0.0/0 into the IGP, or do the same what your ISP does. R1/R2 would need to announce the default network into the IGP. Redistributing 0.0.0.0/0 might be over-complicated. Annoucing a default from R1/R2 with higher metric into IGP is a much simpler design. Simpler is better.

0

You can research the "maximum-paths ibgp 2" command in BGP that handles the load balancing aspect assuming other attributes match.

  • How would that help on eBGP sessions to his ISP? You could consider adding some more details to your answer to explain what this command does and why you think it helps. – Teun Vink Mar 22 at 5:43
  • The question is load balancing is not occurring on iBGP rather than eBGP. For eBGP, the simplest way depending upon the vendor, is to use "multipath" or "maximum-path 2 " command to make sure you have active/active setup on 2 links going out of our AS. Assuming active/active setup is established on eBGP, the only question remains is achieving same setup on the iBGP setup, for which I suggested "maximum-paths ibgp 2" command or command to such an effect depending on the vendor. A simple show route then for the default gateway can confirm if R1 and R2. – Shaunak Kakade Mar 22 at 17:56
  • Come to think of it, this is a scenario where "load balancing" wont be possible but "load sharing" is possible. Traffic policies can be configured for inbound/outbound and link failure will be moved to another link... Maximum-path 2 command should be configured on R1. The purpose of this command is to allow BGP to install multiple paths in the RIB. – Shaunak Kakade Mar 22 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.