Henning Schild
2014-04-07 18:12:08 UTC
Hi,
i set up an openwrt router a few days ago. My provider offers native
IPv6 and v4 is available via a dslite tunnel. I ran into trouble
setting it up according to the available documentation and decided to
get a trunk image first. Now my router runs a trunk image with version
(Bleeding Edge, r40383).
Still i could not figure out how to get the dslite tunnel to work so i
started digging through the code. Eventually i patched the dslite
script to get my setup to work. Now i would like to find out whether my
configuration is wrong or whether a patch is necessary.
on the "wan" interface. "wan6" gets the prefix via dhcpv6 and i assign
a /64 to my "lan".
Now dslite.sh will find "wan6" to be the wanif using network_find_wan6.
And later it will use network_get_ipaddr6 to try to get its ip6addr.
But wan6 does not actually have an ip6addr
setting it as tunlink did not work and does not seem to make sense
anyways.
The solution was to use the ip6addr from "lan" and not set tunlink or
set it to wan6. But since my v6 prefix is dynamic that can not be done
with the current dslite.sh.
So as a workaround i added
the prefix range it got via dhcp. But i did not find a way to assign
one. The second option would be to tell wan4 to use the ip6addr from
lan directly in the configuration. Is there a way to express
"network_get_ipaddr6 ip6addr lan" in the configuration file?
regards,
Henning
i set up an openwrt router a few days ago. My provider offers native
IPv6 and v4 is available via a dslite tunnel. I ran into trouble
setting it up according to the available documentation and decided to
get a trunk image first. Now my router runs a trunk image with version
(Bleeding Edge, r40383).
Still i could not figure out how to get the dslite tunnel to work so i
started digging through the code. Eventually i patched the dslite
script to get my setup to work. Now i would like to find out whether my
configuration is wrong or whether a patch is necessary.
config interface 'lan'
option ifname 'eth0.1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '64'
option ip6hint 'ab'
config interface 'wan'
option ifname 'eth1.40'
option proto 'pppoe'
option username 'XXXX'
option password 'XXXX'
option ipv6 '1'
config interface 'wan6'
option proto 'dhcpv6'
config interface 'wan4'
option proto 'dslite'
option peeraddr '2001:XXXX'
I am getting a /56 prefix from my provider. The pppoe runs in vlan 40option ifname 'eth0.1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '64'
option ip6hint 'ab'
config interface 'wan'
option ifname 'eth1.40'
option proto 'pppoe'
option username 'XXXX'
option password 'XXXX'
option ipv6 '1'
config interface 'wan6'
option proto 'dhcpv6'
config interface 'wan4'
option proto 'dslite'
option peeraddr '2001:XXXX'
on the "wan" interface. "wan6" gets the prefix via dhcpv6 and i assign
a /64 to my "lan".
Now dslite.sh will find "wan6" to be the wanif using network_find_wan6.
And later it will use network_get_ipaddr6 to try to get its ip6addr.
But wan6 does not actually have an ip6addr
# network_find_wan6 wanif && echo $wanif
wan6
# network_get_ipaddr6 ip6addr "wan6" && echo $ip6addr
The only interface that actually has a global IPv6 address is "lan" butwan6
# network_get_ipaddr6 ip6addr "wan6" && echo $ip6addr
setting it as tunlink did not work and does not seem to make sense
anyways.
The solution was to use the ip6addr from "lan" and not set tunlink or
set it to wan6. But since my v6 prefix is dynamic that can not be done
with the current dslite.sh.
So as a workaround i added
network_get_ipaddr6 ip6addr lan
just above the[ -z "$ip6addr" ] && {
...
I guess what i really want is that wan6 actually has an ip6addr from...
the prefix range it got via dhcp. But i did not find a way to assign
one. The second option would be to tell wan4 to use the ip6addr from
lan directly in the configuration. Is there a way to express
"network_get_ipaddr6 ip6addr lan" in the configuration file?
regards,
Henning