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

Routing based on source address

Is there a way to make the routing decision based on source address? For example to be able to route a specific source ip address to a specific interface inside the router.

4 REPLIES
Anonymous
N/A

Re: Routing based on source address

Yes, you can route based on source IP address using Policy Based Routing. Using Policy based routing, you can also route based on the size of the packet.

http://www.cisco.com/warp/public/cc/techno/protocol/tech/plicy_wp.htm

Community Member

Re: Routing based on source address

>>Here is an example on how to do that...

>>Lets say that the traffic you want to apply the source routing on is from interface e0 >>with the following configuration...

interface e0

description PBR example interface

ip address 10.10.10.1 255.255.255.0

ip policy route-map pbr_map

>> And s0 is your interface to your gateway (ISP), (example here is 172.20.1.1)

interface s0

ip addresss 172.20.1.2 255.255.255.252

>> Set an access list for all traffic you want to apply source routing to...

access-list 12 permit 10.10.10.0 0.0.0.255

>> Configure a route-map (pbr_map is arbitrary, but has to match the name applied in the interface e0)

route-map pbr_map permit 10

match ip address 12

set ip next-hop 172.20.1.1

Community Member

Re: Routing based on source address

>>Here is an example on how to do that...

>>Lets say that the traffic you want to apply the source routing on is from interface e0 >>with the following configuration...

interface e0

description PBR example interface

ip address 10.10.10.1 255.255.255.0

ip policy route-map pbr_map

>> And s0 is your interface to your gateway (ISP), (example here is 172.20.1.1)

interface s0

ip addresss 172.20.1.2 255.255.255.252

>> Set an access list for all traffic you want to apply source routing to...

access-list 12 permit 10.10.10.0 0.0.0.255

>> Configure a route-map (pbr_map is arbitrary, but has to match the name applied in the interface e0)

route-map pbr_map permit 10

match ip address 12

set ip next-hop 172.20.1.1

Community Member

Re: Routing based on source address

Question?

access-list 12 permit 10.10.10.0 0.0.0.255

can it be replaced with a single host?

8190
Views
0
Helpful
4
Replies
CreatePlease to create content