Policy-based routing with differing next hops – Brocade Network OS Administrator’s Guide v4.1.1 User Manual

Page 569

Advertising
background image

The set clauses are evaluated in the following order:

1. Set clauses where the next hop is specified.
2. Set interface NULL0.

The order in which you enter the “set ip next-hop” commands determines the order preference. If no
next-hops are reachable, the egress interface is selected based on the order of interface configuration.
The set interface NULL0 clause — regardless of which position it was entered — is always placed as
the last selection in the list.

For example if you enter the order shown below, the PBR logic will treat 3.3.3.5 as its first choice. If
3.3.3.5 is unavailable, the PBR logic will determine if 4.4.4.4 is available. NULL0 is recognized only if
3.3.3.5 and 4.4.4.4 are both unavailable.

route-map foo permit 20

match ip address acl Vincent

set ip next-hop 3.3.3.5

set ip interface NULL0

set ip next-hop 4.4.4.4

NOTE
If a PBR route map is applied to an interface that is actively participating in a control protocol, and the
ACL specified in the route map also matches the control protocol traffic, the control protocol traffic is
trapped to the local processor and is not forwarded according to the route map.

Policy-Based Routing with differing next hops

In this example, traffic is routed from different sources to different places (next hops). Packets arriving
from source 1.1.1.1 are sent to the VRF pulp_fiction’s next hop at 3.3.3.3; packets arriving from source
2.2.2.2 are sent to the VRF pulp_fiction’s next hop at 3.3.3.5. If next hop 3.3.3.5 is not available, then
the packet is sent to the next hop 4.4.4.4.

1. Configure the ACLs.

sw0(config)# ip access-list standard Jules

sw0(conf-ipacl-std)# permit ip 1.1.1.1

sw0(config)# ip access-list standard Vincent

sw0(conf-ipacl-std)# permit ip 2.2.2.2

2. Create the first stanza of the route map. (The example is using a route-map named pulp_fiction.)

sw0(config)# route-map pulp_fiction permit 10

sw0(config-routemap pulp_fiction)# match ip address acl Jules

sw0(config-routemap pulp_fiction)# set ip vrf pulp_fiction next-hop 3.3.3.3

3. Create the second stanza of the route-map (in this example well define a route-map named

pulp_fiction.)

sw0(config)# route-map pulp_fiction permit 20

sw0(config-routemap pulp_fiction)# match ip address acl Vincent

sw0(config-routemap pulp_fiction)# set ip vrf pulp_fiction next-hop 3.3.3.5

sw0(config-routemap pulp_fiction)# set ip next-hop 4.4.4.4

4. Bind the route map to the desired interface.

sw0(config)# interface TenGigabitEthernet 4/1

sw0(conf-if-te-4/1)# ip policy route-map pulp_fiction

5. View the route map configuration contents.

sw0# show running-config route-map pulp-fiction

route-map pulp-fiction permit 10

match ip address acl Jules

set ip vrf pulp_fiction next-hop 3.3.3.3

!

route-map pulp-fiction permit 20

match ip address acl Vincent

set ip vrf pulp_fiction next-hop 3.3.3.5

Policy-Based Routing with differing next hops

Network OS Administrator’s Guide

569

53-1003225-04

Advertising