2

I have a problem when I try to achieve load sharing with bgp. My scenario is http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13762-40.html#conf3. Only difference to this is that the ISP is sending me the full bgp table.

My problem is that when I shutdown r101-r103 link (vlan4 in my case), r101 isn't able to route anything because it has only directly connected routes in its routing table. Shouldn't be r102 advertising full bgp over ibgp session?

Configuration file from r101:

!
hostname Router
log file /var/log/quagga.log
log stdout
hostname bgpd
bgp config-type cisco
!
debug bgp updates in
!
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 1
 no synchronization
 bgp router-id 0.0.0.1
 bgp log-neighbor-changes
 network 1.0.0.0
 network 2.0.0.0
 neighbor 4.4.4.1 remote-as 2
 neighbor 4.4.4.1 description "R101 uplink"
 neighbor 4.4.4.1 update-source 4.4.4.2
 neighbor 4.4.4.1 send-community both
 neighbor 4.4.4.1 route-map R1-MAP out
 neighbor 1.1.1.2 remote-as 1
 neighbor 1.1.1.2 description "R101 BGP interconnect"
 neighbor 1.1.1.2 update-source 1.1.1.1
 neighbor 1.1.1.2 next-hop-self
 neighbor 1.1.1.2 send-community both
 neighbor 1.1.1.2 soft-reconfiguration inbound
 maximum-paths 2
 no auto-summary
!
ip prefix-list 1 seq 5 permit 2.0.0.0/8
ip prefix-list 2 seq 5 permit 1.0.0.0/8
!
route-map R1-MAP permit 10
 match ip address prefix-list 1
 set as-path prepend 1 1 1
!
route-map R1-MAP permit 20
 match ip address prefix-list 2
!
ip forwarding
!
line vty
!
end

R102 configuration file:

hostname Router
hostname bgpd
log file /var/log/quagga.log
log stdout
bgp config-type cisco
!
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
 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 1
 no synchronization
 bgp router-id 0.0.0.2
 bgp log-neighbor-changes
 network 1.0.0.0
 network 2.0.0.0
 neighbor 3.3.3.1 remote-as 2
 neighbor 3.3.3.1 description "R102 uplink"
 neighbor 3.3.3.1 update-source 3.3.3.2
 neighbor 3.3.3.1 send-community both
 neighbor 3.3.3.1 route-map R102-MAP out
 neighbor 1.1.1.1 remote-as 1
 neighbor 1.1.1.1 description "R102 BGP interconnect"
 neighbor 1.1.1.1 update-source 1.1.1.2
 neighbor 1.1.1.1 next-hop-self
 neighbor 1.1.1.1 send-community both
 neighbor 1.1.1.1 soft-reconfiguration inbound
 no auto-summary
!
ip prefix-list 1 seq 5 permit 1.0.0.0/8
ip prefix-list 2 seq 5 permit 2.0.0.0/8
!
route-map R102-MAP permit 10
 match ip address prefix-list 1
 set as-path prepend 1 1 1
!
route-map R102-MAP permit 20
 match ip address prefix-list 2
!
ip forwarding
!
line vty
!
end

Network interfaces are on separate vlans over link aggregation interface. vlan4 is the link to the provider, vlan3 is the link between the two routers.

R101 interfaces:

vlan3: flags=8843 metric 0 mtu 1500
    options=303
    ether a0:36:9a:4a:ec:f1
    inet 1.1.1.1 netmask 0xfffffffc broadcast 1.1.1.3
    nd6 options=29
    media: Ethernet autoselect
    status: active
    vlan: 3 parent interface: lagg0
[root@r101 ~]# ifconfig vlan4
vlan4: flags=8943 metric 0 mtu 1500
    options=303
    ether a0:36:9a:4a:ec:f1
    inet 4.4.4.2 netmask 0xfffffff8 broadcast 4.4.4.7
    nd6 options=29
    media: Ethernet autoselect
    status: active
    vlan: 4 parent interface: lagg0

R102 interfaces:

[root@r102 ~]# ifconfig vlan3
vlan3: flags=8843 metric 0 mtu 1500
    options=303
    ether a0:36:9a:4a:ec:f1
    inet 1.1.1.2 netmask 0xfffffffc broadcast 1.1.1.3
    nd6 options=29
    media: Ethernet autoselect
    status: active
    vlan: 3 parent interface: lagg0
[root@r102 ~]# ifconfig vlan4
vlan4: flags=8943 metric 0 mtu 1500
    options=303
    ether a0:36:9a:4a:ec:f1
    inet 3.3.3.2 netmask 0xfffffff8 broadcast 3.3.3.7
    nd6 options=29
    media: Ethernet autoselect
    status: active
    vlan: 4 parent interface: lagg0
  • Where are you defining the interfaces with the addresses of 1.1.1.1 and 1.1.1.2? You have those as neighbors and update sources, but you need to have interfaces with those addresses. Also, in BGP, the network statements are of specific, classless networks. Without your network addressing defined on interfaces, this will fail, and/or we can't troubleshoot. – Ron Maupin Nov 20 '15 at 0:50
  • The addresses are configured via /etc/rc.conf on FreeBSD system. BGP session is established between hosts. – quaggarouter Nov 20 '15 at 0:53
  • We can't troubleshoot this without knowing how you have assigned the addresses. For instance, I would think on Router 2, you would have the update source be 1.1.1.2 as the loopback on Router 2, while Router 1 would have the loopback of 1.1.1.1 and an update source of 1.1.1.1. That is just the opposite of your update sources. – Ron Maupin Nov 20 '15 at 0:55
  • On R101 VLAN 4, is this an error inet 3.3.3.2 netmask 0xfffffff8 broadcast 4.4.4.7? – Ron Maupin Nov 20 '15 at 1:05
  • I'm sorry! I did double check if I correctly covered real IPs for safery reason. This should be now the final state. – quaggarouter Nov 20 '15 at 1:07
1

The update-source isn't used for eBGP unless you use eBGP multihop (which you aren't), and it's unnecessary for your iBGP since you are not sourcing from a different interface from the one which you are using to connect the neighbors. You should remove those lines.

You don't seem to be using communities, so you can lose the lines with send-community both. Normally you would have consistent communities on prefixes within your AS, and you would only use that when you need to send your communities to a different AS.

Your iBGP routers should be sharing their BGP routing tables already, so the soft-reconfiguration inbound shouldn't be used within your AS, but it is often used between ASes.

I'm not sure why you are prepending the same number of ASes to both the external routers. Normally you use prepending to have the external AS to prefer one of your routers over the other; you would prepend on one external link but not the other. The way you are doing doesn't seem like it accomplishes anything.

Since you want to advertise aggregate prefixes, use the aggregate-address command. This will advertise the summary routes, and based on what you commented, I think this is your goal. The aggregate addresses will be advertised as long as there is at least one route within the summary in your routing table. the summary-only means that it will not advertise the individual routes that are within the aggregate address.

I think your BGP configurations should look something like:

R101:

router bgp 1
 no synchronization
 bgp router-id 0.0.0.1
 bgp log-neighbor-changes
! network 1.0.0.0
! network 2.0.0.0
 aggregate-address 1.1.1.0 255.255.255.0 summary-only
 aggregate-address 2.2.2.0 255.255.255.0 summary-only
 neighbor 4.4.4.1 remote-as 2
 neighbor 4.4.4.1 description "R101 uplink"
 neighbor 4.4.4.1 update-source 4.4.4.2
 neighbor 4.4.4.1 route-map R1-MAP out
 neighbor 4.4.4.1 soft-reconfiguration inbound
 neighbor 1.1.1.2 remote-as 1
 neighbor 1.1.1.2 description "R101 BGP interconnect"
 neighbor 1.1.1.2 next-hop-self
 maximum-paths 2
 no auto-summary
!

R102:

router bgp 1
 no synchronization
 bgp router-id 0.0.0.2
 bgp log-neighbor-changes
! network 1.0.0.0
! network 2.0.0.0
 aggregate-address 1.1.1.0 255.255.255.0 summary-only
 aggregate-address 2.2.2.0 255.255.255.0 summary-only
 neighbor 3.3.3.1 remote-as 2
 neighbor 3.3.3.1 description "R102 uplink"
 neighbor 3.3.3.1 update-source 3.3.3.2
 neighbor 3.3.3.1 route-map R102-MAP out
 neighbor 3.3.3.1 soft-reconfiguration inbound
 neighbor 1.1.1.1 remote-as 1
 neighbor 1.1.1.1 description "R102 BGP interconnect"
 neighbor 1.1.1.1 next-hop-self
 no auto-summary
!

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.