42-17
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 Configuration Examples
Differing Next Hops
The following example illustrates how to route traffic from different sources to different places (next
hops). Packets arriving from source 1.1.1.1 are sent to the next hop at 3.3.3.3; packets arriving from
source 2.2.2.2 are sent to the next hop at 3.3.3.5.
access-list 1 permit ip 1.1.1.1
access-list 2 permit ip 2.2.2.2
!
interface fastethernet 3/1
ip policy route-map Texas
!
route-map Texas permit 10
match ip address 1
set ip next-hop 3.3.3.3
!
route-map Texas permit 20
match ip address 2
set ip next-hop 3.3.3.5
Deny ACE
The following example illustrates how to stop processing a given route map sequence, and to jump to
the next sequence. Packets arriving from source 1.1.1.1 skip sequence 10 and jump to sequence 20. All
other packets from subnet 1.1.1.0 follow the set statement in sequence 10.
access-list 1 deny ip 1.1.1.1
access-list 1 permit ip 1.1.1.0 0.0.0.255
access-list 2 permit ip 1.1.1.1
access-list 2 permit ip 2.2.2.2
!
interface fastethernet 3/1
ip policy route-map Texas
!
route-map Texas permit 10
match ip address 1
set ip next-hop 3.3.3.3
!
route-map Texas permit 20
match ip address 2
set ip next-hop 3.3.3.5
Examples of the show Command
The following
show
command illustrates that route map pbrv6-test has only one permit sequence.
In the example policy, IPv6 packets with an address matching the criteria defined by the access control
list v6_acl are forwarded to the next hop 2006::2. If next-hop 2006::2 is unreachable, the matching
packets are forwarded to 2005::2. If both next-hops are unreachable, the packets are forwarded using the
routing table lookup. For packets that do not match the filter criteria, a standard routing table lookup is
performed for packet forwarding.
Switch#
show route-map pbrv6-test
route-map pbrv6-test, permit, sequence 10
Match clauses:
ipv6 address v6_acl
Set clauses:
ipv6 next-hop 2006::2 2005::2
Содержание Catalyst 4500 Series
Страница 2: ......
Страница 4: ......
Страница 2086: ...Index IN 46 Software Configuration Guide Release IOS XE 3 9 0E and IOS 15 2 5 E ...