Multiple router Emulation/ Policy Based Routing

Unanswered Question
Jul 12th, 2007
User Badges:

I'm trying to emulate multiple routers for testing purposes without using 7 different physical routers. I've written static routes so the traffic should hop from one interface to another before arriving at the final interface. The problem is since all of the networks are directly connected to my router, it allways takes the direct route. I realize this is counter-routing philosophy. But for my testbed purposes, we need to be able to run a traceroute and see all of the hops a packet would take.

Is Policy Based Routing capable of defining routing rules on a per interface basis? I'd like a rule to effect of:

if packet received on interface X and destined for network A, go to interface Y, not directly to the interface on network A.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
sundar.palaniappan Thu, 07/12/2007 - 11:12
User Badges:
  • Green, 3000 points or more

What you are asking should definitely be possible with policy routing. PBR gives you are whole range of options to influence the routing behavior different from the normal routing method.

Have a look at the following link that contains some examples.



patrickvanham Thu, 07/12/2007 - 11:37
User Badges:

You can apply a route-map on the incoming interface, use an accesslist in the route-map and specify the next hop. Depending on what you want to achieve exactly you may need multiple route-maps.

For example you could use the following for a packet received on interface X and destined for network A, go to interface Y.

ip access-list extended 100

match ip any

route-map PBR

match ip 100

set ip next-hop


ip policy route-map PBR

de_brown Tue, 07/17/2007 - 07:40
User Badges:

Thanks for the examples those seem like they will solve my problem. I encountered one problem. The interfaces are on a EtherSwitch NME-16ES-1G-P module, and in conf-if mode, there is no 'ip policy command available' the IOS of the module is 12.2(25)SEE2. I thought PBR was supported since at least 12.0. Do I need a newer IOS?

minumathur Tue, 07/17/2007 - 10:57
User Badges:
  • Bronze, 100 points or more


Yes , you can do using policy based routing.


1) Identify source base traffic- using access-list 1 permit

2) create route-map like below

route-map test permit 10

match ip address 1

set interface s0/0 ---depend on your case

route-map test permit 20.

3) Do not forget to apply policy in incomming interface by command

ip policy route-map test.

4) varification & debug

1) debug ip policy

2) show route-map

this will show you packet are hitting on route-map.

-I hope this willl help you out,



This Discussion