Practical purpose for /30 subnet?

lakedude

Platinum Member
Mar 14, 2009
2,627
371
126
Is there any practical reason to have a ton of networks with only 2 computers each?
 

Pandasaurus

Member
Aug 19, 2012
196
2
76
You're asking two different questions, here. The answer to the question in the title, is there a practical use for a /30 subnet, is yes. The answer to the question in your post, is... Well, not really.

A /30 can *only* operate as a point-to-point connection. This is typically used for a connection between two routers, where you don't need more than two usable addresses. A /30 contains four addresses, but only two are usable. The other two are reserved for the network address, and broadcast address.
 

Railgun

Golden Member
Mar 27, 2010
1,289
2
81
You're asking two different questions, here. The answer to the question in the title, is there a practical use for a /30 subnet, is yes. The answer to the question in your post, is... Well, not really.

A /30 can *only* operate as a point-to-point connection. This is typically used for a connection between two routers, where you don't need more than two usable addresses. A /30 contains four addresses, but only two are usable. The other two are reserved for the network address, and broadcast address.

In which case a /31 is better.
 

Gryz

Golden Member
Aug 28, 2010
1,551
204
106
In which case a /31 is better.
No.

It is convention to treat the "host-part is all zeros"-address as the address of the network itself. And to treat the "host-part is all ones"-address as the broadcast-address of the network.

That means that there is software out there that might act weird if you configure interfaces (on a host, or on a router) with either the all-zeros or all-ones address. If you want to be careful, and try to avoid potential problems, you should avoid using those 2 addresses. And therefor you should use /30s on your point-to-point links.

Of course brave people can use /31s. There is even an RFC that tells you it is fine to do that.
https://tools.ietf.org/html/rfc3021
I'd be interested to hear if people really do assign /31s, or not. Anyone here who works for an ISP or a large enterprise ?

If you really care about address-preservation, I prefer another method. Assign an IP-address to the loopback-interface of your router. And make all point-to-point links unnumbered to the loopback. You then need only 1 ip-address per router, plus 1 address per ethernet (multipoint) interface.
 

dailow

Member
Oct 27, 2001
36
0
66
Yes, /31 subnets work for point-to-point connections just fine.

Cisco IOS does give a warning when assigning a /31 mask to an interface, but I haven't seen any functional issues due to the subnet mask.

I would agree that using a /31 subnet mask probably isn't a best practice, but we can thank IPv4 public IP address exhaustion for necessitating its use.
 

kevnich2

Platinum Member
Apr 10, 2004
2,465
8
76
Point to point links don't need broadcast space, so /31 does actually make sense in that sense to preserve public IP address space that you've been allocated.
 

Railgun

Golden Member
Mar 27, 2010
1,289
2
81
Umm. Yes. Come on. You even referenced the RFC.

There's nothing wrong with /31s when used appropriately.

I worked for said large enterprise and I explicitly made the move to /31s throughout.

Somewhere around 1000 links.

No.

It is convention to treat the "host-part is all zeros"-address as the address of the network itself. And to treat the "host-part is all ones"-address as the broadcast-address of the network.

That means that there is software out there that might act weird if you configure interfaces (on a host, or on a router) with either the all-zeros or all-ones address. If you want to be careful, and try to avoid potential problems, you should avoid using those 2 addresses. And therefor you should use /30s on your point-to-point links.

Of course brave people can use /31s. There is even an RFC that tells you it is fine to do that.
https://tools.ietf.org/html/rfc3021
I'd be interested to hear if people really do assign /31s, or not. Anyone here who works for an ISP or a large enterprise ?

If you really care about address-preservation, I prefer another method. Assign an IP-address to the loopback-interface of your router. And make all point-to-point links unnumbered to the loopback. You then need only 1 ip-address per router, plus 1 address per ethernet (multipoint) interface.
 

drebo

Diamond Member
Feb 24, 2006
7,035
1
81
People who use /30s for ptp networks do so for one of three reasons:

1) they're stodgy,
2) corporate policy, whether it be provisioning tools that haven't been updated or whatever, or
3) ignorance.

No reason to not use /31s anymore. Well, except for ASAs. ASAs still don't support them. But w/e.
 

w0ss

Senior member
Sep 4, 2003
365
0
0
People who use /30s for ptp networks do so for one of three reasons:

1) they're stodgy,
2) corporate policy, whether it be provisioning tools that haven't been updated or whatever, or
3) ignorance.

No reason to not use /31s anymore. Well, except for ASAs. ASAs still don't support them. But w/e.

I work for a large corp and we still use /30's they are all rfc 1918 space so we haven't seen it be an issue.

But then we also use public space internally.

Oh this BOGON is fine or hey we will never need to talk to that DOD network.
 

RadiclDreamer

Diamond Member
Aug 8, 2004
8,622
40
91
In which case a /31 is better.

Many people consider /31 a bad practice. And some network gear doesnt support it. There are not a whole lot of use cases for /31 other than saying you can. It doesnt save much addressing.
 

drquest

Golden Member
Apr 18, 2001
1,148
7
81
We use /31's on Cisco to Cisco devices but have to use /30's on stubborn equipment that doesn't support it.

When you find yourself with a router with full line cards talking to multiple other routers also full, /31's make a lot of sense in the IP use department.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |