auto assign ipv6 for more than /64 prefix, subnet for /112 #164

youxiaojie1979發表於2020-12-13

auto assign for more than /64 prefix, subnet for /112 #164

youxiaojie opened this issue 19 days ago · 4 comments

Comments

 

youxiaojie commented 19 days ago

can odhcpd can assign a /112 ipv6 for clients? I get /64 from isp, so I can only divided /64 to subnets. therefore slaac is missing.what I hope is to use dhcpv6 to assign ipv6 automaticly. how to do it? is it feasible?(I noticed it can only assign /64 ipv6, or something I have wrong?)

 

 

Contributor

icpz commented yesterday

odhcpd does not support a prefix > 64.

Is your /64 from isp IPv6-PD or SLAAC-ed address?

If it's IPv6-PD, then is ok for odhcpd to function for just one subnet. Or if it's address via SLAAC, you may need relay mode (see here for detail).

 

 

Author

youxiaojie commented 1 hour ago

 

dhcp dp is easy, the br-lan will got it automatically, and the system will add route to the pd-prefix.
pppoe is ok with dhcp pd.

and I tried different school lan, most is lan-like,
1.give me /112 (residential lan,write down on paper), so I must subdivided to /120 and set each ipv6 on pc manually, the route item will add by system automatic and ping6 is ok because of /120 is subnet of /112, the route is ok to my pc. (I want to ask for dhcp v6 is there some ip pool like ipv4 auto assigned to users),and I can also cascade layer3 router.(eg, in rented house)

  1. another give me a fixed ipv6 /64 (campus lan, I don't konw whether it is slaac, some pppoe does so), in this situation, relay maybe ok.(is this the same theory to #sysctl net.ipv6.conf.all.proxy_ndp=1 #ip neigh add proxy ... but automaticlly? ) is the way only permit one openwrt? (one broadcast area not permit cascade router? if want to expand client, we must use layer2 switch/hub?

3.the worst give me a /128 ipv6(802.1x, definitely dhcpv6), in this one, must we use NAT like ipv4? I think so.

so every professor, could you help to analyze this 3-situation? thanks.

 

 

Contributor

icpz commented 38 minutes ago

1.give me /112 ... (I want to ask for dhcp v6 is there some ip pool like ipv4 auto assigned to users),and I can also cascade layer3 router.(eg, in rented house)

It's ok in theory, but odhcpd doesn't support it, though. You may try wide-dhcpv6.


2.another give me a fixed ipv6 /64 (campus lan, I don't konw whether it is slaac, some pppoe does so), in this situation, relay maybe ok.

FYI, relay mode may not work in some misconfigured environment. E.g. the upstream won't send NS to WAN before delivering the packet, in which case relay mode won't function (this article might be helpful in such case).

(is this the same theory to #sysctl net.ipv6.conf.all.proxy_ndp=1 #ip neigh add proxy ... but automaticlly? )

Yes, relay mode does this automatically. You may check src/ndp.c for implementation detail.

is the way only permit one openwrt? (one broadcast area not permit cascade router? if want to expand client, we must use layer2 switch/hub?

If the relay mode works for you, then you can setup the cascade routes all in relay mode in theory.


3.the worst give me a /128 ipv6(802.1x, definitely dhcpv6), in this one, must we use NAT like ipv4? I think so.

Yes, you're right.

 

 

Author

youxiaojie commented 12 minutes ago

 

Thanks very much!!! before I only noticed on luci interface, now I can edit configure file to get more function than luci interface.
1.can I use wide-dhcpv6 in openwrt? does it conflict with odhcpd? If /64 pd is available all is simple and odhcpd in charge of ipv6 assignment.if no /64prefix, using wide-dhcpv6 for v6 assignment, therefore I can use this one route in first two situation.

2.does the odhcpd contain the function of ndppd/dnp6 and radvd, and specifically for openwrt(It seems that the repo of openwrt has ndppd/dnp6 and radvd)? in linux pc with muli-ethercard, can we only used ndppd/dnp6 and radvd which no maintance for a long time?

相關文章