Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DHCP message configuration
2013-05-17, 05:28 (This post was last modified: 2013-05-17 07:42 by Rickert.)
Post: #10
RE: DHCP message configuration
(2013-05-16 19:36)robinsmidsrod Wrote:  Rickert: Those two options you mentioned there are available, how else would iPXE be able to resolve DNS names? They are available as ${net0/domain} and ${net0/dns} for adapter net0 or just ${dns} if you're just reading it out from the active adapter. Use the config command from the iPXE shell to see all the variables available by default.

It is also possible to instruct ISC dhcpd to send additional (non-requested) options for certain clients. I think it's described in one of the dhcpd man pages (can't recall which one).

What is it precisely you're trying to do? If we knew your end goal, maybe we could help you out with the most appropriate solution.
Sorry those two options I gave are bad examples. What I want is for iPXE to request custom options like this:

Code:
ption vlan-id                          code 100 = unsigned integer 16;
option system-name                     code 101 = text;
option oam-master                      code 102 = ip-address;
option static-vlan-id-list             code 103 = array of unsigned integer 16;
option is-snmp-trap-receiver           code 104 = ip-address;

These options will be used in a custom network script (one in /etc/init.d/boot.d
), after Linux finished loading vmlinuz and initrd. Before the network script can use such information, it must be retrieved by iPXE or PXE ROM (unfortunately, PXE ROM is unable to perform such request), so my only hope is iPXE. There are more options to be added later.

Edit: Ok I found out the code to add more request options in src/net/udp/dhcp.c line 76. Just added the options I wanted and it works: iPXE finally sends out messages with such options. Thanks for your help everyone. I will still try to understand and study the iPXE source code though.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
DHCP message configuration - Rickert - 2013-05-15, 03:48
RE: DHCP message configuration - Rickert - 2013-05-17 05:28



User(s) browsing this thread: 1 Guest(s)