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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

router 1712, ip routing based on destination port

Hi,

I've:

ip route 192.168.1.2 255.255.255.255 192.168.2.100

where 192.168.2.100 is another cisco router.

I need:

set routing

ip route 192.168.1.2 255.255.255.255 192.168.2.100

together with something like:

ip route 192.168.1.2 port 22 255.255.255.255 192.168.2.1

where 192.168.2.1 is another Cisco router.

is it possible?

thank for your help

milan

3 REPLIES
Cisco Employee

Re: router 1712, ip routing based on destination port

You can use policy based routing to accomplish something like this. See the following example below:

access-list 101 permit tcp any host 192.168.1.2 eq 22

!

route-map redirect permit 10

match ip address 101

set ip next-hop 192.168.2.1

Here is more information:

http://www.cisco.com/en/US/tech/tk364/technologies_configuration_example09186a00801f3b54.shtml

Hall of Fame Super Silver

Re: router 1712, ip routing based on destination port

Milan

Anthony is correct that there is not any option in the ip route command to make the routing decision based on the TCP or UDP port number. But it is possible to do this kind of thing with Policy Based Routing. He gives a pretty good example of PBR. One detail that he did not include is that you must configure PBR on the inbound interface where the traffic arrives to the router.

interface fastethernet0/0

ip policy route-map redirect

HTH

Rick

New Member

Re: router 1712, ip routing based on destination port

Hi,

thank you for your help, guys. At weekend I'll try your suggestion.

Milan

796
Views
0
Helpful
3
Replies
CreatePlease login to create content