openwrt / odhcpd

This repository is a mirror of https://git.openwrt.org/?p=project/odhcpd.git. Pull requests will be accepted which will be merged in odhcpd.git
GNU General Public License v2.0
162 stars 98 forks source link

DHCPv6 over PPPoE, old address on clients cant be invalidated due to timeout #104

Open fcicq opened 7 years ago

fcicq commented 7 years ago

82 & #83 seems to be related.

my ISP disconnects PPPoE connection once every one or two days to recycle IPv4 address. but on every reconnect, dhcpv6 cant get keep the original IP address (range). clients behind the router without the default route changes would no longer be able to use IPv6.

any suggestions?

dedeckeh commented 7 years ago

The odhcpd package is now maintained at https://git.lede-project.org/project/odhcpd.git; in commit https://git.lede-project.org/?p=project/odhcpd.git;a=commit;h=3495f179bd901d6d232e0dbf35444ebe483fdfd9 the uci parameter ra_useleasetime has been added which allows to use the configured leasetime as preferred and valid prefix lifetimes in the RA messages. This allows to limit the actual lifetime of prefixes as by default it's based on the preferred and valid lifetime of the IPv6 addresses present on the interface.

fcicq commented 7 years ago

I have upgraded to lede-17.01 git master and found odhcpd has been upgraded to 2017-03-29 that includes your patch. but I think PPPoE link directly assigns IPv4 address to the wan interface, Am I right? so bind the lease time to dhcpv4 leasetime does not affect my situation?

AndreBL commented 7 years ago

New comment on #82.

fcicq commented 7 years ago

@dedeckeh I changed my mind after another review. thanks for your patch to limit preferred_lft, so issue #83 seems to be resolved by uci set dhcp.lan.ra_useleasetime='1'

I think my issue can be thought as resolved if the source address selection is minimum preferred_lft or "later received address win" based. if not, we have to force the invalidation steps.

XiaoliChan commented 1 year ago

It's 2022, any way of solution? this issues is still here. image

dhcp config

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'
        option force '1'
        option ra_maxinterval '20'
        option ra_mininterval '7'
        option ra_lifetime '60'
        option ra 'server'
        option ra_default '1'
        option preferred_lifetime '1m'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'