cancel
Showing results for 
Search instead for 
Did you mean: 

Using all of your Ip's in a /30

dragon2611
Grafter
Posts: 283
Registered: ‎20-10-2013

Using all of your Ip's in a /30

It looks like It's possible to use the Network and Broadcast IP plusnet assign you as part of the range  Wink
There's a couple of tricks you can do here depending on your Kits capabilities and what you want to achieve.
If you want to NAT everything and just need extra IP's to get around a port conflict that cannot be moved (E.g multiple servers) you might be able to get away with using /32 masks on the IPs and configuring them on your firewall.  (Assuming it's the device doing the PPP termination)
If Both bits of equipment support it then you can use /31 masks to form a Point 2 point link.
I requested extra address space from plusnet after I needed to test a bit of kit with a NAT in and didn't want to double NAT (as that could cause issues with port forwards, sip.etc) but at the same time I couldn't really pull out the production firewall as it's terminating VPN's
They routed me a /30 with the first "usable" address on the PPP interface (You can re-use this on another interface it seems, at least on edgeOS and RouterOS)
So Originally I had the first (Usable) address on my "Router/Firewall" Which I NAT my internal traffic to and the 2nd Address on the device I wanted to avoid doing Double NAT.
However both devices support /31 (Point2point) subnets (RFC 3021) so today I decided to have a play.
I changed the Subnet mask on both routers to /31 using my 2nd "Usable" IP for the device and what should be my broadcast address as it's gateway
I then removed the first "Usable" address from my routers ethernet interface (It'son the PPP interface anyway) and also added what should be the Network address as a /32 on the Ethernet interface of the router.
The device I want to have a public address still has a Public address and seems to be working fine.
My Router is still using the initial address it had previously (on the PPP interface only now)
However I can now seemingly send/receive traffic using the 2 IP's that were previously Wasted either by Natting them or by using /31 masks
So it's potentially possible to use All of your IP's if you have a router that supports either /32 or /31 netmasks and are also clever with NAT.

I'm not sure if I explained it very well (probably not) but the Jist of it is instead of having 2 IP's (one on router, one on another device) it's possible to have either all 4 in use on the router, or 2 in use on the router and 2 publics directly assigned to another device (If both devices can handle /31 masks)