Community discussions

MikroTik App
 
Zacharias
Forum Guru
Forum Guru
Topic Author
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Point to Point Addressing /32 or /31 Default Route

Sat May 29, 2021 2:15 pm

What are the cases where interface name can be used as Gateway on a default route ?

I know on PPP interfaces, interface name can be used successfully as a Gateway...

Does the same happen for point to point addressing between two routers?

If i setup a /32 or /31 network between two Mikrotik routers although i can successfully ping each others side, if i add a default route and use as a Gateway the interface name that connects the second mikrotik to the first one i can not reach the Internet ...

So is this normal ?

I had a case where an ISP assigned a /31 IP to me and i had successfully configured that IP on a Mikrotik Router and the default route using interface name as Gateway... Mikrotik in that case was connected to a Cisco router...

However i can not make something similar to work between two Mikrotik routers...

Any ideas ?
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: Point to Point Addressing /32 or /31 Default Route

Sat May 29, 2021 4:01 pm

It doesn't matter that there is just a single address at each end of the physical interconnection if the interface type is a point-to-multipoint one, as the router handles the interface depending on the interface type. So on point-to-point interfaces, the only possible destination is "the remote end"; on Ethernet and other P-MP interfaces, the router has to translate the IP address of the gateway element to its MAC address in order to send the frame carrying the IP packet to the correct MAC address.

The mechanism allowing P-MP interfaces to be configured as gateways is ICMP router advertisement - routers in a subnet actively inform other devices in the same subnet that they are routers. The recipients of these messages cache these advertisements. When it comes to sending a packet to a new destination IP, they send it to any of the routers; if that router knows that it needs another router in the source subnet to reach that destination, it forwards the packet that way, but it also sends an ICMP redirect message back to the sender, indicating that the other router is a better one for that destination, so the sender caches that information and sends subsequent packets to the same destination directly to the better router.

Don't quote me on that, but it seems that Mikrotik accepts these router advertisements, but doesn't send them.
 
Zacharias
Forum Guru
Forum Guru
Topic Author
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Point to Point Addressing /32 or /31 Default Route

Sat May 29, 2021 7:10 pm

Thank you Sindy ...

So, it doesnt matter if it is a /32 or /31 subnet as long as it is a point to point connection right?
( what do you mean by point to multi point ? Connecting a router directly to another one is a point to point one, so ptmp means ? )

Ok, then it doesn't work unless it is a PPP interface (PPPoE etc...) , correct ? In which case interface name is successfully used as gateway..

But then why did it work on the /31 static IP i configured on a CCR some time ago ( it is working up to now without problems )... Maybe because it is not between 2 Mikrotiks ?
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11381
Joined: Thu Mar 03, 2016 10:23 pm

Re: Point to Point Addressing /32 or /31 Default Route

Sat May 29, 2021 9:07 pm

Ethernet technology is point to multipoint technology. It works the same regardless of how layer above (e.g. IP) is configured, frames are still sent to destination MAC address and that one still has to be learned somehow, normally using ARP who has mechanism and in order to learn destination MAC address using that mechanism destination IP address has to be known. In next-hop-scenario it's either because next hop IP address is set (either statically or via DHCP) or because next hop announces itself (which is what @sindy was explaining).
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: Point to Point Addressing /32 or /31 Default Route

Sat May 29, 2021 9:12 pm

what do you mean by point to multi point ? Connecting a router directly to another one is a point to point one, so ptmp means ?
If you connect Ethernet ports of two routers using a patchcord, it is indeed a point to point connection physically. But the interfaces are still Ethernet ones. And since Ethernet has been designed to support sharing of the transport media among more than two devices interconnected using a coax cable, hub(s), or switch(es), the routers always use the same method to send IP packets via Ethernet ports, no matter what the physical topology is.

Ok, then it doesn't work unless it is a PPP interface (PPPoE etc...) , correct ? In which case interface name is successfully used as gateway..
Correct.

But then why did it work on the /31 static IP i configured on a CCR some time ago ( it is working up to now without problems )... Maybe because it is not between 2 Mikrotiks ?
As I wrote before - I have a strong suspicion that RouterOS uses the ICMP router advertisement messages if it receives them, and I am sure it doesn't send them itself (in IPv4).
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: Point to Point Addressing /32 or /31 Default Route

Sat May 29, 2021 9:42 pm

But then why did it work on the /31 static IP i configured on a CCR some time ago ( it is working up to now without problems )
Btw, you can sniff to a file on the port of the CCR connected to the non-Mikrotik, filtering on ICMP, for about 5-10 minutes. Wireshark should then show you a few ICMP router advertisement packets sent by that other device.
 
Zacharias
Forum Guru
Forum Guru
Topic Author
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Point to Point Addressing /32 or /31 Default Route

Sat May 29, 2021 10:10 pm

Ok thanks @sindy and @mkx ...
 
Zacharias
Forum Guru
Forum Guru
Topic Author
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Point to Point Addressing /32 or /31 Default Route

Sun May 30, 2021 4:04 pm

@sindy i did run the packet sniffer tool, the physical interface connecting both routers was set to the interface field, IP Protocol was set to ICMP and direction to any. I created the .pcap file...
I did run the same test 3 times, first for 5 minutes then 10 and finally 15 minutes...

I opened the .pcap files with wireshark and none of them had any ICMP Router Advertisement type packet... I filtered it as well using as filter icmp.type==9 but nothing again...

Any ideas ?
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: Point to Point Addressing /32 or /31 Default Route

Sun May 30, 2021 4:57 pm

How does the /ip address row look like at that CCR? I just hazily remember someone to mention that Mikrotik sends the packets to a broadcast MAC address under some circumstances. But other than that, no ideas. What RouterOS version is running there?
 
Zacharias
Forum Guru
Forum Guru
Topic Author
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Point to Point Addressing /32 or /31 Default Route

Sun May 30, 2021 5:03 pm

The IP address is x.y.z.w/31 assigned to ether1... The default route uses ether1 as Gateway...
RouterOS version is 6.45.6...
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: Point to Point Addressing /32 or /31 Default Route

Sun May 30, 2021 6:07 pm

What's the network parameter of that /ip address row? x.y.z.(w+1), x.y.z.(w-1), other?
 
Zacharias
Forum Guru
Forum Guru
Topic Author
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Point to Point Addressing /32 or /31 Default Route

Sun May 30, 2021 7:25 pm

The Network parameter is x.y.z.(w-1) ...
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: Point to Point Addressing /32 or /31 Default Route  [SOLVED]

Sun May 30, 2021 9:47 pm

What a coincidence... another forum member was fighting a seemingly unrelated problem, and it came out that if you set an Ethernet interface as a gateway of a route to a destination, it sends ARP requests for the destination addresses out that interface. So if any router connected to that interface is configured with proxy-arp and has a route to the destination, it responds to the ARP request with its own MAC address. So it works, but in larger networks, the ARP table size may become a limitation.

E.g. Cisco seems to have the proxy-arp functionality enabled by default.
 
Zacharias
Forum Guru
Forum Guru
Topic Author
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Point to Point Addressing /32 or /31 Default Route

Sun May 30, 2021 11:10 pm

Ok, i repeated the test but now i did enable proxy-arp on the interface that points to the router at the remote end...
So, two Mikrotik Routers, both on /31 networks and proxy-arp enabled on the first one's p2p interface ...

Stil it didn't work...

As soon as i expanded the network size of the first one, i made it /30 and the second one remained /31, with its address inclued at the /30 network ofcorse and it worked.... But i ve seen other posts too with problems configuring a /31 subnet between two Mirkotiks...

Testing between /32 subnets worked with no problems as well..

Basically the proxy-arp made it work...
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2098
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: Point to Point Addressing /32 or /31 Default Route

Mon May 31, 2021 1:07 am

...But i ve seen other posts too with problems configuring a /31 subnet between two Mirkotiks
official word from MT Support is that ROS does not support /31, have to use /30 or alternatively ptp addressing /32
 
Zacharias
Forum Guru
Forum Guru
Topic Author
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Point to Point Addressing /32 or /31 Default Route

Mon May 31, 2021 10:42 am

...But i ve seen other posts too with problems configuring a /31 subnet between two Mirkotiks
official word from MT Support is that ROS does not support /31, have to use /30 or alternatively ptp addressing /32
Exactly, when i used /31 on the remote end and /30 on the first router it worked... on /32 it worked as well..
It did not work when both routers where configured with /31...
 
sporkman
newbie
Posts: 32
Joined: Thu May 02, 2013 4:37 am

Re: Point to Point Addressing /32 or /31 Default Route

Sat Apr 15, 2023 8:33 am

...But i ve seen other posts too with problems configuring a /31 subnet between two Mirkotiks
official word from MT Support is that ROS does not support /31, have to use /30 or alternatively ptp addressing /32
That is, pardon my language, bullshit on their part.

If they don't support it, then a) document that somewhere b) don't permit it as a valid config (ie: throw an error when a user tries to configure a /31) c) maybe explain why something that's a published RFC and available on "real" gear is not available.

The /32 "trick" breaks some routing protocols (probably worse when you try to interoperate with something adhering to standards) and it's just a bad hack that would not be necessary if the RFC for /31s was supported. It is wild that in trying to figure out why this didn't work I saw a thread form over 13 years ago full of people complaining about it, and here in 2023 it's still not implemented...
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Point to Point Addressing /32 or /31 Default Route

Sat Apr 15, 2023 1:22 pm

Beautiful useless resurrection.

c) maybe explain why something that's a published RFC and available on "real" gear is not available.
Does that router that supports RFC3021 also support RFC2324?
That router must also support the other one. It's an RFC, so it's the bible and it's mandatory to support it...

I have never found a case that a /31 cannot be imitated with a /32 or /30 without problems.
I would really like a precise and specific example where NOT using the /31 prevents something from working...

And about valid or invalid configuration, other brands don't shy away from removing the management service by mistake...
Or any other blunders that a person configuring something like that should know that shouldn't be done... Just for example. ..
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7038
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Point to Point Addressing /32 or /31 Default Route

Sat Apr 15, 2023 5:15 pm


That is, pardon my language, bullshit on their part.

If they don't support it, then a) document that somewhere
Don't call something a BS, if you are bad at searching
https://help.mikrotik.com/docs/display/ ... l+Overview

Who is online

Users browsing this forum: deadmaus911, dervomsee, onnyloh and 80 guests