pbr-action-list
Syntax
pbr-action-list <ACTION-LIST-NAME>
[<SEQUENCE-NUMBER>]
{nexthop | default-nexthop} <NEXT-HOP-IP-ADDR>
interface {null | <TUNNEL-NAME>}
no [<SEQUENCE-NUMBER>]
{nexthop | default-nexthop} <IP-ADDR>
interface {null | <TUNNEL-NAME>}
no pbr-action-list <ACTION-LIST-NAME>
Description
Creates a PBR action list or modifies its entries.
The
no
form of this command can be used to delete an action list or an individual action list entry.
Command context
config
The
pbr-action-list
<ACTION-LIST-NAME>
command takes you into the
config-pbr-action-list-<ACTION-LIST-NAME>
context where you modify entries for a PBR action list.
Parameters
<ACTION-LIST-NAME>
Specifies the action list name. An action list name can be 1 to 64 alphanumeric characters.
<SEQUENCE-NUMBER>
Specifies list entry sequence number. Range: 1-4294967295
{nexthop | default-nexthop}
Selects a regular next-hop (
nexthop
) or a default next-hop (default-nexthop
). These parameters specify the address of a next-hop router to forward traffic matched by a class under different conditions.nexthop
Sets the next hop for routing the packet.
default-nexthop
Sets the next hop for routing the packet when there is no explicit route for its destination.
<NEXTHOP-IP-ADDR>
Specifies IPv4 or IPv6 address of the next-hop router.
interface {null | <TUNNEL-NAME>
Selects the type of keyword interface:
null
or the tunnel interface name.null
Specifies to drop matching traffic.
<TUNNEL-NAME>
Specifies an IP tunnel interface name through which to forward the matching traffic.
Authority
Administrators
Restrictions
The reachability of the next-hop routers/tunnel interfaces in the list is not guaranteed. Such reachability can change at any time due to the dynamic nature of the network environment.
Usage
interface null
interface tunnel
nexthop
default-nexthop
List entries have a unique sequence number which, if not user specified, are automatically assigned beginning at 10 and continuing at intervals of 10 for each subsequent new list entry, for example 20, 30, and 40. Sequence numbers of any value can be specified manually, a different interval may be set, and new entries can be added to (or removed from) any location in the list at any time.
Specifying an existing sequence number causes the existing list entry to be replaced by the new details. The list entry with the lowest sequence number has the highest priority entry in the list. The sequence numbers may be renumbered with the
pbr-action-list resequence
command.
Only one next-hop router or interface from the list is used per packet matched. This router or interface is defined as the highest priority list entry that is reachable or available at the time of the traffic match. If the highest priority list entry next-hop router or tunnel interface is reachable - that list entry is chosen, the search is stopped - and the traffic is forwarded to the next-hop router or interface for the entry. If the highest priority list entry next-hop router or tunnel interface is not reachable, the next highest priority list entry reachability is determined and used if reachable, otherwise the process continues down the list. If none of the routers in the list are reachable, the packet may be dropped through the null interface entry if configured) or forwarded according to a system route table entry.
An action list that contains a next-hop of one IP version cannot also contain an entry of another IP version. For example, an action list must contain only IPv4 or IPv6 next-hop addresses or tunnel interfaces.
Examples
The list name is included in the context prompt for easy current-list identification. Any list name over 10 characters will be truncated at 10 characters and terminated with the tilde character (~) to indicate a reduced list name display. This reduction affects the prompt display of the list name only:
switch(config)# pbr-action-list eighteenchars switch(config-pbr-action-list-eighteench~)#
The following example creates an action list with two IPv4 next-hops, a default IPv4 next-hop, and a null interface. The example uses default sequence numbering for its list entries.
switch(config)# pbr-action-list test1 switch(config-pbr-action-list-test1)# nexthop 1.1.1.1 switch(config-pbr-action-list-test1)# nexthop 2.2.2.2 switch(config-pbr-action-list-test1)# default-nexthop 9.9.9.9 switch(config-pbr-action-list-test1)# interface null switch(config-pbr-action-list-test1)# end switch(config)# show pbr-action-list test1 Name Sequence Type Address/Interface ------------------------------------------------------------------ test1 10 nexthop 1.1.1.1 20 nexthop 2.2.2.2 30 default-nexthop 9.9.9.9 40 interface null
The following example creates an action list with an IPv4 next-hop and a tunnel interface with manual sequence numbers for its entries.
switch(config)# pbr-action-list test2 switch(config-pbr-action-list-test2)# 6 ip default-nexthop 4.4.4.4 switch(config-pbr-action-list-test2)# 1 interface tunnel10 switch(config-pbr-action-list-test2)# end switch(config)# show pbr-action-list test2 Name Sequence Type Address/Interface ------------------------------------------------------------------ test2 1 interface tunnel10 6 default-nexthop 4.4.4.4
The following example creates an action list with two IPv4 tunnel interfaces, with default sequence numbering.
switch(config)# pbr-action-list test3 switch(config-pbr-action-list-test3)# interface tunnel10 switch(config-pbr-action-list-test3)# interface tunnel15 switch(config-pbr-action-list-test3)# end switch(config)# show pbr-action-list test3 Name Sequence Type Address/Interface ------------------------------------------------------------------ test3 10 interface tunnel10 20 interface tunnel15
The following example creates an action list with two IPv6 next-hops and the null interface, with manual sequence numbers.
switch(config)# pbr-action-list test4 switch(config-pbr-action-list-test4)# 5 nexthop 2000:abcd::cccc:dddd switch(config-pbr-action-list-test4)# 6 nexthop 1000:abcd::1234:5678 switch(config-pbr-action-list-test4)# 7 interface null switch(config-pbr-action-list-test4)# end switch(config)# show pbr-action-list test4 Name Sequence Type Address/Interface ------------------------------------------------------------------ test4 5 nexthop 2000:abcd::cccc:dddd 6 nexthop 1000:abcd::1234:5678 7 interface null