I am using quagga and FreeBSD boxes to achieve this: http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13762-40.html#conf3. Only change is that upstream provider is sending full bgp instead of the default route.
I have everything set up and working moreless correctly. However, I am having issues with few things:
when connection between R101 and R103 goes down, R101 doesn't send traffic over R102-R104 link. This is because, R101 doesn't have any routes R102 besides the one I am advertising. How should I can configure quagga to redistribute routes obtained via external peer over internal BGP session?
For advertising my networks, Quagga works until the moment I restart R101. Once, R!01 comes back and internal BGP session is re-established, R102 stops advertising anything to R101, but advertises to R104. Is this normal? After I restart quagga on R102, the advertising to R101 works correctly.
Quagga config 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.1 remote-as 1 neighbor 1.1.1.1 description "R101 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 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 full config:
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.2 remote-as 1 neighbor 1.1.1.2 description "R102 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 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