beautypg.com

Brocade Network OS Administrator’s Guide v4.1.1 User Manual

Page 571

background image

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

sw0(config-routemap pulp_fiction)# set ip interface NULL0

3. Create the second stanza of the route map. (The example is using 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

Based on the above configuration, when address 1.1.1.1 is received, it matches stanza 10:

• If the next hop 3.3.3.3 is selected, the packet is forwarded to 3.3.3.3.
• If 3.3.3.3 is not selected by the PBR logic, the packet is sent to the next specified next-hop, which

is the NULL0 interface, resulting in the traffic being dropped.

• If address 11.11.11.11 is received, since it matches the deny case of the ACL, it is denied from

using the next hops specified in the route map and is forwarded according to the standard logic.

• If address 12.12.12.12 is received, because it meets none of the specified match criteria in either

of the two stanzas, it basically falls off the end of the route map and reverts to using the standard
routing logic.

Policy-Based Routing and NULL0 as route map default action

This example shows the use of the NULL0 interface.

In this example, the use of the NULL0 interface is only applicable to frames that meet the match criteria
defined in the created ACL.

1. Configure the ACLs.

sw0(config)# ip access-list standard Jules

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

sw0(conf-ipacl-std)# deny ip 11.11.11.11

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

sw0(config-routemap pulp_fiction)# set ip interface NULL0

3. Create the second stanza of the route map. (The example is using 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. Create the third stanza, which provides the default action of the route map.

sw0(config)# route-map pulp_fiction permit 30

sw0(config-routemap pulp_fiction)#

sw0(config-routemap pulp_fiction)# set ip interface NULL0

The above configuration introduces a third stanza that defines the routing desired for all frames that
do not meet any of the match criteria defined by the route map.

Based on the above configuration, when address 1.1.1.1 is received, it matches stanza 10:

• If the next hop 3.3.3.3 is selected, the packet is forwarded to 3.3.3.3.
• If 3.3.3.3 is not selected by the PBR logic, the packet is sent to the next specified next-hop, which

is the NULL0 interface, resulting in the traffic being dropped.

• If address 11.11.11.11 is received, since it matches the deny case of the ACL, it is denied from

using the next hops specified in the route map and will be forwarded according to the standard
logic.

• If address 12.12.12.12 is received, because it meets none of the specified match criteria in either

of the first two stanzas, it reaches the third stanza. Since a no “match” statement is specified, it is
an implicit “match any.” The address 12.12.12.12 is forwarded to the NULL0 interface where it is
dropped.

Policy-Based Routing and NULL0 as route map default action

Network OS Administrator’s Guide

571

53-1003225-04