insomniacslk / dhcp

DHCPv6 and DHCPv4 packet library, client and server written in Go
BSD 3-Clause "New" or "Revised" License
710 stars 169 forks source link

dhcpv6 mask and gateway #527

Closed sprootik closed 6 months ago

sprootik commented 6 months ago

Hello. I can’t understand how to transfer the mask and gateway for v6. If I understand correctly, you can only pass the address /128.

pmazzini commented 6 months ago

That information is passed via the Router Advertisement.

sprootik commented 6 months ago

That information is passed via the Router Advertisement.

Thanks. I used WithIANA modifier for func NewAdvertiseFromSolicit or NewRequestFromAdvertise. But WithIANA have only net.IP. I don't understand how to pass the prefix length and gateway. Could you give me some advice?

hugelgupf commented 6 months ago

router advertisements are not part of DHCPv6. The config is supposed to come via NDP router advertisements.