Example configurations
Route-server sessions for common platforms. The examples use AS64511 and documentation prefixes: replace them with your own ASN and prefixes.
All examples do the same thing: announce only your own prefixes to both route servers, tagged 61300:61300 (announce to all peers), and accept routes from the route servers with local preference 199. The route servers don't add AS61300 to the AS path, so first-AS checks are turned off where the platform enables them by default. See BGP communities to limit who receives your routes.
Cisco IOS
ip prefix-list AS64511 permit 192.0.2.0/24
ipv6 prefix-list AS64511 permit 2001:DB8::/32
ip bgp-community new-format
route-map ROUTESERVER:FIXO-out
set community 61300:61300
route-map PEER:FIXO-in
set local-pref 199
router bgp 64511
no bgp enforce-first-as
neighbor 91.198.176.253 remote-as 61300
neighbor 91.198.176.254 remote-as 61300
neighbor 2001:7f8:41::1:61:300:1 remote-as 61300
neighbor 2001:7f8:41::1:61:300:2 remote-as 61300
address-family ipv4
neighbor 91.198.176.253 activate
neighbor 91.198.176.253 soft-reconfiguration inbound
neighbor 91.198.176.253 route-map ROUTESERVER:FIXO-out out
neighbor 91.198.176.253 route-map PEER:FIXO-in in
neighbor 91.198.176.253 prefix-list AS64511 out
neighbor 91.198.176.254 activate
neighbor 91.198.176.254 soft-reconfiguration inbound
neighbor 91.198.176.254 route-map ROUTESERVER:FIXO-out out
neighbor 91.198.176.254 route-map PEER:FIXO-in in
neighbor 91.198.176.254 prefix-list AS64511 out
address-family ipv6
neighbor 2001:7f8:41::1:61:300:1 activate
neighbor 2001:7f8:41::1:61:300:1 soft-reconfiguration inbound
neighbor 2001:7f8:41::1:61:300:1 route-map ROUTESERVER:FIXO-out out
neighbor 2001:7f8:41::1:61:300:1 route-map PEER:FIXO-in in
neighbor 2001:7f8:41::1:61:300:1 prefix-list AS64511 out
neighbor 2001:7f8:41::1:61:300:2 activate
neighbor 2001:7f8:41::1:61:300:2 soft-reconfiguration inbound
neighbor 2001:7f8:41::1:61:300:2 route-map ROUTESERVER:FIXO-out out
neighbor 2001:7f8:41::1:61:300:2 route-map PEER:FIXO-in in
neighbor 2001:7f8:41::1:61:300:2 prefix-list AS64511 out
Cisco IOS XR
route-policy FIXO-outbound
set community (61300:61300)
end-policy
route-policy FIXO-inbound
set local-preference 199
end-policy
route-policy FIXO-outbound-ipv6
set community (61300:61300)
end-policy
route-policy FIXO-inbound-ipv6
set local-preference 199
end-policy
neighbor-group FIXO-RS
remote-as 61300
enforce-first-as disable
address-family ipv4 unicast
route-policy FIXO-inbound in
route-policy FIXO-outbound out
soft-reconfiguration inbound
neighbor-group FIXO-RS-IPv6
remote-as 61300
enforce-first-as disable
address-family ipv6 unicast
route-policy FIXO-inbound-ipv6 in
route-policy FIXO-outbound-ipv6 out
soft-reconfiguration inbound always
neighbor 91.198.176.253
use neighbor-group FIXO-RS
description FIXO Routeserver-1
neighbor 91.198.176.254
use neighbor-group FIXO-RS
description FIXO Routeserver-2
neighbor 2001:7f8:41:0:1:61:300:1
use neighbor-group FIXO-RS-IPv6
description FIXO Routeserver-1 IPv6
neighbor 2001:7f8:41:0:1:61:300:2
use neighbor-group FIXO-RS-IPv6
description FIXO Routeserver-2 IPv6
Juniper Junos
routing-options {
autonomous-system 64511;
}
policy-options {
prefix-list AS64511-V4 {
192.0.2.0/24;
}
prefix-list AS64511-V6 {
2001:db8::/32;
}
community FIXO-ALL members 61300:61300;
policy-statement FIXO-RS-IN {
then {
local-preference 199;
accept;
}
}
policy-statement FIXO-RS-OUT-V4 {
term own {
from prefix-list-filter AS64511-V4 exact;
then {
community add FIXO-ALL;
accept;
}
}
then reject;
}
policy-statement FIXO-RS-OUT-V6 {
term own {
from prefix-list-filter AS64511-V6 exact;
then {
community add FIXO-ALL;
accept;
}
}
then reject;
}
}
protocols {
bgp {
group FIXO-RS-V4 {
type external;
peer-as 61300;
import FIXO-RS-IN;
export FIXO-RS-OUT-V4;
neighbor 91.198.176.253 {
description "FIXO rs1";
}
neighbor 91.198.176.254 {
description "FIXO rs2";
}
}
group FIXO-RS-V6 {
type external;
family inet6 {
unicast;
}
peer-as 61300;
import FIXO-RS-IN;
export FIXO-RS-OUT-V6;
neighbor 2001:7f8:41:0:1:61:300:1 {
description "FIXO rs1";
}
neighbor 2001:7f8:41:0:1:61:300:2 {
description "FIXO rs2";
}
}
}
}
BIRD 2
define MY_AS = 64511;
filter fixo_rs_in {
bgp_local_pref = 199;
accept;
}
filter fixo_rs_out_v4 {
if net ~ [ 192.0.2.0/24 ] then {
bgp_community.add((61300, 61300));
accept;
}
reject;
}
filter fixo_rs_out_v6 {
if net ~ [ 2001:db8::/32 ] then {
bgp_community.add((61300, 61300));
accept;
}
reject;
}
template bgp fixo_rs_v4 {
local as MY_AS;
neighbor as 61300;
ipv4 {
import filter fixo_rs_in;
export filter fixo_rs_out_v4;
};
}
template bgp fixo_rs_v6 {
local as MY_AS;
neighbor as 61300;
ipv6 {
import filter fixo_rs_in;
export filter fixo_rs_out_v6;
};
}
protocol bgp fixo_rs1_v4 from fixo_rs_v4 {
description "FIXO rs1";
neighbor 91.198.176.253;
}
protocol bgp fixo_rs2_v4 from fixo_rs_v4 {
description "FIXO rs2";
neighbor 91.198.176.254;
}
protocol bgp fixo_rs1_v6 from fixo_rs_v6 {
description "FIXO rs1";
neighbor 2001:7f8:41:0:1:61:300:1;
}
protocol bgp fixo_rs2_v6 from fixo_rs_v6 {
description "FIXO rs2";
neighbor 2001:7f8:41:0:1:61:300:2;
}
FRRouting
ip prefix-list AS64511-V4 seq 5 permit 192.0.2.0/24
ipv6 prefix-list AS64511-V6 seq 5 permit 2001:db8::/32
!
route-map FIXO-RS-IN permit 10
set local-preference 199
!
route-map FIXO-RS-OUT-V4 permit 10
match ip address prefix-list AS64511-V4
set community 61300:61300 additive
!
route-map FIXO-RS-OUT-V6 permit 10
match ipv6 address prefix-list AS64511-V6
set community 61300:61300 additive
!
router bgp 64511
no bgp default ipv4-unicast
neighbor FIXO-RS peer-group
neighbor FIXO-RS remote-as 61300
no neighbor FIXO-RS enforce-first-as
neighbor FIXO-RS6 peer-group
neighbor FIXO-RS6 remote-as 61300
no neighbor FIXO-RS6 enforce-first-as
neighbor 91.198.176.253 peer-group FIXO-RS
neighbor 91.198.176.254 peer-group FIXO-RS
neighbor 2001:7f8:41:0:1:61:300:1 peer-group FIXO-RS6
neighbor 2001:7f8:41:0:1:61:300:2 peer-group FIXO-RS6
!
address-family ipv4 unicast
network 192.0.2.0/24
neighbor FIXO-RS activate
neighbor FIXO-RS route-map FIXO-RS-IN in
neighbor FIXO-RS route-map FIXO-RS-OUT-V4 out
exit-address-family
!
address-family ipv6 unicast
network 2001:db8::/32
neighbor FIXO-RS6 activate
neighbor FIXO-RS6 route-map FIXO-RS-IN in
neighbor FIXO-RS6 route-map FIXO-RS-OUT-V6 out
exit-address-family
!
MikroTik RouterOS 7
# Prefixes to announce (they must also exist in the routing table)
/ip firewall address-list
add list=bgp-networks address=192.0.2.0/24
/ipv6 firewall address-list
add list=bgp-networks address=2001:db8::/32
/routing filter rule
add chain=fixo-rs-in rule="set bgp-local-pref 199; accept"
add chain=fixo-rs-out rule="if (dst in 192.0.2.0/24 && dst-len == 24) { append bgp-communities 61300:61300; accept }"
add chain=fixo-rs-out rule="if (dst in 2001:db8::/32 && dst-len == 32) { append bgp-communities 61300:61300; accept }"
/routing bgp template
add name=fixo-rs as=64511 input.filter=fixo-rs-in output.filter-chain=fixo-rs-out output.network=bgp-networks
/routing bgp connection
add name=fixo-rs1-v4 templates=fixo-rs local.role=ebgp remote.address=91.198.176.253 remote.as=61300
add name=fixo-rs2-v4 templates=fixo-rs local.role=ebgp remote.address=91.198.176.254 remote.as=61300
add name=fixo-rs1-v6 templates=fixo-rs local.role=ebgp remote.address=2001:7f8:41:0:1:61:300:1 remote.as=61300 address-families=ipv6
add name=fixo-rs2-v6 templates=fixo-rs local.role=ebgp remote.address=2001:7f8:41:0:1:61:300:2 remote.as=61300 address-families=ipv6
OpenBGPD
AS 64511
prefix-set mynets4 { 192.0.2.0/24 }
prefix-set mynets6 { 2001:db8::/32 }
network prefix-set mynets4
network prefix-set mynets6
group "FIXO-RS" {
remote-as 61300
enforce neighbor-as no
neighbor 91.198.176.253 { descr "FIXO rs1" }
neighbor 91.198.176.254 { descr "FIXO rs2" }
neighbor 2001:7f8:41:0:1:61:300:1 { descr "FIXO rs1" }
neighbor 2001:7f8:41:0:1:61:300:2 { descr "FIXO rs2" }
}
deny from group "FIXO-RS"
deny to group "FIXO-RS"
allow from group "FIXO-RS" set localpref 199
allow to group "FIXO-RS" prefix-set mynets4 set community 61300:61300
allow to group "FIXO-RS" prefix-set mynets6 set community 61300:61300
These are starting points, not complete router configurations. Check them against your platform's documentation and your own policy before use.