Routing Configuration Guide, Cisco Catalyst SD-WAN Releases 17.x

PDF

Configure symmetric routing

Updated: February 6, 2026


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

1.

From the Cisco SD-WAN Manager menu, choose ConfigurationTemplates.

2.

Click Feature Templates.

3.

Do one of the following:

  • To create a System template for a device, click Add Template, choose a device type, and click Cisco System.

  • To edit an existing System template, locate a System template in the table of existing feature templates, click adjacent to the template, and choose Edit.

4.

In the Affinity Group Preference Auto field, choose On.

5.

Click Save if creating a new template, or Update if editing an existing template.


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

1.

Enter system configuration mode.

system
2.

Configure automatic affinity group preference.

affinity-group preference-auto

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

1.

Enter system configuration mode.

system
2.

Configure an affinity group to apply to a specific VRF or range of VRFs.

affinity-per-vrf affinity-group vrf-range vrf-range

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

Configure router affinity groups for specific VRFs using CLI commands

Use these steps to configure router affinity groups for specific VRFs.

Procedure

1.

From the Cisco SD-WAN Manager menu, choose Configuration > Templates.

2.

Click Feature Templates.

3.

Do one of the following:

  • To create a System template for a device, click Add Template, choose a device type, and click Cisco System.

  • To edit an existing System template, locate a System template in the table of existing feature templates, click adjacent to the template, and choose Edit.

4.

For Affinity Group Number for VRFs, there are two fields. In the left field, enter an affinity group number. In the right field, enter a VRF number or a range of numbers–for example, 2-4. To configure addition group numbers for specific VRFs, click the plus button.

In Cisco SD-WAN Manager, you can configure up to four ranges. If you need to configure more, you can use a CLI template or CLI add-on template. See Configure Router Affinity Groups for Specific VRFs Using a CLI Template.

5.

Click Save if creating a new template, or Update if editing an existing template.