Solved

Windows, default gateway

Posted on 2012-04-03
4
265 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
4 Comments
 
LVL 28

Expert Comment

by:jhyiesla
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Preface Having the need * to contact many different companies with different infrastructures * do remote maintenance in their network required us to implement a more flexible routing solution. As RAS, PPTP, L2TP and VPN Client connections are no…
This article covers how to install the Microsoft Windows Operating System (OS). What is covered in this article:  > Different Versions and Editions of the Windows OS  > Upgrading versus Fresh Installation of the OS           - Steps to take pr…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

763 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now