[Kea-users] next-server-address in hooks for UEFI config servers

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] next-server-address in hooks for UEFI config servers

Gokulakrishnan Gopalakrishnan
Hi,
I'm trying to assign IPs to my servers using Kea 1.3.0. Some of my servers are UEFI configured ones and those are failing in getting IP.
When I dig deep, I found out that setting "next-server": "192.168.1.1" manually in kea.conf works fine. I was setting next-server via hooks code (pasted below).

More interesting thing is, this behavior is not observed for non-UEFI configured servers. Am I missing something here?

OptionPtr opt;

// Add next server option to packet.
opt = response->getOption(DHO_HOME_AGENT_ADDRS);
if (opt) {
response->delOption(DHO_HOME_AGENT_ADDRS);
}
opt.reset(new OptionString(Option::V4, DHO_HOME_AGENT_ADDRS, ipaddress_stdstring));
response->addOption(opt);

Thanks,
Gokul


_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] next-server-address in hooks for UEFI config servers

Francis Dupont
Gokulakrishnan Gopalakrishnan writes:
> I'm trying to assign IPs to my servers using Kea 1.3.0. Some of my servers
> are UEFI configured ones and those are failing in getting IP.
> When I dig deep, I found out that setting "next-server": "192.168.1.1"
> manually in kea.conf works fine. I was setting next-server via hooks code
> (pasted below).

=> next-server is a BOOTP/DHCP field, not an option. Note some of these
fields have a corresponding option used for instance when the field
is too small (can't happen with an IPv4 address :-).

> // Add next server option to packet.
> opt = response->getOption(DHO_HOME_AGENT_ADDRS);

=> This option gives a list (vs one) of addresses of the Mobile IP
home agent. So it is something different (but if it makes the client
happy...).

Regards

Francis Dupont <[hidden email]>
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] next-server-address in hooks for UEFI config servers

Gokulakrishnan Gopalakrishnan
Thanks, Francis. If I want to get rid of hardcoding 'next-server' from kea.conf and move it to the hooks library by setting the field dynamically, what it the right way?

On Fri, May 25, 2018 at 4:00 PM, Francis Dupont <[hidden email]> wrote:
Gokulakrishnan Gopalakrishnan writes:
> I'm trying to assign IPs to my servers using Kea 1.3.0. Some of my servers
> are UEFI configured ones and those are failing in getting IP.
> When I dig deep, I found out that setting "next-server": "192.168.1.1"
> manually in kea.conf works fine. I was setting next-server via hooks code
> (pasted below).

=> next-server is a BOOTP/DHCP field, not an option. Note some of these
fields have a corresponding option used for instance when the field
is too small (can't happen with an IPv4 address :-).

> // Add next server option to packet.
> opt = response->getOption(DHO_HOME_AGENT_ADDRS);

=> This option gives a list (vs one) of addresses of the Mobile IP
home agent. So it is something different (but if it makes the client
happy...).

Regards

Francis Dupont <[hidden email]>


_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] next-server-address in hooks for UEFI config servers

Gokulakrishnan Gopalakrishnan
Francis,
Currently, I'm hardcoding 'next-server' in kea.conf. Is it possible to do it via hook code? 

On Fri, May 25, 2018 at 4:23 PM, Gokulakrishnan Gopalakrishnan <[hidden email]> wrote:
Thanks, Francis. If I want to get rid of hardcoding 'next-server' from kea.conf and move it to the hooks library by setting the field dynamically, what it the right way?

On Fri, May 25, 2018 at 4:00 PM, Francis Dupont <[hidden email]> wrote:
Gokulakrishnan Gopalakrishnan writes:
> I'm trying to assign IPs to my servers using Kea 1.3.0. Some of my servers
> are UEFI configured ones and those are failing in getting IP.
> When I dig deep, I found out that setting "next-server": "192.168.1.1"
> manually in kea.conf works fine. I was setting next-server via hooks code
> (pasted below).

=> next-server is a BOOTP/DHCP field, not an option. Note some of these
fields have a corresponding option used for instance when the field
is too small (can't happen with an IPv4 address :-).

> // Add next server option to packet.
> opt = response->getOption(DHO_HOME_AGENT_ADDRS);

=> This option gives a list (vs one) of addresses of the Mobile IP
home agent. So it is something different (but if it makes the client
happy...).

Regards

Francis Dupont <[hidden email]>



_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] next-server-address in hooks for UEFI config servers

Francis Dupont
Gokulakrishnan Gopalakrishnan writes:
> Currently, I'm hardcoding 'next-server' in kea.conf. Is it possible to do
> it via hook code?

=> yes of course. BTW the way to set the next server address field
(aka siaddr) in BOOTP/DHCP packet is the Pkt4 setSiaddr() method.

Regards

Francis Dupont <[hidden email]>
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] next-server-address in hooks for UEFI config servers

Gokulakrishnan Gopalakrishnan
Thanks Francis.

On Wed, May 30, 2018 at 6:41 PM, Francis Dupont <[hidden email]> wrote:
Gokulakrishnan Gopalakrishnan writes:
> Currently, I'm hardcoding 'next-server' in kea.conf. Is it possible to do
> it via hook code?

=> yes of course. BTW the way to set the next server address field
(aka siaddr) in BOOTP/DHCP packet is the Pkt4 setSiaddr() method.

Regards

Francis Dupont <[hidden email]>


_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users