With DHCP, where does one find their IP, nameserver and gateway addresses?

Trent Lloyd lathiat at bur.st
Thu May 5 08:33:01 UTC 2005


ip address/netmask: ifconfig
dns servers: /etc/resolv.conf
gateway: ip route show

examples:

lathiat at ubuntu:~$ ifconfig ppp0
ppp0      Link encap:Point-to-Point Protocol
          inet addr:202.72.150.106  P-t-P:202.72.191.98
Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:1213445 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1058628 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:809754495 (772.2 MiB)  TX bytes:277085586 (264.2 MiB)
lathiat at ubuntu:~$ cat /etc/resolv.conf
nameserver 203.21.20.20
nameserver 203.10.1.9
search murdoch.edu.au
lathiat at ubuntu:~$ ip route
202.72.191.98 dev ppp0  proto kernel  scope link  src 202.72.150.106
default via 202.72.191.98 dev ppp0
lathiat at ubuntu:~$

You can also see information in /var/lib/dhcp3/dhclient.leases
Hope this helps.

Cheers,
Trent


On Thu, 2005-05-05 at 00:51 -0400, Rick Berger wrote:
> With DHCP, where does one find their IP, nameserver and gateway
> addresses?
> 
> I want to try doing re-install of a broken Debian box faking a static
> connection with the DHCP addresses from my Ubuntu box, but I can't find
> them.
> 
>  
> -- 
> Rick Berger <rberger at sympatico.ca>
> 
> 
-- 
Trent Lloyd <lathiat at bur.st>
Bur.st Networking Inc.





More information about the ubuntu-users mailing list