/30 addressing shortcutPosted by stretch in Tips and Tricks on Thursday, 12 Jun 2008 at 12:13 a.m. GMTPoint-to-point IPv4 links are typically addressed with a 30-bit mask (255.255.255.252). This only provides 50% addressing efficiency (only two of the four addresses per subnet are usable), but many organizations consider this sufficient. Consequently, an engineer often needs to find the address of the interface at the other end of a /30 link to a neighboring router. You could do the binary in your head to deduce whether the local interface has the lower or higher IP, but an easier way is to remember this rule of thumb: the lower address will always be odd, and the higher will always be even. Consider a point-to-point link between routers A and B. You know the interface of router A is assigned 192.168.0.90/30. Router B's address is obviously one IP higher or lower -- but which is it? Since the local address is even, we know know we have the higher IP, and the other end of the link must be 192.168.0.89. Indeed, working out the binary will confirm that these are the two correct addresses for the 192.168.0.88/30 subnet. This same trick also works in reverse for /31 subnets, which are becoming more common as some legacy IP rules have been deprecated. For /31 subnets, the lower IP is always even, and the higher is always odd. For example, we know 192.168.0.176/31 is the lower IP in the pair, facing 192.168.0.177. (Note that these shortcuts only work on properly addressed networks.) |
Navigation
Armory
Online Toolbox
|
When can you use /30s vs /31s? Obviously they have to be point-to-point (not Ethernet) but what about the IOS limitations?