The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This document describes how to configure Software-Defined Wide-Area Network (SD-WAN) Control Policy to prefer a default-route or prefix.
Cisco recommends that you have knowledge of these topics:
The information in this document is based on these software and hardware versions:
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
For the purpose of this demonstration, the lab is set up with 5 cEdges/vEdges on different Side IDs where Router01, Router02, and Router03 have a default-route configured in VPN 1.
Router04 (10.70.70.2) and Router05 (10.20.20.1) receive and install the default-route from the Router01 (10.70.70.1), Router02 (10.80.80.1) and Router03 (10.80.80.1). There is no active Centralized policy or Localized policies applied to the devices, it is a Full-Mesh topology by default.
Router04 and Router05 receive a default-route from three different devices.
Router04# show sdwan omp routes Generating output, this might take time, please wait ... Code: C -> chosen I -> installed Red -> redistributed Rej -> rejected L -> looped R -> resolved S -> stale Ext -> extranet Inv -> invalid Stg -> staged IA -> On-demand inactive U -> TLOC unresolved PATH ATTRIBUTE VPN PREFIX FROM PEER ID LABEL STATUS TYPE TLOC IP COLOR ENCAP PREFERENCE -------------------------------------------------------------------------------------------------------------------------------------- 1 0.0.0.0/0 10.1.1.7 29 1002 C,I,R installed 10.70.70.1 biz-internet ipsec - 10.1.1.7 30 1005 C,I,R installed 10.80.80.1 mpls ipsec - 10.1.1.7 31 1003 C,I,R installed 10.80.80.2 mpls ipsec -
Tip: The show sdwan omp routes
output for cEdges can be large if the router receive to much routes. You can use show sdwan omp route vpn <ID> <prefix>
to filter the output or also, you can use show sdwan omp route vpn <ID> | s <prefix>
to filter all the sector output of the prefix in cEdges.
Router05# show omp routes vpn 1 Code: C -> chosen I -> installed Red -> redistributed Rej -> rejected L -> looped R -> resolved S -> stale Ext -> extranet Inv -> invalid Stg -> staged IA -> On-demand inactive U -> TLOC unresolved PATH ATTRIBUTE VPN PREFIX FROM PEER ID LABEL STATUS TYPE TLOC IP COLOR ENCAP PREFERENCE -------------------------------------------------------------------------------------------------------------------------------------- 1 0.0.0.0/0 10.1.1.7 5 1002 C,I,R installed 10.70.70.1 biz-internet ipsec - 10.1.1.7 6 1005 C,I,R installed 10.80.80.1 mpls ipsec - 10.1.1.7 7 1003 C,I,R installed 10.80.80.2 mpls ipsec -
Tip: The show omp route
output for vEdges can be large if the router receives too routes. You can use show omp routes vpn <ID> <prefix>
to filter the output in vEdges. You can use
next to the command to see the output in format table in vEdges.| tab
Router04 (10.70.70.2) and Router05 (10.20.20.1) install the default-route from Router01 (10.70.70.1), Router02 (10.80.80.1), and Router03 (10.80.80.1).
Router04# show ip route vrf 1 Routing Table: 1 Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route H - NHRP, G - NHRP registered, g - NHRP registration summary o - ODR, P - periodic downloaded static route, l - LISP a - application route + - replicated route, % - next hop override, p - overrides from PfR & - replicated local route overrides by connected Gateway of last resort is 10.80.80.2 to network 0.0.0.0 m* 0.0.0.0/0 [251/0] via 10.80.80.2, 00:05:02, Sdwan-system-intf [251/0] via 10.80.80.1, 00:05:02, Sdwan-system-intf [251/0] via 10.70.70.1, 00:05:02, Sdwan-system-intf
Tip: The
output for cEdges can be large if the router receives too routes. You can use show ip route vrf <ID>
show ip route vrf <ID> <prefix without mask>
to filter the output, or also, you can use
to filter all the sector output of the prefix.show ip route vrf <ID> | s <prefix>
Router05# show ip routes vpn 1 0.0.0.0/0 Codes Proto-sub-type: IA -> ospf-intra-area, IE -> ospf-inter-area, E1 -> ospf-external1, E2 -> ospf-external2, N1 -> ospf-nssa-external1, N2 -> ospf-nssa-external2, e -> bgp-external, i -> bgp-internal Codes Status flags: F -> fib, S -> selected, I -> inactive, B -> blackhole, R -> recursive, L -> import PROTOCOL NEXTHOP NEXTHOP NEXTHOP VPN PREFIX PROTOCOL SUB TYPE IF NAME ADDR VPN TLOC IP COLOR ENCAP STATUS --------------------------------------------------------------------------------------------------------------------------------------------- 1 0.0.0.0/0 omp - - - - 10.70.70.1 biz-internet ipsec F,S 1 0.0.0.0/0 omp - - - - 10.80.80.1 mpls ipsec F,S 1 0.0.0.0/0 omp - - - - 10.80.80.2 mpls ipsec F,S
Tip: The show ip routes
output for vEdges can be large if the router receives too routes. You can use show ip routes vpn <ID> <prefix>
to filter the output in vEdges.
Use a Topology Custom Control and apply a preference for the default-route in the OMP.
Use Route Rule instead of Transport Location (TLOC) rule.
Apply this policy in the outbound direction to Router04 site ID 40.
You can use vManage GUI to configure the Centralized Policy
with the Control Policy
.
Control policies are configured in Topology
, and you can choose Hub-and-Spoke
, Mesh
, or Custom Control
policies.
is used for this specific scenario, as shown in the image.Custom Control(Route & TLOC)
andSequence
type
is added.Sequence Rule
system-ip and prefix list are set in match conditions.Originator
and Accept
Preference
is set on actions for same sequence, as shown in the image.
is applied in the outbound direction for site 40, as shown in the image.Control Policy
Caution: To activate a Centralized Policy
, the vSmart needs a device template attached, or the Centralized Policy
send a
error. The vSmart has to be in vManage mode.Failed to activate policy
You can configure the vSmart manually instead of vManage GUI.
control-policy originatoronly sequence 1 match route originator 10.70.70.1 prefix-list Default_Route ! action accept set preference 200 ! ! ! default-action accept ! lists prefix-list Default_Route ip-prefix 0.0.0.0/0 ! site-list sitio40 site-id 40 ! ! ! apply-policy site-list sitio40 control-policy originatoronly out <<<<<<< ! !
The vSmart sends out to Router04 only the default-route from the originator Router01 (10.70.70.1) with a higher preference 200.
Caution: The default action is set to reject.
The default action can be set to accept or reject.
Caution: If the sequence is not matched, the routes take the default action.
It means that if the default action is set to reject and the route does not match any sequence, it is rejected from the vSmart and it is not advertised to the overlay.
If the default action is set to accept and the route does not match any sequence, it is accepted from the vsmart and advertised to the overlay.
You can use the
command on vSmart to verify that the show running-config policy
Control-Policy
is applied correctly.
vsmart# show running-config policy control-policy policy control-policy originatoronly sequence 1 match route originator 10.70.70.1 prefix-list Default_Route ! action accept set preference 200 ! ! ! default-action accept ! !
Use
to check the site and direction that the show running-config apply-policy
Control-Policy
is applied.
vsmart# show running-config apply-policy apply-policy site-list sitio40 control-policy originatoronly out ! !
Tip: You can use show running-config policy control-policy <name> default-action | sequence
to filter the output if the vSmart has many control policies.
Router04 (10.70.70.2) receives all the default-routes from Router01 (10.70.70.1), Router02 (10.80.80.1), and Router03 (10.80.80.1), but the default-route from Router01 have higher preference (200).
Router04# show sdwan omp routes Generating output, this might take time, please wait ... Code: C -> chosen I -> installed Red -> redistributed Rej -> rejected L -> looped R -> resolved S -> stale Ext -> extranet Inv -> invalid Stg -> staged IA -> On-demand inactive U -> TLOC unresolved PATH ATTRIBUTE VPN PREFIX FROM PEER ID LABEL STATUS TYPE TLOC IP COLOR ENCAP PREFERENCE -------------------------------------------------------------------------------------------------------------------------------------- 1 0.0.0.0/0 10.1.1.7 29 1002 C,I,R installed 10.70.70.1 biz-internet ipsec 200 <<<<<<<<<<<< 10.1.1.7 30 1005 R installed 10.80.80.1 mpls ipsec - 10.1.1.7 31 1003 R installed 10.80.80.2 mpls ipsec -
Router04 (10.70.70.2) installs only the route from Router01 (10.70.70.1) in the IP route table.
Router04# show ip route vrf 1 Routing Table: 1 Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route H - NHRP, G - NHRP registered, g - NHRP registration summary o - ODR, P - periodic downloaded static route, l - LISP a - application route + - replicated route, % - next hop override, p - overrides from PfR & - replicated local route overrides by connected Gateway of last resort is 10.70.70.1 to network 0.0.0.0 m* 0.0.0.0/0 [251/0] via 10.70.70.1, 00:13:25, Sdwan-system-intf
Router05 (10.20.20.1) is on site 20, still, receive and install all the default-routes from Router01 (10.70.70.1), Router02 (10.80.80.1), and Router03 (10.80.80.1).
Router05# show omp routes vpn 1 Code: C -> chosen I -> installed Red -> redistribute Rej -> rejected L -> looped R -> resolved S -> stale Ext -> extranet Inv -> invalid Stg -> staged IA -> On-demand inactive U -> TLOC unresolved PATH ATTRIBUTE VPN PREFIX FROM PEER ID LABEL STATUS TYPE TLOC IP COLOR ENCAP PREFERENCE -------------------------------------------------------------------------------------------------------------------------------------- 1 0.0.0.0/0 10.1.1.7 5 1002 C,I,R installed 10.70.70.1 biz-internet ipsec - <<<<<< no preference 10.1.1.7 6 1005 C,I,R installed 10.80.80.1 mpls ipsec - 10.1.1.7 7 1003 C,I,R installed 10.80.80.2 mpls ipsec - Router05# show ip routes vpn 1 Codes Proto-sub-type: IA -> ospf-intra-area, IE -> ospf-inter-area, E1 -> ospf-external1, E2 -> ospf-external2, N1 -> ospf-nssa-external1, N2 -> ospf-nssa-external2, e -> bgp-external, i -> bgp-internal Codes Status flags: F -> fib, S -> selected, I -> inactive, B -> blackhole, R -> recursive, L -> import PROTOCOL NEXTHOP NEXTHOP NEXTHOP VPN PREFIX PROTOCOL SUB TYPE IF NAME ADDR VPN TLOC IP COLOR ENCAP STATUS --------------------------------------------------------------------------------------------------------------------------------------------- 1 0.0.0.0/0 omp - - - - 10.70.70.1 biz-internet ipsec F,S 1 0.0.0.0/0 omp - - - - 10.80.80.1 mpls ipsec F,S 1 0.0.0.0/0 omp - - - - 10.80.80.2 mpls ipsec F,S
Use the same policy that Solution 1
used, and apply it in the inbound direction from Router01 site ID 70.
control-policy originatoronly sequence 1 match route originator 10.70.70.1 prefix-list Default_Route ! action accept set preference 200 ! ! ! default-action accept ! lists prefix-list Default_Route ip-prefix 0.0.0.0/0 ! site-list SiteList_70 site-id 70 ! ! ! apply-policy site-list SiteList_70 control-policy originatoronly in <<<<<<<<< ! !
If you use the inbound direction, Router04 (10.70.70.2) and Router05 (10.20.20.1) receive and install the default-route from Router01 (10.70.70.1) only.
Router04# show sdwan omp routes Generating output, this might take time, please wait ... Code: C -> chosen I -> installed Red -> redistributed Rej -> rejected L -> looped R -> resolved S -> stale Ext -> extranet Inv -> invalid Stg -> staged IA -> On-demand inactive U -> TLOC unresolved PATH ATTRIBUTE VPN PREFIX FROM PEER ID LABEL STATUS TYPE TLOC IP COLOR ENCAP PREFERENCE -------------------------------------------------------------------------------------------------------------------------------------- 1 0.0.0.0/0 10.1.1.7 29 1002 C,I,R installed 10.70.70.1 biz-internet ipsec 200 <<<<<<< Router05# show omp routes vpn 1 Code: C -> chosen I -> installed Red -> redistributed Rej -> rejected L -> looped R -> resolved S -> stale Ext -> extranet Inv -> invalid Stg -> staged IA -> On-demand inactive U -> TLOC unresolved PATH ATTRIBUTE VPN PREFIX FROM PEER ID LABEL STATUS TYPE TLOC IP COLOR ENCAP PREFERENCE -------------------------------------------------------------------------------------------------------------------------------------- 1 0.0.0.0/0 10.1.1.7 5 1002 C,I,R installed 10.70.70.1 biz-internet ipsec 200 <<<<<<<
If you lose Router01 (10.70.70.1), the routers install all default-routes that receive without preference. In this scenario, from Router02 (10.80.80.1) and Router03 (10.80.80.2):
Router04# show sdwan omp routes Generating output, this might take time, please wait ... Code: C -> chosen I -> installed Red -> redistributed Rej -> rejected L -> looped R -> resolved S -> stale Ext -> extranet Inv -> invalid Stg -> staged IA -> On-demand inactive U -> TLOC unresolved PATH ATTRIBUTE VPN PREFIX FROM PEER ID LABEL STATUS TYPE TLOC IP COLOR ENCAP PREFERENCE -------------------------------------------------------------------------------------------------------------------------------------- 1 0.0.0.0/0 10.1.1.7 36 1005 C,I,R installed 10.80.80.1 mpls ipsec - 10.1.1.7 37 1003 C,I,R installed 10.80.80.2 mpls ipsec - Router05# show omp routes vpn 1 Code: C -> chosen I -> installed Red -> redistributed Rej -> rejected L -> looped R -> resolved S -> stale Ext -> extranet Inv -> invalid Stg -> staged IA -> On-demand inactive U -> TLOC unresolved PATH ATTRIBUTE VPN PREFIX FROM PEER ID LABEL STATUS TYPE TLOC IP COLOR ENCAP PREFERENCE -------------------------------------------------------------------------------------------------------------------------------------- 1 0.0.0.0/0 10.1.1.7 14 1005 C,I,R installed 10.80.80.1 mpls ipsec - 10.1.1.7 15 1003 C,I,R installed 10.80.80.2 mpls ipsec -
In this Solution, routers receive the default-router only from Router01 (10.70.70.1), but if you lose it, you want the backup default-route that remote routers install came from Router02 (10.80.80.1) and not from both Router02 (10.80.80.1) and Router03 (10.80.80.1) as in Solution 1
and Solution 2
.
Add a sequence on the same Control Policy and apply a lower preference that you set from default-route for Router01 preference 200, but a higher than the default preference (100).
For the default-route advertised from Router02 (10.80.80.1), you can set a preference of 150.
control-policy originator sequence 1 match route originator 10.70.70.1 prefix-list Default_Route ! action accept set preference 200 ! ! ! sequence 11 <<<<< new sequence match route originator 10.80.80.1 <<<<< Router02 system ip as originator prefix-list Default_Route ! action accept set preference 150 <<< lower preference of Router01 ! ! ! default-action accept ! lists prefix-list Default_Route ip-prefix 0.0.0.0/0 ! site-list sitio40 site-id 40 ! ! ! apply-policy site-list sitio40 control-policy originator out ! !
The router receives the default-routes with preferences of 200, 150, and default preference.
Router04# show sdwa omp routes Generating output, this might take time, please wait ... Code: C -> chosen I -> installed Red -> redistributed Rej -> rejected L -> looped R -> resolved S -> stale Ext -> extranet Inv -> invalid Stg -> staged IA -> On-demand inactive U -> TLOC unresolved PATH ATTRIBUTE VPN PREFIX FROM PEER ID LABEL STATUS TYPE TLOC IP COLOR ENCAP PREFERENCE -------------------------------------------------------------------------------------------------------------------------------------- 1 0.0.0.0/0 10.1.1.7 36 1005 R installed 10.80.80.1 mpls ipsec 150 <<<<<<<< 10.1.1.7 37 1003 R installed 10.80.80.2 mpls ipsec - 10.1.1.7 38 1002 C,I,R installed 10.70.70.1 biz-internet ipsec 200 <<<<<<<<
Router04 (10.70.70.2) installs in routing table only the default-route from Router01 (10.70.70.1) with higher preference:
Router04# show ip route vrf 1 Routing Table: 1 Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route H - NHRP, G - NHRP registered, g - NHRP registration summary o - ODR, P - periodic downloaded static route, l - LISP a - application route + - replicated route, % - next hop override, p - overrides from PfR & - replicated local route overrides by connected Gateway of last resort is 10.70.70.1 to network 0.0.0.0 m* 0.0.0.0/0 [251/0] via 10.70.70.1, 00:02:47, Sdwan-system-intf
If you lose Router01 (10.70.70.1), Router04 (10.70.70.2) installs only the route with the next higher preference from Router02 (10.80.80.1).
Router04# show sdwa omp routes Generating output, this might take time, please wait ... Code: C -> chosen I -> installed Red -> redistributed Rej -> rejected L -> looped R -> resolved S -> stale Ext -> extranet Inv -> invalid Stg -> staged IA -> On-demand inactive U -> TLOC unresolved PATH ATTRIBUTE VPN PREFIX FROM PEER ID LABEL STATUS TYPE TLOC IP COLOR ENCAP PREFERENCE -------------------------------------------------------------------------------------------------------------------------------------- 1 0.0.0.0/0 10.1.1.7 36 1005 C,I,R installed 10.80.80.1 mpls ipsec 150 <<<<<<< 10.1.1.7 37 1003 R installed 10.80.80.2 mpls ipsec - Router04# show ip route vrf 1 Routing Table: 1 Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route H - NHRP, G - NHRP registered, g - NHRP registration summary o - ODR, P - periodic downloaded static route, l - LISP a - application route + - replicated route, % - next hop override, p - overrides from PfR & - replicated local route overrides by connected Gateway of last resort is 10.80.80.1 to network 0.0.0.0 m* 0.0.0.0/0 [251/0] via 10.80.80.1, 00:00:15, Sdwan-system-intf
If you lose Router02, Router04 installs default-route from Router03 (10.80.80.1) that is the route with the default preference.
Tip: The inbound and outbound direction works on next way, the inbound if you want to advertise the preferences to all remote routers in Full-Mesh or the outbound if you want to advertise the preferences only to a specific remote site.
All previous solutions works exactly the same if you use any other prefix instead of the default-route prefix.
Example with prefix 10.40.40.0/24 advertised from Router01 (10.70.70.1) to Router04 (10.70.70.2).
control-policy originator sequence 1 match route originator 10.70.70.1 prefix-list prefix40 ! action accept set preference 200 ! ! ! default-action accept ! lists prefix-list prefix40 ip-prefix 10.40.40.0/24 <<<<<<<<< ! site-list sitio40 site-id 40 ! ! ! apply-policy site-list sitio40 control-policy originator out ! !
Router04# show sdwan omp routes Generating output, this might take time, please wait ... Code: C -> chosen I -> installed Red -> redistributed Rej -> rejected L -> looped R -> resolved S -> stale Ext -> extranet Inv -> invalid Stg -> staged IA -> On-demand inactive U -> TLOC unresolved PATH ATTRIBUTE VPN PREFIX FROM PEER ID LABEL STATUS TYPE TLOC IP COLOR ENCAP PREFERENCE -------------------------------------------------------------------------------------------------------------------------------------- 1 0.0.0.0/0 10.1.1.7 36 1005 C,I,R installed 10.80.80.1 mpls ipsec 150 10.1.1.7 37 1003 R installed 10.80.80.2 mpls ipsec - 1 10.40.40.0/24 10.1.1.7 13 1002 C,I,R installed 10.70.70.1 biz-internet ipsec 200 <<<<<<<< 10.1.1.7 15 1005 R installed 10.80.80.1 mpls ipsec - 10.1.1.7 16 1003 R installed 10.80.80.2 mpls ipsec - Router04# show ip route vrf 1 Routing Table: 1 Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route H - NHRP, G - NHRP registered, g - NHRP registration summary o - ODR, P - periodic downloaded static route, l - LISP a - application route + - replicated route, % - next hop override, p - overrides from PfR & - replicated local route overrides by connected Gateway of last resort is 10.80.80.1 to network 0.0.0.0 m* 0.0.0.0/0 [251/0] via 10.80.80.1, 00:11:55, Sdwan-system-intf 10.0.0.0/24 is subnetted, 1 subnets m 10.40.40.0 [251/0] via 10.70.70.1, 00:02:17, Sdwan-system-intf <<<<<< Router04#
Policies Configuration Guide for vEdge Routers, Cisco SD-WAN
Technical Support & Documentation - Cisco Systems
Revision | Publish Date | Comments |
---|---|---|
1.0 |
30-Aug-2022 |
Initial Release |