BGPv4 Configuration
BGPv4 component configuration is under the top level bgp
object in /etc/flockd/flockd.json
bgp {
"local": {
# BGP ID of this router
"id": "172.16.10.1",
# Autonomous System this router is part of
"asn": 65016,
# Originate networks into BGP
"network": [
{
"ip_prefix": "172.16.0.0/16"
},
{
"ip_prefix": "172.17.0.0/16"
}
]
},
"as": [
{
# iBGP neighbors (asn == local.asn)
"asn": 65016,
# Allow iBGP neighbors to not have eBGP subnets in their IPv4 RIB
"next_hop_self": true,
"neighbor": [
{
"ip": "172.16.10.2",
"local_ip": "172.16.10.1"
},
{
"ip": "172.16.10.3",
"local_ip": "172.16.10.1",
# Set non-default timers for this neighbor
"timers": {
"hold_time": 90,
"keep_alive": 30
}
}
]
},
{
# AS65017 eBGP neighbors (asn != local.asn)
"asn": 65017,
"neighbor": [
{
"ip": "172.17.20.1"
},
{
"ip": "172.17.30.1"
}
]
}
]
}
BGPv4 Active / Passive Neighbors
By default BGPv4 will try to create two TCP transport connections to each neighbor. One outgoing to the neighbors remote BGP TCP port 179, and one allowing incoming connections from the neighbor to the local BGP TCP port 179. A tie break is used to enusure only one connection remains when the BGP neighbor moves to the 'Established' state.
The router can be configured to only form a single TCP transport connection to each neighbor using the connect_mode
neighbor configuration parameter.
bgp {
"as": [
"neighbor": [
# Only create the outgoing connection to this neighbor.
# Refuse any incoming connection.
"connect_mode": "active"
]
]
}
or
# Only allow the incoming connection from this neighbor.
# Do not create any outgoing connection.
connect_mode = "passive"
BGPv4 Route Reflectors
To configure a router as a BGP Route Reflector, specify which neighbors are Route Relector clients using the route_reflector_client
configuration boolean.
bgp {
"as": [
"neighbor": [
# Reflect iBGP routes to and from this neighbor
"route_reflector_client": "true"
]
]
}
To deploy redundant Route Reflectors a Route Relector Cluster Id can optionally be configured.
bgp {
"local": {
"cluster_id": "1.2.3.4"
}
}