42-5
Catalyst 4500 Series Switch, Cisco IOS Software Configuration Guide - Cisco IOS XE 3.9.xE and IOS 15.2(5)Ex
Chapter 42 Configuring Policy-Based Routing
Policy-Based Routing
!
route-map rm-test permit 23
match ip address 101 2102
set interface vlan23
!
route-map rm-test deny 24
match ip address 104
set ip next-hop 24.4.4.1
!
route-map rm-test deny 25
match ip address 105
set ip next-hop 25.5.5.1
!
route-map rm-test permit 26
match ip address 2104
set ip next-hop 26.6.6.1
•
TCP packet from 61.1.1.1 to 133.3.3.1 with destination port 101
–
Matches ACL 101 in sequence #21.
–
PBR is switched through next-hop 21.1.1.1.
Note
ACL 101 is also matched in sequence #23, but the processing doesn't reach that point
•
TCP packet from 61.1.1.1 to 133.3.3.1 with destination port 102
–
In sequence #21, the ACL 101 action denies this packet (because all ACLs have an implicit
deny). Processing advances to sequence #22.
–
In sequence #22, ACL 102 matches TCP port 102, but the ACL action is deny. Processing
advances to sequence #23.
–
In sequence #23, ACL 2102 matches TCP port 102, and the ACL action is permit.
–
Packet is switched to output interface VLAN 23.
•
TCP packet from 61.1.1.1 to 133.3.3.1 with destination port 105
–
Processing moves from sequence #21 to #24, because all ACLs in these sequence numbers have
a deny action for port 105.
–
In sequence #25, ACL 105 has a permit action for TCP port 105.
–
The route-map deny command takes effect, and the packet is routed using the default IP routing
table.
The Catalyst 4500 series switch supports matching route map actions with a packet by installing entries
in the TCAM that match the set of packets described by the ACLs in the match criteria of the route map.
These TCAM entries point at adjacencies that either perform the necessary output actions or forward the
packet to software if either hardware does not support the action or its resources are exhausted.
If the route map specifies a
set interface …
action, packets that match the
match
statement are routed
in the software. Some packets may be dropped. Similarly, if the route-map specifies a
set default
interface…
action and there is no matching IP route for the packet, the packet is routed in the software.
Note
The scale of hardware-based PBR is determined by the TCAM size and the time required for the CPU
to flatten the ACL before programming into the hardware. The time take to flatten the ACL increases
when a PBR policy requires a considerable number of route-maps. For example, a PBR policy of 1,200
Содержание Catalyst 4500 Series
Страница 2: ......
Страница 4: ......
Страница 2086: ...Index IN 46 Software Configuration Guide Release IOS XE 3 9 0E and IOS 15 2 5 E ...