Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    DHCP: Getting dhclient to resort to a static IP

    Please can anyone help me setup networking... I'm a tard and cant figure out all the dhclient options.

    I'm running fedora core 6 and want to configure eth0 to try to get a DHCP lease but if this fails then to use a static IP.

    I created this dhclient.conf file:

    timeout 30;
    alias {
    interface "eth0";
    option subnet-mask;

    ... and restarted the network (in the abscence of a DHCP server) but it seemed to ignore the requested timeout and hasn't
    assigned the static address.

    I've looked over the network-scripts that invoke dhclient and they seem to be doing something mysterious with dhclient-[$DEVICE].conf.

    Now im not sure if my dhclient.conf is being picked up - do i need to make a dhclient-eth0.conf - , or maybe if im using incorrect options. Should i be using "default" rather than "alias"?

    Please help at the moment it DHCP hangs the boot process for ages. then i have to manually configure a static if on my home network, then set it back to DHCP when roaming.


  2. #2

    Thumbs up

    hello dude,

    If you installed dhclient on you host.

    But DHCP server must be needed to release the ip address for DHCP client and this will happen only when your DHCP server release the ip address.

    your client conf file is ok but u need to run command on both server side and client side
    client : DHCP / renew
    server : DHCP / release

    when server is release the new address from the list of free address in polling,
    at that time your client get the new address by renew command but must be sync between this two process.

    it's only the dynamic ip address, it's not static for one client but if you want to bind IP address with dat client then u must need the DNS on your server.
    by DNS server you can fix the IP addres for particular client when the client up.
    DNS server mainly bind the MAC address with the IP address, then IP address is reserver for dat particular MAC..

    DHCP : it's Dynamic host configuration protocol man you can not assigen d static ip address with DHCP if you want to give the specific IP to specific client then u also need to install the DNS

    once u try to follow the DHCP procedure and lemme know what happen!!!
    initially we dont need this DNS server once your server and client run particurlerly then we use the DSN.

    let's do dis then lemme know!!!!!!!!!!!!!!!!!!!!!!!!!

    Linux is Rocking

  3. #3
    Ok thankyo.
    But this would only work on the network that has the DNS and DHCP servers. Yeah i know DHCP is dynamic but i want to setup the static ip if a server cannot be found - The DHCP server knows nothing about this static ip or network.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts