1 of 11

router7

Michael Stapelberg�2018-08-30, GopherCon

2 of 11

Background

  • fiber7 is a Swiss ISP�→ 1 Gbps symmetrical, unlimited�→ native IPv4+IPv6�→ net neutral�→ good peerings, good caches�
  • free choice of router�→ they even sell the Turris Omnia!

3 of 11

Motivation

  • May 2018: an odhcp6c update breaks my IPv6�→ fiber7 can’t debug; in the middle of a DHCP revamp�→ author doesn’t want to make odhcp6c more robust�
  • things which annoy me get replaced with Go ;-)

4 of 11

gokrazy

  • a pure-Go userland for Raspberry Pi 3 appliances�
  • Linux kernel�Raspberry Pi firmware�minimal init program�<your Go programs>�
  • gokr-packer -overwrite=/dev/sdb \� github.com/stapelberg/hmgo

5 of 11

router7: architecture

internet

dhcp6

dhcp4

netconfigd

6 of 11

router7: architecture

internet

LAN

dhcp6

dhcp4

radvd

dhcp4d

netconfigd

7 of 11

router7: architecture

internet

LAN

dhcp6

dhcp4

radvd

dhcp4d

netconfigd

dnsd

8 of 11

router7: hardware

  • PC Engines apu2c4�→ 1 GHz 4-core amd64�→ 4 GB RAM, 16G SSD�→ 3 Ethernet ports�
  • PXE boot�→ installation/recovery�→ trigger: rebootor

9 of 11

router7: features

  • maximize internet connectivity�→ keep DHCP lease, ignore expiration�
  • testcases use fiber7 packet captures�→ minimize chance of connectivity breakage

10 of 11

router7: features (2)

  • safe and quick updates�→ diagd knows about connectivity, updater rolls back�→ kexec: update is ≈13s connectivity loss total�
  • easy debugging�→ config packets stored in ring buffer�→ (live)stream into Wireshark�→ architecture makes state visible and modifiable

11 of 11

Thanks for your attention!

  • lots of good Go packages, fun to plug them together like this�
  • tech demo, but using it for 2 months without issues�
  • learn more at https://github.com/rtr7/router7