Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
New Member

How to mark locally originating traffic?


Recently we discovered a problem with our configuration help-out, which was not problem with router having just static routes. We do with it a marking and rate-limiting of locally originating traffic upon its way to the output link. We have for it a local route-map, which directs all such traffic to local loopback. Here, one output rate-limiting command with marking is applied.

Now, we wanted to use this scenario with a router running BGP toward its peer. The BGP session couldn't be established due to presence of our "feature" which redirects now all BGP traffic to that loopback.

Is there any other way how to do this marking-and-limiting of local whatever traffic?

Any prompt and useful help is much appreciated.


Re: How to mark locally originating traffic?

Create two instance of the route-map. route map instance 10 and 20. On instance 10, first match the traffic that matches BGP (source ip address of this router and destination addr. that of the peer) and set the next-hop to the appropriate gateway (if there is a router in between) or the peer itself.

On instance 20, match the remaining local traffic and set the nexthop to local loopback interface.

route-map test permit 10

set ip next-hop

route-map test permit 20

set ip

ip local policy test

Hope that helps!


Re: How to mark locally originating traffic?

You could also use a deny route map clause, and not set the next hop (let normal routing take place). That might give you more flexibility later on, if the routes to the bgp peer changes, etc.

access-list 100 permit tcp any eq bgp any

access-list 100 permit tcp any any eq bgp

route-map foo deny 10

match ip address 100

route-map foo permit 20

set ip next-hop

It just depends on which way makes it easier to maintain the config later on.


CreatePlease to create content