Results 1 to 8 of 8

Thread: DHCP Option 120

  1. #1

    Default DHCP Option 120

    Good morning, world.

    I need to add an option 120 line to my dhcpd.conf. Trouble is, I'm getting 'Option not supported' when I crank up the service.
    The syntax I tried was

    option-120 123.132.132.123

    Just thought of something - and that's before coffee - is this option only supported at a host level and not at the top of the conf file?

    Is it syntax? I tried sip-servers, sipserver, sipservers, SIP-server, option-120 as above etc etc etc. Alas to no avail.

    I'm on OpenSuse 10.3 AMD 64. The machine is facing roughly due west. Thank you, thank you.

    sparkie

  2. #2

    Default Re: DHCP Option 120 - Second plea!

    Hi Folks,

    I'm still struggling with this one. If anyone has any knowledge or insights on support for option 120 in the dhcp server on OpenSuse 10.3, I'd be most grateful to hear from you. Also, would this option be at host entry level or conf level?

    Client is threatening to pull the plug and I am royally stuck!

    Thanks

    sparkie

  3. #3
    Join Date
    Jun 2008
    Location
    Finland, European Union
    Posts
    1,879

    Default Re: DHCP Option 120 - Second plea!

    You could try defining a new string like:
    option option-120 code 120 = string;
    in the global part of the config.

    Haven't played around with creating custom responses to dhcp clients lately.

  4. #4
    Join Date
    Jun 2008
    Location
    The Netherlands
    Posts
    1,273

    Default Re: DHCP Option 120 - Second plea!

    This should be working, but don't have a configuration handy.

    I did snip this from Google's cache, hoping it helps trigger your brain in the right direction!

    On Mon, Nov 20, 2006 at 02:23:40PM +0100, Rune Kock wrote:
    > A DHCP-server will only send those options that the client asks for.
    > So maybe your client doesn't ask for option 120?

    Ah, that'll be it :-)

    OK, so I changed the client's /etc/dhclient.conf as follows:

    send host-name "wibble";
    option sip-server-address code 120 = { unsigned integer 8, ip-address };
    request subnet-mask, broadcast-address, time-offset, routers, domain-name,
    domain-name-servers, host-name, nis-domain, nis-servers, ntp-servers,
    sip-server-address;

    and dnsmasq still has:

    dhcp-option=120,1,192.168.1.1

    Now, here's the end of the response I get back as seen by tcpdump:

    0x0140: 036c 616e 0c06 7769 6262 6c65 7808 ffff .lan..wibblex...
    0x0150: ffff c0a8 0101 ff .......

    So there's option 120 (0x78), but for some reason the value '1' has been
    encoded as ff ff ff ff, when I need it to be 01.

    I tried changing to

    dhcp-option=120,1b,192.168.1.1

    but then the response I got back was no good as the whole lot was intepreted
    as an ASCII string:

    0x0140: 036c 616e 0c06 7769 6262 6c65 780e 3162 .lan..wibblex.1b
    0x0150: 2c31 3932 2e31 3638 2e31 2e31 ff ,192.168.1.1.

    Ah, but it seems I was misunderstanding the man page. OK, this seems to do
    the trick:

    dhcp-option=120,01:C0:A8:01:01

    Thanks for pointing me in the right direction.

    It would be nice if I could mix'n'match integers and IP addresses though,
    because then I could have

    dhcp-option=120,1,0.0.0.0

    which would substitute the "correct" IP address automatically.

    Regards,

    Brian.
    Have a lot of fun!

  5. #5
    Join Date
    Jun 2008
    Location
    Oklahoma, US
    Posts
    822

    Default Re: DHCP Option 120

    I dug around a little, the syntax you're using looks more like dnsmasq options than dhcpd.conf.

    I found a page that discusses dhcpd.conf options, and how to set them for new option numbers (evidently #120 hasn't been 'built-in' yet)

    This is the man page:

    5:dhcp-options - Linux Man Pages Manual Documentation for Linux / Solaris / UNIX / BSD

    There it discusses how to set up new options and provide parameters for them. (almost said options for options!)

    looks like your desired syntax would be:


    option new-name code new-code = ip-address ;

    Thus:

    option sip-server code 120 = ip-address;
    option sip-server = 123.123.123.123;

    The first line defines a name and what type of parameters it takes, the second line does the actual set up of that option.

    The write up in the link is decent, just takes a moment to get head wrapped around it... and now I think my head is all pointy and bumpy from that one. Never looked at dhcp options that hard in the past.

    Take Care,

    Lornix
    lornix@lornix.com

  6. #6

    Default Re: DHCP Option 120

    Thanks for replies on this one. I'll play around with the option declaration syntax and report back.

    sparkie

  7. #7
    glavnijunak NNTP User

    Default Re: DHCP Option 120

    I also have to set a option 120 on my dhcp server; in fact I have set this option on my server, having found the info previously talked here very usefull;
    but another I have another issue now; My dhcp client doesn't request for a 120 option, and my server does not respond with such thing; I know it is possible to make my server respond with option 120 even if it is not requested, so I wonder how to do this ???
    Thank you!

  8. #8
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: DHCP Option 120

    I doubt that will be much use, even if possible. If a client doesn't request it, it's not going to process it anyway.

Posting Permissions

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