#19348: odhcpd does not recognize wan6 in /etc/config/dhcp
----------------------+------------------------
 Reporter:  risa2000  |      Owner:  developers
     Type:  defect    |     Status:  new
 Priority:  normal    |  Milestone:
Component:  packages  |    Version:  Trunk
 Keywords:  odhcpd    |
----------------------+------------------------
 I am running r45073 on ar71xx (TL-WR1043NDv2) with native IPv6
 connectivity. My ISP modem provides ::/64 subnet to my router on eth0. The
 excerpt of the network configuration:

 /etc/config/network
 {{{
 config interface        lan
         option ifname   eth1
         option type     bridge
         option proto    static
         option ipaddr   192.168.6.10
         option netmask  255.255.255.0
         option ip6addr  2a01:x:y:z::6/64

 config interface        wan
         option ifname   eth0
         option proto    dhcp

 config interface        wan6
         option ifname   eth0
         option proto    dhcpv6
 }}}

 /etc/config/dhcp
 {{{
 config dhcp lan
 option interface lan
 option start 100
 option limit 150
 option leasetime 12h
 list dhcp_option vendor:MSFT,1,2i
 list dhcp_option vendor:MSFT,2,1i
 list dhcp_option option:ntp-server,0.0.0.0
 list dhcp_option 252,"\n"
 option ra server
 option ndp relay

 config dhcp wan6
 option interface wan6
 option master 1
 option ndp relay

 config odhcpd odhcpd
 option maindhcp 0
 option leasefile /tmp/hosts/odhcpd
 option leasetrigger /usr/sbin/odhcpd-update
 }}}

 This sets up correctly the IPv6 addresses and routing
 {{{
 root@risa-wrt:~# ip -6 addr
 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536
     inet6 ::1/128 scope host
        valid_lft forever preferred_lft forever
 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
     inet6 2a01:x:y:z:12fe:edff:fee6:5da9/64 scope global dynamic
        valid_lft 86353sec preferred_lft 86353sec
     inet6 fe80::12fe:edff:fee6:5da9/64 scope link
        valid_lft forever preferred_lft forever
 5: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
     inet6 2a01:x:y:z:12fe:edff:fee6:5da9/64 scope global dynamic
        valid_lft 86353sec preferred_lft 86353sec
     inet6 2a01:x:y:z::6/64 scope global
        valid_lft forever preferred_lft forever
     inet6 fe80::12fe:edff:fee6:5da8/64 scope link
        valid_lft forever preferred_lft forever
 6: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
     inet6 fe80::12fe:edff:fee6:5da8/64 scope link
        valid_lft forever preferred_lft forever

 root@risa-wrt:~# ip -6 route
 default from :: via fe80::207:cbff:fe96:d1de dev eth0  proto static
 metric 512
 default from 2a01:x:y:z::/64 via fe80::207:cbff:fe96:d1de dev eth0  proto
 static  metric 512
 2a01:x:y:z::6 dev br-lan  proto static  metric 1024
 2a01:x:y:z:12fe:edff:fee6:5da9 dev br-lan  proto static  metric 1024
 2a01:x:y:z:c71b:460e:f24a:4947 dev br-lan  proto static  metric 1024
 2a01:x:y:z:f186:cc8f:ab48:12d3 dev br-lan  proto static  metric 1024
 2a01:x:y:z::/64 dev eth0  proto static  metric 256
 2a01:x:y:z::/64 dev br-lan  proto kernel  metric 256  expires 86348sec
 fe80::/64 dev br-lan  proto kernel  metric 256
 fe80::/64 dev eth0  proto kernel  metric 256
 fe80::/64 dev wlan0  proto kernel  metric 256
 }}}

 Outbound IPv6 connection works ok, but forwarding does not. When running
 tcpdump on both wan (eth0) and lan (eth1) interfaces while pinging
 www.google.com from the host on the lan I got:
 {{{
 root@risa-wrt:~# tcpdump -i eth0 -f icmp6
 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
 listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
 10:38:54.066935 IP6 2a01:x:y:z:c71b:460e:f24a:4947 > de-in-x6a.1e100.net:
 ICMP6, echo request, seq 1, length 64
 10:38:54.116098 IP6 fe80::207:cbff:fe96:d1de > ff02::1:ff4a:4947: ICMP6,
 neighbor solicitation, who has 2a01:x:y:z:c71b:460e:f24a:4947, length 32
 10:38:54.116633 IP6 2a01:x:y:z:12fe:edff:fee6:5da9 > ff02::1:ff4a:4947:
 ICMP6, neighbor solicitation, who has 2a01:x:y:z:c71b:460e:f24a:4947,
 length 32
 10:38:55.074283 IP6 2a01:x:y:z:c71b:460e:f24a:4947 > de-in-x6a.1e100.net:
 ICMP6, echo request, seq 2, length 64
 10:38:55.113697 IP6 2a01:x:y:z:12fe:edff:fee6:5da9 > ff02::1:ff4a:4947:
 ICMP6, neighbor solicitation, who has 2a01:x:y:z:c71b:460e:f24a:4947,
 length 32
 10:38:55.116053 IP6 fe80::207:cbff:fe96:d1de > ff02::1:ff4a:4947: ICMP6,
 neighbor solicitation, who has 2a01:x:y:z:c71b:460e:f24a:4947, length 32
 10:38:56.076025 IP6 2a01:x:y:z:c71b:460e:f24a:4947 > de-in-x6a.1e100.net:
 ICMP6, echo request, seq 3, length 64
 10:38:56.113675 IP6 2a01:x:y:z:12fe:edff:fee6:5da9 > ff02::1:ff4a:4947:
 ICMP6, neighbor solicitation, who has 2a01:x:y:z:c71b:460e:f24a:4947,
 length 32
 10:38:56.116060 IP6 fe80::207:cbff:fe96:d1de > ff02::1:ff4a:4947: ICMP6,
 neighbor solicitation, who has 2a01:x:y:z:c71b:460e:f24a:4947, length 32
 10:38:57.076553 IP6 2a01:x:y:z:c71b:460e:f24a:4947 > de-in-x6a.1e100.net:
 ICMP6, echo request, seq 4, length 64

 root@risa-wrt:~# tcpdump -i eth1 -f icmp6
 tcpdump: WARNING: eth1: no IPv4 address assigned
 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
 listening on eth1, link-type EN10MB (Ethernet), capture size 65535 bytes
 10:39:35.833417 IP6 2a01:x:y:z:c71b:460e:f24a:4947 > de-in-x6a.1e100.net:
 ICMP6, echo request, seq 1, length 64
 10:39:35.885295 IP6 2a01:x:y:z:12fe:edff:fee6:5da9 >
 2a01:x:y:z:c71b:460e:f24a:4947: ICMP6, echo request, seq 0, length 8
 10:39:35.885869 IP6 2a01:x:y:z:c71b:460e:f24a:4947 >
 2a01:x:y:z:12fe:edff:fee6:5da9: ICMP6, echo reply, seq 0, length 8
 10:39:36.843367 IP6 2a01:x:y:z:c71b:460e:f24a:4947 > de-in-x6a.1e100.net:
 ICMP6, echo request, seq 2, length 64
 10:39:36.884868 IP6 2a01:x:y:z:12fe:edff:fee6:5da9 >
 2a01:x:y:z:c71b:460e:f24a:4947: ICMP6, echo request, seq 0, length 8
 10:39:36.885437 IP6 2a01:x:y:z:c71b:460e:f24a:4947 >
 2a01:x:y:z:12fe:edff:fee6:5da9: ICMP6, echo reply, seq 0, length 8
 10:39:37.843591 IP6 2a01:x:y:z:c71b:460e:f24a:4947 > de-in-x6a.1e100.net:
 ICMP6, echo request, seq 3, length 64
 10:39:37.884981 IP6 2a01:x:y:z:12fe:edff:fee6:5da9 >
 2a01:x:y:z:c71b:460e:f24a:4947: ICMP6, echo request, seq 0, length 8
 10:39:37.885656 IP6 2a01:x:y:z:c71b:460e:f24a:4947 >
 2a01:x:y:z:12fe:edff:fee6:5da9: ICMP6, echo reply, seq 0, length 8
 }}}

 If I change /etc/config/dhcp in this way (i.e. configuring odhcpd for wan
 instead of wan6)
 {{{
 config dhcp wan
 option interface wan
 option master 1
 option ndp relay
 }}}
 the ICMPv6 seems to be correctly propagated and forwarding works ok.

--
Ticket URL: <https://dev.openwrt.org/ticket/19348>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to