Follow these procedures to implement symmetric routing on your devices.
Configure a router to use automatic affinity group preference
Configure a router to use automatic affinity group preference using templates
If you configure both a manual affinity preference order and an auto preference order on a router, the router gives priority to the auto preference order when selecting the next hop.
However, the manually configured preference list is still useful for path filtering using the filter route outbound affinity-group preference command. For information about filtering out paths for routers that are not on the device’s affinity list, see Information About Router Affinity Groups and see the filter route outbound affinity-group preference command reference in the Cisco IOS XE SD-WAN Qualified Command Reference.
Procedure
Configure a router to use automatic affinity group preference, using CLI commands
If you configure a router with both affinity-group preference-auto and affinity-group preference list , the affinity-group preference-auto command has priority for selecting a next hop.
However, the affinity-group preference list command is still useful for path filtering using the filter route outbound affinity-group preference command.
For information about filtering out paths for routers that are not on the device’s affinity list, see Information About Router Affinity Groups and see the filter route outbound affinity-group preference command reference in the Cisco IOS XE SD-WAN Qualified Command Reference.
For more information about using CLI templates, see CLI Add-On Feature Templates and CLI Templates. By default, CLI templates execute commands in global configuration mode.
Procedure
Configure router affinity groups for specific VRFs
Configure router affinity groups for specific VRFs using templates
For more information about using CLI templates, see CLI Add-On Feature Templates and CLI Templates. By default, CLI templates execute commands in global configuration mode.
Procedure
The following example configures affinity group 1 for VRF1:
system
affinity-per-vrf 1 vrf-range 1
The following example configures affinity group 4 for the VRF range 3 to 6:
system
affinity-per-vrf 4 vrf-range 3-6