Last active
August 29, 2015 14:04
-
-
Save jeffbrl/3d431547fd6f58e340a7 to your computer and use it in GitHub Desktop.
Script to configure IPv6 ND proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Jeff Loughridge | |
# July 2014 | |
# jeffl at brooksconsulting-llc.com | |
# This script provides an example of setting up IPv6 static | |
# ND proxy entries. Edit the V6_START to match | |
# what you see in the DO control panel | |
V6_START=2a03:b0c0:1:d0::18:d000 | |
# strip the last hex character | |
V6_MINUS_LAST_HEX_CHAR=`echo $V6_START|sed s/.$//` | |
# we'll skip the first /126 and use 0x4 to 0xF as the last | |
# hex character | |
ip addr add ${V6_MINUS_LAST_HEX_CHAR}4/126 dev docker0 | |
echo "adding ND proxy entries..." | |
for character in 4 6 7 8 9 a b c d e f; do | |
echo "ip -6 neigh add proxy ${V6_MINUS_LAST_HEX_CHAR}${character} dev eth0" | |
ip -6 neigh add proxy ${V6_MINUS_LAST_HEX_CHAR}${character} dev eth0 | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment