This article describes how to change the order of the rules in the route-map setup.
A route map may have multiple rules that are processed from the top down, so the order of the rules is important.
FortiOS.
New rules in a route map need to be placed in the correct order for desired results.
Unfortunately, once a sequence of rules has been set up, new rules will only be added to the end of the list, regardless of the number that is assigned.
For example:
There is a need to add a new rule, placed in the 2nd position, to the existing rules: 10, 20, 30, 40.
The desired new rule sequence would be 10, 15, 20, 30, 40.
However, adding a new rule 15 in the CLI will place it at the bottom of the list, so the outcome will be 10, 20, 30, 40, 15 (which is not desired).
show
config router route-map
edit "MyRouteMap"
config rule
edit 10
set match-ip-address "Test1"
set set-local-preference 100
next
edit 20
set match-ip-address "Test2"
set set-local-preference 100
next
edit 30
set match-ip-address "Test3"
set set-local-preference 200
next
edit 40
set match-ip-address "Test4"
set set-local-preference 50
next
edit 15
set set-local-preference 100
next
end
To correct this and place rule 15 on the second position, the existing rules must first deleted and the config must be saved (end).
Deleting the existing rules and saving means that the traffic will be disrupted, so performing this during a maintenance window is required.
The option to 'move' one rule above another does not exist (in the way that it is possible to do this with the firewall policies).
The fastest way to achieve the desired result is to use a text editor to arrange the rules in the desired position prior to applying them in the FortiOS config.
Related articles:
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.