So a question I get on a fairly regular basis is how do I assign IPs to my customers out of this /29 block my ISP gave me. As many of you know, IPV4 public addresses, commonly known as globally routable IPV4 addresses, are in short supply and obtaining more is usually very expensive. You have three options to obtain IP addresses.
Option #1 is getting them from whoever is supplying your bandwidth. These IPs are known as Provider Assigned IP Space or PI space for short. Typically these IP addresses are leased to you for a price or just allocated to you because you are a customer. The key here they are tied to the provider. If you leave for someone else, your IPs are typically not portable.
Option#2 is going to the open market to buy or lease IP addresses. There are several companies out there which sell or rent IP addresses. For business continuity buying your addresses is the best way to go. As of this writing, IPV4 addresses in the ARIN region at going for $17-21 an Ip address. This pricing means the smallest block you can get costs you around $5,600.
Option #3 is asking ARIN or whatever Regional Internet Registry (RIR) you fall under and getting put on a waiting list. This wait can take quite some time and you may be waiting for a very long time.
Most startup ISPs get a small block of addresses from their provider. The block can be a /29 ,or sometimes they can get a /28 or larger. The upstream ISP routes the block(s) to the startup. Here is where the problem comes up. If an ISP gets a /29 this means they have 1 block of 6 IPs to use or two blocks of two IPs they can use in the form of two /30’s. For those of you not familiar with subnetting, each time you “break down” a block of IP addresses you always lose 2 to the network and broadcast addresses.
if you want to learn about subnetting the following Youtube Videos will be helpful. Be warned there is a lot of numbers and math involved, but it’s necessary to learn about subnetting and proper IP planning.
Imagine an ISP has two customers on different towers that want a public IP address. These addresses are for cameras, VPNs, or any number of uses. In order to assign IPs to each of those customers out of your /29 you have to either break it apart into two /30’s and route that to the appropriate router of yours the customer is attached to. With small blocks assigned to you, this becomes very inefficient. Even with large blocks, it can be inefficient. The below diagram shows how we can properly subnet this out given the limited IP block you have.
We broke out 18.104.22.168/29 into the following subnets.
We still have the same number of IP addresses we had before, but due to the way subnetting works we lost a total of 4 addresses to the network and broadcast addresses. Think of these as the beginning and end of the subnet. We can’t use them to assign to devices, but we need them as part of the subnet. We can note these as the following
22.214.171.124/30 – Network Address
126.96.36.199/30 – FIrst assignable address
188.8.131.52/30 – Second Assignable address
184.108.40.206/30 – Broadcast address
The next subnet would be 4,5,6,7 in the same order. The rules of subnetting say we can not assign the network and broadcast addresses to devices or else we start breaking things.
Now if both of these customers were on the same tower, behind the same ISP router we would not necessarily have to subnetted the /29 out. We could have routed the /29 to the router and customer 1 has the .2 IP address and customer 2 has the .3 IP address. the subnet would have IPs 4-6 available, but only for customers on the same tower.
The other way to save on public IP addresses is to do a 1:1 nat. Natting involves doing port forwarding from the public IP to a private IP address at the customer location. If you want to learn about 1:1 Nat here are some links:
So what is the real problem? If you have a /29 you can only break that down twice into the two /30s for customers going through different routers. Your network is routed instead of bridged right?
So how does the startup WISP overcome this without spending lots of money on IP addresses? You can do the 1:1 nat for each customer as explained above. In my experience, this works 98% of the time. It is also something most I.T. folks are not familiar with. I have had to spend hours on the phone with customers over the years explaining how a 1:1 nat works and they do have a public address to connect to, even though they have a private IP address on their router. Customers who do not get the 1:1 nat concept seem to be very leary of it and often blame the 1:1 nat when things go wrong. Now if you are an ISP that provides a managed router, the customer does not see this layer.
Your other option is an MPLS network with VPLS tunnels. MPLS with VPLS allows you to bridge your sites together to share an IP address pool. However, bridging is bad is what you hear. MPLS has things like split-horizon built into the protocol to make bridging things together not so bad of a thing.
Another option is PPPoE. PPPoE creates a tunnel utilizing a /32 (one ip address). Many providers are using a shared pool to hand out IP addresses to customers who are given Public Ip addresses.
But my provider also gave me a /30 that is between my router and their’s. Can I use this?
The short answer is this is the “Glue” between you and the upstream provider. The only real use for this is to Nat traffic out the Ip assigned to your side. Doing this is not scalable though.
I have briefly touched on things like PPPoE, MPLS, and other things in this article. These are such large topics there was no way this single post could do them justice. I wanted to present the problem, a solution, and other methods to research to solve it. I will go into these in later blog posts.