dhcp4o6_dhcp6.dox 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
  2. //
  3. // This Source Code Form is subject to the terms of the Mozilla Public
  4. // License, v. 2.0. If a copy of the MPL was not distributed with this
  5. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
  6. /**
  7. @page dhcpv4o6Dhcp6 DHCPv4-over-DHCPv6 DHCPv6 Server Side
  8. Kea supports DHCPv4-over-DHCPv6 using cooperating DHCPv6 and DHCPv4
  9. servers. This section describes the DHCPv6 server side.
  10. @section dhcp6to4Ipc DHCPv6-to-DHCPv4 Inter Process Communication
  11. The @c Dhcp6to4Ipc class is derived from the base @c Dhcp4o6IpcBase as
  12. a singleton class (by the static @ref isc::dhcp::Dhcp6to4Ipc::instance
  13. function). @ref isc::dhcp::Dhcp6to4Ipc::open is called to open IPC
  14. sockets and to register @ref isc::dhcp::Dhcp6to4Ipc::handler on
  15. external sockets on the @c IfaceMgr.
  16. @section dhcp6to4Process DHCPv6-to-DHCPv4 Packet Processing
  17. Following the DHCPv4-over-DHCPv6 packet flow:
  18. - a DHCPv6 DHCPv4-QUERY is received from a DHCPv4-over-DHCPv6 client
  19. (standard incoming DHCPv6 message processing is done until
  20. the message type specific part)
  21. - the isc::dhcp::Dhcpv6Srv::processDhcp4Query method which verifies
  22. a DHCPv4 message option is present and calls the (inherited) @ref
  23. isc::dhcp::Dhcp4o6IpcBase::send method to transmit the DHCPv4-QUERY
  24. with the interface name and remote IPv6 address to the DHCPv4 server
  25. - the DHCPv4 server processes the DHCPv4-QUERY and returns a
  26. DHCPv4-RESPONSE using the IPC
  27. - the interface manager (@c IfaceMgr) using the external socket
  28. mechanism invokes @ref isc::dhcp::Dhcp6to4Ipc::handler
  29. - @ref isc::dhcp::Dhcp6to4Ipc::handler receives the packet by
  30. (inherited) @ref isc::dhcp::Dhcp4o6IpcBase::receive which
  31. decodes and strips the ISC Vendor option. From this point
  32. the code mimics the sending part of standard DHCPv6 packet
  33. processing.
  34. - the callouts registered for "buffer6_send" hook point are called
  35. (@ref dhcpv6HooksBuffer6Send). Note the "pkt6_send" hook is not used
  36. because the matching query packet is not available
  37. - the DHCPv6 DHCPv4-RESPONSE packet is sent back to the IPv6 remote address
  38. @section dhcp6SubnetSelection DHCPv6 Subnet Selection
  39. @todo Move this to libdhcpsrv
  40. Selectors (i.e., members of @c SubnetSelector class) are:
  41. - incoming interface name
  42. - remote address
  43. - first relay link address - undefined or the first relay link address which
  44. is not undefined or link local (i.e., usable)
  45. - interface ID - when a relay message includes an interface ID relay option
  46. - client classes - used to reject a matching rule and try next rules
  47. If the first relay link address is undefined the client is directly connected:
  48. the interface name is matched and if it does not select a subnet the remote
  49. address is matched in a subnet address range.
  50. If the first relay link address is not undefined the query was relayed:
  51. the interface ID is tried and if it does not select a subnet the first
  52. relay address is matched as a subnet relay address.
  53. */