Solved

Windows, default gateway

Posted on 2012-04-03
4
272 Views
Last Modified: 2012-08-13
1> From a command prompt, how can I determine the default gateway currently assigned

2> How can I assign a new default gateway from a command prompt

Thanks
0
Comment
Question by:Los Angeles1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 28

Expert Comment

by:jhyiesla
ID: 37802140
You can see the default gateway by doing ipconfig /all.

To configure from CMD review the following:

http://www.petri.co.il/configure_tcp_ip_from_cmd.htm
0
 
LVL 21

Expert Comment

by:motnahp00
ID: 37802145
ipconfig

netsh int ipv4 show int
netsh int ipv4 set address 11 static 192.168.1.X 255.255.255.0 192.168.1.1
0
 
LVL 4

Expert Comment

by:xanandu
ID: 37802558
by using the command "route print" in a command window, you will see a line that says
"0.0.0.0          0.0.0.0         a.b.x.y       a1.b1.x1.y1" with the column headers  "network destinatoin, netmask, gateway, and interface"

this is your default route.

to create a new one you can do it with the route add command

"route add 0.0.0.0 MASK 0.0.0.0 [gateway ip address] IF [interface]"

don't forget to delete the old default route.
"route delete 0.0.0.0 MASK 0.0.0.0 [oldgateway ip address] IF [old interface ip]"
0
 
LVL 44

Accepted Solution

by:
Darr247 earned 500 total points
ID: 37802615
As xanandu said...

But, just using
route -f
should remove the gateway, first.

And if you want to make the new gateway persistent, use
route -p add 0.0.0.0 MASK 0.0.0.0 [gateway ip address] IF [interface]
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many times while working on a computer regardless of any Operating System, lag and crashes seem to creep in, hindering your working speed. Sometimes, it can also cause your work to be lost unexpectedly and as a result, you are unable to meet your de…
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

705 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