LTM with BGP route advertisement

One more question to the group. Two Cisco router and a pair of LTMs in a dual homed environment. Each Cisco has it’s own uplink. All four devices communicate internal using iBGP, virtual servers are correctly advertised and the failover is working as expected. Each time I enable bgp in the route domain on both devices, the routing is screwed up, the virtual server is correctly advertised but i.e my snat adress is not.

Could anyone help here?

Best

Frank

Is the SNAT range attached to a VLAN? (In other words, does the F5 have an interface in that subnet?)

Yes, it is.

OK, so it should just get advertised without any specific work on your part. Is the SNAT related VLAN in the same Route Domain as the VLAN used to connect with the Cisco routers? Do any ACLs or Route Maps need to be adjusted on the Cisco side?

You might find this useful too for checking what’s in the kernel routing table and what’s advertised: 404 Page not found | BIG-IP Documentation

Yes it is advertised, as soon as I disable BGP on one node, everthing is working. “show ip route kernel” shows all virtual servers and the host route for the SNAT IP Address as well. If I enable dynamic routing again, the virtual servers are still reachable but the SNAT is out of order. Apart from that, each time the device is rebooted it loses BGP from the routing domain.

Disable BGP on one node? Can you explain that in more detail please. Same for “the SNAT is out of order” - I assume you mean you can no longer see it in the output of the ‘show ip route kernel’.

Regarding the reboots, do you mean the BGP module doesn’t run automatically for that RD on system startup?

Lastly, what version are you running?

On Node 1 - Network ›› Route Domains ›› 0 → remove BGP from Dynamic Routing Protocols → update, after that SNAT and virtual adresses are working and reachable from the internet. I’m also able to ping from the internal network to hosts on the internet.

On node 2 - [0]sh ip route kern. shows me the virtual server routes including the SNAT address

On Node 1 - Network ›› Route Domains ›› 0 → add BGP to Dynamic Routing Protocols → update, virtual servers are still reachable (even when I force the node to standby) but no SNAT

Version 11.2.1

cisco 1 123.123.55.241

cisco 2 123.123.55.242

node 1 123.123.55.243

node 2 123.123.55.244

node 2 with bgp enabled only on that node

show ip bgp 123.123.55.208

BGP routing table entry for 123.123.55.208/28

Paths: (1 available, best 1, table Default-IP-Routing-Table)

Advertised to non peer-group peers:

123.123.55.241 123.123.55.242 123.123.55.243

Local

0.0.0.0 from 0.0.0.0 (192.168.1.4)

Origin IGP, localpref 100, weight 32768, valid, sourced, local, best

Last update: Mon Oct 15 13:03:04 2012

node 2 after enabling bgp also on node 1

show ip bgp 123.123.55.208

BGP routing table entry for 123.123.55.208/28

Paths: (2 available, best 2, table Default-IP-Routing-Table)

Advertised to non peer-group peers:

123.123.55.241 123.123.55.242 123.123.55.243

Local

123.123.55.243 from 123.123.55.243 (192.168.1.3)

Origin IGP metric 0, localpref 100, valid, internal

Last update: Mon Oct 15 16:48:03 2012

Local

0.0.0.0 from 0.0.0.0 (192.168.1.4)

Origin IGP, localpref 100, weight 32768, valid, sourced, local, best

Last update: Mon Oct 15 13:03:04 2012

and here the output from node 1

show ip bgp 123.123.55.208

BGP routing table entry for 123.123.55.208/28

Paths: (2 available, best 2, table Default-IP-Routing-Table)

Advertised to non peer-group peers:

123.123.55.241 91.241.55.242 91.241.55.244

Local

123.123.55.244 from 91.241.55.244 (192.168.1.4)

Origin IGP metric 0, localpref 100, valid, internal

Last update: Mon Oct 15 16:48:08 2012

Local

0.0.0.0 from 0.0.0.0 (192.168.1.3)

Origin IGP, localpref 100, weight 32768, valid, sourced, local, best

Last update: Mon Oct 15 16:48:02 2012

Both nodes shows the route as best path although the route is in the kernel table from node 1

sh ip route kernel

K 123.123.54.195/32 is directly connected, tmm0

K 123.123.54.196/32 is directly connected, tmm0

K 123.123.54.198/32 is directly connected, tmm0

K 123.123.54.199/32 is directly connected, tmm0

K 123.123.54.200/32 is directly connected, tmm0

K 123.123.54.201/32 is directly connected, tmm0

K 123.123.54.202/32 is directly connected, tmm0

K 123.123.54.203/32 is directly connected, tmm0

K 123.123.54.204/32 is directly connected, tmm0

K 123.123.54.205/32 is directly connected, tmm0

K 123.123.54.207/32 is directly connected, tmm0

K 123.123.54.208/32 is directly connected, tmm0

K 123.123.54.209/32 is directly connected, tmm0 <---- SNAT

K 123.123.54.210/32 is directly connected, tmm0

K 123.123.54.212/32 is directly connected, tmm0

K 123.123.54.213/32 is directly connected, tmm0

K 123.123.55.132/32 is directly connected, tmm0

K 123.123.55.133/32 is directly connected, tmm0

K 123.123.55.135/32 is directly connected, tmm0

K 123.123.55.136/32 is directly connected, tmm0

K 123.123.55.210/32 is directly connected, tmm0

K 123.123.55.211/32 is directly connected, tmm0

Are these devices in a HA pair, active/standby or completely independent? Are you using ConfigSync for the LTM configuration?

Do you have an IGP running too?

I take it the whole /28 is advertised to the Cisco routers. Do things look OK from that POV? Do they route to node 1 when BGP is enabled? Are they running an IGP?

Devices configured as an HA pair active / standby and yes the config is synced using the LTM GUI. No we don’t have an IGP running, only BGP between these for devices. The config on the Ciscos looks fine.

And in any configuration, do the Cisco routers get the correct routes advertised? If there’s no IGP I take it you’ve turned off synchronisation on the Cisco routers and you’ve configured next hop self? I’m far from a BGP expert so forgive me if the questions are way off field. Can you post the IMI configuration and also compare it between the two devices?

Also, did you change the SNAT Packet Forwarding setting you asked about earlier on both boxes, or check it’s synchronised?

Yes the cisco gets the correct routes advertised. Synchronisation is turned off by default in that IOS version. Each Cisco uses next hop self. Here is the whole config.

node 1

router bgp 12345

bgp log-neighbor-changes

bgp graceful-restart restart-time 120

network 123.123.54.0/23

network 123.123.54.0/26

network 123.123.54.64/26

network 123.123.54.128/26

network 123.123.54.192/26

network 123.123.55.0/26

network 123.123.55.64/27

network 123.123.55.96/27

network 123.123.55.128/27

network 123.123.55.160/27

network 123.123.55.160/28

network 123.123.55.176/28

network 123.123.55.192/28

network 123.123.55.208/28

network 123.123.55.209/32

network 123.123.55.224/28

network 123.123.55.240/28

redistribute kernel

neighbor 123.123.55.241 remote-as 12345

neighbor 123.123.55.241 next-hop-self

neighbor 123.123.55.241 capability graceful-restart

neighbor 123.123.55.242 remote-as 12345

neighbor 123.123.55.242 capability graceful-restart

neighbor 123.123.55.244 remote-as 12345

neighbor 123.123.55.244 capability graceful-restart

!

ip route 70.72.6.200/30 123.123.55.241

ip route 70.231.161.80/30 123.123.55.242

!

node 2

router bgp 12345

bgp log-neighbor-changes

bgp graceful-restart restart-time 120

network 123.123.54.0/23

network 123.123.54.0/26

network 123.123.54.64/26

network 123.123.54.128/26

network 123.123.54.192/26

network 123.123.55.0/26

network 123.123.55.64/27

network 123.123.55.96/27

network 123.123.55.128/27

network 123.123.55.160/27

network 123.123.55.160/28

network 123.123.55.176/28

network 123.123.55.192/28

network 123.123.55.208/28

network 123.123.55.209/32

network 123.123.55.224/28

network 123.123.55.240/28

redistribute kernel

neighbor 123.123.55.241 remote-as 12345

neighbor 123.123.55.241 capability graceful-restart

neighbor 123.123.55.242 remote-as 12345

neighbor 123.123.55.242 capability graceful-restart

neighbor 123.123.55.243 remote-as 12345

neighbor 123.123.55.243 capability graceful-restart

!

ip route 70.72.6.200/30 123.123.55.241

ip route 70.231.161.80/30 123.123.55.242

cisco 1

router bgp 12345

bgp log-neighbor-changes

network 123.123.54.0 mask 255.255.254.0

network 123.123.54.0 mask 255.255.255.192

network 123.123.54.64 mask 255.255.255.192

network 123.123.54.128 mask 255.255.255.192

network 123.123.54.192 mask 255.255.255.192

network 123.123.55.0 mask 255.255.255.192

network 123.123.55.64 mask 255.255.255.224

network 123.123.55.96 mask 255.255.255.224

network 123.123.55.128 mask 255.255.255.224

network 123.123.55.160 mask 255.255.255.224

network 123.123.55.160 mask 255.255.255.240

network 123.123.55.176 mask 255.255.255.240

network 123.123.55.192 mask 255.255.255.240

network 123.123.55.208 mask 255.255.255.240

network 123.123.55.224 mask 255.255.255.240

network 123.123.55.240 mask 255.255.255.240

neighbor 70.72.6.201 remote-as 5656

neighbor 70.72.6.201 route-map prepend out

neighbor 70.72.6.201 filter-list 1 out

neighbor 123.123.55.242 remote-as 12345

neighbor 123.123.55.243 remote-as 12345

neighbor 123.123.55.243 next-hop-self

neighbor 123.123.55.244 remote-as 12345

!

ip forward-protocol nd

!

ip as-path access-list 1 permit ^$

!

no ip http server

no ip http secure-server

ip route 2.2.2.2 255.255.255.255 GigabitEthernet0/0

ip route 70.231.161.80 255.255.255.252 123.123.55.242

ip route 123.123.54.0 255.255.254.0 Null0

ip route 123.123.55.176 255.255.255.240 GigabitEthernet0/0

cisco 2

router bgp 12345

bgp log-neighbor-changes

bgp default local-preference 150

network 123.123.54.0 mask 255.255.254.0

network 123.123.54.0 mask 255.255.255.192

network 123.123.54.64 mask 255.255.255.192

network 123.123.54.128 mask 255.255.255.192

network 123.123.54.192 mask 255.255.255.192

network 123.123.55.0 mask 255.255.255.192

network 123.123.55.64 mask 255.255.255.224

network 123.123.55.96 mask 255.255.255.224

network 123.123.55.128 mask 255.255.255.224

network 123.123.55.160 mask 255.255.255.224

network 123.123.55.160 mask 255.255.255.240

network 123.123.55.176 mask 255.255.255.240

network 123.123.55.192 mask 255.255.255.240

network 123.123.55.208 mask 255.255.255.240

network 123.123.55.224 mask 255.255.255.240

network 123.123.55.240 mask 255.255.255.240

neighbor 70.231.161.81 remote-as 1111

neighbor 70.231.161.81 filter-list 1 out

neighbor 123.123.55.241 remote-as 12345

neighbor 123.123.55.243 remote-as 12345

neighbor 123.123.55.243 next-hop-self

neighbor 123.123.55.244 remote-as 12345

neighbor 123.123.55.244 next-hop-self

!

ip forward-protocol nd

!

ip as-path access-list 1 permit ^$

!

no ip http server

no ip http secure-server

ip route 1.1.1.1 255.255.255.255 GigabitEthernet0/0

ip route 70.72.6.200 255.255.255.252 123.123.55.241

ip route 123.123.54.0 255.255.254.0 Null0

ip route 123.123.55.176 255.255.255.240 GigabitEthernet0/0

cisco 1

snat address

show ip bgp 123.123.55.209

BGP routing table entry for 123.123.55.209/32, version 11073552

Paths: (2 available, best 2, table default)

Advertised to update-groups:

6

Refresh Epoch 1

Local

123.123.55.243 from 123.123.55.243 (192.168.1.3)

Origin IGP, localpref 100, valid, internal

rx pathid: 0, tx pathid: 0

Refresh Epoch 1

Local

123.123.55.244 from 123.123.55.244 (192.168.1.4)

Origin IGP, localpref 100, valid, internal, best

rx pathid: 0, tx pathid: 0x0

cisco 1

some virtual server

show ip bgp 123.123.55.210

BGP routing table entry for 123.123.55.210/32, version 11079429

Paths: (1 available, best 1, table default)

Advertised to update-groups:

6

Refresh Epoch 1

Local

123.123.55.243 from 123.123.55.243 (192.168.1.3)

Origin incomplete, localpref 100, valid, internal, best

rx pathid: 0, tx pathid: 0x0

the virtual server is correct announced but the snat address point to the standby device

Just for your own protection I assume you’ve masked any sensitive information? Some of the static routes look ‘real’.

On node 2 you’re missing ‘neighbor 123.123.55.241 next-hop-self’

On cisco 1 you’re missing ‘neighbor 123.123.55.244 next-hop-self’

Any reason for that?

Sure, all addresses are masked and unfortunately the missing statement is just a copy & paste error :frowning:

OK, here’s some more questions;

1) Anything in the /var/log/zebos.log and /var/log/daemon.log files?

2) When you do a ‘show ip route’ on node 1 does it show node 2 as the best path for the .209 SNAT address?

3) Can you get any more detailed output from show ip bgp x.x.x.x command that might explain the preference for node 2?

4) This from the ARM manual: “When using BGP, RIP, or IS-IS, both units of the redundant system automatically advertise their shared, floating self IP address as the next hop for all advertised routes. This ensures that peer routers use the shared self IP address as the next hop for all routes advertised by the BIG-IP system.” - You’re output suggests this isn’t the case? Is there no Floating IP?

Debug is enabled on both but /var/log/zebos.log contains no good informations, daemon log is also not very useful. Item 4 on your list helped me a lot. I was able to fix it. To solve the issue I created a floating self IP for the uplink interfaces on the bigip ips and changed the peering on the cisco boxes to only use the floating IP, after that it’s working :slight_smile:

Thanks for you effort and your time.

Best Frank

Phew, I was close to conceding defeat there. You’re very welcome and hey, I’ve learned quite a bit on the way myself.