Name
set default interface — route-map
Synopsis
set default interfaceinterface
[...interface
] no set default interfaceinterface
[...interface
]
Configures
Properties of routes matching a route map
Default
None
Description
This command sets the output interface for destinations that match the criteria in the route map if there is no explicit route to the destination. In other words, if the route is matched by this route map and has no explicit destination, this command can tell it which interface to use as a default route. This allows you to have different default routes for different hosts or networks.
You may list any number of interfaces; if the first interface in the
list is down, the next is tried, and so on. This command should be
used in conjunction with the ip
policy route-map
command.
Example
The following commands establish a route map named
policy-one
for policy-based routing. This map
takes all packets for the destinations matched by access list 1
(i.e., all destinations that match 10.1.0.0/16) and sends them out
through interface serial0
.
interface ethernet0 ip policy route-map policy-one ip address 10.1.1.1 255.255.255.0 ! ! this access-list is for the match ip command below access-list 1 permit 10.1.0.0 0.0.255.255 ! route-map policy-one match ip address 1 set default interface serial0
Get CISCO IOS in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.