?
Solved

Windows, default gateway

Posted on 2012-04-03
4
Medium Priority
?
273 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In a hurry?.. scroll down to "HERE's HOW TO DO IT" Section. Greetings All, I was going to post this as question/solution, but its seems more appropriate as an article considering its length.  I felt it important to illucidate all the details c…
This article describes how to set permissions to allow a limited-permissions user to start and stop a particular System Service.   It is always best to give users only the permissions that they need to perform their job, so tweaking particular permi…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
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…

801 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