Export direct and static to one bgp neighbor

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
Is there any way to only export direct and/or static to a specific neighboor ? I can't figure out if I can do it in a route-policy or not ? I do not want to do it for the general bgp process. ( I would have to rewrite alot of export policys then )

But if that is the only way I have to do it I guess ?

Or could I do a seperate network statement under bgp for that subnet specific ?
One example
10.0.0.0/24
I want to send
10.0.0.0/30 to a specific neighboor that I is direclty connected to the router that runs BGP.

// Andreas
Photo of andreas

andreas

  • 1,218 Points 1k badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Naresh

Naresh, Employee

  • 1,266 Points 1k badge 2x thumb

Hi Andreas,

Please find the article to find “How to advertise selective routes via BGP” using below link,

https://gtacknowledge.extremenetworks.com/articles/How_To/How-to-selectively-advertise-static-routes-via-BGP

 

Note: please test it before implementing on production switch.

Photo of Bharathiraja, Suresh

Bharathiraja, Suresh, Employee

  • 3,442 Points 3k badge 2x thumb
Hi Andreas,

I hope given kb  is helpful , This KB is for exos based device.

Please check and let us know if you have any further questions.

Thanks,
Suresh.B
Photo of andreas

andreas

  • 1,218 Points 1k badge 2x thumb
yes but this will not be specific to a BGP peer right ? This will be for ALL peers ? And I just want to annonce a static/direct entry to ONE peer not all peers ?
Photo of Tripathy, Priya Ranjan

Tripathy, Priya Ranjan, ESE

  • 2,306 Points 2k badge 2x thumb
Hello Andreas,

Actually When exporting BGP routes, static routes we need to configure with the configure bgp add network command. This takes precedence over BGP discovered routes.

To create a static BGP network, use the following command:
configure bgp add network {address-family [ipv4-unicast | ipv4-multicast | ipv6-
unicast | ipv6-multicast]} <ipaddress/masklength> {network-policy <policy>}

NOTE:
This command adds the route to BGP only if the route is present in the routing table.

Hope  this is useful for you.
Photo of andreas

andreas

  • 1,218 Points 1k badge 2x thumb
Yes I understand all of that. My question still remains can I do this per "neighboor" ? I do not want to add a static network to my other neighboor only to a specific neigh.

// Andreas
Photo of Alex Morrissey

Alex Morrissey, Employee

  • 862 Points 500 badge 2x thumb
Hello Andreas,

Route-Policies would be the way to go to filter advertisements to a specific peer.  These two articles How to filter routes in BGP on EXOS Router and How to selectively advertise static routes via BGP show two different implementations of this.  The first filters routes out using a deny policy while the second specifies only certain routes that should be advertised.

In your case adding routes to BGP is not a per neighbor thing.  However by using route-policies for each peer you can control which routes go to which peer from the overall BGP route table.

- Alex
Photo of andreas

andreas

  • 1,218 Points 1k badge 2x thumb
Understood =) It would be nice to be able to specify per neighboor behaviour though.

I solved it the way you suggested but it will make the polices more complex.