S Commands
This chapter describes the Cisco NX-OS Policy Based Routing (PBR) commands that begin with S, except for the show commands.
set interface
To configure an interface to be used for routing, use the set interface command. To revert to the default settings, use the no form of this command.
Syntax Description
(Optional) Specifies the null interface. The valid value is 0. |
Command Default
Command Modes
Command History
|
|
---|---|
Usage Guidelines
The set interface command is used only for policy-based routing (PBR) and is ignored if it is present in a route map that is used for route redistribution or filtering. To remove the static routing for tunnels, use the no set interface command.
Examples
This example shows how to configure an interface to be used for routing:
|
|
---|---|
Defines the conditions for redistributing routes from one routing protocol into another. |
set ip next-hop
To configure a route map that sets the next-hop IPv4 address, use the set ip next-hop command. To delete an entry, use the no form of this command.
set ip next-hop { ip-address [... ip - address ]}
no set ip next-hop { ip-address [... ip - address ]}
Syntax Description
IP address of the next hop to which packets are output. The next-hop does not need to be adjacent router. You can configure one or more IP addresses. |
Command Default
Command Modes
Command History
|
|
---|---|
Usage Guidelines
An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the ip-address argument.
Use the ip policy route-map command and the match and set commands to define the conditions for policy routing packets. The ip policy route-map command identifies a route map by name. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which policy routing occurs. The set commands specify the set actions—the particular routing actions to perform if the criteria enforced by the match commands are met.
If the first next hop specified with the set ip next-hop command is down, the optionally specified IP addresses are tried in turn.
Examples
This example shows three routers are on the same LAN (with IP addresses 10.1.1.1, 10.1.1.2, and 10.1.1.3). Each is in a different autonomous system:
set ipv6 next-hop
To indicate where to output packets that pass a match clause of a route map for policy routing, use the set ipv6 next-hop command in route-map configuration mode. To delete an entry, use the no form of this command.
set ipv6 next-hop { ipv6-address [... ipv6 - address ]}
no set ipv6 next-hop { ipv6-address [... ip v6- address ]}
Syntax Description
IPv6 address of the next hop to which packets are output. It need not be an adjacent router. You can configure one or more IP addresses. |
Command Default
Command Modes
Route-map configuration (config-route-map)
Command History
|
|
---|---|
Usage Guidelines
An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the ip-address argument.
Use the ipv6 policy route-map command and the match and set commands to define the conditions for policy routing packets. The ipv6 policy route-map command identifies a route map by name. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which policy routing occurs. The set commands specify the set actions—the particular routing actions to perform if the criteria enforced by the match commands are met.
If the first next hop specified with the set ipv6 next-hop command is down, the optionally specified IP addresses are tried in turn.
Examples
This example shows how to configure a route map that sets the IPv6 next-hop address:
switch(config-route-map)# match ipv6 address test
switch(config-route-map)# set ipv6 next-hop 2001:0DB8::3
switch(config-route-map))# exit
switch(config)# interface externet 2/1