cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
389
Views
0
Helpful
3
Replies

Policy based routing and AS number

guyber
Level 1
Level 1

Hello,

Can I match the policy based routing with the AS number ?

In my case it would be too difficult to route the traffic on a per IP address basis (matching the IP addresses) on the router2.

site 1--router1-router2--VLAN1---router3

site 1 advertises with BGP to router1, router2 and router3 its own networks.

Traffic from site 1 must be routed on the VLAN1 between router2 and router3...

Kind regards,

3 Replies 3

preddyi
Level 3
Level 3

You can do it.

create your AS-path filter-list

then use as-path filter list in the route-map for matching the criteria.

Set the required action

ex:To permit all traffic originated from AS-100

Outgoing interface on router 2 is vlan1, incoming interface vlan 1

ip as-path access-list 1 permit $100

route-map test

match as-path 1

set next-hop interface vlan1

interface vlan 1

ip policy route-map test

ruwhite
Level 7
Level 7

CEF doesn't have the AS Path, since the routing table doesn't have the AS Path--the as path filters in a route map are only designed for use with filtering BGP updates, not for use in policy based routing. Using PBR, the only things you can filter on are what you see when you do a show ip route, basically.

But, I'm curious why you don't just set the local preference on the routes learned across vlan1 so they are always preferred over the routes learned from other vlans? The only real reason to use policy based routing is if you can't route the traffic correctly using just the destination address. It sounds like you can do this routing with just the destination address?

Russ.W

I regret for the incorrect answer posted earlier.

As Ruwhite said, it is perfect that we can not use AS-Path for changing the outoing path for the ip datagrams.

Rather we can use in route-filters.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: