Last active
May 25, 2016 20:43
-
-
Save ppmathis/4baa30a4177e7919513f52f39e6bef95 to your computer and use it in GitHub Desktop.
IPv6 RA Default Gateway for Mikrotik devices
This file contains hidden or 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
| :local "v6ra-router" [:toid ([/ipv6 neighbor find where router]->0)] | |
| :if ([:typeof $"v6ra-router"] = "nil") do={ | |
| :error "No IPv6 neighbor with router flag found, can not set default gateway!" | |
| } | |
| :local "v6ra-address" [/ipv6 neighbor get $"v6ra-router" address] | |
| :local "v6ra-interface" [/ipv6 neighbor get $"v6ra-router" interface] | |
| /ipv6 route set [find where comment="Default Gateway (RA)"] gateway="$(v6ra-address)%$(v6ra-interface)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment