Networking Forums

Networking Forums > Computer Networking > Linux Networking > lisitng default gw, dns etc

Reply
Thread Tools Display Modes

lisitng default gw, dns etc

 
 
Pjtg0707
Guest
Posts: n/a

 
      01-17-2005, 07:55 PM
Is there a unix command that lists default gw,
default dns etc for a dhcp machine, kind of
like what windows ipconfig /all does?


 
Reply With Quote
 
 
 
 
Bill Marcum
Guest
Posts: n/a

 
      01-18-2005, 01:01 AM
On Mon, 17 Jan 2005 20:55:08 GMT, Pjtg0707
<Pjtg0707@NOSPAM___n_e__t____s___ca__pe.__ne__t> 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?
>

ifconfig shows the ip address
route -n shows the default gateway
cat /etc/resolv.conf shows the dns


--
BOFH excuse #270:

Someone has messed up the kernel pointers
 
Reply With Quote
 
prg
Guest
Posts: n/a

 
      01-18-2005, 01:56 AM

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

 
Reply With Quote
 
Pjtg0707
Guest
Posts: n/a

 
      01-18-2005, 03:42 PM
On 17 Jan 2005 18:56:10 -0800, prg <(E-Mail Removed)> wrote:
>


Thanks. That's what I am looking for.

Is there a way to force the dhcp to give up the lease and obtain a new one?
ie, I obtained a lease from ap a in room a, then moved to room b and
moved back to room a. Can I issue a command to have dhcp to drop old leases and
obtain new ones? The equivalent windows command is ipconfig /renew <card>.


 
Reply With Quote
 
prg
Guest
Posts: n/a

 
      01-19-2005, 12:26 AM

Pjtg0707 wrote:
> On 17 Jan 2005 18:56:10 -0800, prg <(E-Mail Removed)> wrote:
> >

>
> Thanks. That's what I am looking for.
>
> Is there a way to force the dhcp to give up the lease and obtain a

new one?
> ie, I obtained a lease from ap a in room a, then moved to room b and


> moved back to room a. Can I issue a command to have dhcp to drop old

leases
> and obtain new ones? The equivalent windows command is ipconfig

/renew
> <card>.


Sounds like you're running wireless on a laptop.

I'm not the one to ask about such things -- too, too little experience
-- but you can "manually" release/renew via ifdown <net-dev> followed
by an ifup <net-dev>. Seem to recall that not everyone is happy with
this when using wireless;(

You might want to look into ifplug and waproamd for "automagic"
roaming. Try googling "linux ifplugd waproamd" for more info. You may
have both on your disk drive or CDs.

You can also check here for your laptop and see if anyone has
configured it for their system -- sort of user howtos.

http://www.tuxmobil.org/
http://www.linux-on-laptops.com/

hth,
prg
email above disabled

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FC9 and default GW Jørn Dahl-Stamnes Linux Networking 11 11-29-2008 01:55 PM
How to set NIC to be default Miha Windows Networking 4 09-19-2007 03:40 PM
Default Gateway Lino767 Windows Networking 1 06-13-2006 04:21 AM
Linux: Default gateway fails, must use local IP for default gw instead John Sasso Wireless Internet 2 07-08-2004 08:30 AM
What's the default PW for the MN-500 -A Broadband Hardware 2 05-28-2004 05:06 AM



1 2 3 4 5 6 7 8 9 10 11