[patch] hostname.if5 additional info on point to point addressing

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch] hostname.if5 additional info on point to point addressing

Tom Smyth
Hello lads, and ladies,
I have included some extra info on point to point addressing on
interfaces in OpenBSD  thanks @tedu  for the blog post that helpd me
learn how to do point to point addressing (non Broadcast) on Openbsd
and @theo @ingo for pointing me in the right direction on man page
contributions earlier in the year,
patch is below I hope it helps

Index: src/share/man/man5/hostname.if.5
===================================================================
RCS file: /cvs/src/share/man/man5/hostname.if.5,v
retrieving revision 1.65
diff -u -p -u -r1.65 hostname.if.5
--- src/share/man/man5/hostname.if.5    10 Mar 2017 18:28:11 -0000    1.65
+++ src/share/man/man5/hostname.if.5    23 Sep 2017 11:50:49 -0000
@@ -91,6 +91,16 @@ Regular IPv4 network setup:
 .Va dest_addr
 .Ed
 .Pp
+Point to Point IPv4 network setup:
+.Bd -ragged -offset indent
+.Li inet
+.Op Li alias
+.Va addr
+.Va netmask
+.Va network_addr
+.Va options
+.Ed
+.Pp
 Regular IPv6 network setup:
 .Bd -ragged -offset indent
 .Li inet6
@@ -122,6 +132,13 @@ inet6 alias fec0::1 64
 inet6 alias fec0::2 64 anycast
 !route add 65.65.65.65 10.0.1.13
 up
+.Ed
+.Pp
+Point to point ip addressing can also be applied to an interface
+for example:
+.Bd -literal -offset 1n
+inet 10.64.100.2 0xffffffff 10.64.80.25
+#    host_addr  /32_netmask network_addr
 .Ed
 .Pp
 The above formats have the following field values:

Reply | Threaded
Open this post in threaded view
|

Re: [patch] hostname.if5 additional info on point to point addressing

Tom Smyth
Hello Lads and ladies

I had a number of discussions with some devs about this patch and
there seems to be a lack of confidence in what I wrote  :)
and one person used the word suspicious to describe the patch :)

so the point to point addressing scheme is for saving ips sometimes
 it can be referred to incorrectly in my opinion as /31 addressing
 (well it is more like 2x /32 addresses) but it can be a
(summary /31 network if they are sequential
and the first ip is an even number)
it is described on the following rfc
https://tools.ietf.org/html/rfc3021

it is used to save IP allocations rather than using a
standard broadcast network allocation
for giving an ip to a client which would require /30 network
(4 Ips in total )
so an ascii diagram of what im trying to document is as follows

                          inet 10.3.4.5 0xffffffff 10.1.2.3
                              +
                              |
 +-----------------+          |  +------------------+
 |  Router A       |          v  |    Router B      |
 |                 +-+--------+--+                  |
 +-----------------+ ^           +------------------+
                     |
                     |
inet 10.1.2.3   0xffffffff 10.3.4.5

so in point to point addressing an interface on your router
you put ip address of your router interface after inet
 you set the subnet mask to /32  (255.255.255.255)
and you put the other router ip address after the subnetmask,

then on the other router you do swap the ips  in the hostname.if file
and hey presto your link works

comments suggestions and criticisms welcome
Thanks


On 24 September 2017 at 13:12, Tom Smyth <[hidden email]> wrote:

> Hello lads, and ladies,
> I have included some extra info on point to point addressing on
> interfaces in OpenBSD  thanks @tedu  for the blog post that helpd me
> learn how to do point to point addressing (non Broadcast) on Openbsd
> and @theo @ingo for pointing me in the right direction on man page
> contributions earlier in the year,
> patch is below I hope it helps
>
> Index: src/share/man/man5/hostname.if.5
> ===================================================================
> RCS file: /cvs/src/share/man/man5/hostname.if.5,v
> retrieving revision 1.65
> diff -u -p -u -r1.65 hostname.if.5
> --- src/share/man/man5/hostname.if.5    10 Mar 2017 18:28:11 -0000    1.65
> +++ src/share/man/man5/hostname.if.5    23 Sep 2017 11:50:49 -0000
> @@ -91,6 +91,16 @@ Regular IPv4 network setup:
>  .Va dest_addr
>  .Ed
>  .Pp
> +Point to Point IPv4 network setup:
> +.Bd -ragged -offset indent
> +.Li inet
> +.Op Li alias
> +.Va addr
> +.Va netmask
> +.Va network_addr
> +.Va options
> +.Ed
> +.Pp
>  Regular IPv6 network setup:
>  .Bd -ragged -offset indent
>  .Li inet6
> @@ -122,6 +132,13 @@ inet6 alias fec0::1 64
>  inet6 alias fec0::2 64 anycast
>  !route add 65.65.65.65 10.0.1.13
>  up
> +.Ed
> +.Pp
> +Point to point ip addressing can also be applied to an interface
> +for example:
> +.Bd -literal -offset 1n
> +inet 10.64.100.2 0xffffffff 10.64.80.25
> +#    host_addr  /32_netmask network_addr
>  .Ed
>  .Pp
>  The above formats have the following field values:

Reply | Threaded
Open this post in threaded view
|

Re: [patch] hostname.if5 additional info on point to point addressing

Stuart Henderson
On 2017/10/01 19:18, Tom Smyth wrote:
> so the point to point addressing scheme is for saving ips sometimes
>  it can be referred to incorrectly in my opinion as /31 addressing

It's totally different to /31.

>  (well it is more like 2x /32 addresses) but it can be a

What you're suggesting is more commonly known as "ip unnumbered", the gateway
uses an address shared between multiple downstreams. It was originally common
for PPP links but low-budget VPS providers started doing this on ethernet too.

> it is described on the following rfc
> https://tools.ietf.org/html/rfc3021

No, that describes standard /31 use.

Reply | Threaded
Open this post in threaded view
|

Re: [patch] hostname.if5 additional info on point to point addressing

Tom Smyth
Hello,

But the Ip configuration syntax in hostname.if is the same.
(appart from a /31 having a sequential ip address pair that starts
on an even numbered ip) while a point to point / ip unumbered setup
would have any arbitary pair of ips on the interface.
Is there anything specifically wrong in the proposed patch ?
thanks for the update on ip unumbered (i didnt know about that term
for point to point addressing)
Tom Smyth

On 1 October 2017 at 23:42, Stuart Henderson <[hidden email]> wrote:

> On 2017/10/01 19:18, Tom Smyth wrote:
>> so the point to point addressing scheme is for saving ips sometimes
>>  it can be referred to incorrectly in my opinion as /31 addressing
>
> It's totally different to /31.
>
>>  (well it is more like 2x /32 addresses) but it can be a
>
> What you're suggesting is more commonly known as "ip unnumbered", the gateway
> uses an address shared between multiple downstreams. It was originally common
> for PPP links but low-budget VPS providers started doing this on ethernet too.
>
>> it is described on the following rfc
>> https://tools.ietf.org/html/rfc3021
>
> No, that describes standard /31 use.
>



--
Kindest regards,
Tom Smyth

Mobile: +353 87 6193172
The information contained in this E-mail is intended only for the
confidential use of the named recipient. If the reader of this message
is not the intended recipient or the person responsible for
delivering it to the recipient, you are hereby notified that you have
received this communication in error and that any review,
dissemination or copying of this communication is strictly prohibited.
If you have received this in error, please notify the sender
immediately by telephone at the number above and erase the message
You are requested to carry out your own virus check before
opening any attachment.

Reply | Threaded
Open this post in threaded view
|

Re: [patch] hostname.if5 additional info on point to point addressing

Stuart Henderson
On 2017/10/02 03:04, Tom Smyth wrote:
> Hello,
>
> But the Ip configuration syntax in hostname.if is the same.

For a /31 you just use e.g. "inet 192.0.2.100/31" (and it works properly
in other parts of the system, e.g. ospfd).

> Is there anything specifically wrong in the proposed patch ?

This configuration only works on actual point-to-point interfaces (gif, gre,
tun). Without further explanation people might expect it to work on ethernet
like interfaces, and the "endpoint" address (10.64.80.25 in your example)
doesn't do anything there.

Reply | Threaded
Open this post in threaded view
|

Re: [patch] hostname.if5 additional info on point to point addressing

Tom Smyth
Hello Stuart, all,
Thanks for the corrections Stuart,
I have corrected the patch to take into account your suggestions
and I hope this proposed patch is more correct and useful
Index: src/share/man/man5/hostname.if.5
===================================================================
RCS file: /cvs/src/share/man/man5/hostname.if.5,v
retrieving revision 1.65
diff -u -p -u -r1.65 hostname.if.5
--- src/share/man/man5/hostname.if.5    10 Mar 2017 18:28:11 -0000      1.65
+++ src/share/man/man5/hostname.if.5    12 Oct 2017 00:06:15 -0000
@@ -91,6 +91,16 @@ Regular IPv4 network setup:
 .Va dest_addr
 .Ed
 .Pp
+Point to Point IPv4 network setup:
+.Bd -ragged -offset indent
+.Li inet
+.Op Li alias
+.Va addr
+.Va netmask
+.Va network_addr
+.Va options
+.Ed
+.Pp
 Regular IPv6 network setup:
 .Bd -ragged -offset indent
 .Li inet6
@@ -122,6 +132,15 @@ inet6 alias fec0::1 64
 inet6 alias fec0::2 64 anycast
 !route add 65.65.65.65 10.0.1.13
 up
+.Ed
+.Pp
+Point to point IP addresses or IP unnumbered addresses
+can also be applied to an interface iff it is a tunnel or serial interface
+such as; gif(4), gre(4), pppoe(4), ppp(4), sppp(4).
+For example:
+.Bd -literal -offset 1n
+inet 10.64.100.2 0xffffffff 10.64.80.25
+#    local_addr  /32_netmask remote_addr
 .Ed
 .Pp
 The above formats have the following field values:

On 2 October 2017 at 11:33, Stuart Henderson <[hidden email]> wrote:

> On 2017/10/02 03:04, Tom Smyth wrote:
>> Hello,
>>
>> But the Ip configuration syntax in hostname.if is the same.
>
> For a /31 you just use e.g. "inet 192.0.2.100/31" (and it works properly
> in other parts of the system, e.g. ospfd).
>
>> Is there anything specifically wrong in the proposed patch ?
>
> This configuration only works on actual point-to-point interfaces (gif, gre,
> tun). Without further explanation people might expect it to work on ethernet
> like interfaces, and the "endpoint" address (10.64.80.25 in your example)
> doesn't do anything there.
>



--
Kindest regards,
Tom Smyth

Mobile: +353 87 6193172
The information contained in this E-mail is intended only for the
confidential use of the named recipient. If the reader of this message
is not the intended recipient or the person responsible for
delivering it to the recipient, you are hereby notified that you have
received this communication in error and that any review,
dissemination or copying of this communication is strictly prohibited.
If you have received this in error, please notify the sender
immediately by telephone at the number above and erase the message
You are requested to carry out your own virus check before
opening any attachment.

Reply | Threaded
Open this post in threaded view
|

Re: [patch] hostname.if5 additional info on point to point addressing

Ingo Schwarze
Hi Tom,

it is still completely unclear what you are even trying to talk
about.  The patch is certainly not acceptable, it is vague,
highly confusing, and fails to state what it is all about.

If what you are trying to document is the so-called "IP unnumbered"
hack:  That is an abomination brewed by a single corporate vendor
and a severe abuse of how IP works.  I doubt that the documentation
needs to mention it at all, and i feel that, if any text is added
anywhere about "IP unnumbered", it should not sound as if that abuse
is encouraged, and the text should definitely make it clear that it
is an abominable hack, maybe using a wording like

  If an Internet access provider uses the so-called "IP unnumbered"
  hack which violates the basic principles of how IP is supposed
  to work, it is possible to work around the problem with a
  client configuration similar to the following:
  ...

The text must not be worded in any way that lends itself to confusion
with normal PPP.

Your try fails on all counts.

If any other developer thinks "IP unnumbered" is worth mentioning
and wants to document it properly, fine, but right now, this thread
feel like a waste of time.

Oh, and please do not document how to set up "IP unnumbered" on an
OpenBSD router.  I do not think that should be supported, even if it
happens to work right now.

Yours,
  Ingo

Reply | Threaded
Open this post in threaded view
|

Re: [patch] hostname.if5 additional info on point to point addressing

Tom Smyth
Hi Ingo,

First of all thanks for the feedback it is appreciated,
especially when you think the thread is a waste of time.

so rather than look for feedback on another patch for now

If you could bear with me and let me outline
why I think this thread is important
important enough to be my first proper attempt at a patch
submission :)

what Im trying to document is point to point addressing
similar to serial links /PPP /PPPoE links

There are a couple of advantages in these systems
a) in that it there is no arp on the link
b) it can save the number of addresses used by linking
routers together

I must say point to point addressing /ip unnumbered is widely
deployed in networks in the wild and is supported on other vendors,
and in order for me to integrate OpenBSD Routers / firewalls  into
those networks, we use the point to point addressing  feature
(ip un numbered) to achieve this.

In a nut shell there is a feature that is useful in OpenBSD in use
in the Wild, that I found difficult to get working because it was
not documented (adequately) in the manual. The only way I could get
 it to work was internet searching and finding a Tedu blog post

I think this feature is useful and functional and should be
documented and I want to help with the documentation based on my
experience.

If you / the community agree with my intention can you point me
in a direction where I can document this feature in a useful
manner for the OpenBSD Users.

Perhaps it needs its own manual page ?
Perhaps a manual page explaining all the ways we can set an
Ip address  on an interface would be helpful ?
Maybe hostname.if.5 is not the place for it ?
Any ideas and pointers that would allow me to submit a useful
doc patch would be greatly appreciated

Thanks for your Time and consideration

Tom Smyth

P.S. I absolutely hate /31 addressing
I prefer having a link with 2 x /32 ip addresses
is easier for me to digest than the 2 ip addresses
occupying the reserved network and Broadcast addresses in
/31 addressing

Reply | Threaded
Open this post in threaded view
|

Re: [patch] hostname.if5 additional info on point to point addressing

Joe Holden-2
On 12/10/2017 17:04, Tom Smyth wrote:

> Hi Ingo,
>
> First of all thanks for the feedback it is appreciated,
> especially when you think the thread is a waste of time.
>
> so rather than look for feedback on another patch for now
>
> If you could bear with me and let me outline
> why I think this thread is important
> important enough to be my first proper attempt at a patch
> submission :)
>
> what Im trying to document is point to point addressing
> similar to serial links /PPP /PPPoE links
>
> There are a couple of advantages in these systems
> a) in that it there is no arp on the link
> b) it can save the number of addresses used by linking
> routers together
>
> I must say point to point addressing /ip unnumbered is widely
> deployed in networks in the wild and is supported on other vendors,
> and in order for me to integrate OpenBSD Routers / firewalls  into
> those networks, we use the point to point addressing  feature
> (ip un numbered) to achieve this.
"IP unnumbered" is only acceptable on true point to point like PPP.
Said vendor doesn't officially support it on non-p2p links.

>
> In a nut shell there is a feature that is useful in OpenBSD in use
> in the Wild, that I found difficult to get working because it was
> not documented (adequately) in the manual. The only way I could get
>   it to work was internet searching and finding a Tedu blog post
>
> I think this feature is useful and functional and should be
> documented and I want to help with the documentation based on my
> experience.
>
> If you / the community agree with my intention can you point me
> in a direction where I can document this feature in a useful
> manner for the OpenBSD Users.
>
> Perhaps it needs its own manual page ?
> Perhaps a manual page explaining all the ways we can set an
> Ip address  on an interface would be helpful ?
> Maybe hostname.if.5 is not the place for it ?
> Any ideas and pointers that would allow me to submit a useful
> doc patch would be greatly appreciated
>
> Thanks for your Time and consideration
>
> Tom Smyth
>
> P.S. I absolutely hate /31 addressing
> I prefer having a link with 2 x /32 ip addresses
> is easier for me to digest than the 2 ip addresses
> occupying the reserved network and Broadcast addresses in
> /31 addressing
>
Why is arbitary /32 addresses with the associated uselessness (I suspect
ospfd etc will likely break anyway) any better than 2 sequential
addresses that are always on a boundary?  Also see: /31 has neither
network nor broadcast addresses, they must be interpreted as host
addresses (as per the RFC)

Bearing in mind the only vendor to actively encourage this setup is
Mikrotik because they can't figure out how to support /31 properly (like
every other OS vendor has done, Microsoft included).

Adding horribleness like this sets a precedent that I don't think is wise.