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.