09-24-2009 07:26 AM - edited 03-04-2019 06:09 AM
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
09-24-2009 07:33 AM
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
09-24-2009 07:54 AM
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
09-24-2009 01:42 PM
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
09-25-2009 03:39 AM
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
09-25-2009 03:42 AM
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.
09-25-2009 04:20 AM
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
09-25-2009 04:32 AM
Good luck with you studies.
As you become more familiar with networking, it should become impossible for you to write impossible addresses as examples.
09-25-2009 04:54 AM
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
09-25-2009 05:14 AM
That is called PBR "policy based routing" and is explained in the documentation.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide