Find the answer to your Linux question:
Results 1 to 2 of 2
Hi Guys, On Windows clients we can setup Dhcp class id, so that a particular range of ip's are addressed to those clients. Is is possible to assign such dhcp ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2008
    Posts
    2

    Dhcp class id


    Hi Guys,

    On Windows clients we can setup Dhcp class id, so that a particular range of ip's are addressed to those clients.

    Is is possible to assign such dhcp class id to linux ? cause currently i have to assign static ips to my linux user one of them being my MD. Setting up dhcp class id for linux will be a relief for the users who now have to go thru the hassle of manually changing their settings.

    Awaiting some good responce.
    Thanks

  2. #2
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    721
    I think it will depend on the dhcp client you are using, but this sort of thing looks promising.

    from /etc/dhcp3/dhclient.conf
    send host-name "<hostname>";
    #send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
    #send dhcp-lease-time 3600;
    from man dhclient.conf
    The send statement

    send { [ option declaration ] [, ... option declaration ]}

    The send statement causes the client to send the specified options to the server with the specified values. These are full option declarations as described in dhcp-options(5). Options that are always sent in the DHCP protocol should not be specified here, except that the client can specify a requested-lease-time option other than the default requested lease time, which is two hours. The other obvious use for this statement is to send information to the server that will allow it to differentiate between this client and other clients or kinds of clients.
    from man dhcp-options
    option user-class string;

    This option is used by some DHCP clients as a way for users to specify identifying information to the client. This can be used in a similar way to the vendor-class-identifier option, but the value of the option is specified by the user, not the vendor. Most recent DHCP clients have a way in the user interface to specify the value for this identifier, usually as a text string.
    I don't have anything to test against so you will have to do some investigation on your own, but this should get you started.

    Distressingly while I've seen this used as a security mechanism, "If they don't have the right class-id then we give them bad/no settings." The dhcp discover message is sent in the clear so you can just wait for another dhcp request to go by.

    Let us know how you get on,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

Posting Permissions

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