The Hoof & Paw
DocsCategoriesTagsView the current conditions from the WolfspyreLabs WeatherstationToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Declaring netblocks in NetBox

Using Netbox to try and more intelligently manage Private IP Space

I’ve been playing with NetBox1 recently.
It’s pretty cool, quite honestly. While I’m in the process of cleaning stuff up, I decided to try to manage the various use of IPspace in dockerland across my VMs and hosts… So, figuring out how the IPAM facet of Netbox is managed helped.

What it seems like most users of netbox are doing is creating RIRs2 to indicate the different reservations of non-routable space, and then declaring Aggregates3 associated with those RIRs.

Importable RIRs and Aggregates representing Private IP Space.

I simply pulled these CSVs together thru looking at the RFCs. Hopefully this helps someoene else.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
name,slug,is_private,description
ARIN,ARIN,False,'Internet'
IANA-RFC1112-Multicast,IANA-RFC1112,False,'Reserved for future use'
IANA-RFC1122-LoopLocalNet,IANA-RFC1122,False,'Loopback and This Network'
IANA-RFC1918-Private,IANA-RFC1918,False,'Private Use Networks'
IANA-RFC2544-Benchmark,IANA-RFC2544,False,'Benchmarking Network'
IANA-RFC3068-6to4,IANA-RFC3068,False,'IP6 to 4 relay addresses'
IANA-RFC3171-Multicast,IANA-RFC3171,False,'IP4 Multicast Assignments'
IANA-RFC3927-LinkLocal,IANA-RFC3927,False,'Autoconf Link Local addressing'
IANA-RFC4193-Private,IANA-RFC4193,False,'IPv6-Unique-Local-Address-Range'
IANA-RFC5375-Special,IANA-RFC5375,False,'Special use Networks'
IANA-RFC5736-Protocol,IANA-RFC5736,False,'Protocol Assignments'
IANA-RFC5737-TestNet,IANA-RFC5737,False,'Networks reserved for Documentation and Examples'
IANA-RFC6598-CGNAT,IANA-RFC6598,False,'Carrier Grade NAT'
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
prefix,rir,description
0.0.0.0/8,IANA-RFC1122-LoopLocalNet,'This Network'
10.0.0.0/8,IANA-RFC1918-Private,'10/8 Reserved for Private Networks.'
100.64.0.0/10,IANA-RFC6598-CGNAT,'Carrier Grade NAT'
127.0.0.0/8,IANA-RFC1122-LoopLocalNet,'Loopback Network'
172.16.0.0/12,IANA-RFC1918-Private,'Internal Network Use'
192.0.0.0/24,IANA-RFC5736-Protocol,'IETF Protocl assignments'
192.0.2.0/24,IANA-RFC5737-TestNet,'IANA TEST-NET-1 Documentation and Examples'
192.88.99.0/24,IANA-RFC3068-6to4,'Routable - 6 to 4 anycast addresses'
192.168.0.0/16,IANA-RFC1918-Private,'Private Networks'
198.18.0.0/15,IANA-RFC2544-Benchmark,'Network Interconnect Device Benchmark and Testing Network'
198.51.100.0/24,IANA-RFC5737-TestNet,'IANA TEST-NET-2 Documentation and Examples'
203.0.113.0/24,IANA-RFC5737-TestNet,'IANA TEST-NET-3 Documentation and Examples'
224.0.0.0/4,IANA-RFC3171-Multicast,'Multicast ip4 assignments'
240.0.0.0/4,IANA-RFC1112-Multicast,'Reserved for future use'
fc00::/7,IANA-RFC4193-Private,'IPv6-Unique-Local-Address-Range'

Repo of constructs

I’ve created a repo of importable things4

Hope this helps someone else!