What's new

IPv6 static route

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!


Occasional Visitor
Hey, I want create a static route of my /64 prefix to my local server for VPN and other stuff. I can't use the GUI for that. How can I make it using some scripts to survive all the reboots, changes on the router?
ip -6 route add 2001:xxx:xxx:xxx::/64 via 2001:xxx:xxx:xxx::50 dev br0
I know there is a dhcp-event but there is so many events that I am bit confused which to use.
Last edited:
First, you have to state what router model and firmware you are using.
So I managed to create simple script. Since I am using PPPoE dhcp-event will not work for me.
It takes some time to receive the prefix so I added 20 seconds sleep. I can probably check for it dynamiclly but that works for me just fine.


if [ "$2" = "connected" ]; then
    sleep 20

    logger -t "ipv6_static_route" "Adding static IPv6 route"
    ip -6 route add 2001:xxxx:xxxx:xxxx::/64 via 2001:xxxx:xxxx:xxxx::x dev br0

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!