Skip to content

Controlling ExaBGP : limiting diffusion of routes

Thomas Mangin edited this page Jan 4, 2014 · 4 revisions

How to control which neighbor receive which route update ?

This feature requires ExaBGP 3.1.14 or higher.

The neighbor options you can filter on are:

  • the neighbor IP (mandatory)
  • the TCP connection peer local-ip
  • the BGP session local-as
  • the BGP session peer-as
  • the router-id
  • the family-allowed

The filtering is optional.

What do a control line looks like ?

The following are valid way to limit a route announcement to only some peers

announce route 1.0.0.0/24 next-hop 101.1.101.1
neighbor 127.0.0.1 announce route 1.0.0.0/24 next-hop 101.1.101.1
neighbor 127.0.0.1 local-as 1 announce route 1.0.0.0/24 next-hop 101.1.101.1
neighbor 127.0.0.1 peer-as 1 announce route 1.0.0.0/24 next-hop 101.1.101.1
neighbor 127.0.0.1 local-ip 127.0.0.1 announce route 1.0.0.0/24 next-hop 101.1.101.1
neighbor 127.0.0.1 router-id 1.2.3.4 announce route 1.0.0.0/24 next-hop 101.1.101.1
neighbor 127.0.0.1 local-as 1 peer-as 1 local-ip 127.0.0.1 router-id 1.2.3.4 announce route 1.0.0.0/24 next-hop 101.1.101.1

Should not route match the defined session, the route announcement will simply be not performed.

The family-allowed string can be either :

  • "in-open" for non multisession BGP session
  • the afi and safi names joined by an hyphen as defined in the family section of the configuration for each of the multisession connections. the AFI "inet" will always be represented as "inet4".

For example:

  • family-allowed in-open
  • family-allowed inet4-unicast
  • family-allowed inet6-unicast

Can I sent to multiple peers at once ?

Yes, sending to multiple peers is possible, the following are example of way to do it. Please note that a space before AND after the coma is required.

neighbor 10.0.0.1 , neighbor 10.0.0.2 router-id 1.2.3.4 , neighbor 10.0.0.3 announce route 1.0.0.0/24 next-hop 101.1.101.1
neighbor 10.0.0.1 , neighbor 10.0.0.2 announce route 1.0.0.0/24 next-hop 101.1.101.1
neighbor 10.0.0.1 , neighbor 10.0.0.2 router-id 1.2.3.4 , neighbor 10.0.0.3 announce route 1.0.0.0/24 next-hop 101.1.101.