Solved

Add static Route in Windows 7

Posted on 2011-09-28
8
902 Views
Last Modified: 2012-05-12
Hi Guys,

My internal IP is
 IPv4 Address. . . . . . . . . . . : 172.30.26.90
 Subnet Mask . . . . . . . . . . . : 255.255.240.0
 Default Gateway . . . . . . . . . : 172.30.16.1

On my core switch (172.30.16.1) there is a static route setup to route traffic going to 196.216.150.131 to 172.30.16.250.

What I want to do is on the PC if i want to access  196.216.150.131 the traffic must go to 172.30.32.250.

I typed: route add 196.216.150.131 mask 255.255.255.255 172.30.32.250
and it adds the route but traffic is still going to the default gateway.

Any ideas, is this at all possible or am i missing the point of the route command?
0
Comment
Question by:PietMuis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 5

Expert Comment

by:mrklaxon
ID: 36716408
Your local subnet ends at 172.30.31.254 but you are adding a gateway that is at 172.30.32.250.  Since this GW is outside your network range your PC automatically takes it to the default GW.  You need to take another look at your subnets and how they are reachable.  Also, add a -p to the route add to make it permanent.
0
 
LVL 5

Expert Comment

by:mrklaxon
ID: 36716477
BTW, why are you not using the default GW to do it?  Trying to save a routing step?
0
 
LVL 4

Author Comment

by:PietMuis
ID: 36716520
172.30.32.250 is a router in a remote office (connected to my office via MPLS).

both 172.30.16.250 and 172.30.32.250 connects us to the same 3rd party.

I would like only one machine to connect to the 3rd party via the remote office`s connection.

If that makes sense?
0
Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

 
LVL 5

Accepted Solution

by:
mrklaxon earned 500 total points
ID: 36716770
Makes sense as far as adding a static and not just using the default GW but not on the network range part.

Your IP address and the subnet mask limit your system to being able to directly reach an IP address no higher than 172.30.31.254.  You are adding a route with a GW that is above that range.  For your system to reach a GW outside of its mask range it must go through a GW.  That's why even after adding a route it is still hitting the default GW in order to get to the GW you have added.

With what you are stating, it sounds like you expect your PC to be able to directly access 172.30.32.250 but your subnet does not allow this.  Am I missing something in your description?
0
 
LVL 6

Expert Comment

by:ipajones
ID: 36716810
I'm not really sure what you're trying to do here but as @mrklaxon has said a next hop address must be contained within the local subnet for it to be directly accessible by the local host.

Your PC using 172.30.26.90 /20 currently resides in the 172.60.16.0/20 subnet with the following usable address space:  172.30.16.1 - 172.30.31.254  (broadcast = 172.30.31.255) so 172.30.32.250 is in a different subnet.

Without knowing the full topology it's difficult to advise but the only thing you could do is place your PC in both subnets either by using a second IP address (that is in the next hops subnet) or by reducing the network prefix your PC is using, but you would need to be careful as to whether that would have any other routing implications.

For example if you change your PC's mask to 255.255.192.0 (/18) then your PC would be in the same subnet as 172.30.32.250 - see below:

PC using IP 172.30.26.90 /18 (255.255.192.0) would reside in 172.30.0.0/18 subnet with address space range of 172.30.0.1 - 172.30.63.254 (broadcast = 172.30.63.255)  ** this is a big subnet!  So now the static route would work.

Not sure what you're tying to achieve but thought I'd share this.

Good luck
--IJ
0
 
LVL 4

Author Comment

by:PietMuis
ID: 36716993
Thanks mrklaxon, I think i understand what you are saying and since i do not have direct access to 172.30.32.250 this must be routed in some way which is done by the GW...

Thanks for clearing that up.
0
 
LVL 59

Expert Comment

by:LeeTutor
ID: 37052224
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By default the complete memory dump option is disabled in windows . If we want to enable the complete memory dump for a diagnostic purpose, we have a solution for it. here we are using the registry method to enable this.
This program is used to assist in finding and resolving common problems with wireless connections.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question