locked
add route on windows ?? RRS feed

  • Question

  • Hi there, am new to this forum, and not so frequent admin but called upon to help when things aren't  going right. So as you might guess I normally ask help from those up to date with tech. My situation is that a colleagues has only one network point to LAN and is using a WIFI device sort of like a switch/router for the PC and the mobile (utilizing the WIFI) but would like to print from the PC to a network printer on the LAN. can adding a route on the pc access the printer and how. it was my first attempt and i did not get it right even to ping the printer. The Wifi device has the space 192.168.8.0, the LAN 192.168.151.0, so I tried the following

    route add 192.168.151.0 mask 255.255.255.0 192.168.8.1 if 1

    help, its my way of learning

    Ngonyi

    Wednesday, July 8, 2020 2:49 PM

All replies

  • Hi Ngonyi,

    To add a static route to the table, you’ll type a command using the following syntax:

    route add destination_network MASK subnet_mask  gateway_ip metric_cost

    So if you wanted to add a route specifying that all traffic bound for the 192.168.151.0 subnet went to a gateway at 192.168.8.1 and you just wanted to use the automatic metric cost, you would use the following command:

    route add 192.168.151.0 MASK 255.255.255.0 192.168.8.1

    Then you could use the route print command to look at the table , you’d see your new static route.

    For more details, you could refer to the following article:

    How to Add a Static TCP/IP Route to the Windows Routing Table

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    After adding a static route it will be active until the next restart of your Windows PC.  To make the route persistent just add the -p option to the command.

    For Example:

    route -p add 192.168.151.0 MASK 255.255.255.0 192.168.8.1

    Best regards,

    Candy


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com   

    Thursday, July 9, 2020 8:05 AM
  • Hi ,

    Just want to confirm the current situations.

    Please feel free to let us know if you need further assistance.                   

    Best Regards,

    Candy


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com   

    Monday, July 13, 2020 1:56 AM
  • Hi ,

    You could mark the useful reply as answer if you want to end this thread up.

    If there is anything else we can do for you, please feel free to post in the forum.

    Best Regards,

    Candy


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com   

    Tuesday, July 14, 2020 5:57 AM
  • Hi ,

    We helped you post a new thread on Q&A platform. If you need follow-up or have any concerns about this issue, please come to the Q&A platform to discuss.

    Best Regards,

    Candy


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com   

    Friday, August 7, 2020 6:21 AM