Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #219653 > unrolled thread
| Started by | deloptes <deloptes@gmail.com> |
|---|---|
| First post | 2020-02-29 16:10 +0100 |
| Last post | 2020-03-03 21:50 +0100 |
| Articles | 11 — 5 participants |
Back to article view | Back to linux.debian.user
Can I run dnsmasq as boot server in my environment deloptes <deloptes@gmail.com> - 2020-02-29 16:10 +0100
Re: Can I run dnsmasq as boot server in my environment john doe <johndoe65534@mail.com> - 2020-02-29 18:10 +0100
Re: Can I run dnsmasq as boot server in my environment deloptes <deloptes@gmail.com> - 2020-02-29 18:30 +0100
Re: Can I run dnsmasq as boot server in my environment john doe <johndoe65534@mail.com> - 2020-02-29 18:40 +0100
[SOLVED] Can I run dnsmasq as boot server in my environment deloptes <deloptes@gmail.com> - 2020-03-03 00:40 +0100
Re: [SOLVED] Can I run dnsmasq as boot server in my environment deloptes <deloptes@gmail.com> - 2020-03-03 09:20 +0100
Re: [SOLVED] Can I run dnsmasq as boot server in my environment <tomas@tuxteam.de> - 2020-03-03 09:40 +0100
Re: [SOLVED] Can I run dnsmasq as boot server in my environment David <bouncingcats@gmail.com> - 2020-03-03 12:40 +0100
Re: [SOLVED] Can I run dnsmasq as boot server in my environment <tomas@tuxteam.de> - 2020-03-03 13:50 +0100
Re: [SOLVED] Can I run dnsmasq as boot server in my environment deloptes <deloptes@gmail.com> - 2020-03-03 21:10 +0100
Re: [SOLVED] Can I run dnsmasq as boot server in my environment Jonas Smedegaard <jonas@jones.dk> - 2020-03-03 21:50 +0100
| From | deloptes <deloptes@gmail.com> |
|---|---|
| Date | 2020-02-29 16:10 +0100 |
| Subject | Can I run dnsmasq as boot server in my environment |
| Message-ID | <zFbUC-154-5@gated-at.bofh.it> |
Hi, I am running isc-dhcp-server, bind9 and tftp-hpa. All machines can do diskless boot (i386, amd64 and rpi3) except rpi4. I couldn't bring the dhcp and tftp server to work together. It seems however dnsmasq does the job with just few lines in the configuration. So I am wondering if I can allocate a range on the dhcp server and handle this range via dnsmasq. Perfect would be to keep the working part without too many modification as I do not want to regression test all the rest. thank you in advance regards
[toc] | [next] | [standalone]
| From | john doe <johndoe65534@mail.com> |
|---|---|
| Date | 2020-02-29 18:10 +0100 |
| Message-ID | <zFdMK-2dr-3@gated-at.bofh.it> |
| In reply to | #219653 |
On 2/29/2020 4:08 PM, deloptes wrote: > Hi, > > I am running isc-dhcp-server, bind9 and tftp-hpa. All machines can do > diskless boot (i386, amd64 and rpi3) except rpi4. I couldn't bring the dhcp > and tftp server to work together. I would rather look there to get it working with your current setup. > It seems however dnsmasq does the job > with just few lines in the configuration. > So I am wondering if I can allocate a range on the dhcp server and handle > this range via dnsmasq. Perfect would be to keep the working part without > too many modification as I do not want to regression test all the rest. > I don't think you can have two DHCP server running on the same ports, so I would go one way or the other. -- John Doe
[toc] | [prev] | [next] | [standalone]
| From | deloptes <deloptes@gmail.com> |
|---|---|
| Date | 2020-02-29 18:30 +0100 |
| Message-ID | <zFe65-2jM-1@gated-at.bofh.it> |
| In reply to | #219656 |
john doe wrote: > I would rather look there to get it working with your current setup. > looks like dnsmasq is more cooperative - I don't know how to do it with the current setup :/ >> It seems however dnsmasq does the job >> with just few lines in the configuration. >> So I am wondering if I can allocate a range on the dhcp server and handle >> this range via dnsmasq. Perfect would be to keep the working part without >> too many modification as I do not want to regression test all the rest. >> > > I don't think you can have two DHCP server running on the same ports, so > I would go one way or the other. yes this is true, but bootp is not the dhcp. Let me precise the question dnsmasq would do the bootp stuff and the dhcp server will provide the ips as usual. I saw one can turn off the bootp in isc-dhcp-server. Is this possible?
[toc] | [prev] | [next] | [standalone]
| From | john doe <johndoe65534@mail.com> |
|---|---|
| Date | 2020-02-29 18:40 +0100 |
| Message-ID | <zFefM-2nd-5@gated-at.bofh.it> |
| In reply to | #219657 |
On 2/29/2020 6:20 PM, deloptes wrote: > john doe wrote: > >> I would rather look there to get it working with your current setup. >> > > looks like dnsmasq is more cooperative - I don't know how to do it with the > current setup :/ > >>> It seems however dnsmasq does the job >>> with just few lines in the configuration. >>> So I am wondering if I can allocate a range on the dhcp server and handle >>> this range via dnsmasq. Perfect would be to keep the working part without >>> too many modification as I do not want to regression test all the rest. >>> >> >> I don't think you can have two DHCP server running on the same ports, so >> I would go one way or the other. > > yes this is true, but bootp is not the dhcp. > > Let me precise the question > > dnsmasq would do the bootp stuff and the dhcp server will provide the ips as > usual. I saw one can turn off the bootp in isc-dhcp-server. > > Is this possible? > > I know that you can disable DHCP and DNS functionalities in Dnsmasq, so-in effect living only PXE boot functionality. At the risk of being redundant, don't mix both approaches. -- John Doe
[toc] | [prev] | [next] | [standalone]
| From | deloptes <deloptes@gmail.com> |
|---|---|
| Date | 2020-03-03 00:40 +0100 |
| Subject | [SOLVED] Can I run dnsmasq as boot server in my environment |
| Message-ID | <zG2Pg-fo-1@gated-at.bofh.it> |
| In reply to | #219658 |
john doe wrote:
> On 2/29/2020 6:20 PM, deloptes wrote:
>> john doe wrote:
>>
>>> I would rather look there to get it working with your current setup.
>>>
>>
>> looks like dnsmasq is more cooperative - I don't know how to do it with
>> the current setup :/
>>
>>>> It seems however dnsmasq does the job
>>>> with just few lines in the configuration.
>>>> So I am wondering if I can allocate a range on the dhcp server and
>>>> handle this range via dnsmasq. Perfect would be to keep the working
>>>> part without too many modification as I do not want to regression test
>>>> all the rest.
>>>>
>>>
>>> I don't think you can have two DHCP server running on the same ports, so
>>> I would go one way or the other.
>>
>> yes this is true, but bootp is not the dhcp.
>>
>> Let me precise the question
>>
>> dnsmasq would do the bootp stuff and the dhcp server will provide the ips
>> as usual. I saw one can turn off the bootp in isc-dhcp-server.
>>
>> Is this possible?
>>
>>
>
> I know that you can disable DHCP and DNS functionalities in Dnsmasq,
> so-in effect living only PXE boot functionality.
>
> At the risk of being redundant, don't mix both approaches.
>
> --
> John Doe
The trick was to add following line to the dhcpd.conf
option vendor-encapsulated-options
6:1:3:a:4:0:50:58:45:9:14:0:0:11:52:61:73:70:62:65:72:72:79:20:50:69:20:42:6f:6f:74:ff;
This could be added to a class, but I have only one rpi4, so added directly
to the client config.
The other trick is to set root-path to the tftp boot directory.
If there is more curiosity what happens on the network, use this
tcpdump -Xvv udp port 67 or port 68 or port 69
Amazing!
I would like to know what vendor-encapsulated-options is. The end of it
translates to Raspberry Pi Boot\0. But the first part ... ???
In anycase it does the magic
[toc] | [prev] | [next] | [standalone]
| From | deloptes <deloptes@gmail.com> |
|---|---|
| Date | 2020-03-03 09:20 +0100 |
| Subject | Re: [SOLVED] Can I run dnsmasq as boot server in my environment |
| Message-ID | <zGaWu-5pO-9@gated-at.bofh.it> |
| In reply to | #219732 |
> > > The trick was to add following line to the dhcpd.conf > > option vendor-encapsulated-options > 6:1:3:a:4:0:50:58:45:9:14:0:0:11:52:61:73:70:62:65:72:72:79:20:50:69:20:42:6f:6f:74:ff; > > This could be added to a class, but I have only one rpi4, so added > directly to the client config. > > The other trick is to set root-path to the tftp boot directory. > > If there is more curiosity what happens on the network, use this > > tcpdump -Xvv udp port 67 or port 68 or port 69 > > Amazing! > > I would like to know what vendor-encapsulated-options is. The end of it > translates to Raspberry Pi Boot\0. But the first part ... ??? > In anycase it does the magic It is probably not clear what I meant with the message. It is not necessary to use dnsmasq. Just the proper configuration in isc-dhcp-server. If the vendor encapsulated option is missing, the boot process do not continue. When the configuration option is present the boot sequence continues. root-path must point to the boot directory, so that Rpi can find the boot files. regards
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2020-03-03 09:40 +0100 |
| Subject | Re: [SOLVED] Can I run dnsmasq as boot server in my environment |
| Message-ID | <zGbfP-5wz-9@gated-at.bofh.it> |
| In reply to | #219732 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, Mar 03, 2020 at 12:36:42AM +0100, deloptes wrote:
> john doe wrote:
[...]
> The trick was to add following line to the dhcpd.conf
>
> option vendor-encapsulated-options
> 6:1:3:a:4:0:50:58:45:9:14:0:0:11:52:61:73:70:62:65:72:72:79:20:50:69:20:42:6f:6f:74:ff;
>
> This could be added to a class, but I have only one rpi4, so added directly
> to the client config.
>
> The other trick is to set root-path to the tftp boot directory.
>
> If there is more curiosity what happens on the network, use this
>
> tcpdump -Xvv udp port 67 or port 68 or port 69
>
> Amazing!
>
> I would like to know what vendor-encapsulated-options is. The end of it
> translates to Raspberry Pi Boot\0. But the first part ... ???
> In anycase it does the magic
Thanks for making all of us smarter. To throw my two cents in, I did some
legwork, and (as usually) Wikipedia [1] provides some light.
Those options are encoded as
- code: 1 octet
- length (of following data): 1 octet
- data <length> octets.
They are closed off by one "option" 0xff with no length octet.
So taking apart your magic string above (and rewriting a bit to
make more readable):
06 01 03
0a 04 00 50 58 45
09 14 00 00 11 52 61 73 70 62
65 72 72 79 20 50 69 20
42 6f 6f 74
ff
But the codes, alas, are not interpretable according to the
ref given. An exercise for the reader :)
Cheers
[1] https://en.wikipedia.org/wiki/DHCP#Options
-- tomás
[toc] | [prev] | [next] | [standalone]
| From | David <bouncingcats@gmail.com> |
|---|---|
| Date | 2020-03-03 12:40 +0100 |
| Subject | Re: [SOLVED] Can I run dnsmasq as boot server in my environment |
| Message-ID | <zGe41-7oE-1@gated-at.bofh.it> |
| In reply to | #219739 |
On Tue, 3 Mar 2020 at 19:38, <tomas@tuxteam.de> wrote: > On Tue, Mar 03, 2020 at 12:36:42AM +0100, deloptes wrote: > > The trick was to add following line to the dhcpd.conf > > > > option vendor-encapsulated-options > > 6:1:3:a:4:0:50:58:45:9:14:0:0:11:52:61:73:70:62:65:72:72:79:20:50:69:20:42:6f:6f:74:ff; > > > > I would like to know what vendor-encapsulated-options is. The end of it > > translates to Raspberry Pi Boot\0. But the first part ... ??? > > In anycase it does the magic > > Thanks for making all of us smarter. To throw my two cents in, I did some > legwork, and (as usually) Wikipedia [1] provides some light. [...] > But the codes, alas, are not interpretable according to the > ref given. An exercise for the reader :) > > [1] https://en.wikipedia.org/wiki/DHCP#Options My guess (untested) would be per Section 8.4 in https://tools.ietf.org/html/rfc2132 with the leading Code=43 and Len=n octets possibly prepended by the software. And a bit of idle searching [1] suggests that perhaps (untested) only the trailing "Raspberry Pi Boot" string is required. Also I notice that 50:58:45 spells "PXE". [1] https://www.raspberrypi.org/forums/viewtopic.php?t=209247#p1294345
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2020-03-03 13:50 +0100 |
| Subject | Re: [SOLVED] Can I run dnsmasq as boot server in my environment |
| Message-ID | <zGf9L-80T-1@gated-at.bofh.it> |
| In reply to | #219745 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, Mar 03, 2020 at 10:35:51PM +1100, David wrote: > On Tue, 3 Mar 2020 at 19:38, <tomas@tuxteam.de> wrote: > > On Tue, Mar 03, 2020 at 12:36:42AM +0100, deloptes wrote: > > > > The trick was to add following line to the dhcpd.conf > > > > > > option vendor-encapsulated-options > > > 6:1:3:a:4:0:50:58:45:9:14:0:0:11:52:61:73:70:62:65:72:72:79:20:50:69:20:42:6f:6f:74:ff; [...] > > Thanks for making all of us smarter. To throw my two cents in, I did some > > legwork, and (as usually) Wikipedia [1] provides some light. > > [...] > > > But the codes, alas, are not interpretable according to the > > ref given. An exercise for the reader :) > > > > [1] https://en.wikipedia.org/wiki/DHCP#Options > > My guess (untested) would be per Section 8.4 in > https://tools.ietf.org/html/rfc2132 > with the leading Code=43 and Len=n > octets possibly prepended by the software. > > And a bit of idle searching [1] suggests that perhaps (untested) > only the trailing "Raspberry Pi Boot" string is required. Thanks :) Cheers -- t
[toc] | [prev] | [next] | [standalone]
| From | deloptes <deloptes@gmail.com> |
|---|---|
| Date | 2020-03-03 21:10 +0100 |
| Subject | Re: [SOLVED] Can I run dnsmasq as boot server in my environment |
| Message-ID | <zGm1z-3UE-1@gated-at.bofh.it> |
| In reply to | #219745 |
David wrote: > [...] > >> But the codes, alas, are not interpretable according to the >> ref given. An exercise for the reader :) >> >> [1] https://en.wikipedia.org/wiki/DHCP#Options > > My guess (untested) would be per Section 8.4 in > https://tools.ietf.org/html/rfc2132 > with the leading Code=43 and Len=n > octets possibly prepended by the software. > > And a bit of idle searching [1] suggests that perhaps (untested) > only the trailing "Raspberry Pi Boot" string is required. > > Also I notice that 50:58:45 spells "PXE". > > [1] https://www.raspberrypi.org/forums/viewtopic.php?t=209247#p1294345 Hi, I read the DHCP documentation, but it does not specify how those options are encapsulated. The string "Raspberry Pi Boot" was not sufficient to do the work. I guess it is important to code the whole structure incl. this PXE (50:58:45) https://kb.isc.org/docs/isc-dhcp-44-manual-pages-dhcp-options#VENDOR%20ENCAPSULATED%20OPTIONS
[toc] | [prev] | [next] | [standalone]
| From | Jonas Smedegaard <jonas@jones.dk> |
|---|---|
| Date | 2020-03-03 21:50 +0100 |
| Subject | Re: [SOLVED] Can I run dnsmasq as boot server in my environment |
| Message-ID | <zGmEi-4bt-5@gated-at.bofh.it> |
| In reply to | #219749 |
[Multipart message — attachments visible in raw view] — view raw
Quoting deloptes (2020-03-03 21:07:44) > David wrote: > > > [...] > > > >> But the codes, alas, are not interpretable according to the > >> ref given. An exercise for the reader :) > >> > >> [1] https://en.wikipedia.org/wiki/DHCP#Options > > > > My guess (untested) would be per Section 8.4 in > > https://tools.ietf.org/html/rfc2132 > > with the leading Code=43 and Len=n > > octets possibly prepended by the software. > > > > And a bit of idle searching [1] suggests that perhaps (untested) > > only the trailing "Raspberry Pi Boot" string is required. > > > > Also I notice that 50:58:45 spells "PXE". > > > > [1] https://www.raspberrypi.org/forums/viewtopic.php?t=209247#p1294345 > > Hi, I read the DHCP documentation, but it does not specify how those options > are encapsulated. The string "Raspberry Pi Boot" was not sufficient to do > the work. I guess it is important to code the whole structure incl. this > PXE (50:58:45) > > https://kb.isc.org/docs/isc-dhcp-44-manual-pages-dhcp-options#VENDOR%20ENCAPSULATED%20OPTIONS Many years ago I messed with PXE booting, and found the official ISC documentation insufficient for me to grasp it. Maybe you and others find my old config snippets - and the comments in them - enlightening for your present use case - especially this one: http://source.jones.dk/local-COMMON.git/tree/dhcp3/dhcpd.pxe - Jonas -- * Jonas Smedegaard - idealist & Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web