mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-30 05:27:55 +00:00
[4274] Moved subnet selections
This commit is contained in:
parent
867d2d7188
commit
2ab5f9df65
@ -96,6 +96,8 @@
|
||||
* - @subpage allocengine
|
||||
* - @subpage timerManager
|
||||
* - @subpage leaseReclamationRoutine
|
||||
* - @subpage subnetSelect
|
||||
* - @subpage dhcp4o6Ipc
|
||||
* - @subpage libdhcp_ddns
|
||||
* - @subpage dhcpDatabaseBackends
|
||||
* - @subpage dhcpEval
|
||||
|
@ -59,63 +59,4 @@ remote address is set to the query one (which is in fact an IPv6 address).
|
||||
In @ref isc::dhcp::Dhcpv4Srv::acceptDirectRequest @c Pkt4o6 queries are
|
||||
accepted (they are considered as being relayed).
|
||||
|
||||
@section dhcp4SubnetSelect DHCPv4 Subnet Selection
|
||||
|
||||
@todo Move this to libdhcpsrv
|
||||
|
||||
Selectors (i.e., members of @c SubnetSelector class) are:
|
||||
- incoming interface name
|
||||
- gateway address - giaddr field
|
||||
- client address - ciaddr field
|
||||
- local address
|
||||
- remote address
|
||||
- option select - from the first Relay Agent Link Selection suboption or
|
||||
from a Subnet Selection option
|
||||
- client classes - used to reject a matching rule and try next rules
|
||||
|
||||
First use the option select, next if the message was relayed (not undefined
|
||||
gateway address) use the gateway address as a subnet relay address.
|
||||
|
||||
If a subnet was not already selected choose an address between:
|
||||
|
||||
- if the gateway address is not undefined the gateway address
|
||||
- if the client address is not undefined and the local address not the
|
||||
broadcast address (i.e., renew or rebind) the client address
|
||||
- if the remote address is not undefined and the local address not the
|
||||
broadcast address (i.e., renew or rebind) the remote address
|
||||
- at this point try the interface name as a subnet interface
|
||||
- if the interface name does not select a subnet choose the interface address
|
||||
(last resort)
|
||||
|
||||
Match the chosen address in a subnet address range.
|
||||
|
||||
@section dhcp4o6SubnetSelect DHCPv4-over-DHCPv6 Subnet Selection
|
||||
|
||||
@todo Move this to libdhcpsrv
|
||||
|
||||
Selectors (i.e., members of @c SubnetSelector class) are:
|
||||
- incoming interface name
|
||||
- gateway address - giaddr field (should be always undefined)
|
||||
- client address - ciaddr field
|
||||
- local address - set to the interface IPv4 address
|
||||
- remote address - IPv6 address
|
||||
- option select - from a Subnet Selection option
|
||||
- first relay link address - (IPv6) undefined or the first relay link
|
||||
address which is not undefined or link local (i.e., usable)
|
||||
- interface ID - (IPv6) when a relay message includes an interface ID
|
||||
relay option
|
||||
- client classes - used to reject a matching rule and try next rules
|
||||
|
||||
Check if DHCPv4-over-DHCPv6 is enabled for this particulat subnet and
|
||||
continue with the next subnet is if it is not.
|
||||
|
||||
First the remote address is matched in a subnet IPv6 range, second
|
||||
the interface ID if it is set is matched, third the interface name.
|
||||
|
||||
These rules are applied for each subnet configuration so if two
|
||||
subnets match the first one is returned (vs. the first matching rule).
|
||||
|
||||
@todo better DHCPv4-over-DHCPv6 selection, e.g., handle relayed
|
||||
messages and return best (vs first) match.
|
||||
|
||||
*/
|
||||
|
@ -50,24 +50,4 @@ Following the DHCPv4-over-DHCPv6 packet flow:
|
||||
|
||||
- the DHCPv6 DHCPv4-RESPONSE packet is sent back to the IPv6 remote address
|
||||
|
||||
@section dhcp6SubnetSelection DHCPv6 Subnet Selection
|
||||
|
||||
@todo Move this to libdhcpsrv
|
||||
|
||||
Selectors (i.e., members of @c SubnetSelector class) are:
|
||||
- incoming interface name
|
||||
- remote address
|
||||
- first relay link address - undefined or the first relay link address which
|
||||
is not undefined or link local (i.e., usable)
|
||||
- interface ID - when a relay message includes an interface ID relay option
|
||||
- client classes - used to reject a matching rule and try next rules
|
||||
|
||||
If the first relay link address is undefined the client is directly connected:
|
||||
the interface name is matched and if it does not select a subnet the remote
|
||||
address is matched in a subnet address range.
|
||||
|
||||
If the first relay link address is not undefined the query was relayed:
|
||||
the interface ID is tried and if it does not select a subnet the first
|
||||
relay address is matched as a subnet relay address.
|
||||
|
||||
*/
|
||||
|
@ -368,6 +368,84 @@ since expiration elapsed. These methods are executed periodically
|
||||
by the DHCP servers using the dedicated timers registered in the
|
||||
@c isc::dhcp::TimerMgr.
|
||||
|
||||
@section subnetSelect Subnet Selection
|
||||
|
||||
An important service offered by this library is the subnet selection
|
||||
from a query packet.
|
||||
|
||||
@subsection dhcp4SubnetSelect DHCPv4 Subnet Selection
|
||||
|
||||
Selectors (i.e., members of @c SubnetSelector class) are:
|
||||
- incoming interface name
|
||||
- gateway address - giaddr field
|
||||
- client address - ciaddr field
|
||||
- local address
|
||||
- remote address
|
||||
- option select - from the first Relay Agent Link Selection suboption or
|
||||
from a Subnet Selection option
|
||||
- client classes - used to reject a matching rule and try next rules
|
||||
|
||||
First use the option select, next if the message was relayed (not undefined
|
||||
gateway address) use the gateway address as a subnet relay address.
|
||||
|
||||
If a subnet was not already selected choose an address between:
|
||||
|
||||
- if the gateway address is not undefined the gateway address
|
||||
- if the client address is not undefined and the local address not the
|
||||
broadcast address (i.e., renew or rebind) the client address
|
||||
- if the remote address is not undefined and the local address not the
|
||||
broadcast address (i.e., renew or rebind) the remote address
|
||||
- at this point try the interface name as a subnet interface
|
||||
- if the interface name does not select a subnet choose the interface address
|
||||
(last resort)
|
||||
|
||||
Match the chosen address in a subnet address range.
|
||||
|
||||
@subsection dhcp4o6SubnetSelect DHCPv4-over-DHCPv6 Subnet Selection
|
||||
|
||||
Selectors (i.e., members of @c SubnetSelector class) are:
|
||||
- incoming interface name
|
||||
- gateway address - giaddr field (should be always undefined)
|
||||
- client address - ciaddr field
|
||||
- local address - set to the interface IPv4 address
|
||||
- remote address - IPv6 address
|
||||
- option select - from a Subnet Selection option
|
||||
- first relay link address - (IPv6) undefined or the first relay link
|
||||
address which is not undefined or link local (i.e., usable)
|
||||
- interface ID - (IPv6) when a relay message includes an interface ID
|
||||
relay option
|
||||
- client classes - used to reject a matching rule and try next rules
|
||||
|
||||
Check if DHCPv4-over-DHCPv6 is enabled for this particular subnet and
|
||||
continue with the next subnet is if it is not.
|
||||
|
||||
First the remote address is matched in a subnet IPv6 range, second
|
||||
the interface ID if it is set is matched, third the interface name.
|
||||
|
||||
These rules are applied for each subnet configuration so if two
|
||||
subnets match the first one is returned (vs. the first matching rule).
|
||||
|
||||
@todo better DHCPv4-over-DHCPv6 selection, e.g., handle relayed
|
||||
messages and return best (vs first) match.
|
||||
|
||||
@subsection dhcp6SubnetSelection DHCPv6 Subnet Selection
|
||||
|
||||
Selectors (i.e., members of @c SubnetSelector class) are:
|
||||
- incoming interface name
|
||||
- remote address
|
||||
- first relay link address - undefined or the first relay link address which
|
||||
is not undefined or link local (i.e., usable)
|
||||
- interface ID - when a relay message includes an interface ID relay option
|
||||
- client classes - used to reject a matching rule and try next rules
|
||||
|
||||
If the first relay link address is undefined the client is directly connected:
|
||||
the interface name is matched and if it does not select a subnet the remote
|
||||
address is matched in a subnet address range.
|
||||
|
||||
If the first relay link address is not undefined the query was relayed:
|
||||
the interface ID is tried and if it does not select a subnet the first
|
||||
relay address is matched as a subnet relay address.
|
||||
|
||||
@section dhcp4o6Ipc DHCPv4-over-DHCPv6 Inter Process Communication
|
||||
|
||||
DHCPv4-over-DHCPv6 support is implemented using cooperating
|
||||
|
Loading…
x
Reference in New Issue
Block a user