Solved

Windows, default gateway

Posted on 2012-04-03
4
270 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
vmware virtual machine from fusion wont boot on workstation, 23 100
Malware infection in IE11 25 91
CBS.LOG 2 192
URL to download Windows 10 Home 7 136
by Nathan Brom/Bromy2004 Introduction There are numerous websites out there for any different type of program you can imagine.  Of those, you'll need to decide which ones are legitimate and aren't trying to steal your money or infect your comput…
Many admins will agree: WSUS is is a nice invention but using it on the client side when updating a newly installed computer is still time consuming as you have to do several reboots and furthermore, the procedure of installing updates, rebooting an…
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…

738 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