{"id":78,"date":"2017-02-04T00:10:36","date_gmt":"2017-02-04T00:10:36","guid":{"rendered":"http:\/\/coherence.co.za\/?p=78"},"modified":"2017-02-04T00:17:43","modified_gmt":"2017-02-04T00:17:43","slug":"saving-ip-space-on-your-point-to-point-peering-subnets-using-31-subnets-aka-rfc3021","status":"publish","type":"post","link":"http:\/\/coherence.co.za\/?p=78","title":{"rendered":"Saving IP space on your point to point peering subnets using \/31 subnets aka RFC3021"},"content":{"rendered":"<p>Most of us are used to allocating a \/30 subnet for point to point peering, which gives us 2 device IP&#8217;s, a network address, and a broadcast address. With the exhaustion of IPV4 space it&#8217;s useful to be able to save wherever you can, so where possible you should consider \/31 allocation instead of \/30. Most modern day vendors support RFC3021 and using it is as simple as just specifying the \/31 subnet mask. I have used this on various Juniper and Cisco devices in the past without any issues, but unfortunately not all vendors or models support it so your mileage will vary.<\/p>\n<p>I would also, always recommend performing further testing beyond just a ICMP reachability tests if broadcast protocols are involved. A prime example is if you use something like the OSPF routing protocol that uses broadcast as a discovery mechanism. It should work but if it does not then possibly see if you can set it o P2P operation before reverting back to a \/30 allocation.<br \/>\nI need to mention Mikrotik specifically here because they do not support RFC3021 in an obvious way. If you just specify x.x.x.x\/31 it wont work. You need to specify a \/32 with a matching network address. So 1.1.1.0\/31 would look like so<\/p>\n<pre>\/ip address add address=1.1.1.0\/32 network=1.1.1.1 interface=ether1<\/pre>\n<p>The above example is compatible with RFC3021 but is actually different in that the network address does not have to fall within the same \/31 as the IP. I have struggled to find the RFC for this assignment scheme but it allows you to be able to add the same IP multiple times with a different network address. This allows you to reach multiple devices on the same network segment using only a single IP per device. This obviously only works if all devices support this format.<\/p>\n<p>Example of using this to connect to 2 other routers with IP&#8217;s 2.2.2.2 and 3.3.3.3.<\/p>\n<pre>\/ip address add address=1.1.1.0\/32 network=2.2.2.2 interface=ether1\r\n\/ip address add address=1.1.1.0\/32 network=3.3.3.3 interface=ether1<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Most of us are used to allocating a \/30 subnet for point to point peering, which gives us 2 device IP&#8217;s, a network address, and a broadcast address. With the exhaustion of IPV4 space it&#8217;s useful to be able to save wherever you can, so where possible you should consider \/31 allocation instead of \/30. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[17,5,14],"_links":{"self":[{"href":"http:\/\/coherence.co.za\/index.php?rest_route=\/wp\/v2\/posts\/78"}],"collection":[{"href":"http:\/\/coherence.co.za\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/coherence.co.za\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/coherence.co.za\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/coherence.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=78"}],"version-history":[{"count":4,"href":"http:\/\/coherence.co.za\/index.php?rest_route=\/wp\/v2\/posts\/78\/revisions"}],"predecessor-version":[{"id":82,"href":"http:\/\/coherence.co.za\/index.php?rest_route=\/wp\/v2\/posts\/78\/revisions\/82"}],"wp:attachment":[{"href":"http:\/\/coherence.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=78"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/coherence.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=78"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/coherence.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}