How do I configure a BGP Session to the Routeservers?

Before you follow this FAQ article, please read our FAQ article about
how to get an BGP session. This is supported for our Co-Location
customers. FAQ-article.


We accept the following BGP communities:

​24961:666 - Public Blackhole - map to 65535:666 and Peer-specific community
24961:1XZZZ - Announcement control
X value definition
0 do not announce
1 prepend once
2 prepend twice
3 prepend thrice

Z value definition
000 All peers
001 All upstreams
002 All peerings
003 All public peerings
004 All private peerings


In this FAQ article you can find example configuration snippets for
Arista, FreeRangeRouting and Juniper routers.

As a general rule, you will need to set static /32 or /128 Routes to
the multihop BGP Routeservers with the nexthop being your normal
default gateway for IPv4 or IPv6.

Additionally you will need to configure import/export filters for the
BGP session. While we (myLoc) filter the BGP session from our side as
well, this is good practice to do from both sides.

Lastly, you will need to configure the actual BGP session to the
Routeservers with the following IPs and the BGP session password that
we gave you when provisioning your session:

IPv4:
- 62.141.40.144
- 62.141.40.145
- 62.141.40.146
- 62.141.40.147

IPv6:
- 2001:4ba0:1336::1
- 2001:4ba0:1336::2
- 2001:4ba0:1336::3
- 2001:4ba0:1336::4

myLoc ASN: 24961

Keep in mind that the default BGP timeout is 300 seconds. This means that if you are announcing prefixes from more than one location, the prefix might be available for up to 300 seconds after a problem occured.
In this case it might be advisable to either change the BGP timeout to less than 300 seconds, or enable BFD, which we also support with our routeservers.

Please take care to replace the default gateway for the static routes
in the following examples to the IPs applicable to you. As well as any
import/export filters you might want to apply. Generally, these
snippets are mostly provided as examples. It is quite possible that you
need additional configuration to support your use-case.
This example will only export prefixes that originate from your router,
if you have customers yourself, you will need to adjust the filters.

Arista Config:

ip as-path access-list NULL-AS permit ^$ any
ip prefix-list ALLOW_ALL seq 5 permit 0.0.0.0/0 le 24
ip prefix-list ANNOUNCEv4 seq 5 permit YOUR-PREFIX(es)
!
ipv6 prefix-list ALLOW_ALL
  seq 10 permit ::/0 le 48
!
ipv6 prefix-list ANNOUNCEv6
  seq 10 permit YOUR-PREFIX(es)
!
ip route 62.141.40.144/32 YOUR-Default-GW
ip route 62.141.40.145/32 YOUR-Default-GW
ip route 62.141.40.146/32 YOUR-Default-GW
ip route 62.141.40.147/32 YOUR-Default-GW

!
ipv6 route 2001:4ba0:1336::1/128 YOUR-Default-GW
ipv6 route 2001:4ba0:1336::2/128 YOUR-Default-GW
ipv6 route 2001:4ba0:1336::3/128 YOUR-Default-GW
ipv6 route 2001:4ba0:1336::4/128 YOUR-Default-GW

!
route-map to_MYLOCv4 permit 10
  match ip address prefix-list ANNOUNCEv4
  match as-path NULL-AS
route-map to_MYLOCv6 permit 10
  match ip address prefix-list ANNOUNCEv6
  match as-path NULL-AS
!
router bgp YOUR_ASN
  router-id YOUR_ROUTER_ID
  neighbor MYLOC4 peer group
  neighbor MYLOC4 remote-as 24961
  neighbor MYLOC4 ebgp-multihop
  neighbor MYLOC4 password 7 YOUR_BGP_PASSWORD
  neighbor MYLOC4 maximum-routes 0
  neighbor MYLOC6 peer group
  neighbor MYLOC6 remote-as 24961
  neighbor MYLOC6 ebgp-multihop
  neighbor MYLOC6 password 7 YOUR_BGP_PASSWORD
  neighbor MYLOC6 maximum-routes 0
  neighbor 62.141.40.144 peer group MYLOC4
  neighbor 62.141.40.145 peer group MYLOC4
  neighbor 62.141.40.146 peer group MYLOC4
  neighbor 62.141.40.147 peer group MYLOC4

  neighbor 2001:4ba0:1336::1 peer group MYLOC6
  neighbor 2001:4ba0:1336::2 peer group MYLOC6
  neighbor 2001:4ba0:1336::3 peer group MYLOC6
  neighbor 2001:4ba0:1336::4 peer group MYLOC6

  !
  address-family ipv4
     neighbor MYLOC4 prefix-list ALLOW_ALL in
     neighbor MYLOC4 route-map to_MYLOCv4 out
     network YOUR-PREFIX(es)
  !
  address-family ipv6
     neighbor MYLOC6 activate
     neighbor MYLOC6 prefix-list ALLOW_ALL in
     neighbor MYLOC6 route-map to_MYLOCv6 out
     network YOUR-PREFIX(es)
!

FreeRangeRouting Config:

ip route 62.141.40.144/32 YOUR-Default-GW
ip route 62.141.40.145/32 YOUR-Default-GW
ip route 62.141.40.146/32 YOUR-Default-GW
ip route 62.141.40.147/32 YOUR-Default-GW

ipv6 route 2001:4ba0:1336::1/128 YOUR-Default-GW
ipv6 route 2001:4ba0:1336::2/128 YOUR-Default-GW
ipv6 route 2001:4ba0:1336::3/128 YOUR-Default-GW
ipv6 route 2001:4ba0:1336::4/128 YOUR-Default-GW


router bgp YOUR-ASN
bgp router-id YOUR-ROUTER-ID
neighbor MYLOC peer-group
neighbor MYLOC remote-as 24961
neighbor MYLOC password YOUR-BGP-PASSWORD
neighbor MYLOC ebgp-multihop 255
neighbor MYLOC disable-connected-check
neighbor MYLOC6 peer-group
neighbor MYLOC6 remote-as 24961
neighbor MYLOC6 password YOUR-BGP-PASSWORD
neighbor MYLOC6 ebgp-multihop 255
neighbor MYLOC6 disable-connected-check
neighbor 62.141.40.144 peer-group MYLOC
neighbor 62.141.40.145 peer-group MYLOC
neighbor 62.141.40.146 peer-group MYLOC
neighbor 62.141.40.147 peer-group MYLOC

neighbor 2001:4ba0:1336::1 peer-group MYLOC6
neighbor 2001:4ba0:1336::2 peer-group MYLOC6
neighbor 2001:4ba0:1336::3 peer-group MYLOC6
neighbor 2001:4ba0:1336::4 peer-group MYLOC6

!
address-family ipv4 unicast
 network YOUR-PREFIX(es)
 neighbor MYLOC prefix-list ALLOW_ALL in
 neighbor MYLOC route-map to_MYLOCv4 out
exit-address-family
!
address-family ipv6 unicast
 network YOUR-PREFIX(es)
 neighbor MYLOC6 activate
 neighbor MYLOC6 prefix-list ALLOW_ALL in
 neighbor MYLOC6 route-map to_MYLOCv6 out
exit-address-family
!
ip prefix-list ANNOUNCEv4 seq 100 deny any
ip prefix-list ANNOUNCEv4 seq 5 permit YOUR-PREFIX(es)
ip prefix-list ALLOW_ALL seq 5 permit 0.0.0.0/0 le 24
!
ipv6 prefix-list ANNOUNCEv6 seq 100 deny any
ipv6 prefix-list ANNOUNCEv6 seq 5 permit YOUR-PREFIX(es)
ipv6 prefix-list ALLOW_ALL seq 5 permit ::/0 le 48
!
bgp as-path access-list AS-NULL permit ^$
!
route-map to_MYLOCv4 permit 5
match as-path AS-NULL
match ip address prefix-list ANNOUNCEv4
!
route-map to_MYLOCv6 permit 5
match as-path AS-NULL
match ip address prefix-list ANNOUNCEv6
!


Juniper Config:

protocols {
   bgp {
       group myloc-routeserver {
           type external;
           multihop {
               ttl 10;
           }
           local-preference 200;
           log-updown;
           import from-myloc-route;
           authentication-key /* SECRET-DATA */; ## BGP Password
           export Exp2MyLoc;
           peer-as 24961;
           neighbor 62.141.40.144
           neighbor 62.141.40.145
           neighbor 62.141.40.146
           neighbor 62.141.40.147

           neighbor 2001:4ba0:1336::1
           neighbor 2001:4ba0:1336::2
           neighbor 2001:4ba0:1336::3
           neighbor 2001:4ba0:1336::4

               }
       }
}
routing-options {
   rib inet6.0 {
       static {
           /* myLoc Routeserver 1 static route */
           route 2001:4ba0:1336::1/128 next-hop /* default IPv6 GW */;
           /* myLoc Routeserver 2 static route */
           route 2001:4ba0:1336::2/128 next-hop /* default IPv6 GW */;
           /* myLoc Routeserver 3 static route */
           route 2001:4ba0:1336::3/128 next-hop /* default IPv6 GW */;
           /* myLoc Routeserver 4 static route */
           route 2001:4ba0:1336::4/128 next-hop /* default IPv6 GW */;

       }
       }
   static {
       /* myLoc Routeserver 1 static route */
       route 62.141.40.144/32 next-hop /* default IPv4 GW */;
       /* myLoc Routeserver 2 static route */
       route 62.141.40.145/32 next-hop /* default IPv4 GW */;
       /* myLoc Routeserver 3 static route */
       route 62.141.40.146/32 next-hop /* default IPv4 GW */;
       /* myLoc Routeserver 4 static route */
       route 62.141.40.147/32 next-hop /* default IPv4 GW */;

       }
   autonomous-system YOUR_ASN;
}

null-as "()";

policy-statement from-myloc-route {
   term 1 {
       from {
           route-filter 0.0.0.0/0 upto /24;
       }
       then accept;
   }
   term 2 {
       then reject;
   }
}

policy-statement Exp2MyLoc {
   term 1 {
       from {
           route-filter YOUR_PREFIX(es) exact;
           as-path null-as;
       }
       then accept;
   }
   term 2 {
       then reject;
   }
}

You cannot comment on this entry