Pjtg0707 wrote:
> Is there a unix command that lists default gw,
> default dns etc for a dhcp machine, kind of
> like what windows ipconfig /all does?
Nearest thing I can think of is to cat the dhcp lease file.
For distros/hosts using dhclient:
$ cat /var/lib/dhcp/dhclient-<interface>.leases <<eg., eth0
Note that this is for a RH/Fedora distro, where a separate file for
each interface is maintained. For other distros it may simply be:
$ cat /var/lib/dhcp/dhclient.leases
For those using dhcpcd (eg., Suse) I _think_ it would be:
$ cat /etc/dhcpc/dhcpcd-<interface>.cache <<eg., eth0
Any other place/name for the dhcp lease file? Hmmm...
You could alias this to something like iplease (as opposed to
meplease
hth,
prg
email above disabled