Question

Set static routes for entire network on router (default Gateway)

Asked by: tijsjansen

Hi,

I've set up a Peplink 300 that load-balances 3 connections for our internet connectivity. we have multiple routers with their own public IPs that perform different functions such as lan-to-lan vpns and such. For this reason, I need to redirect a few networks (we use 192.168.1.0/24 locally) to a different router than the default gateway. I'm succesfull when adding the static routes directly on the client, but when I add it on the router (save the config + reboot) it doesn't 'stick'
Here's the scenario:
All clients in 192.168.1.xxx range. Default gateway: 192.168.1.254 (peplink router)
I added static routes on the thing for 192.168.2.0/24 with a gateway of 192.168.1.253 (the VPN router box)
and some others, but when i do a tracert to an address in that range on a client (after flushing the routing tables) it still tries to use 192.168.1.254 instead of 253...

Any idea what this could be about? Do I need to do something to tell the clients to 'listen' to what the routers routing tables say?

Thanks!

Tijs

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2006-07-28 at 07:26:11ID21935413
Tags

peplink

,

static

,

300

,

route

Topics

Miscellaneous Networking

,

Dynamic Host Configuration Protocol (DHCP)

,

File Transfer Protocol (FTP)

Participating Experts
5
Points
500
Comments
20

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. tracert
    C:\WINDOWS>tracert www.ece.cmu.edu Tracing route to www.ece.cmu.edu [128.2.136.131] over a maximum of 30 hops: 1 339 ms 339 ms 340 ms mystis.ts.yorku.ca [130.63.101.21] 2 336 ms 340 ms 339 ms 130.63.101.1 3 332 ms 340 ms 318 ms uninet.gw.yorku....
  2. Two routers balancing
    Hi, I have two routers each with a 128k link to the same outside network. The routers are connected directly to a cisco 4006 Switch. Also Attached to the switch, a 3640 Cisco Router connects an inside lan. I need the computers in that Lan to access one application in the out...
  3. tracert analysis
    Here is my tracert output (first three hops): --------------------------------------------------------------------------------------------------- tracert www.yahoo.com Tracing route to www.yahoo.akadns.net [216.109.118.64] over a maximum of 30 hops: 1 * * ...
  4. Can tracert to the internal address of the router but can't t…
    I have currently installed a CISCO 1701 at a remote site.. I have created the VPN link through our own cooperate firewall (checkpoint R55). I am able to successfully ping \ tracert to the internal IP address of the Cisco box but I am not able to ping \ tracert to a machine ...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: prashsaxPosted on 2006-07-28 at 07:37:27ID: 17201539

Let me understand this.

You are adding static route on machines for subnet 192.168.2.0/24.
The next hop you want is 192.168.1.253, but machines are still trying to access it using default gateway.


Or are you adding static route for subnet 192.168.2.0/24 on the default gateway(i.e 192.168.1.254) and it does not work.

Which is the case.

 

by: cbaronPosted on 2006-07-28 at 07:41:00ID: 17201580

Setting a static route on the peplink wont change the route taken by your clients, if ...254 is their default gateway then they always use that regardless of what routes you set on your gateway.  The clients aren't routes so don't learn new routes.

However if you've set a static route on the peplink then it should know where to forward the packets from the clients so if your tracert stops as ...254 then there's something wrong with the static route you've defined.  

You can definte a permanent static route on your clients if you like by adding a -p to the end of the ROUTE ADD command.  The route will then stay forever, unless you delete it with ROUTE DELETE.  Always assuming their Microsoft clients!

 

by: NYtechGuyPosted on 2006-07-28 at 07:42:32ID: 17201597

I think you are going about this the wrong way...

It sounds like you want the default gateway router (.254) to somehow add a route into the client OS?  am I right?

If so, this is not how things work.  The client should ALWAYS forward unknown packets for which it doesn't have a route to the default gateway (as it is doing).  The router (.254) should then take the packet and send it on to the distant network - ie routing (what a router does... :) )

By adding the route to the router (.254) for the 192.168.2.x network, using a gateway of (.253) you are asking the router to send the packet back out the same interface which it received it on (192.168.1.x) - this is not always possible with some hardware.  This may be why the route is not "sticking"

The way to test is to actually test from the router itself first.  With the route added/saved, try doing a traceroute and a ping to an available host within the router's console.

Is there anyway you can attach the ".253" router to a different interface on the .254 router ?

Thanks

 

by: tijsjansenPosted on 2006-07-28 at 08:26:48ID: 17201959

Thanks for these fast replies guys!

Prashsax: I'm adding this route on the default gateway and i want the next hop to be .253 This doesn't work, it forwards it to it's default gateway (public ip on the DSL modem) instead where it dies.

Cbaron: yes, i know it won't add it but the def gateway should route it. It works when I define the route on the clients but want to avoid decentralising this.

NYTechGuy: yes, it needs to send it back out on the same interface. Never thought that would be a problem. I'll submit it to Peplink support then? (they did not yet reply on previous issues)

If you (or others) have any further ideas, please let me know. I think I gave you the additional clarification you needed above? If not let me know

Tijs

 

by: giltjrPosted on 2006-07-28 at 09:48:06ID: 17202602

If I understand this right:

Your subnet is 192.168.1.0/24 and the default route is 192.168.1.254.
You are adding a route that says if the destination address is in the subnet 192.168.2.0/24 use the router at 192.168.1.253.

What does the routing table on 192.168.1.254 look like?

What does the routing table look like on your computer before and after you do the tracert?

It sounds almost as if 192.168.1.254 does not know how to get to 1921.168.2.0/24 and is issuing a ICMP redirect telling the computers to use 192.168.1.253.


 

by: tijsjansenPosted on 2006-07-28 at 12:30:33ID: 17203841

Giltjr, your correct in the assumptions about subnets above. However, when I run the utility on the router itself that can perform a traceroute, it does "know" to use 192.168.1.253 as the next hop and succesfully reaches the host...

Is there a way to attach screenhots here on EE?

I'm starting to fear NYTechGuy is onto something (hardware simply not capable to go back out on same interface?)but still haven't heard from Peplink Tech support. Hope it's a simple to fix bug in the firmware and not hardware, the rest of the device is quite nice (loadbalancing and failover and such)

I'll keep you posted.

 

by: giltjrPosted on 2006-07-28 at 12:39:30ID: 17203917

Which router are you running the trace route on?

You CAN NOT code a route on 192.168.1.254 for 192.168.2.0/24 pointing to 192.168.1.253.

The device at 192.168.1.254 must either have direct access to 192.168.2.0/24 or have a next hop that is in a different subnet.

Say you have 192.168.1.1 (PC1) and it is trying to get to 192.168.2.1 (PC2).
 
PC1 has a route 192.168.2.0/24 --> 192.168.1.253 (R1).

So PC1 send the packet to R1.

Now if R1 has 192.168.2.0/24 next hop is 192.168.1.254 (R2). What is does is since the source (PC1) is on the same subnet as the the REAL next hop, it will send a ICMP redirect packet to PC1 that says, you really want to use R2.  So PC1 starts using R2.

 

by: tijsjansenPosted on 2006-07-28 at 14:49:13ID: 17204821

Giltjr,

Thanks for your comment and explanation. So what would be wrong in this case is that my router (192.168.1.254) is not sending that ICMP redirect packet? How can I make it do that? It worked on the previous router....
I'm leaving on holiday tonight so will be a bit slower in monitoring this thread. I'll check what I get back from peplink and assign points based on that, since most of the above suggestions seem to make sense.

Don't hesitate to post if you know the solution though :)

Thanks!

Tijs

 

by: giltjrPosted on 2006-07-28 at 18:48:50ID: 17205826

O.K. Maybe I have mis understood the situation.  Which router, 192.168.1.254 or 192.168.1.253, actually has the connection to the subnet 192.162.2.0/24?

 

by: scrathcyboyPosted on 2006-07-28 at 19:20:29ID: 17206070

First, you have the WRONG address for the peplink router -- Default gateway: 192.168.1.254 (peplink router)

No that should be 192.168.1.1 -- or 2,3,4,5.  You have given it a loopback address, and it cannot operate correctly at 254 address, unless you do some special config.  Why do you have it at that address, it does not make sense, is there another router occupying 1.1 or 1.2?  If so, what is it?

 

by: giltjrPosted on 2006-07-28 at 19:29:47ID: 17206140

scrathcyboy: What?  192.168.1.254 is a valid IP address for a subnet of 192.168.1.0/24.  The valid IP addresses are 192.168.1.1-192.168.1.254.  This is NOT a loopback address.  

 

by: scrathcyboyPosted on 2006-07-28 at 22:09:13ID: 17206460

I think you really are missing the point -- read again the problem --

"I added static routes on the thing for 192.168.2.0/24 with a gateway of 192.168.1.253 (the VPN router box) and some others, but when i do a tracert to an address in that range on a client (after flushing the routing tables) it still tries to use 192.168.1.254 instead of 253."

The 254 gateway IP is not valid on the domain. tijsjansen if you change the IP of this supposed trans-C router to a lower number, you need to do that and test it first.

 

by: giltjrPosted on 2006-07-29 at 06:11:58ID: 17207515

NO you missed the point.

--> All clients in 192.168.1.xxx range. Default gateway: 192.168.1.254 (peplink router)

The valid default gateway is 192.168.1.254.

--> I need to redirect a few networks (we use 192.168.1.0/24 locally) to a different router than the default gateway.

For some subnets he needs to use a different router.

So based on the way I am interperting this he has the current default route as 192.168.1.254, which works,  and he needs the route to the 192.168.2.0/24 subnet to be 192.168.1.253.  Something like:


     192.168.1.0/24 <----> 192.168.1.254 <--> the world
            /\
             |
            \/
     192.168.1.253
            /\
             |
            \/
    192.168.2.0/24

Anywho, 192.168.1.254 is a valid IP address.  It is not by any definition or stand the loopback address (loopback address by default are 127.0.0.0/10).  Maybe in your company the standard is to use the ".254" address as a routers loopback and to use the '.1' as the interface address on your routers, but that is the way your company may do it. At one time is was a normal pratice to use ".1" as the routers interface, but that only works when you are using classfull subnets.  Once you get into subneting and classless subnets, you can't have every router interface being ".1", because some subnets will not have a ".1".

The problem he is having is when he attempts to get to 192.168.2.0/24 he is getting there, or attempting to get there, using 192.168.1.254.  If this actually works, that is he can get to 192.168.2.0/24 via 192.168.1.254, then somehow 192.168.1.254 is connected to the 192.168.2.0/24 and 192.168.1.253 is not connected to it.


 

by: NYtechGuyPosted on 2006-07-29 at 07:15:30ID: 17207666


Wouldn't this be a better way to set everything up?  (credit to GILTJR for the diagram)
   

 192.168.1.0/24 <----> 192.168.1.254 <--> the world
                                               /\
                                               |
                                               \/
                                    192.168.1.253
                                              /\
                                              |
                                              \/
                                   192.168.2.0/24

 

by: giltjrPosted on 2006-07-29 at 07:32:04ID: 17207725

The problem is that 192.168.1.253 is on subnet 192.168.1.0/24.  Routers do not route between hosts on the same subnet.  

Say I am 192.168.1.44 and I wan't to talk to 192.168.2.99.  If my route statement says to use 192.168.1.254, I will try that.   Now if 192.168.1.254 says to use 192.168.1.253 to get to 192.168.2.0/24, it (192.168.1.254) will see that I (192.168.1.44) am on the same subnet as 192.168.1.253.  It is should send me a ICMP redirect and tell me to use 192.168.1.253.  

Where this could become a problem is when 192.168.2.99 comes back through 192.168.1.253, 192.168.1.253 will see the target address of 192.168.1.44 and go directly to me because we are on the same subnet.  

You can't route between computers on the same subnet, so 192.168.1.254 will not route/forward the traffic from me (192.168.1.44) via 192.168.1.253.

 

by: NYtechGuyPosted on 2006-07-29 at 08:58:25ID: 17208045


Disclaimer:  In my diagram above, of course the ".253" router's address would have to be changed to a different ip/subnet, just used it to show what would be where

/Js

 

by: giltjrPosted on 2006-07-29 at 09:24:42ID: 17208122

Yes, if  the ".253" router and the ".254" router were connected to each other on a new IP subnet, then it would work.  This is getting a bit more difficult to draw but something like


192.168.1.0/24 <----> 192.168.1.254/192.168.3.254 <--> 192.168.3.253/???????<- ?A?A?A?A--> 192.168.2.0/24
                                               /\
                                                |
                                               \/
                                        The World

Where ??????? is someother IP address on possibility another IP subnet and ?A?A?A?A is another IP subnet that connected the ".253" router to the 192.168.2.0/24 subnet.  If the 192.168.2.0/24 subnet is in the same building as everything else then you connect the ".253" router directly to it and have:

                                               Router                                             Router
192.168.1.0/24 <--> 192.168.1.254/192.168.3.254 <--> 192.168.3.253/192.168.2.253 <--> 192.168.2.0/24
                                             /\
                                              |
                                             \/
                                      The World

 

by: tijsjansenPosted on 2006-08-18 at 04:02:56ID: 17341245

Wow, that's a lot of info.
Sorry for getting back to you on this so late, as mentioned I left on a holiday and no way of connecting to the internet from there (nice and calm :-) )
As giltjr and NYtechGuy correctly stated, this is how it currently looks like:

192.168.1.0/24 <----> 192.168.1.254 <--> the world
                                               /\
                                               |
                                               \/
                                    192.168.1.253
                                              /\
                                              |
                                              \/
                                   192.168.2.0/24

giltjr mentioned : "The problem is that 192.168.1.253 is on subnet 192.168.1.0/24.  Routers do not route between hosts on the same subnet."
That would definitly be a problem in my case. Strange thing is that everything used to work this way when our default gw 192.168.1.254 was a linux machine.
Now that i replaced it with the Peplink device it won't do it. Peplink tech support requested the routers config file and I'll see what they get back with. Based on your hard work and patient explanations I think I should split the points between giltjr and NYtechGuy. I'll post back with comments I get from Peplink tech support and will follow your advice to create a new subnet (192.168.3.0/24 for example) and change the various VPN devices (192.168.1.253, 192.168.1.250, 192.168.1.251 ) IP's accordingly.

Just got this in from Peplink:
Hello Tijs,

Thank you for the configuration file.  We loaded the configuration on an in-house test unit, and will provide further information shortly.

Warm regards,
Raymond

The PePLink Team

Thanks guys, will let you know!

Tijs

 

by: tijsjansenPosted on 2006-10-06 at 01:34:19ID: 17674755

Hi Guys,

Peplink provided me with a new firmware for the router, and now it works a charm...
The router will now route between hosts on the same subnet if the static route is set up on the router.
I'm splitting the points between Giltjr and NYtechguy for your efforts and patience.

Thanks!

Tijs

 

by: giltjrPosted on 2006-10-06 at 04:21:09ID: 17675389

Great and thanks.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...