How to change default gateway in windows command line? | geeksdatabase

    22

    Nov

    I’m sure you been in a situation, where you had to connect to both wireless and wired network on a windows PC. If the wired network is connected to your internal network which doesn’t have internet connectivity, then you are stuck. This is because Windows OS sets the default gateway to the wired network. Below is the command to change the default gateway to wireless networks.

    To add default route with the default gateway address of 10.2.3.1, use the below command:

    C:>ROUTE ADD 0.0.0.0 MASK 0.0.0.0 10.2.3.1

    To make any route persistent after the reboots, you can add ‘-P’ argument to the route command.

    Below are some more commands for your reference:

    To print the Route information

    C:>ROUTE PRINT

    To add a route with 10.5.1.* traffic going to 10.2.3.1 gateway

    C:>ROUTE ADD 10.5.1.0 MASK 255.0.0.0 10.2.3.1

    To change the existing route of 10.5.1.* traffic to go to 10.5.1.1 gateway

    C:>ROUTE CHANGE 10.5.1.0 MASK 255.0.0.0 10.5.1.1

    Please use comments box to post any questions.

    This entry was written by

    and posted on November 22, 2008 at 1:11 am and filed under ,

    . Bookmark the . Follow any comments here with the .

    or leave a trackback: .

    No Comments

    No comments yet.

    Leave a comment

    Categories

    Archives

    Recent Posts

    Search

    Sponsored Links

    Categories

    Archives

    Recent Posts

    Theme :    Powered by :

    Leave a Reply

    Your email address will not be published.

    How to change default gateway in windows command line? | geeksdatabase

    22

    Nov

    I’m sure you been in a situation, where you had to connect to both wireless and wired network on a windows PC. If the wired network is connected to your internal network which doesn’t have internet connectivity, then you are stuck. This is because Windows OS sets the default gateway to the wired network. Below is the command to change the default gateway to wireless networks.

    To add default route with the default gateway address of 10.2.3.1, use the below command:

    C:>ROUTE ADD 0.0.0.0 MASK 0.0.0.0 10.2.3.1

    To make any route persistent after the reboots, you can add ‘-P’ argument to the route command.

    Below are some more commands for your reference:

    To print the Route information

    C:>ROUTE PRINT

    To add a route with 10.5.1.* traffic going to 10.2.3.1 gateway

    C:>ROUTE ADD 10.5.1.0 MASK 255.0.0.0 10.2.3.1

    To change the existing route of 10.5.1.* traffic to go to 10.5.1.1 gateway

    C:>ROUTE CHANGE 10.5.1.0 MASK 255.0.0.0 10.5.1.1

    Please use comments box to post any questions.

    This entry was written by

    and posted on November 22, 2008 at 1:11 am and filed under ,

    . Bookmark the . Follow any comments here with the .

    or leave a trackback: .

    No Comments

    No comments yet.

    Leave a comment

    Categories

    Archives

    Recent Posts

    Search

    Sponsored Links

    Categories

    Archives

    Recent Posts

    Theme :    Powered by :

    Leave a Reply

    Your email address will not be published.