This document describes the procedure to enable packet-trace on IOS-XE platform to capture Policy-Based Routing (PBR) traffic on Cisco's Integrated Service Router (ISR) 4000 series platform.
Contributed by Prathik Krishnappa, Cisco TAC Engineer.
There are no specific requirements for this document.
This document is not restricted to specific software and hardware versions.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Here is the configuration to enable packet-trace to debug PBR traffic:
route-map PBR permit 10
match ip address 102
set ip next-hop 192.168.1.18
ip access-list extended 102
permit ip 192.168.1.0 0.0.3.255 any
permit ip 192.168.2.0 0.0.0.255 any
ip address 192.168.2.10 255.255.255.248
no ip redirects
no ip unreachables
no ip proxy-arp
ip nat inside
ip policy route-map PBR
route-map PBR, permit, sequence 10
ip address (access-lists):102
ip next-hop 192.168.1.18 Policy routing matches: 500 packets, 400 bytes
To debug particular subnet, create an access-list:
ip access-list ext 103 permit ip host 192.168.3.10 any
Apply the access-list in the PBR:
route-map PBR match ip address 103
Perform conditional debug on the interface where PBR is applied:
debug platform condition interface gigabitethernet 0/0/1 ipv4 access-list 103 both