Development discussion of WireGuard
 help / color / mirror / Atom feed
* Re: [WireGuard] WireGuard cryptokey routing
       [not found]         ` <CAHmME9qr2H=4Qdzx9Kz4=op-O-yzum0+hJWvazHZ_K7ex05ncQ@mail.gmail.com>
@ 2016-07-05 18:05           ` Norman Shulman
  2016-07-05 19:06             ` Jason A. Donenfeld
  0 siblings, 1 reply; 11+ messages in thread
From: Norman Shulman @ 2016-07-05 18:05 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: wireguard

[-- Attachment #1: Type: text/plain, Size: 1379 bytes --]

Hi Jason,

Makes sense, but what if both clients have the same address (
192.168.32.19/32)?

Norm

On Tue, Jul 5, 2016 at 12:30 PM, Jason A. Donenfeld <Jason@zx2c4.com> wrote:

> Hi Norm,
>
> If you run these commands:
>
> wg set wg0 peer ABCD allowed-ips 192.168.32.19/32
> wg set wg0 peer EFGH allowed-ips 192.168.32.19/32
>
> After the first command ABCD has 192.168.32.19/32. After the second
> command, ABCD has no allowed ips, and EFGH has 192.168.32.19/32.
>
> However, if you run these commands:
>
> wg set wg0 peer ABCD allowed-ips 192.168.32.0/24
> wg set wg0 peer EFGH allowed-ips 192.168.32.19/32
>
> After running both commands, ABCD will have 192.168.32.0/24 and EFGH
> will have 192.168.32.19/32. However, when sending packets, the routing
> table lookups will always match on the most specific match, so ABCD
> will not be able to send or receive packets for 192.168.32.19/32.
>
> Make sense?
>
> Jason
>



-- 
Norman Shulman
Sr. Developer/Architect
N-Dimension Solutions Inc.
9030 Leslie St, Unit 300
Richmond Hill, ON L4B 1G2
Canada

Tel: 905 707-8884 x 226
Fax: 905 707-0886

This email and any files transmitted with it are solely intended for the
use of the named recipient(s) and may contain information that is
privileged and confidential. If you receive this email in error, please
immediately notify the sender and delete this message in all its forms.

[-- Attachment #2: Type: text/html, Size: 2653 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [WireGuard] WireGuard cryptokey routing
  2016-07-05 18:05           ` [WireGuard] WireGuard cryptokey routing Norman Shulman
@ 2016-07-05 19:06             ` Jason A. Donenfeld
  2016-07-05 19:09               ` Norman Shulman
  0 siblings, 1 reply; 11+ messages in thread
From: Jason A. Donenfeld @ 2016-07-05 19:06 UTC (permalink / raw)
  To: Norman Shulman; +Cc: WireGuard mailing list

One peer may have multiple allowed-ips.

Several peers may not share the same IP.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [WireGuard] WireGuard cryptokey routing
  2016-07-05 19:06             ` Jason A. Donenfeld
@ 2016-07-05 19:09               ` Norman Shulman
  2016-07-05 19:11                 ` Jason A. Donenfeld
  0 siblings, 1 reply; 11+ messages in thread
From: Norman Shulman @ 2016-07-05 19:09 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

[-- Attachment #1: Type: text/plain, Size: 668 bytes --]

How is this enforced? How does this scale?

On Tue, Jul 5, 2016 at 3:06 PM, Jason A. Donenfeld <Jason@zx2c4.com> wrote:

> One peer may have multiple allowed-ips.
>
> Several peers may not share the same IP.
>



-- 
Norman Shulman
Sr. Developer/Architect
N-Dimension Solutions Inc.
9030 Leslie St, Unit 300
Richmond Hill, ON L4B 1G2
Canada

Tel: 905 707-8884 x 226
Fax: 905 707-0886

This email and any files transmitted with it are solely intended for the
use of the named recipient(s) and may contain information that is
privileged and confidential. If you receive this email in error, please
immediately notify the sender and delete this message in all its forms.

[-- Attachment #2: Type: text/html, Size: 1096 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [WireGuard] WireGuard cryptokey routing
  2016-07-05 19:09               ` Norman Shulman
@ 2016-07-05 19:11                 ` Jason A. Donenfeld
  2016-07-06 15:31                   ` Norman Shulman
  0 siblings, 1 reply; 11+ messages in thread
From: Jason A. Donenfeld @ 2016-07-05 19:11 UTC (permalink / raw)
  To: Norman Shulman; +Cc: WireGuard mailing list

On Tue, Jul 5, 2016 at 9:09 PM, Norman Shulman
<norman.shulman@n-dimension.com> wrote:
> How is this enforced?
Receiving, line 238 here:
https://git.zx2c4.com/WireGuard/tree/src/receive.c#n238
Sending, line 112 here:
https://git.zx2c4.com/WireGuard/tree/src/device.c#n112

> How does this scale?
The same way in which an ethernet network scales? One ethernet device
can have multiple IPs, but separate (unbonded) ethernet devices
generally do not share IPs.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [WireGuard] WireGuard cryptokey routing
  2016-07-05 19:11                 ` Jason A. Donenfeld
@ 2016-07-06 15:31                   ` Norman Shulman
  2016-07-06 15:37                     ` Jason A. Donenfeld
  2016-07-06 15:48                     ` Baptiste Jonglez
  0 siblings, 2 replies; 11+ messages in thread
From: Norman Shulman @ 2016-07-06 15:31 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]

Ethernet networks don't scale; that's why we have IP networks.

So in general a client needs one address for each server? Rather limiting
for clients on small subnets, especially considering the case of n clients
on a subnet, each connecting to m different servers.




On Tue, Jul 5, 2016 at 3:11 PM, Jason A. Donenfeld <Jason@zx2c4.com> wrote:

> On Tue, Jul 5, 2016 at 9:09 PM, Norman Shulman
> <norman.shulman@n-dimension.com> wrote:
> > How is this enforced?
> Receiving, line 238 here:
> https://git.zx2c4.com/WireGuard/tree/src/receive.c#n238
> Sending, line 112 here:
> https://git.zx2c4.com/WireGuard/tree/src/device.c#n112
>
> > How does this scale?
> The same way in which an ethernet network scales? One ethernet device
> can have multiple IPs, but separate (unbonded) ethernet devices
> generally do not share IPs.
>



-- 
Norman Shulman
Sr. Developer/Architect
N-Dimension Solutions Inc.
9030 Leslie St, Unit 300
Richmond Hill, ON L4B 1G2
Canada

Tel: 905 707-8884 x 226
Fax: 905 707-0886

This email and any files transmitted with it are solely intended for the
use of the named recipient(s) and may contain information that is
privileged and confidential. If you receive this email in error, please
immediately notify the sender and delete this message in all its forms.

[-- Attachment #2: Type: text/html, Size: 2086 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [WireGuard] WireGuard cryptokey routing
  2016-07-06 15:31                   ` Norman Shulman
@ 2016-07-06 15:37                     ` Jason A. Donenfeld
  2016-07-06 15:48                     ` Baptiste Jonglez
  1 sibling, 0 replies; 11+ messages in thread
From: Jason A. Donenfeld @ 2016-07-06 15:37 UTC (permalink / raw)
  To: Norman Shulman; +Cc: WireGuard mailing list

[-- Attachment #1: Type: text/plain, Size: 1583 bytes --]

Hey Norman,

I'm not sure I follow here. Could you maybe describe a concrete example of
what your concern is, with as much detail as possible?

Jason
On Jul 6, 2016 5:31 PM, "Norman Shulman" <norman.shulman@n-dimension.com>
wrote:

> Ethernet networks don't scale; that's why we have IP networks.
>
> So in general a client needs one address for each server? Rather limiting
> for clients on small subnets, especially considering the case of n clients
> on a subnet, each connecting to m different servers.
>
>
>
>
> On Tue, Jul 5, 2016 at 3:11 PM, Jason A. Donenfeld <Jason@zx2c4.com>
> wrote:
>
>> On Tue, Jul 5, 2016 at 9:09 PM, Norman Shulman
>> <norman.shulman@n-dimension.com> wrote:
>> > How is this enforced?
>> Receiving, line 238 here:
>> https://git.zx2c4.com/WireGuard/tree/src/receive.c#n238
>> Sending, line 112 here:
>> https://git.zx2c4.com/WireGuard/tree/src/device.c#n112
>>
>> > How does this scale?
>> The same way in which an ethernet network scales? One ethernet device
>> can have multiple IPs, but separate (unbonded) ethernet devices
>> generally do not share IPs.
>>
>
>
>
> --
> Norman Shulman
> Sr. Developer/Architect
> N-Dimension Solutions Inc.
> 9030 Leslie St, Unit 300
> Richmond Hill, ON L4B 1G2
> Canada
>
> Tel: 905 707-8884 x 226
> Fax: 905 707-0886
>
> This email and any files transmitted with it are solely intended for the
> use of the named recipient(s) and may contain information that is
> privileged and confidential. If you receive this email in error, please
> immediately notify the sender and delete this message in all its forms.
>

[-- Attachment #2: Type: text/html, Size: 2753 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [WireGuard] WireGuard cryptokey routing
  2016-07-06 15:31                   ` Norman Shulman
  2016-07-06 15:37                     ` Jason A. Donenfeld
@ 2016-07-06 15:48                     ` Baptiste Jonglez
  2016-07-07 16:15                       ` Norman Shulman
  1 sibling, 1 reply; 11+ messages in thread
From: Baptiste Jonglez @ 2016-07-06 15:48 UTC (permalink / raw)
  To: Norman Shulman; +Cc: WireGuard mailing list

[-- Attachment #1: Type: text/plain, Size: 2050 bytes --]

On Wed, Jul 06, 2016 at 11:31:28AM -0400, Norman Shulman wrote:
> Ethernet networks don't scale; that's why we have IP networks.

Wireguard does not use Ethernet at all, it operates purely at layer 3 (IP).

IP over Ethernet would use a reactive scheme (ARP, Neighbour Discovery) to
discover the mapping between IP addresses and link-layer addresses.  This
is part of the reason why Ethernet does not scale well.

Wireguard, on the other hand, does the equivalent mapping statically, via
the AllowedIPs directive.  The mapping is also slightly different:

- with Ethernet, you map from IP address to MAC address (using ARP or ND)

- Wireguard maps from IP address to public key (using AllowedIP, so this
  is completely static).  A public key is then mapped to the IP address
  and UDP port of the peer on the Internet, using the last known endpoint
  of the peer.  This makes this second mapping mostly dynamic, even though
  it falls back to a static "Endpoint" configuration for bootstrap.

Does that make things clearer for you?

> So in general a client needs one address for each server? Rather limiting
> for clients on small subnets, especially considering the case of n clients
> on a subnet, each connecting to m different servers.
> 
> 
> 
> 
> On Tue, Jul 5, 2016 at 3:11 PM, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> 
> > On Tue, Jul 5, 2016 at 9:09 PM, Norman Shulman
> > <norman.shulman@n-dimension.com> wrote:
> > > How is this enforced?
> > Receiving, line 238 here:
> > https://git.zx2c4.com/WireGuard/tree/src/receive.c#n238
> > Sending, line 112 here:
> > https://git.zx2c4.com/WireGuard/tree/src/device.c#n112
> >
> > > How does this scale?
> > The same way in which an ethernet network scales? One ethernet device
> > can have multiple IPs, but separate (unbonded) ethernet devices
> > generally do not share IPs.
> >

> _______________________________________________
> WireGuard mailing list
> WireGuard@lists.zx2c4.com
> http://lists.zx2c4.com/mailman/listinfo/wireguard


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [WireGuard] WireGuard cryptokey routing
  2016-07-06 15:48                     ` Baptiste Jonglez
@ 2016-07-07 16:15                       ` Norman Shulman
  2016-07-07 16:18                         ` Jason A. Donenfeld
  0 siblings, 1 reply; 11+ messages in thread
From: Norman Shulman @ 2016-07-07 16:15 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

[-- Attachment #1: Type: text/plain, Size: 2803 bytes --]

Look at it from the server side. There are millions of clients on millions
of 192.168.1.0/24 networks, yet a server can communicate with no more than
254 of them.


On Wed, Jul 6, 2016 at 11:48 AM, Baptiste Jonglez <
baptiste@bitsofnetworks.org> wrote:

> On Wed, Jul 06, 2016 at 11:31:28AM -0400, Norman Shulman wrote:
> > Ethernet networks don't scale; that's why we have IP networks.
>
> Wireguard does not use Ethernet at all, it operates purely at layer 3 (IP).
>
> IP over Ethernet would use a reactive scheme (ARP, Neighbour Discovery) to
> discover the mapping between IP addresses and link-layer addresses.  This
> is part of the reason why Ethernet does not scale well.
>
> Wireguard, on the other hand, does the equivalent mapping statically, via
> the AllowedIPs directive.  The mapping is also slightly different:
>
> - with Ethernet, you map from IP address to MAC address (using ARP or ND)
>
> - Wireguard maps from IP address to public key (using AllowedIP, so this
>   is completely static).  A public key is then mapped to the IP address
>   and UDP port of the peer on the Internet, using the last known endpoint
>   of the peer.  This makes this second mapping mostly dynamic, even though
>   it falls back to a static "Endpoint" configuration for bootstrap.
>
> Does that make things clearer for you?
>
> > So in general a client needs one address for each server? Rather limiting
> > for clients on small subnets, especially considering the case of n
> clients
> > on a subnet, each connecting to m different servers.
> >
> >
> >
> >
> > On Tue, Jul 5, 2016 at 3:11 PM, Jason A. Donenfeld <Jason@zx2c4.com>
> wrote:
> >
> > > On Tue, Jul 5, 2016 at 9:09 PM, Norman Shulman
> > > <norman.shulman@n-dimension.com> wrote:
> > > > How is this enforced?
> > > Receiving, line 238 here:
> > > https://git.zx2c4.com/WireGuard/tree/src/receive.c#n238
> > > Sending, line 112 here:
> > > https://git.zx2c4.com/WireGuard/tree/src/device.c#n112
> > >
> > > > How does this scale?
> > > The same way in which an ethernet network scales? One ethernet device
> > > can have multiple IPs, but separate (unbonded) ethernet devices
> > > generally do not share IPs.
> > >
>
> > _______________________________________________
> > WireGuard mailing list
> > WireGuard@lists.zx2c4.com
> > http://lists.zx2c4.com/mailman/listinfo/wireguard
>
>


-- 
Norman Shulman
Sr. Developer/Architect
N-Dimension Solutions Inc.
9030 Leslie St, Unit 300
Richmond Hill, ON L4B 1G2
Canada

Tel: 905 707-8884 x 226
Fax: 905 707-0886

This email and any files transmitted with it are solely intended for the
use of the named recipient(s) and may contain information that is
privileged and confidential. If you receive this email in error, please
immediately notify the sender and delete this message in all its forms.

[-- Attachment #2: Type: text/html, Size: 4084 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [WireGuard] WireGuard cryptokey routing
  2016-07-07 16:15                       ` Norman Shulman
@ 2016-07-07 16:18                         ` Jason A. Donenfeld
  2016-07-14 21:16                           ` Norman Shulman
  0 siblings, 1 reply; 11+ messages in thread
From: Jason A. Donenfeld @ 2016-07-07 16:18 UTC (permalink / raw)
  To: Norman Shulman; +Cc: WireGuard mailing list

On Thu, Jul 7, 2016 at 6:15 PM, Norman Shulman
<norman.shulman@n-dimension.com> wrote:
> Look at it from the server side. There are millions of clients on millions
> of 192.168.1.0/24 networks, yet a server can communicate with no more than
> 254 of them.

Voila, this is where you are most certainly mistaken.

While a client might have 192.168.1.8 as their IP address for eth0,
their IP address for wg0 can be something completely different. Want a
million clients? Use a /20 as your wireguard device inner IP.

Anyway, why don't you tell us all what you actually want to do, rather
than these meandering theoretical questions? Then maybe we can help
you effectively.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [WireGuard] WireGuard cryptokey routing
  2016-07-07 16:18                         ` Jason A. Donenfeld
@ 2016-07-14 21:16                           ` Norman Shulman
  2016-07-15 11:51                             ` Jason A. Donenfeld
  0 siblings, 1 reply; 11+ messages in thread
From: Norman Shulman @ 2016-07-14 21:16 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

[-- Attachment #1: Type: text/plain, Size: 1527 bytes --]

Hi Jason,

Sorry if this sounds too theoretical. I'm just trying to understand the
cryptokey routing well enough to determine if it's suitable for our use.
The main problem I have is understanding how you can base routing on
non-routable addresses, which are not unique.

Thanks.

Norm


On Thu, Jul 7, 2016 at 12:18 PM, Jason A. Donenfeld <Jason@zx2c4.com> wrote:

> On Thu, Jul 7, 2016 at 6:15 PM, Norman Shulman
> <norman.shulman@n-dimension.com> wrote:
> > Look at it from the server side. There are millions of clients on
> millions
> > of 192.168.1.0/24 networks, yet a server can communicate with no more
> than
> > 254 of them.
>
> Voila, this is where you are most certainly mistaken.
>
> While a client might have 192.168.1.8 as their IP address for eth0,
> their IP address for wg0 can be something completely different. Want a
> million clients? Use a /20 as your wireguard device inner IP.
>
> Anyway, why don't you tell us all what you actually want to do, rather
> than these meandering theoretical questions? Then maybe we can help
> you effectively.
>



-- 
Norman Shulman
Sr. Developer/Architect
N-Dimension Solutions Inc.
9030 Leslie St, Unit 300
Richmond Hill, ON L4B 1G2
Canada

Tel: 905 707-8884 x 226
Fax: 905 707-0886

This email and any files transmitted with it are solely intended for the
use of the named recipient(s) and may contain information that is
privileged and confidential. If you receive this email in error, please
immediately notify the sender and delete this message in all its forms.

[-- Attachment #2: Type: text/html, Size: 2245 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [WireGuard] WireGuard cryptokey routing
  2016-07-14 21:16                           ` Norman Shulman
@ 2016-07-15 11:51                             ` Jason A. Donenfeld
  0 siblings, 0 replies; 11+ messages in thread
From: Jason A. Donenfeld @ 2016-07-15 11:51 UTC (permalink / raw)
  To: Norman Shulman; +Cc: WireGuard mailing list

On Thu, Jul 14, 2016 at 11:16 PM, Norman Shulman
<norman.shulman@n-dimension.com> wrote:
> Sorry if this sounds too theoretical. I'm just trying to understand the
> cryptokey routing well enough to determine if it's suitable for our use. The
> main problem I have is understanding how you can base routing on
> non-routable addresses, which are not unique.

I don't think it's productive for either of us for me to continue
answering questions posed in this form. How about instead you write
down an example network layout ("Subnet A is 10.2.3.0/24, Subnet B
is...") and then present a problem you'd like to solve with WireGuard
but are having trouble figuring out how.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-07-15 11:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CANQAqMXqQv_MkEsLSuSHNVqHGJuy6yVHhVP4mM6v3x+5iVbVqA@mail.gmail.com>
     [not found] ` <CAHmME9rXYm3yV0j5pW3yH59j-C9S=6X8-6OY+b=dkuRq7Vpzvw@mail.gmail.com>
     [not found]   ` <CANQAqMX8Bf9taS+VgRYnGwuOoJcG3PL8PNmyOK66O3pHjP6VBw@mail.gmail.com>
     [not found]     ` <CAHmME9rRHgEtsJ8F-4UrzZMwOs43T24Jq+mUHO91-oimQXXjwg@mail.gmail.com>
     [not found]       ` <CANQAqMV=QeCG9BPvPpaCAu56a+mNi_7sNvhDL=_i4N7WFY1=Ng@mail.gmail.com>
     [not found]         ` <CAHmME9qr2H=4Qdzx9Kz4=op-O-yzum0+hJWvazHZ_K7ex05ncQ@mail.gmail.com>
2016-07-05 18:05           ` [WireGuard] WireGuard cryptokey routing Norman Shulman
2016-07-05 19:06             ` Jason A. Donenfeld
2016-07-05 19:09               ` Norman Shulman
2016-07-05 19:11                 ` Jason A. Donenfeld
2016-07-06 15:31                   ` Norman Shulman
2016-07-06 15:37                     ` Jason A. Donenfeld
2016-07-06 15:48                     ` Baptiste Jonglez
2016-07-07 16:15                       ` Norman Shulman
2016-07-07 16:18                         ` Jason A. Donenfeld
2016-07-14 21:16                           ` Norman Shulman
2016-07-15 11:51                             ` Jason A. Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).