Solved

Add static Route in Windows 7

Posted on 2011-09-28
8
892 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
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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Applying Computer Settings 12 76
Port to open for RDP connection to VM in DMZ ? 5 61
X2 to x0 on sonicwall tz200 1 15
Desktop loading is delayed 37 32
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

685 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