Re: IPv6 autoconf

2017-07-28 Thread Hamza Sheikh
I went through the process of creating an OpenBSD-based gateway for my
home network (IPv4 and IPv6). Learned a lot and documented my setup in
a blog post[0]. Maybe it can help troubleshoot your IPv6 setup. Pay
special attention to these sections: (a) cnmac0; (b) dhcp6c; (c) The
"Wrong" Config.

[0] http://codeghar.com/blog/openbsd-network-gateway-on-edgerouter-lite.html



WAN interface loses IPv6 NA address after pltime/vltime expire

2017-06-23 Thread Hamza Sheikh
When I run dhcp6c in foreground I see that the lease/address is
renewed but it never gets applied to WAN interface (cnmac0).

More information about my setup is documented in blog post[0].

Thanks,
Hamza
Twitter: @aikchar



[0] http://codeghar.com/blog/openbsd-network-gateway-on-edgerouter-lite.html

= ifconfig cnmac0 [after starting dhcp6c] =

$ ifconfig cnmac0
cnmac0: flags=208843 mtu 1500
lladdr REDACTED
index 1 priority 0 llprio 3
groups: egress
media: Ethernet autoselect (1000baseT full-duplex,master)
status: active
inet REDACTED netmask 0xfc00 broadcast REDACTED
inet6 fe80::REDACTED%cnmac0 prefixlen 64 scopeid 0x1
inet6 2001:558:600a:3:bda6:e819:b4d1:c335 prefixlen 128 pltime
3265 vltime 3265

= ifconfig cnmac0 [after pltime expires] =

$ ifconfig cnmac0
cnmac0: flags=208843 mtu 1500
lladdr REDACTED
index 1 priority 0 llprio 3
groups: egress
media: Ethernet autoselect (1000baseT full-duplex,master)
status: active
inet REDACTED netmask 0xfc00 broadcast REDACTED
inet6 fe80::REDACTED%cnmac0 prefixlen 64 scopeid 0x1

= /etc/hostname.cnmac0 =

$ more /etc/hostname.cnmac0
dhcp lladdr REDACTED
up
inet6 autoconf
!/usr/sbin/rcctl restart dhcp6c

= /etc/dhcp6c.conf =

$ more /etc/dhcp6c.conf
interface cnmac0 {
send ia-pd 0;
send ia-na 1;
};

id-assoc na 1 {
};

id-assoc pd 0 {
prefix ::/64 infinity;
prefix-interface vether0 {
sla-id 1;
sla-len 0;
};
};


= # dhcp6c -c /etc/dhcp6c.conf -Df cnmac0 =

# dhcp6c -c /etc/dhcp6c.conf -Df cnmac0
Jun/23/2017 00:26:26: get_duid: extracted an existing DUID from
/var/db/dhcp6c_duid: 00:01:00:01:20:c9:be:ab:44:d9:e7:9e:52:20
Jun/23/2017 00:26:26: dhcp6_ctl_authinit: failed to open
/etc/dhcp6cctlkey: No such file or directory
Jun/23/2017 00:26:26: client6_init: failed initialize control message
authentication
Jun/23/2017 00:26:26: client6_init: skip opening control port
Jun/23/2017 00:26:26: cfdebug_print: <3>[interface] (9)
Jun/23/2017 00:26:26: cfdebug_print: <5>[cnmac0] (6)
Jun/23/2017 00:26:26: cfdebug_print: <3>begin of closure [{] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>[send] (4)
Jun/23/2017 00:26:26: cfdebug_print: <3>[ia-pd] (5)
Jun/23/2017 00:26:26: cfdebug_print: <3>[0] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>end of sentence [;] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>[send] (4)
Jun/23/2017 00:26:26: cfdebug_print: <3>[ia-na] (5)
Jun/23/2017 00:26:26: cfdebug_print: <3>[1] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>end of sentence [;] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>end of closure [}] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>end of sentence [;] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>[id-assoc] (8)
Jun/23/2017 00:26:26: cfdebug_print: <13>[na] (2)
Jun/23/2017 00:26:26: cfdebug_print: <13>[1] (1)
Jun/23/2017 00:26:26: cfdebug_print: <13>begin of closure [{] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>end of closure [}] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>end of sentence [;] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>[id-assoc] (8)
Jun/23/2017 00:26:26: cfdebug_print: <13>[pd] (2)
Jun/23/2017 00:26:26: cfdebug_print: <13>[0] (1)
Jun/23/2017 00:26:26: cfdebug_print: <13>begin of closure [{] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>[prefix-interface] (16)
Jun/23/2017 00:26:26: cfdebug_print: <5>[vether0] (7)
Jun/23/2017 00:26:26: cfdebug_print: <3>begin of closure [{] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>[sla-id] (6)
Jun/23/2017 00:26:26: cfdebug_print: <3>[1] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>end of sentence [;] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>[sla-len] (7)
Jun/23/2017 00:26:26: cfdebug_print: <3>[0] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>end of sentence [;] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>end of closure [}] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>end of sentence [;] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>end of closure [}] (1)
Jun/23/2017 00:26:26: cfdebug_print: <3>end of sentence [;] (1)
Jun/23/2017 00:26:26: configure_pool: called
Jun/23/2017 00:26:26: clear_poolconf: called
Jun/23/2017 00:26:26: dhcp6_reset_timer: reset a timer on cnmac0,
state=INIT, timeo=0, retrans=727
Jun/23/2017 00:26:27: client6_send: a new XID (95e1d5) is generated
Jun/23/2017 00:26:27: copy_option: set client ID (len 14)
Jun/23/2017 00:26:27: copyout_option: set identity association
Jun/23/2017 00:26:27: copy_option: set elapsed time (len 2)
Jun/23/2017 00:26:27: copyout_option: set IA_PD
Jun/23/2017 00:26:27: client6_send: send solicit to ff02::1:2%cnmac0
Jun/23/2017 00:26:27: dhcp6_reset_timer: reset a timer on cnmac0,
state=SOLICIT, timeo=0, retrans=1041
Jun/23/2017 00:26:27: client6_recv: receive advertise from
fe80::d62c:44ff:fe7d:b822%cnmac0 on cnmac0
Jun/23/2017 00:26:27: