Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Add static Route in Windows 7

Posted on 2011-09-28
8
Medium Priority
?
917 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 5

Accepted Solution

by:
mrklaxon earned 2000 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
IF you are either unfamiliar with rootkits, or want to know more about them, read on ....
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

927 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