0

i have seen a co-worker set a command like

route add 192.168.4.20 10.167.0.198

in his computer to access services provided by a server on my network without changing his IP address or passing trough a router (they just plug his network on my switch and wrote this command on his machine and started to work), now i am trying to do the same for a test but it doesn't work.

here my setup:

  • Server X2 (3rd part, possibly a linux machine, I access it through his custom software) on 10.167.0.198\24
  • PC (win 7 pro) to 192.167.0.28\24

I wrote this in the prompt

route add 192.167.0.29 10.167.0.198

and my routing table have this line

Network Address - Mask            - Gateway      - Interface    - Metric
192.167.0.29    - 255.255.255.255 - 10.167.0.198 - 192.168.0.28 - 11

i've tried deleting the previous line and swapping addresses but none of this config seem to work

what am i missing (apart a proper networking expertise)?

could windows 7 be stopping this because he thinks he is in a public network?

are there other setting to allow this?

UPDATE

the thing i'm tryng to do is similar to this https://serverfault.com/questions/115654/windows-static-routes-w-o-specifying-gateway-next-hop

on the first part he setup a local Route,but I'm having trouble doing this i tried to add

route add 192.167.0.28 10.167.0.198

still no succes

5
  • 1
    See route command details: technet.microsoft.com/en-us/library/bb490991.aspx
    – Biswapriyo
    Commented Feb 5, 2018 at 10:11
  • You would have to actually look at the IP configuration to see whenever it matches. As you can see you are setting a Gateway which usually is a router.
    – Seth
    Commented Feb 5, 2018 at 10:12
  • i am tryng that in a Test environment in my network, i can set my pc however i want, but i'm shure 192.167.0.28 and 10.167.0.198 exists, are you suggesting to increase my netmask range on the pc? or should i match the routing mask to the actual mask of the server? Commented Feb 5, 2018 at 10:51
  • 1
    I'm suggesting that your network configuration is important and you're lacking details. For example your route output shows that you're able to reach 192.167.0.29 through a router 10.167.0.198 on interface 192.168.0.28. Which means you won't be able to reach the router without further configuration as it is in a different network segment. If you look at the help for route you will find a good description of gateway. Without changing other parameters just adding a route will be insufficient to connect different networks.
    – Seth
    Commented Feb 5, 2018 at 11:09
  • "Gateway : Specifies the forwarding or next hop IP address over which the set of addresses defined by the network destination and subnet mask are reachable. For locally attached subnet routes, the gateway address is the IP address assigned to the interface that is attached to the subnet. ....." and 10.167.0.198 is attached to the same switch, i know that 192.167.0.29 doesen't exist, and i woudn't have tought of doing this, but this guy did it wthout changing anything on my server, it appear like a NAT (10.167.0.198 becoming 192.167.0.29) done just with route command in a .bat Commented Feb 5, 2018 at 11:37

0

You must log in to answer this question.

Browse other questions tagged .