Solved

Add static Route in Windows 7

Posted on 2011-09-28
8
884 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 5

Accepted Solution

by:
mrklaxon earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
OfficeMate Freezes on login or does not load after login credentials are input.
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

762 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now