Configuration Guide User guide

1752 FastIron Configuration Guide
53-1002494-02
Policy-based routing (PBR)
This command sets the next-hop IP address for traffic that matches a match statement in the route
map.
Setting the next hop
The following commands configure the Brocade device to apply PBR to traffic from IP subnets
209.157.23.x, 209.157.24.x, and 209.157.25.x. In this example, route maps specify the next-hop
gateway for packets from each of these subnets:
Packets from 209.157.23.x are sent to 192.168.2.1.
Packets from 209.157.24.x are sent to 192.168.2.2.
Packets from 209.157.25.x are sent to 192.168.2.3.
The following commands configure three standard ACLs. Each ACL contains one of the ACLs listed
above. Make sure you specify permit instead of deny in the ACLs, so that the Brocade device
permits the traffic that matches the ACLs to be further evaluated by the route map. If you specify
deny, the traffic that matches the deny statements are routed normally. Notice that these ACLs
specify any for the destination address.
Brocade(config)#access-list 50 permit 209.157.23.0 0.0.0.255
Brocade(config)#access-list 51 permit 209.157.24.0 0.0.0.255
Brocade(config)#access-list 52 permit 209.157.25.0 0.0.0.255
The following commands configure three entries in a route map called “test-route”. The first entry
(permit 50) matches on the IP address information in ACL 50 above. For IP traffic from subnet
209.157.23.0/24, this route map entry sets the next-hop IP address to 192.168.2.1.
Brocade(config)#route-map test-route permit 50
Brocade(config-routemap test-route)#match ip address 50
Brocade(config-routemap test-route)#set ip next-hop 192.168.2.1
Brocade(config-routemap test-route)#exit
The following commands configure the second entry in the route map. This entry (permit 51)
matches on the IP address information in ACL 51 above. For IP traffic from subnet
209.157.24.0/24, this route map entry sets the next-hop IP address to 192.168.2.2.
Brocade(config)#route-map test-route permit 51
Brocade(config-routemap test-route)#match ip address 51
Brocade(config-routemap test-route)#set ip next-hop 192.168.2.2
Brocade(config-routemap test-route)#exit
The following commands configure the third entry in the test-route route map. This entry (permit
52) matches on the IP address information in ACL 52 above. For IP traffic from subnet
209.157.25.0/24, this route map entry sets the next-hop IP address to 192.168.2.3.
Brocade(config)#route-map test-route permit 52
Brocade(config-routemap test-route)#match ip address 52
Brocade(config-routemap test-route)#set ip next-hop 192.168.2.3
Brocade(config-routemap test-route)#exit
The following command enables PBR by globally applying the test-route route map to all interfaces.
Brocade(config)#ip policy route-map test-route