cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
688
Views
10
Helpful
4
Replies

Routing based on intefaces

Hi Guys,

I am wondering if we can create routes based on the interface through which the traffic is received. Please refer to the below diagram of the network. 

So, what I want to achieve is, that when any traffic is received by the switch on the interface G0/1 with the destination of the Web Server, the switch should directly send it to the Web Server via interface G0/2.

But, if the traffic is received on G0/3 with the same destination of "Web Server", it should forward to the DPI server. Is that possible?Network.png

 

 

 

 

  

1 Accepted Solution

Accepted Solutions

two solution 
1-G0/3 and DPI G0/4 in one VRF not in global 
2- using  PBR in g0/3 to direct the traffic to G0/4

View solution in original post

4 Replies 4

two solution 
1-G0/3 and DPI G0/4 in one VRF not in global 
2- using  PBR in g0/3 to direct the traffic to G0/4

Hi, Thanks for replying. Just want to know with PBR can we define routes based on the interface? Can you please elaborate on this a little bit?

Hi there,

Policy Based Routing comprises of an ACL to match traffic flows and a route-map which in your example would specify the egress interface Gi0/4. The ip policy is then applied on the ingress interface (gi0/3).

!
ip access-list extended 101
  permit 192.168.0.0 0.0.0.255 any
!
route-map DPI
  match ip address 101
  set interface gi0/4
!
int gi0/3
  ip policy route-map DPI
!

 

 

cheers,

Seb.

Review Cisco Networking for a $25 gift card