Detect default gateway w/o DHCP?

  • Thread starter Thread starter JasonW
  • Start date Start date
J

JasonW

I ran into this in a classroom setting once and don't recall if I found an
answer. If I am setting up a workstation without DHCP, is there a command or
method to discover the default gateway and thus the subnet that I am
connected to, so that I can configure the IP address and other settings? In
the class, the instructor (like the sysadmin) was gone that day and we were
setting up a couple of mock private networks, but had no way to figure out
what the gateway IP should be or what range we could use for our workstation
IP addresses (DHCP was not active on the server). The gateway was configured
and sitting in the teacher's office so we couldn't gain physical access to
it.

-JasonW
 
Good question! If you have an idea of what network addresses are usually used, the
default gateway many times is the first host address in the network such as
192.168.0.1 in one of my networks. You could also install a network scanner such as
Superscan and then scan the network ranges using only ping to speed things up such as
scan 192.168.0.1 to 192.168.255.254. It would probably take an hour or two for that.
If you are using class A range, good luck with scanning it. Another thing to try is
to use arp -a to see if any addresses show up in the cache and/or using a network
monitor such as Netmon built in to W2K server or download something like Ethereal to
monitor the network for any traffic that may indicate the default gateway or subnet.
I know my default gateway spews out traffic periodically. --- Steve

http://is-it-true.org/pt/ptips2.shtml
 
I agree with all of those except the scanning - if you want to ping scan
then you need to have an IP address on the correct subnet which is what you
are trying to find out.

The best bet is to go with the sniffing tools, noting that on a switched
network you will only see broadcast messages (and messages directed to you)
 
Back
Top