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

pbr set next-hop to router not directly connected

Hello,

I'm trying to route traffic to a router that is not directly connected using pbr. Here is my config:

Extended IP access list dsl-inet

deny ip any 192.168.0.0 0.0.255.255

deny ip any 10.50.0.0 0.0.255.255

deny ip any 10.51.0.0 0.0.255.255

permit ip 192.168.8.0 0.0.0.255 any

route-map dsl-inet, permit, sequence 10

Match clauses:

ip address (access-lists): dsl-inet

Set clauses:

ip next-hop 10.51.10.2

Policy routing matches: 0 packets, 0 bytes

I know that that the acl rule is working because i use it on some other switches. 10.51.10.2 is a router that is not directly connected to this switch but it can ping it. I have used this scenario with other setups but the next-hop has always been directly connected. Its seems i'm missing something here.

4 REPLIES
Hall of Fame Super Bronze

Re: pbr set next-hop to router not directly connected

Dan,

You can use the recursive option but you may need to upgrade the IOS.

See

http://www.cisco.com/en/US/products/ps6350/products_configuration_guide_chapter09186a0080457b9c.html

for more info.

____

Please rate helpful posts.

Thanks

Cisco Employee

Re: pbr set next-hop to router not directly connected

Hi Friend,

If you next hop is not directly connected route then you need to have a route for your next hop ip address.

As you have defined 10.51.10.2 as your next hop does your router has a route to 10.51.10.2, you can check via "sh ip route 10.51.10.2" and if you do not have a route for that then you need to have a route to reach your next hop ip address so you can configure a static route where destination as 10.51.10.2 and next hop as directly connected route.

HTH

Ankur

New Member

Re: pbr set next-hop to router not directly connected

3550#sh ip route 10.51.10.2

Routing entry for 10.51.10.0/24

Known via "ospf 1001", distance 110, metric 2, type intra area

Last update from 10.50.2.2 on FastEthernet0/2, 03:27:30 ago

Routing Descriptor Blocks:

* 10.50.2.2, from 0.0.0.2, 03:27:30 ago, via FastEthernet0/2

Route metric is 2, traffic share count is 1

So with it known via ospf it should work? Or do I need to enter in a static route?

Dan.

Hall of Fame Super Bronze

Re: pbr set next-hop to router not directly connected

Dan,

You have a 3550 switch, the situation may be different since you can't upgrade to the IOS that supports the 'recursive' option.

341
Views
5
Helpful
4
Replies
CreatePlease to create content