Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ipv4 addr plus port #63

Open
wants to merge 56 commits into
base: master
Choose a base branch
from

Conversation

razvan-becheriu
Copy link
Contributor

No description provided.

@razvan-becheriu
Copy link
Contributor Author

Hi,

I have merged all the changes related to ipv4 address plus port allocation and manually tested the feature.

You can start looking over the implementation.

To test the implementation, just define a custom option in the dhclient config:

option v4-portparams code 159 = integer 32;

send v4-portparams 262144;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
netbios-name-servers, netbios-scope, interface-mtu,
ntp-servers, v4-portparams;

Because there is no standard dhclient which requests for address plus port, I have hard-coded here the option value to be 262144 which means offset is set to 0, psid len is 4 and the actual psid is 0 (first address)

The feature currently works with the standard ipv4 client but it should be used with dhcpv4o6 client version as this feature is related to rfc7341 (DHCPv4-over-DHCPv6 (DHCP 4o6) Transport)
Please read rfc7618.

As for the server configuration, I have added 3 options for the 4o6 subnet definition:
v4-psid-offset: the offset used to calculate the port from the portparams option
v4-psid-len: the length of the psid field used to calculate the port from the portparams option
v4-excluded-psids: the excluded psid which are reserved and will not be assigned by the server

Any of these options will enable the subnet as a 4o6 subnet.
eg:

"subnet4": [
{ "subnet": "192.0.2.0/24",
"pools": [ { "pool": "192.0.2.1 - 192.0.2.200" } ],
"v4-psid-offset": 0,
"v4-psid-len": 4,
"4o6-interface": "ens4",
"v4-excluded-psids": [ 1, 5 ,7 ],
"4o6-subnet": "3001:db8:1::/64"
}
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants