Route server IPv6 avoid_martians

Jonathan Stewart jonathan.stewart at gmail.com
Fri Aug 21 00:57:15 CEST 2015


On Wed, Aug 19, 2015 at 5:56 PM, Job Snijders <job at instituut.net> wrote:

> On Thu, Aug 20, 2015 at 12:44:18AM +0200, Job Snijders wrote:
> > 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;
> >     }
>
> The above is not complete, but you get the gist of it, here is a more
> current overview in BIRD format:
>
>     0000::/8{8,128},        # loopback, unspecified, v4-mapped
>     0064:ff9b::/96{96,128}, # IPv4-IPv6 Translat. [RFC6052]
>     0100::/8{8,128},        # reserved for Discard-Only Address Block
> [RFC6666]
>     0200::/7{7,128},        # Reserved by IETF [RFC4048]
>     0400::/6{6,128},        # Reserved by IETF [RFC4291]
>     0800::/5{5,128},        # Reserved by IETF [RFC4291]
>     1000::/4{4,128},        # Reserved by IETF [RFC4291]
>     2001::/32{33,128},      # Teredo prefix [RFC4380]
>     2001:0002::/48{48,128}, # Benchmarking [RFC5180]
>     2001:0003::/32{32,128}, # Automatic Multicast Tunneling [RFC7450]
>     2001:10::/28{28,128},   # Deprecated ORCHID [RFC4843]
>     2001:20::/28{28,128},   # ORCHIDv2 [RFC7343]
>     2001:db8::/32{32,128},  # NON-ROUTABLE range to be used for
> documentation purpose [RFC3849]
>     2002::/16{17,128},      # 6to4 prefix [RFC3068]
>     3ffe::/16{16,128},      # used for the 6bone but was returned [RFC5156]
>     4000::/3{3,128},        # Reserved by IETF [RFC4291]
>     5f00::/8{8,128},        # used for the 6bone but was returned [RFC5156]
>     6000::/3{3,128},        # Reserved by IETF [RFC4291]
>     8000::/3{3,128},        # Reserved by IETF [RFC4291]
>     a000::/3{3,128},        # Reserved by IETF [RFC4291]
>     c000::/3{3,128},        # Reserved by IETF [RFC4291]
>     e000::/4{4,128},        # Reserved by IETF [RFC4291]
>     f000::/5{5,128},        # Reserved by IETF [RFC4291]
>     f800::/6{6,128},        # Reserved by IETF [RFC4291]
>     fc00::/7{7,128},        # Unique Local Unicast [RFC4193]
>     fe80::/10{10,128},      # Link Local Unicast [RFC4291]
>     fec0::/10{10,128},      # Reserved by IETF [RFC3879]
>     ff00::/8{8,128}         # Multicast [RFC4291]
>

Job, this looks great! I'll incorporate this for sure.

I really like your longer list with comments.  Helps to remind the operator
why these prefixes are special.

I want to ask a question: do any of these rules define an overall prefix
length accepted?  A statement like "accept a /8 to a /48"?  How would i
write this type of rule?

Cheers,
Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20150820/6fa72a89/attachment.html>


More information about the Bird-users mailing list