Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

NetFlow and Policy-based Routing

Hello.

We have a longtime and annoying problem in using NetFlow with policy-based routing. Consider a situation when traffic arriving at the input router intfc is routed to loopback via PBR (route map -> set int loop 1). And we want to use that loopback to get flow data (int loop 1 - ip flow ingress/egress). The command applies but there is no output in "sh ip cache flow". If enabled on physical intfc, there is output. Anyway, traffic is routed correctly but "sh int loop 1" gives 0 bytes input, although "sh int loop 1 accounting" gives correct in/out figures. Can anyone tell what is wrong? Can we get flow statistics from loopback intfc by any means?

Thanks in advance.

1 REPLY
Bronze

Re: NetFlow and Policy-based Routing

Here's the sample configuration:

interface g0/0

ip policy route-map g0/0-s0/0/0

interface g0/1

ip policy route-map g0/1-s0/1/0

interface s0/0/0

ip policy route-map s0/0/0-g0/0

interface s0/1/0

ip policy route-map s0/1/0-g0/1

!

route-map g0/0-s0/0/0

match ip address 100

set interface s0/0/0

route-map g0/1-s0/1/0

match ip address 101

set interface s0/1/0

route-map s0/0/0-g0/0

match ip address 102

set interface g0/0

route-map s0/1/0-g0/1

match ip address 103

set interface g0/1

!

access-list 100 permit ip any any

access-list 101 permit ip any any

access-list 102 permit ip any any

access-list 103 permit ip any any

!

Alternative configuration option:

route-map g0/0-s0/0/0

match ip address 100

set ip next-hop x.x.x.x <-- ip address of the next-hop router

This URL should help you:

http://www.cisco.com/en/US/products/ps6599/products_white_paper09186a00800a4409.shtml

227
Views
0
Helpful
1
Replies
CreatePlease to create content