Tuesday, December 18, 2018

Joe's Internet goes IPv6 -- an adventure in numbering plans

This is a sample IPv6 number plan that was put together with good intentions.  It will not be complete, and it isn't likely to be the answer you're looking for -- but it may help you find your way to developing one of your own.  Feel free to use any of the ideas here.

I'm assuming that people taking the time to read this will also be familiar with acronyms and jargon used.  If you run into a term you don't know, ask about it in the comments.

 Joe's Internet ventures into the IPv6 World


Joe's Internet is a WISP that has just  been given the right to use a block of IPv6 address from their Regional Internet Registry (RIR).  Currently, Joe's Internet has 37 towers/POPs that they use to service customers, but have just won a bid to deploy 13 more POPs.  That means 50 POPs that require numbering.

This numbering plan will give Joe's Internet the ability to give every customer unique address blocks for their Internet use.  There will be plenty of addresses for customer use, and no need to force multiple clients to proxy behind a single address.

Some generic assumptions about this numbering plan include:

  • IPv6 block is:  2001:db8::/32
  • All networks will be assigned a /64 prefix (industry standard)
  • All customers will be assigned a /48 (giving them 65k networks to use as they wish)
  • Each POP will be assigned a /40



POP Codes

Let's assign each POP a 2 digit hex code -- that gives us room for 256 POPs.  We haven't used a quarter of our address space with this idea -- so have plenty of room to grow, or to make changes down the line if the original plan is too wasteful.

We'll have two example POPs to use for this documentation:
   1A -- Springfield
   1B -- Winterfield




Anatomy of an IPv6 address at Joe's Internet

With the above assumptions, we can have an address structure as below:


    --------------------------------   Joe's /32
    |         ----------------------   POP code
    |         |   ------------------   Customer designation
    |         |   |     ------------   Customer's 2^16 LANs
    |         |   |     |      -----   Local LAN
    |         |   |     |      |
|---------| |--||--| |----|  |-------|
[2001:0DB8]:[XX][YY]:[AAAA]::[64 bits]


So, the Springfield POP would look like:
  2001:DB8:1A00:: /48  -- Reserved
  2001:DB8:1A01:: /48  -- Springfield Customer 1
  2001:DB8:1A02:: /48  -- Springfield Customer 1
    [...]
  2001:DB8:1AFF:: /48  -- Springfield Customer 255


Similarly, the Winterfield POP would look like:
  2001:DB8:1B00:: /48  -- Reserved
  2001:DB8:1B01:: /48  -- Winterfield Customer 1
  2001:DB8:1B02:: /48  -- Winterfield Customer 1
    [...]
  2001:DB8:1BFF:: /48  -- Winterfield Customer 255


So, every POP can have 255 customers with a /48 each.


Infrastructure POP

We'll reserve the initial POP customer (00) for infrastructure.  It'll let us have easily remembered and typed addresses for things we might need to hardcode, etc.  When other POPs get customer codes, we'll use them to differentiate things we might find useful.

  2001:DB8:0000:: /48     -- Loopback addresses
  2001:DB8:0001:: /48     -- Pt-to-Pt connectors
       [...]                    [...]
  2001:DB8:000F:: /48     -- [infrastructure addressing]
  2001:DB8:0010:: /48     -- server block 1
       [...]                    [...]
  2001:DB8:001F:: /48     -- server block 16

       [...]                    [...]

  2001:DB8:00F0:: /48     -- NOC testing?
       [...]                    [...]
  2001:DB8:00FF:: /48     -- NOC testing?


Loopback Addresses

Loopbacks will have a special construction, so we can tell which POPs things live in.  The full format will be:

   2001:0DB8:0000:0000:0000:0000:0000:XXYY /128

So, upper bits correspond to:
   POP:   00     -- Infrastructure!
  Cust:   00     -- none / us!
   LAN:   0000   -- first usable LAN


This can be typed as:
   2001:DB8::XXYY/128
        XX = POP code
        YY = device number

This gives us 256 loopback addresses per POP, which should be sufficient for growth.


Infrastructure PT-to-PT links

Pt-to-Pt links will also encode POPs in them, and have the full format of:
   2001:0DB8:0001:XXYY:0000:0000:0000:000Z /127

Shorter typing version:
   2001:DB8:1:XXYY::Z   /127
     XX = POP1
     YY = POP2
      Z = Interface number

We can make these /126 if we want to be able to have other equipment addressable on these links.




Customer PT-to-PT links

We can carve customer Pt-to-Pt links out of the reserved block for each
POPs' /40.  It would look like this for the Springfield POP:

  2001:DB8:1A00:: /48  -- Reserved

  2001:DB8:1A00:00YY::Z /127
      YY = POP Customer
       Z = Interface number

No comments:

Post a Comment