<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 19, 2015 at 5:56 PM, Job Snijders <span dir="ltr"><<a href="mailto:job@instituut.net" target="_blank">job@instituut.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Aug 20, 2015 at 12:44:18AM +0200, Job Snijders wrote:<br>
> On Wed, Aug 19, 2015 at 05:34:49PM -0500, Jonathan Stewart wrote:<br>
> > This page describes an IPv4 route-server:<br>
> > <a href="https://gitlab.labs.nic.cz/labs/bird/wikis/Simple_route_server" rel="noreferrer" target="_blank">https://gitlab.labs.nic.cz/labs/bird/wikis/Simple_route_server</a><br>
> ><br>
> > I like the function avoid_martians(), and use it (mine's even been<br>
> > expanded a bit). I'd like to implement something similar for IPv6.<br>
><br>
> here you go:<br>
><br>
> function avoid_martians()<br>
> prefix set martians;<br>
> {<br>
> martians = [<br>
> 0000::/8{8,128}, 0200::/7{7,128}, 2001::/32{32,128},<br>
> 2001:db8::/32{32,128}, 2002::/16{16,128}, 3ffe::/16{16,128},<br>
> 5f00::/8{8,128}, fc00::/7{7,128}, fe80::/10{10,128},<br>
> fec0::/10{10,128}, ff00::/8{8,128} ];<br>
> if net ~ martians then return true;<br>
> return false;<br>
> }<br>
<br>
</span>The above is not complete, but you get the gist of it, here is a more<br>
current overview in BIRD format:<br>
<br>
0000::/8{8,128}, # loopback, unspecified, v4-mapped<br>
0064:ff9b::/96{96,128}, # IPv4-IPv6 Translat. [RFC6052]<br>
0100::/8{8,128}, # reserved for Discard-Only Address Block [RFC6666]<br>
0200::/7{7,128}, # Reserved by IETF [RFC4048]<br>
0400::/6{6,128}, # Reserved by IETF [RFC4291]<br>
0800::/5{5,128}, # Reserved by IETF [RFC4291]<br>
1000::/4{4,128}, # Reserved by IETF [RFC4291]<br>
2001::/32{33,128}, # Teredo prefix [RFC4380]<br>
2001:0002::/48{48,128}, # Benchmarking [RFC5180]<br>
2001:0003::/32{32,128}, # Automatic Multicast Tunneling [RFC7450]<br>
2001:10::/28{28,128}, # Deprecated ORCHID [RFC4843]<br>
2001:20::/28{28,128}, # ORCHIDv2 [RFC7343]<br>
2001:db8::/32{32,128}, # NON-ROUTABLE range to be used for documentation purpose [RFC3849]<br>
2002::/16{17,128}, # 6to4 prefix [RFC3068]<br>
3ffe::/16{16,128}, # used for the 6bone but was returned [RFC5156]<br>
4000::/3{3,128}, # Reserved by IETF [RFC4291]<br>
5f00::/8{8,128}, # used for the 6bone but was returned [RFC5156]<br>
6000::/3{3,128}, # Reserved by IETF [RFC4291]<br>
8000::/3{3,128}, # Reserved by IETF [RFC4291]<br>
a000::/3{3,128}, # Reserved by IETF [RFC4291]<br>
c000::/3{3,128}, # Reserved by IETF [RFC4291]<br>
e000::/4{4,128}, # Reserved by IETF [RFC4291]<br>
f000::/5{5,128}, # Reserved by IETF [RFC4291]<br>
f800::/6{6,128}, # Reserved by IETF [RFC4291]<br>
fc00::/7{7,128}, # Unique Local Unicast [RFC4193]<br>
fe80::/10{10,128}, # Link Local Unicast [RFC4291]<br>
fec0::/10{10,128}, # Reserved by IETF [RFC3879]<br>
ff00::/8{8,128} # Multicast [RFC4291]<br></blockquote><div><br><div><div><div>Job, this looks great! I'll incorporate this for sure.<br></div><br></div><div>I really like your longer list with comments. Helps to remind the operator why these prefixes are special.<br></div><div><br></div>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?<br><br></div><div>Cheers,<br></div>Jonathan</div></div></div></div>