Skip to content

Instantly share code, notes, and snippets.

@mraerino
Last active October 25, 2018 22:03
Show Gist options
  • Save mraerino/15003174be1ea88349f2c986de6a9efa to your computer and use it in GitHub Desktop.
Save mraerino/15003174be1ea88349f2c986de6a9efa to your computer and use it in GitHub Desktop.
How to enable an IPv6 management address on a Ubiquiti AirFiber

Enabling IPv6 management address on AirFiber

In order to be able to have a management IPv6 address assigned on the br0 interface of a Ubiquiti AirFiber, there is a hacky way to do it.

Login via SSH to execute the commands

Steps

  • Restart bridge interface, so /proc/sys/net/ipv6/conf/br0 is available
  • Disable duplicate address detection on bridge
    • The behavior of the bridge will cause it to always detect a duplicate address
  • Enable IPv6 on bridge

Temporary (will not survive reboot)

ip link set br0 down; ip link set br0 up  # one line so you don't lock yourself out!
sysctl -w net.ipv6.conf.br0.dad_transmits=0
sysctl -w net.ipv6.conf.br0.accept_dad=0
sysctl -w net.ipv6.conf.br0.disable_ipv6=0

Permanent (survives reboots)

  • Create scripts in /etc/persistent (content below)
    • /etc/persistent/rc.poststart
    • /etc/persistent/setup-ipv6-mgmt
  • Make script executable: chmod +x /etc/persistent/setup-ipv6-mgmt
  • Persist to disk cfgmtd -w -p /etc/

Community discussions

/etc/persistent/setup-ipv6-mgmt >> /tmp/ipv6-mgmt.log &
date
sleep 5
# Bring back sysctl parameters for IPv6
echo "Restarting Bridge..."
ip link set br0 down
ip link set br0 up
echo "Setting values for Bridge..."
echo 0 > /proc/sys/net/ipv6/conf/br0/dad_transmits
echo 0 > /proc/sys/net/ipv6/conf/br0/accept_dad
echo 0 > /proc/sys/net/ipv6/conf/br0/disable_ipv6
touch /tmp/ipv6-mgmt-done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment