10.10.10.2/31 covers 10.10.10.1 and 10.10.10.2I've tried with several devices now, but there's absolutely no way, I can get /31 addresses working. Is this a bug, or is it a missing feature?
For the reference:
R1 (RB450):
/ip address add interface=ether1 address=10.10.10.2/31 disabled=no
R2 (RB450)::
/ip address add interface=ether1 address=10.10.10.3/31 disabled=no
Ping times out.
my badNo.
10.10.10.1/31 covers 10.10.10.0-10.10.10.1.
You will get a nice no route to host error with 10.10.10.1-10.10.10.2 netmask 255.255.255.254
try to force broadcast on 10.10.10.1 address (manually).address=10.10.10.2/31 network=10.10.10.2 broadcast=10.10.10.3 interface=ether3 actual-interface=ether3
Seems correct to me.
I would skip using an actual /31, and just use two /32s. Specify the remote address as the "network", and you should be good to go.
This mechanism is more flexible than using /31s, as the addresses don't need to be adjacent; and more efficient since you can re-use the same address for multiple links on a router.
In your particular case:
R1: /ip add add interface=ether1 address=10.10.10.2/32 network=10.10.10.3
R2: /ip add add interface=ether1 address=10.10.10.3/32 network=10.10.10.2
Will do the trick.
In a more complex hypothetical setup, with four routers connected to each other in a full-mesh of point-to-point ethernets:
R1: /ip add add interface=ether1-to-R2 address=10.10.10.1/32 network=10.10.10.2
R1: /ip add add interface=ether2-to-R3 address=10.10.10.1/32 network=10.10.10.3
R1: /ip add add interface=ether3-to-R4 address=10.10.10.1/32 network=10.10.10.4
R2: /ip add add interface=ether1-to-R1 address=10.10.10.2/32 network=10.10.10.1
R2: /ip add add interface=ether2-to-R3 address=10.10.10.2/32 network=10.10.10.3
R2: /ip add add interface=ether3-to-R4 address=10.10.10.2/32 network=10.10.10.4
R3: /ip add add interface=ether1-to-R1 address=10.10.10.3/32 network=10.10.10.1
R3: /ip add add interface=ether2-to-R2 address=10.10.10.3/32 network=10.10.10.2
R3: /ip add add interface=ether3-to-R4 address=10.10.10.3/32 network=10.10.10.4
R4: /ip add add interface=ether1-to-R1 address=10.10.10.4/32 network=10.10.10.1
R4: /ip add add interface=ether2-to-R2 address=10.10.10.4/32 network=10.10.10.2
R4: /ip add add interface=ether3-to-R3 address=10.10.10.4/32 network=10.10.10.3
Would fully interconnect them, using only 4 addresses. In this particular case, we get 3 times the address utilization efficiency of /31 addressing.
In an 8 router full-mesh the efficiency is even more spectacular, with only 8 addresses needed for /32 addressing, while a whopping 56 addresses would be needed for /31 addressing.
--Eric
While Ciscos won't allow /32 addressing on broadcasty interfaces, you _can_ use /31 on the Cisco side, and /32 on the MT side.Interesting concept, quite a hack!
I'm pretty sure I can't use that when the other end of the device is a cisco router, so I'm still very much wanting real /31 support. But thanks for your suggestion, it's a really cool hack
Just change the address to .2/32 and network/brdcast to .3 manually.address=10.10.10.2/31 network=10.10.10.2 broadcast=10.10.10.3 interface=ether3 actual-interface=ether3
Seems correct to me.
For MT-Cisco i have done following configNot I.
For MT-MT, I use /32s, and rejoice that the vast majority of my network is extremely efficient address-use wise.
For Cisco-Cisco, /31s work great, and are only slightly depressing.
For MT-Cisco, /30s seems to be the longest common netmask that works properly with OSPF, so I go with it, and mourn the lost utility.
--Eric
Is this usable in production networks?I would skip using an actual /31, and just use two /32s. Specify the remote address as the "network", and you should be good to go.
This mechanism is more flexible than using /31s, as the addresses don't need to be adjacent; and more efficient since you can re-use the same address for multiple links on a router.
In your particular case:
R1: /ip add add interface=ether1 address=10.10.10.2/32 network=10.10.10.3
R2: /ip add add interface=ether1 address=10.10.10.3/32 network=10.10.10.2
Will do the trick.
In a more complex hypothetical setup, with four routers connected to each other in a full-mesh of point-to-point ethernets:
R1: /ip add add interface=ether1-to-R2 address=10.10.10.1/32 network=10.10.10.2
R1: /ip add add interface=ether2-to-R3 address=10.10.10.1/32 network=10.10.10.3
R1: /ip add add interface=ether3-to-R4 address=10.10.10.1/32 network=10.10.10.4
R2: /ip add add interface=ether1-to-R1 address=10.10.10.2/32 network=10.10.10.1
R2: /ip add add interface=ether2-to-R3 address=10.10.10.2/32 network=10.10.10.3
R2: /ip add add interface=ether3-to-R4 address=10.10.10.2/32 network=10.10.10.4
R3: /ip add add interface=ether1-to-R1 address=10.10.10.3/32 network=10.10.10.1
R3: /ip add add interface=ether2-to-R2 address=10.10.10.3/32 network=10.10.10.2
R3: /ip add add interface=ether3-to-R4 address=10.10.10.3/32 network=10.10.10.4
R4: /ip add add interface=ether1-to-R1 address=10.10.10.4/32 network=10.10.10.1
R4: /ip add add interface=ether2-to-R2 address=10.10.10.4/32 network=10.10.10.2
R4: /ip add add interface=ether3-to-R3 address=10.10.10.4/32 network=10.10.10.3
Would fully interconnect them, using only 4 addresses. In this particular case, we get 3 times the address utilization efficiency of /31 addressing.
In an 8 router full-mesh the efficiency is even more spectacular, with only 8 addresses needed for /32 addressing, while a whopping 56 addresses would be needed for /31 addressing.
--Eric
Is this usable in production networks?
Where's the catch?
BR,
M
Does this tweak work with OSPF?Using it in my production network without problems.
Of course, Only Mikrotik supports this. That's the only limitationIs this usable in production networks?
Where's the catch?
BR,
M
Yes, it works great with simple OSPF and LDP; but TE doesn't seem to work correctly with it, so we are moving away from it (sadly).Does this tweak work with OSPF?Using it in my production network without problems.
Of course, Only Mikrotik supports this. That's the only limitationIs this usable in production networks?
Where's the catch?
BR,
M
The problem wasn't so much directly with TE and /32 addressing, as it was with PtMP mode and CSPF.What kind of problems you have with TE?
No, you need to stick to VLSM boundaries for /31s...If the subnet is /31 would you not need to use:
10.10.10.1/31 and 10.10.10.2/31
I have run into this because only two addresses are allowed it will expect the equal amount of Ips in the subnet 10.10.10.3/31 would belong with 10.10.10.4/31
Routing a /32 via another /32 has been used for years in Telco DSL networks on a multitude of vendor equipment like Cisco, Adtran, etc...Using it in my production network without problems.
Of course, Only Mikrotik supports this. That's the only limitationIs this usable in production networks?
Where's the catch?
BR,
M
Great.Routing a /32 via another /32 has been used for years in Telco DSL networks on a multitude of vendor equipment like Cisco, Adtran, etc...Using it in my production network without problems.
Of course, Only Mikrotik supports this. That's the only limitationIs this usable in production networks?
Where's the catch?
BR,
M
It's a very popular network design when using a PPPoE BRAS
I tried the above but am running into an odd problem. Here is my config:The technique that is being referred to in earlier posts really uses routing via interface rather than via a specific gateway IP. The method described causes RouterOS to place connected routes in the routing table for the remote IPs but a very similar arrangement with static routes can be achieved as follows:
Make an ARP capable layer 2 network available between 2 RouterOS devices - it can be an Ethernet, VLAN or whatever you can arrange.
Place a /32 IP number "IP A" on Router A.
Place a /32 IP number "IP B" on Router B.
Now add a route on Router A with IP B as the destination and the interface connecting Router A to Router B as the gateway.
Now add a route on Router B with IP A as the destination and the interface connecting Router B to Router A as the gateway.
Router A should now be able to ping Router B on IP B and vice versa should also work. IP A and IP B do not need to be IP numbers remotely close together. This approach works on plenty of routing engines from many suppliers.
It simply forces the routing engine to ARP for the destination IP on the relevant interface.
/ip address add address=172.16.0.1/32 network=172.16.0.1 interface=eoip-tunnel1
/ip address add address=10.0.0.1/24 network=10.0.0.0 interface=bridge-local
/ip route add dst-address=172.16.0.2/32 gateway=eoip-tunnel1
/ip route add dst-address=10.0.1.0/24 gateway=172.16.0.2
/ip address add address=172.16.0.2/32 network=172.16.0.2 interface=eoip-tunnel1
/ip address add address=10.0.1.1/24 network=10.0.1.0 interface=bridge-local
/ip route add dst-address=172.16.0.1/32 gateway=eoip-tunnel1
/ip route add dst-address=10.0.0.0/24 gateway=172.16.0.1
What I am trying to do is utilize a /32 for the end points for EoIP tunnels. I have three different routers at three different sites. My goal is to have each one have an address 172.16.0.1-3/32 and then setup EoIP tunnel (A-B, B-C, and A-C) such that A=172.16.0.1, B=172.16.0.2, and C=172.16.0.3. Each router also has its own private range A=10.0.0.0/24, B=10.0.1.0/24, and C=10.0.2.0/24. I would like to setup routes for each of these networks so that they are all routed through the EoIP tunnels with the /32 addresses.I think you are hitting a restriction on next hops not being resolvable via interface routes. I'm not sure what your overall aim is so not sure of best solution, however as a technical point note that if you make both the 10.x.x.x routes interface routes - i.e. set the EoIP tunnel interface as the gateway - and enable proxy-arp at both ends of the EoIP tunnel then you should be able to ping the 10.x.x.x addresses fine in both direction.
Private addresses... just assigning them to the inside of a tunnel.I'm not sure of the overall picture. Are these /32s public IPs you are assigning or /32s provided by an ISP at each location?
I suppose mine was a theoretical experiment to learn about /32 addressing.If they are RFC1918 addresses why do you want to do anything other than use a /30? Conservation of non-RFC1918 addresses is what drives people into /31 & /32 land usually.....
Gotcha. Thanks for the info.If you add proxy-arp and use the eoip interface as the gateway(s) above then you will be able to ping those 10.x.x.x blocks both ways. However, whether that would be acceptable in a real world scenario might depend on a few other factors.
/ip address add address=10.10.10.10/32 interface=ether2 network=11.11.11.11
/ip address add address=11.11.11.11/32 interface=ether2 network=10.10.10.10
Agreed....public Class A/B/C is the only reason I would mess with /32 and /31 routing. If you're using 1918 space only, then do yourself a favor and use a /29. I very rarely provision /30 anymore in the private space between routers because you don't have to redesign or configure if you want to use an IP in that subnet for troubleshooting or add a node.If they are RFC1918 addresses why do you want to do anything other than use a /30? Conservation of non-RFC1918 addresses is what drives people into /31 & /32 land usually.....
I want to suggest that actually this doesnt solve the problem. Its a work around.using the /32 on the MT solves it perfectly!
This is the way I have tried this with routing protocols ospf and bgp and mpls it all works so my definite recommendation MT<->MT scenario is /32 and use the same IP for all local interfaces on one router. this eliminates the need for loopback interface as the router is the same IP to all interfaces. As MT doesn't work well with /31's the only way to interconnect MT<->OtherVendor is by /30'sI would skip using an actual /31, and just use two /32s. Specify the remote address as the "network", and you should be good to go.
This mechanism is more flexible than using /31s, as the addresses don't need to be adjacent; and more efficient since you can re-use the same address for multiple links on a router.
In your particular case:
R1: /ip add add interface=ether1 address=10.10.10.2/32 network=10.10.10.3
R2: /ip add add interface=ether1 address=10.10.10.3/32 network=10.10.10.2
Will do the trick.
In a more complex hypothetical setup, with four routers connected to each other in a full-mesh of point-to-point ethernets:
R1: /ip add add interface=ether1-to-R2 address=10.10.10.1/32 network=10.10.10.2
R1: /ip add add interface=ether2-to-R3 address=10.10.10.1/32 network=10.10.10.3
R1: /ip add add interface=ether3-to-R4 address=10.10.10.1/32 network=10.10.10.4
R2: /ip add add interface=ether1-to-R1 address=10.10.10.2/32 network=10.10.10.1
R2: /ip add add interface=ether2-to-R3 address=10.10.10.2/32 network=10.10.10.3
R2: /ip add add interface=ether3-to-R4 address=10.10.10.2/32 network=10.10.10.4
R3: /ip add add interface=ether1-to-R1 address=10.10.10.3/32 network=10.10.10.1
R3: /ip add add interface=ether2-to-R2 address=10.10.10.3/32 network=10.10.10.2
R3: /ip add add interface=ether3-to-R4 address=10.10.10.3/32 network=10.10.10.4
R4: /ip add add interface=ether1-to-R1 address=10.10.10.4/32 network=10.10.10.1
R4: /ip add add interface=ether2-to-R2 address=10.10.10.4/32 network=10.10.10.2
R4: /ip add add interface=ether3-to-R3 address=10.10.10.4/32 network=10.10.10.3
Would fully interconnect them, using only 4 addresses. In this particular case, we get 3 times the address utilization efficiency of /31 addressing.
In an 8 router full-mesh the efficiency is even more spectacular, with only 8 addresses needed for /32 addressing, while a whopping 56 addresses would be needed for /31 addressing.
--Eric
But I need this. I linked MT(/32) - Linux(/31) but I can't run OSPF over it (with Quagga). I tried nbma, broadcastAs MT doesn't work well with /31's the only way to interconnect MT<->OtherVendor is by /30's
True. I switched "ip address add 172.16.64.59/31 ..." to "ip address add 172.16.64.59/31 peer 172.16.64.59 ..." and link continued to work. Ok.Linux support /32 so switch to /32
But this not. Quagga isn't up neighbor with error (with nbma):and OSPF will work.
ip address add 172.16.64.59/32 peer 172.16.64.58 dev eth2
!
interface eth2
ip ospf network point-to-point
!
router ospf
ospf router-id 10.10.10.10
!
network 172.16.64.58/31 area 0.0.0.112
!
area 0.0.0.112 stub
!
/ip address
add address=172.16.64.58 interface=ether1 network=172.16.64.59
/routing ospf area
set [ find default=yes ] disabled=yes
add area-id=0.0.0.112 default-cost=1 inject-summary-lsas=yes name=stub-area1 type=stub
/routing ospf interface
add interface=ether1 network-type=point-to-point
/routing ospf network
add area=stub-area1 network=172.16.64.58/31
It seems more accurate but it not works: Quagga is not sending OSPF hello.change to
network 172.16.64.58/32 area 0.0.0.112
Same as with many other things here...Is there any fundamental reason why mikrotik does not support RFC 3021, so it is compatible with other vendors (cisco) without problems?
I would skip using an actual /31, and just use two /32s. Specify the remote address as the "network", and you should be good to go.
This mechanism is more flexible than using /31s, as the addresses don't need to be adjacent; and more efficient since you can re-use the same address for multiple links on a router.
In your particular case:
R1: /ip add add interface=ether1 address=10.10.10.2/32 network=10.10.10.3
R2: /ip add add interface=ether1 address=10.10.10.3/32 network=10.10.10.2
Will do the trick.
In a more complex hypothetical setup, with four routers connected to each other in a full-mesh of point-to-point ethernets:
R1: /ip add add interface=ether1-to-R2 address=10.10.10.1/32 network=10.10.10.2
R1: /ip add add interface=ether2-to-R3 address=10.10.10.1/32 network=10.10.10.3
R1: /ip add add interface=ether3-to-R4 address=10.10.10.1/32 network=10.10.10.4
R2: /ip add add interface=ether1-to-R1 address=10.10.10.2/32 network=10.10.10.1
R2: /ip add add interface=ether2-to-R3 address=10.10.10.2/32 network=10.10.10.3
R2: /ip add add interface=ether3-to-R4 address=10.10.10.2/32 network=10.10.10.4
R3: /ip add add interface=ether1-to-R1 address=10.10.10.3/32 network=10.10.10.1
R3: /ip add add interface=ether2-to-R2 address=10.10.10.3/32 network=10.10.10.2
R3: /ip add add interface=ether3-to-R4 address=10.10.10.3/32 network=10.10.10.4
R4: /ip add add interface=ether1-to-R1 address=10.10.10.4/32 network=10.10.10.1
R4: /ip add add interface=ether2-to-R2 address=10.10.10.4/32 network=10.10.10.2
R4: /ip add add interface=ether3-to-R3 address=10.10.10.4/32 network=10.10.10.3
Would fully interconnect them, using only 4 addresses. In this particular case, we get 3 times the address utilization efficiency of /31 addressing.
In an 8 router full-mesh the efficiency is even more spectacular, with only 8 addresses needed for /32 addressing, while a whopping 56 addresses would be needed for /31 addressing.
--Eric
One thing I have not tested is a /31 between a Mikrotik and a Cisco , or between a Mikrotik and a PfSense virtual router/firewall.@TomjNorthidaho, some creative thinking there, I might pop your balloon though
That method is called point to point addressing and but should work
/31 network between two mikrotik devices - here is how you do it
First thing - you do not actually use a /31 in the IP address ( this is important )
Here is how you use a /31 network of only two IP address to get two Mikrotik devices to talk to each other.
I am going to demonstrate 192.168.168.0/31 ( This /31 has only two IP address which are 192.168.168.0 and 192.168.168.1 )
Mikrotik #1
- Configure IP address 192.168.168.0 on your first Mikrotik ( example 192.168.168.0 ( no / after IP address ) will be on ether2 )
- Add the route 192.168.168.1 out interface ether2 ( use the interface name not an IP address )
Mikrotik #2
- Configure IP address 192.168.168.1 on your second Mikrotik ( example 192.168.168.1 ( no / after IP address ) will be on ether2 )
- Add the route 192.168.168.0 out interface ether2 ( use the interface name not an IP address )
Thats it , the two mikrotiks can ping each other and pass traffic
So , why burn up 4 IPv4 address on a link with only two Mikrotiks on the link. Each /30 link between two Mikrotik devices can now be used for two different /31 links ( twice as many link using the same number of IP address ).
North Idaho Tom Jones
I wish that Mikrotik would support a /31 natively on a /31 network between any two Mikrotiks./31 network between two mikrotik devices - here is how you do it
First thing - you do not actually use a /31 in the IP address ( this is important )
Here is how you use a /31 network of only two IP address to get two Mikrotik devices to talk to each other.
I am going to demonstrate 192.168.168.0/31 ( This /31 has only two IP address which are 192.168.168.0 and 192.168.168.1 )
Mikrotik #1
- Configure IP address 192.168.168.0 on your first Mikrotik ( example 192.168.168.0 ( no / after IP address ) will be on ether2 )
- Add the route 192.168.168.1 out interface ether2 ( use the interface name not an IP address )
Mikrotik #2
- Configure IP address 192.168.168.1 on your second Mikrotik ( example 192.168.168.1 ( no / after IP address ) will be on ether2 )
- Add the route 192.168.168.0 out interface ether2 ( use the interface name not an IP address )
Thats it , the two mikrotiks can ping each other and pass traffic
So , why burn up 4 IPv4 address on a link with only two Mikrotiks on the link. Each /30 link between two Mikrotik devices can now be used for two different /31 links ( twice as many link using the same number of IP address ).
North Idaho Tom Jones
The main issue that i've run into with this method is routing protocol instability. I've had intermittent issues with OSPF adjacency instability on a number of networks that used this addressing method. As soon as we migrated to /30 or larger prefix, the issues went away.
When I was adding a second BGP peer, I was given one IP address from a /31. I had a Mikrotik ( I don't know what the upstream BGP router was ). I tried and tried and tried using a /31 and at the time I could not get it to even ping his /31 IP address. This was my first attempt at trying to use a /31.So I am on the verge of setting up a BGP with my 1st peer and he mentioned using a /31. I am going to assume he is using a Cisco. I am a Mikrotik shop.
You are saying that Cisco and Mikrotik are not able to use BGP on a /31?
Rick
Normis, it seems /31 works fine on RouterOS v6 stable/long-term though? I've seen many ASNs doing it just fine?turnip, this should resolve all issues: viewtopic.php?f=14&t=32935#p772755
/32 really cuts down on addresses though, and it follows the philosophy of "hosts have IP addresses, not interfaces"Normis, it seems /31 works fine on RouterOS v6 stable/long-term though?
This partially untrue, as OSPF has PtP mode which eliminates address broadcasts, making /32 addresses the absolute simplest and easiest option, but only for PtP mode OSPF.but they fail when you use protocols that expect to be able to use broadcast over a link, like OSPF.
Thanks Normisturnip, this should resolve all issues: viewtopic.php?f=14&t=32935#p772755
That is what I say, you may need additional configuration. And I have also seen people reporting problems with that.This partially untrue, as OSPF has PtP mode which eliminates address broadcasts, making /32 addresses the absolute simplest and easiest option, but only for PtP mode OSPF.but they fail when you use protocols that expect to be able to use broadcast over a link, like OSPF.
Set OSPF to PTP instead of broadcasting on the Mikrotik. for this interface.I'm relying on OSPF as IGP, as well as BGP and MPLS, so I'm not going to do this...
Would be nice if MikroTik fixed this. It shouldn't be that hard.