Forum Discussion
F5 BGP Peering in Active /Standby Cluster
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
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