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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,AUTOCONF6> mtu 1500
        lladdr REDACTED
        index 1 priority 0 llprio 3
        groups: egress
        media: Ethernet autoselect (1000baseT full-duplex,master)
        status: active
        inet REDACTED netmask 0xfffffc00 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,AUTOCONF6> mtu 1500
        lladdr REDACTED
        index 1 priority 0 llprio 3
        groups: egress
        media: Ethernet autoselect (1000baseT full-duplex,master)
        status: active
        inet REDACTED netmask 0xfffffc00 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: dhcp6_get_options: get DHCP option client ID, len 14
Jun/23/2017 00:26:27:   DUID: 00:01:00:01:20:c9:be:ab:44:d9:e7:9e:52:20
Jun/23/2017 00:26:27: dhcp6_get_options: get DHCP option server ID, len 14
Jun/23/2017 00:26:27:   DUID: 00:01:00:01:17:32:3d:31:14:fe:b5:d5:ab:9e
Jun/23/2017 00:26:27: dhcp6_get_options: get DHCP option identity
association, len 40
[111/231]
Jun/23/2017 00:26:27:   IA_NA: ID=1, T1=2071, T2=3314
Jun/23/2017 00:26:27: copyin_option: get DHCP option IA address, len 24
Jun/23/2017 00:26:27: copyin_option:   IA_NA address:
2001:558:600a:3:bda6:e819:b4d1:c335 pltime=4143 vltime=4143
Jun/23/2017 00:26:27: dhcp6_get_options: get DHCP option IA_PD, len 41
Jun/23/2017 00:26:27:   IA_PD: ID=0, T1=2071, T2=3314
Jun/23/2017 00:26:27: copyin_option: get DHCP option IA_PD prefix, len 25
Jun/23/2017 00:26:27: copyin_option:   IA_PD prefix:
2601:600:967f:f12c::/64 pltime=4143 vltime=4143
Jun/23/2017 00:26:27: client6_recvadvert: server ID:
00:01:00:01:17:32:3d:31:14:fe:b5:d5:ab:9e, pref=-1
Jun/23/2017 00:26:27: client6_recvadvert: reset timer for cnmac0 to 0.914935
Jun/23/2017 00:26:28: select_server: picked a server (ID:
00:01:00:01:17:32:3d:31:14:fe:b5:d5:ab:9e)
Jun/23/2017 00:26:28: client6_send: a new XID (252952) is generated
Jun/23/2017 00:26:28: copy_option: set client ID (len 14)
Jun/23/2017 00:26:28: copy_option: set server ID (len 14)
Jun/23/2017 00:26:28: copyout_option: set IA address
Jun/23/2017 00:26:28: copyout_option: set identity association
Jun/23/2017 00:26:28: copy_option: set elapsed time (len 2)
Jun/23/2017 00:26:28: copyout_option: set IA_PD prefix
Jun/23/2017 00:26:28: copyout_option: set IA_PD
Jun/23/2017 00:26:28: client6_send: send request to ff02::1:2%cnmac0
Jun/23/2017 00:26:28: dhcp6_reset_timer: reset a timer on cnmac0,
state=REQUEST, timeo=0, retrans=907
Jun/23/2017 00:26:28: client6_recv: receive reply from
fe80::d62c:44ff:fe7d:b822%cnmac0 on cnmac0
Jun/23/2017 00:26:28: dhcp6_get_options: get DHCP option client ID, len 14
Jun/23/2017 00:26:28:   DUID: 00:01:00:01:20:c9:be:ab:44:d9:e7:9e:52:20
Jun/23/2017 00:26:28: dhcp6_get_options: get DHCP option server ID, len 14
Jun/23/2017 00:26:28:   DUID: 00:01:00:01:17:32:3d:31:14:fe:b5:d5:ab:9e
Jun/23/2017 00:26:28: dhcp6_get_options: get DHCP option identity
association, len 40
Jun/23/2017 00:26:28:   IA_NA: ID=1, T1=2071, T2=3313
Jun/23/2017 00:26:28: copyin_option: get DHCP option IA address, len 24
Jun/23/2017 00:26:28: copyin_option:   IA_NA address:
2001:558:600a:3:bda6:e819:b4d1:c335 pltime=4142 vltime=4142
Jun/23/2017 00:26:28: dhcp6_get_options: get DHCP option IA_PD, len 41
Jun/23/2017 00:26:28:   IA_PD: ID=0, T1=2071, T2=3313
Jun/23/2017 00:26:28: copyin_option: get DHCP option IA_PD prefix, len
25
[79/231]
Jun/23/2017 00:26:28: copyin_option:   IA_PD prefix:
2601:600:967f:f12c::/64 pltime=4142 vltime=4142
Jun/23/2017 00:26:28: get_ia: make an IA: PD-0
Jun/23/2017 00:26:28: update_prefix: create a prefix
2601:600:967f:f12c::/64 pltime=4142, vltime=4142
Jun/23/2017 00:26:28: ifaddrconf: add an address
2601:600:967f:f12c:fce1:baff:fed0:5c85/64 on vether0
Jun/23/2017 00:26:28: get_ia: make an IA: NA-1
Jun/23/2017 00:26:28: update_address: create an address
2001:558:600a:3:bda6:e819:b4d1:c335 pltime=4142, vltime=4142
Jun/23/2017 00:26:28: ifaddrconf: add an address
2001:558:600a:3:bda6:e819:b4d1:c335/128 on cnmac0
Jun/23/2017 00:26:28: dhcp6_remove_event: removing an event on cnmac0,
state=REQUEST
Jun/23/2017 00:26:28: dhcp6_remove_event: removing server (ID:
00:01:00:01:17:32:3d:31:14:fe:b5:d5:ab:9e)
Jun/23/2017 00:26:28: client6_recvreply: got an expected reply, sleeping.











Jun/23/2017 01:00:59: ia_timo: IA timeout for NA-1, state=ACTIVE
Jun/23/2017 01:00:59: dhcp6_reset_timer: reset a timer on cnmac0,
state=RENEW, timeo=0, retrans=9972
Jun/23/2017 01:00:59: client6_send: a new XID (cdad91) is generated
Jun/23/2017 01:00:59: copy_option: set client ID (len 14)
Jun/23/2017 01:00:59: copy_option: set server ID (len 14)
Jun/23/2017 01:00:59: copyout_option: set IA address
Jun/23/2017 01:00:59: copyout_option: set identity association
Jun/23/2017 01:00:59: copy_option: set elapsed time (len 2)
Jun/23/2017 01:00:59: client6_send: send renew to ff02::1:2%cnmac0
Jun/23/2017 01:00:59: ia_timo: IA timeout for PD-0, state=ACTIVE
Jun/23/2017 01:00:59: dhcp6_reset_timer: reset a timer on cnmac0,
state=RENEW, timeo=0, retrans=10845
[47/231]
Jun/23/2017 01:00:59: client6_send: a new XID (4e9813) is generated
Jun/23/2017 01:00:59: copy_option: set client ID (len 14)
Jun/23/2017 01:00:59: copy_option: set server ID (len 14)
Jun/23/2017 01:00:59: copy_option: set elapsed time (len 2)
Jun/23/2017 01:00:59: copyout_option: set IA_PD prefix
Jun/23/2017 01:00:59: copyout_option: set IA_PD
Jun/23/2017 01:00:59: client6_send: send renew to ff02::1:2%cnmac0
Jun/23/2017 01:00:59: client6_recv: receive reply from
fe80::d62c:44ff:fe7d:b822%cnmac0 on cnmac0
Jun/23/2017 01:00:59: dhcp6_get_options: get DHCP option client ID, len 14
Jun/23/2017 01:00:59:   DUID: 00:01:00:01:20:c9:be:ab:44:d9:e7:9e:52:20
Jun/23/2017 01:00:59: dhcp6_get_options: get DHCP option server ID, len 14
Jun/23/2017 01:00:59:   DUID: 00:01:00:01:17:32:3d:31:14:fe:b5:d5:ab:9e
Jun/23/2017 01:00:59: dhcp6_get_options: get DHCP option identity
association, len 40
Jun/23/2017 01:00:59:   IA_NA: ID=1, T1=3600, T2=5760
Jun/23/2017 01:00:59: copyin_option: get DHCP option IA address, len 24
Jun/23/2017 01:00:59: copyin_option:   IA_NA address:
2001:558:600a:3:bda6:e819:b4d1:c335 pltime=7200 vltime=7200
Jun/23/2017 01:00:59: get_ia: update an IA: NA-1
Jun/23/2017 01:00:59: update_address: update an address
2001:558:600a:3:bda6:e819:b4d1:c335 pltime=7200, vltime=7200
Jun/23/2017 01:00:59: dhcp6_remove_event: removing an event on cnmac0,
state=RENEW
Jun/23/2017 01:00:59: client6_recvreply: got an expected reply, sleeping.
Jun/23/2017 01:00:59: client6_recv: receive reply from
fe80::d62c:44ff:fe7d:b822%cnmac0 on cnmac0
Jun/23/2017 01:00:59: dhcp6_get_options: get DHCP option client ID, len 14
Jun/23/2017 01:00:59:   DUID: 00:01:00:01:20:c9:be:ab:44:d9:e7:9e:52:20
Jun/23/2017 01:00:59: dhcp6_get_options: get DHCP option server ID, len 14
Jun/23/2017 01:00:59:   DUID: 00:01:00:01:17:32:3d:31:14:fe:b5:d5:ab:9e
Jun/23/2017 01:00:59: dhcp6_get_options: get DHCP option IA_PD, len 41
Jun/23/2017 01:00:59:   IA_PD: ID=0, T1=3600, T2=5760
Jun/23/2017 01:00:59: copyin_option: get DHCP option IA_PD prefix, len 25
Jun/23/2017 01:00:59: copyin_option:   IA_PD prefix:
2601:600:967f:f12c::/64 pltime=7200 vltime=7200
Jun/23/2017 01:00:59: get_ia: update an IA: PD-0
Jun/23/2017 01:00:59: update_prefix: update a prefix
2601:600:967f:f12c::/64 pltime=7200, vltime=7200
Jun/23/2017 01:00:59: dhcp6_remove_event: removing an event on cnmac0,
state=RENEW
[15/231]
Jun/23/2017 01:00:59: client6_recvreply: got an expected reply, sleeping.

Reply via email to