How to get DHCP IP from DHCP Client on Fedora 11 ?

July 2, 2009

As I did know this hint before I share it with you.

Define what is you Network interface Card – NIC – with ifconfig ( For my part it is eth0).
[fhornain@localhost ~]$ ifconfig
eth0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
inet addr:192.168.xxx.xxx Bcast:192.168.XXX.255 Mask:255.255.255.0
inet6 addr: fe80::223:8bff:fea0:e8ee/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:270269 errors:0 dropped:0 overruns:0 frame:0
TX packets:136038 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:281403168 (268.3 MiB) TX bytes:33294001 (31.7 MiB)
Interrupt:31

Then do a cat of the /var/lib/dhclient/dhclient-*-eth0.lease and look for the stanza associated to the NIC card here eth0 :

[fhornain@localhost dhcp]$ cat /var/lib/dhclient/dhclient-*-eth0.lease

lease {
interface “eth0”;
fixed-address 192.168.xxx.xxx;
filename “/boot/pxelinux.0”;
option subnet-mask 255.255.255.0;
option routers 192.168.xxx.1;
option dhcp-lease-time 172800;
option dhcp-message-type 5;
option domain-name-servers 192.168.xxx.xxx,192.168.xxx.xxx;
option dhcp-server-identifier 192.168.xxx.xxx;
option domain-name “mydomain.com”;
renew 5 2009/07/03 03:47:38;
rebind 6 2009/07/04 01:10:17;
expire 6 2009/07/04 07:10:17;
}

Here is the answers :  option dhcp-server-identifier 192.168.xxx.xxx;

Have Fun with F11

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: