Forum Discussion
F5 BGP Peering in Active /Standby Cluster
- Sep 02, 2025
Hi I was able to advertise routes by declaring a floating Ip for the bgp peering subnet self ips and attaching it to default traffic group , rest F5 takes care of advertising routes only via floating ip on both active and standby
Try this approach using F5's iCall framework to automatically adjust BGP route advertisements based on traffic group state:
Step 1: Create Traffic Group State Detection Script
bash
tmsh create sys icall event-processor traffic-group-state {
definition {
set traffic_group [tmsh::get_status cm traffic-group traffic-group-1]
if {[lindex $traffic_group 0 1] eq "active"} {
# Device is active - advertise with good metrics
exec /usr/bin/vtysh -c "configure terminal" -c "route-map POOL_MEMBERS permit 10" -c "set metric 50" -c "set local-preference 200"
} else {
# Device is standby - suppress or advertise with poor metrics
exec /usr/bin/vtysh -c "configure terminal" -c "route-map POOL_MEMBERS deny 10"
}
exec /usr/bin/vtysh -c "clear ip bgp * out"
}
}
Step 2: Create Route-Map for Pool Member Subnets
bash
# In imish on both devices
ip prefix-list POOL_MEMBERS seq 10 permit b.b.b.b/subnet_mask
route-map POOL_MEMBERS permit 10
match ip address prefix-list POOL_MEMBERS
set metric 50
set local-preference 200
router bgp YOUR_ASN
neighbor ACI_PEER_IP route-map POOL_MEMBERS out
Step 3: Trigger Script on Failover Events
bash
tmsh create sys icall periodic-handler traffic-group-monitor {
interval 30
script traffic-group-state
}
This solution ensures route advertisements automatically follow the active/standby state
Hello, this iCall Framework is interesting, and I would like to try out your script.
Can you or anyone who has implemented this confirm that it does work as expected?
One thing that concerns me is that I am relying completely on the F5 iCall periodic handler to advertise the backend prefix (iCall Framework bugs, stability etc).
Thank you
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com