cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1154
Views
0
Helpful
9
Replies

ip routes

usuario0001
Level 1
Level 1

I have a 2811 router with a static route like this:

ip route 111.222.136.0 255.255.252.0 10.1.1.1

to go through a GRE tunnel (10.1.1.0),

but now I need to configure a new route to reach a server from that range with IP address: 111.222.136.10 but going out of tunnel. The ip route is like this:

ip route 111.222.136.10 255.255.255.255 333.333.333.1

If I add this new route it goes to the end, and if I delete all routes and add it before the other one, it appears always at the end, so I can't reach that server going out of the tunnel. What should I configure to do this? do I have to part the route in two? or there is a way to add it at the begining?

Thanks in advance

Best regards

9 Replies 9

simontibbitts
Level 1
Level 1

Hello.

This should work fine, have you tested it?

111.222.136.10 255.255.255.255 is more specific than 111.222.136.0 255.255.252.0 so will always be chosen first regardless of the order they are listed in the configuration.

Configure both of your static routes and the use 'show ip route 111.222.136.10' to confirm it is working.

Simon

YANGCCIE4
Level 1
Level 1

if the server ip address is 111.222.136.10 255.255.255.255, the static route will work no matter where you put it, it work according to the principle -- classless network longest-match;

hope it helps,

Yang

Marian

Your post seems to suggest that you believe that the position in the routing table (or the position within the config - I can not tell which) is important in determining which route will be used. As others have explained this is not true. An IP router, as it makes a forwarding decision, will examine the routing table for possible matches to the destination address. If the router finds more than one possible match then it selects the most specific route. So in your example you have a /22 route and a /32 route. The router will choose the /32 route.

As you have explained the situation the /32 route should send traffic to the server outside the tunnel. If it is not working then something is not as you have described it, or there is some factor that is not in your description that is influencing forwarding the packet to the server.

If it is not working then perhaps you could post the output of show ip route from the router and the output of traceroute to the server. This might help us figure out what is happening.

HTH

Rick

HTH

Rick

Thank for all your replies,

I think the error was that I was trying to ping the server through internet instead of the tunnel, but the server doesn't reply ping through internet.

I have another question, is it possible to configure two diferent routes to the same destination server, one through internet for a group of PCs and another one vía GRE tunnel for another group of PCs. Because as I know a ip route doesn't deppend on the source and I can't see how to configure it.

Thanks

Best regards

ip route 111.222.136.10 255.255.255.255 333.333.333.1

Seems to me you should consider hiring a professional to look after your network.

Dear bevilacqua,

I'm an Network Engineer and I'm studing CCNA and with more or less work I use to configure our network.

The IP address 333.333.333.1 is not real, I put that number instead of the real Public IP Adress.

Thanks

Good luck with you studies.

As you become more familiar with networking, it should become impossible for you to write impossible addresses as examples.

Thanks for your advice.

Could anybody help me with my question?

is it possible to configure two diferent routes to the same destination server, one through internet for a group of PCs and another one vía GRE tunnel for another group of PCs. Because as I know a ip route doesn't deppend on the source and I can't see how to configure it.

Thanks

Best regards

That is called PBR "policy based routing" and is explained in the documentation.

Review Cisco Networking for a $25 gift card