Moving BGP policy rules

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Moving BGP policy rules

L0 Member

Hi,

 

I'm trying to write Ansible automation to move a specific BGP import/export policy rule. Creating a BGP rule will automatically be added to the bottom of thel ist but as you can see we have default-import-deny rule(test_rule_top is used by the default deny even if missing in the screenshot). This will obviously prevent the rule from working.

SebastianOlsen_1-1645690674489.png

So in the GUI it's easy going in clicking the move up / down buttons. When i look into the debug console I cannot see any way of doing this.

 

I have tried getting all the rules and using python to reorder the list of rules so default-import-deny policy is at the bottom and then using a type_cmd to set the rules again. This unfortunately does not move any of the rules on the firewalls. The only solution I have found is to get the default-import-deny rule, delete the rule and then re-add the rule.

 

So my question is: There must be a better way of doing this that I am missing? I know it's possible with NAT and security rules to declare where they should be positioned in regards to other rules, but it does not seem possible to do with the BGP policy rules.

 

0 REPLIES 0
  • 1374 Views
  • 0 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!