Skip to content

udhcpc hooks for ENI IPv6 & secondary IPv4

Created by: tomalok

Automatically sets up any IPv6 and secondary IPv4 on instance ENIs when DHCP leases are bound or renewed on that interface.

Resolves #70 (closed)

Freshly instantiated instance...

~ % ssh -i AWS/tomalok.pem alpine@2600:1f13:224:d501:c953:a14a:7b8:3909
Warning: Permanently added '2600:1f13:224:d501:c953:a14a:7b8:3909' (ECDSA) to the list of known hosts.
Welcome to Alpine!

The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See <http://wiki.alpinelinux.org/>.

You can setup the system with the command: setup-alpine

You may change this message by editing /etc/motd.

alpine@ip-172-30-30-85:~$ cat /var/log/messages
Aug 30 02:00:58 localhost syslog.info syslogd started: BusyBox v1.32.0
Aug 30 02:00:58 localhost daemon.info init: starting pid 2346, tty '': '/sbin/openrc default'
Aug 30 02:00:59 localhost daemon.notice udhcpc/post-bound[2406]: eth0 add 2600:1f13:224:d501:c953:a14a:7b8:3909 - success
Aug 30 02:01:00 localhost daemon.info chronyd[2517]: chronyd version 3.5.1 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP -SCFILTER +SIGND +ASYNCDNS -SECHASH +IPV6 -DEBUG)
Aug 30 02:01:00 localhost daemon.warn chronyd[2517]: Could not read valid frequency and skew from driftfile /var/lib/chrony/chrony.drift
Aug 30 02:01:05 localhost daemon.info chronyd[2517]: System's initial offset : 0.428769 seconds slow of true (slew)
Aug 30 02:01:07 localhost auth.info sshd[2551]: Server listening on 0.0.0.0 port 22.
Aug 30 02:01:07 localhost auth.info sshd[2551]: Server listening on :: port 22.
Aug 30 02:01:07 localhost user.info : password for 'root' changed
Aug 30 02:01:07 localhost user.info : password for 'alpine' changed
Aug 30 02:01:08 localhost daemon.info init: starting pid 2632, tty '/dev/ttyS0': '/sbin/getty -L ttyS0 115200 vt100'
Aug 30 02:01:11 localhost daemon.info chronyd[2517]: Selected source 169.254.169.123
Aug 30 02:03:32 localhost auth.info sshd[2638]: Accepted publickey for alpine from 2601:602:8f80:75b9:a567:6cb7:c10e:41bb port 57388 ssh2: RSA SHA256:NXpuX150N2HDjZ8bBv9UnjC1gi52KLrvtSyLiHqW8FA

alpine@ip-172-30-30-85:~$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 02:5e:2d:89:26:ed brd ff:ff:ff:ff:ff:ff
    inet 172.30.30.85/20 brd 172.30.31.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 2600:1f13:224:d501:c953:a14a:7b8:3909/128 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::5e:2dff:fe89:26ed/64 scope link
       valid_lft forever preferred_lft forever

Merge request reports