6.6. Policy-Based Routing Commands

6.6.1. ip policy route-map

Command Purpose

By default, PBR is disabled on the switch. To enable PBR, you must create a route map that specifies the match criteria and the resulting action if all of the match clauses are met. Then, you must enable PBR on a layer3 interface. All packets arriving on the specified interface matching the match clauses are subject to PBR.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ip policy route-map MAP_NAME

no ip policy route-map

Parameter

Parameter Description

Parameter Value

MAP_NAME

policy route-map name

Up to 20 characters

Command Mode

Interface Configuration

Default

disabled

Usage

This command can only be configured on routed port, vlan interface and routed agg port.

Examples

The following example shows how to configure pbr on an interface:

Switch# configure terminal
switch (config)# ip access-list 1 extend
switch (config-ex-ip-acl)# 10 permit any any any
switch (config-route-map)#exit
switch (config)#route-map richard permit 10
switch (config-route-map)#match ip address 1
switch (config-route-map)#set ip next-hop 10.1.1.1
switch (config-route-map)#exit
switch (config)#interface eth-0-1
switch (config-if)# no switch port
switch (config-if)# no shutdown
switch (config-if)#ip policy route-map richrad

6.6.2. ip-group

Command Purpose

Use this command to set the ip-group.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ip-group NAME ( vrf WORD | ) ( load-share | )

no ip-group NAME

Parameter

Parameter Description

Parameter Value

MAP_NAME

ip-group name

Up to 32 characters

WORD

vrf name

Up to 15 characters

load-share

load-share mode

-

Command Mode

Global Config

Default

No set ip-group is specified by default.

Usage

Use this command to configure ip-group which is uesd by pbr.

Examples

The following example shows how to configure ip-group:

Switch# configure terminal
switch (config)# ip-group aaa

Related Commands

route-map

6.6.3. ip-member

Command Purpose

Use this command to set the ip-member.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

member ip A.B.C.D ( priority PRIORITY ) ( track object_id | )

no member ip A.B.C.D ( track | )

Parameter

Parameter Description

Parameter Value

A.B.C.D

ip-member address

IPv4 Address in A.B.C.D format

PRIORITY

member priority

0-65535

object_id

Object identity is used to identify track object

1-500

Command Mode

Ip-group Configuration

Default

No set ip-member is specified by default.

Usage

Use this command to configure ip-member in ip-group.

Examples

The following example shows how to configure ip-member:

Switch# configure terminal
switch (config)# ip-group aaa
switch (config-ip-group)# member ip 1.1.1.1

Related Commands

route-map

6.6.4. show ip policy route-map

Command Purpose

Use this command to display user readable policy route-map information

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show ip policy route-map

Command Mode

Privileged EXEC

Default

Disabled

Usage

If some of the PBR entries are not successfully inserted into tcam, an error tip will be displayed.

Examples

SWITCH# show ip policy route-map

Route-map interface
richard eth-0-1
eth-0-3
Failed entry: no
sally eth-0-2
Failed entry: yes
Please use Policy Based-Routing CLI: show pbr failed entry to gain more detail.

Related Commands

route-map

6.6.5. show resource pbr

Command Purpose

Use this command to display the resource usage over the policy based routing module.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show resource pbr

Command Mode

Privileged EXEC

Default

Disabled

Usage

None

Examples

SWITCH# show resource pbr

Policy Based Routing
Resource Used Capability
=============================================================
Policy Route Map 0 32
Policy Based Routing ACE 0 64

Related Commands

route-map

show ip policy route-map