Link to home
Start Free TrialLog in
Avatar of PietMuis
PietMuis

asked on

Add static Route in Windows 7

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?
Avatar of mrklaxon
mrklaxon

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.
BTW, why are you not using the default GW to do it?  Trying to save a routing step?
Avatar of PietMuis

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of mrklaxon
mrklaxon

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.