LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-09-2022, 06:05 PM   #1
meliodas
LQ Newbie
 
Registered: Aug 2022
Posts: 4

Rep: Reputation: 0
dhcp option - DHCP/DNSMASQ


Hi, this is related to both dhcp and dnsmasq. In dnsmasq.conf, I notice the following..for example:

dhcp-option=lan,3,192.168.0.1
dhcp-option=lan,15,domain.local
dhcp-option=lan,44,192.168.0.1


What do the bold numbers mean and where can I reference it that explains more about it ?
 
Old 08-09-2022, 06:13 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,740

Rep: Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923
Welcome to LinuxQuestions.

Those are option numbers the DHCP protocol uses to identify what data is being sent to the client. In your first example 3 is the gateway IP address.

https://www.iana.org/assignments/boo...rameters.xhtml

Last edited by michaelk; 08-09-2022 at 06:14 PM.
 
1 members found this post helpful.
Old 08-09-2022, 06:28 PM   #3
meliodas
LQ Newbie
 
Registered: Aug 2022
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for the welcome and the post.
 
Old 08-09-2022, 06:47 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,740

Rep: Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923
I guess the two most important options are 3 and 6. As posted 3 is the gateway IP address i.e. that tells a client where to send data outside of the LAN and 6, the DNS addresses. dnsmasq can be its own local DNS server which also forwards requests to network DNS servers like Google.
 
1 members found this post helpful.
Old 08-10-2022, 08:14 AM   #5
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
There should be macro substitutions that map the number to more readable names. I haven't found the full list, but here is
an example:

dhcp-option=option:router,192.168.10.1
dhcp-option=option:dns-server,192.168.10.1
dhcp-option=option:netmask,255.255.255.0
 
1 members found this post helpful.
Old 08-10-2022, 08:35 AM   #6
meliodas
LQ Newbie
 
Registered: Aug 2022
Posts: 4

Original Poster
Rep: Reputation: 0
Yeh with names it's easier but I'm dealing with mostly dnsmasq here since this is on a merlin-wrt router and it uses numbers mostly which can be confusing.

Another question, can dnsmasq handle
dhcp-pd to request an IPv6 prefix of your choice from the upstream ISP?
 
Old 08-10-2022, 05:49 PM   #7
meliodas
LQ Newbie
 
Registered: Aug 2022
Posts: 4

Original Poster
Rep: Reputation: 0
I read that Android doesn't support stateful DHCPv6. DNSMASQ does SLACC however can it assign an IPv6 address of my choice to an Android device ?

I have this in dnsmasq.conf:

dhcp-option=android_hostname,192.168.0.100,[::abcd]


When I check the Android device it only get's assigned the IPv4 address correctly and the IPv6 address is random.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with dnsmasq. DHCP not working zhjim Linux - Software 7 02-09-2009 09:26 AM
dnsmasq dhcp not working danwald79 Linux - Networking 1 02-01-2008 09:34 AM
routing with dhcp dnsmasq /y0shi Slackware 12 11-19-2007 02:39 PM
dnsmasq: no dhcp ryerke Slackware 8 06-03-2007 06:29 PM
dnsmasq: not resolving names of dhcp'd computers vimico Linux - Networking 3 03-19-2005 05:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration