Route server IPv6 avoid_martians

Job Snijders job at instituut.net
Thu Aug 20 00:44:18 CEST 2015


On Wed, Aug 19, 2015 at 05:34:49PM -0500, Jonathan Stewart wrote:
> This page describes an IPv4 route-server:
> https://gitlab.labs.nic.cz/labs/bird/wikis/Simple_route_server
> 
> I like the function avoid_martians(), and use it (mine's even been
> expanded a bit). I'd like to implement something similar for IPv6.

here you go:

    function avoid_martians()
    prefix set martians;
    {
        martians = [
            0000::/8{8,128}, 0200::/7{7,128}, 2001::/32{32,128},
            2001:db8::/32{32,128}, 2002::/16{16,128}, 3ffe::/16{16,128},
            5f00::/8{8,128}, fc00::/7{7,128}, fe80::/10{10,128},
            fec0::/10{10,128}, ff00::/8{8,128} ];
        if net ~ martians then return true;
        return false;
    }

Kind regards,

Job


More information about the Bird-users mailing list