All of lore.kernel.org
 help / color / mirror / Atom feed
From: d tbsky <tbskyd@gmail.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: multi-home difficulty
Date: Mon, 4 Dec 2017 01:45:50 +0800	[thread overview]
Message-ID: <CAC6SzHKGuD9k9Dm3K-1ysW__ny+UH6P3_FHJ+XMNhErAjjNjAg@mail.gmail.com> (raw)
In-Reply-To: <CAC6SzHJotdY8ihSdDPBWoz=k9EvN1rUDPR=yvrkutmTEFX75TQ@mail.gmail.com>

2017-12-01 15:44 GMT+08:00 d tbsky <tbskyd@gmail.com>:
> 2017-11-29 22:49 GMT+08:00 Jason A. Donenfeld <Jason@zx2c4.com>:
>> On Wed, Nov 29, 2017 at 3:16 PM, d tbsky <tbskyd@gmail.com> wrote:
>>>      sorry I misunderstand you. you mean I modify the script and run
>>> in my environment to reveal the problem?
>>> ok I will try to do it.
>>
>> Take what I sent you. Run it. If it breaks, send me the output and
>> your kernel. If it doesn't break, mess with it until it breaks, and
>> then send it back to me.

Hi Jason:

     sorry for bothering your again. I still can not find the key
point. my testing environment is  rhel 7.4,
I have  tried kernel 3.10,  4.4,  4.14. wireguard 20171111 and 20171127.

I have three things in mind.

1. when wireguard communication established, it will remember self
source ip(although "wg wg0" didn't show) forever until changed next
time. I don't know if the assumption true, could you tell me? I don't
know if this is wireguard feature or netns feature.

2. I build three netns environment, to emulate multi-home-client,
multi-home-server, and a router between client/server. wireguard works
perfect under netns environment.

3. in real world the situation is strange. as I said last time, build
a simple vm with two nic(in the same host bridge)  will reveal the
problem. my vm looks like below:

>ip addr show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
    link/ether 52:54:00:ff:29:75 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
    link/ether 52:54:00:31:d3:1a brd ff:ff:ff:ff:ff:ff
    inet 10.99.1.99/24 scope global eth1
       valid_lft forever preferred_lft forever
    inet 10.99.1.100/24 scope global secondary eth1
       valid_lft forever preferred_lft forever

it is the most simple config I could find to reveal the problem.
situation below won't show any problem:
1. single nic
2. two nic but ip bound to first nic
3. two nic but first nic state is "down", not "up".

the problem is the same under kernel 3.10, 4.4, 4.14. when client
connect to server ip "10.99.1.100", server will reply with ip
"10.99.1.99". it is really a puzzle to me. but maybe you can see why
immediately if you have the environment.

thanks a lot for your patience.

Regards,
tbskyd

      reply	other threads:[~2017-12-03 17:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21 13:21 multi-home difficulty d tbsky
2017-11-21 13:32 ` Tomas Herceg
2017-11-21 14:15 ` Jason A. Donenfeld
2017-11-21 14:35   ` d tbsky
2017-11-22 23:35     ` Jason A. Donenfeld
2017-11-23 17:06       ` d tbsky
2017-11-29 11:05       ` d tbsky
2017-11-29 13:13         ` Jason A. Donenfeld
2017-11-29 13:51         ` Jason A. Donenfeld
2017-11-29 14:08           ` d tbsky
2017-11-29 14:10             ` Jason A. Donenfeld
2017-11-29 14:16               ` d tbsky
2017-11-29 14:49                 ` Jason A. Donenfeld
2017-11-30  6:15                   ` d tbsky
2017-11-30  6:22                     ` d tbsky
2017-11-30  6:30                       ` d tbsky
2017-12-01  7:44                   ` d tbsky
2017-12-03 17:45                     ` d tbsky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAC6SzHKGuD9k9Dm3K-1ysW__ny+UH6P3_FHJ+XMNhErAjjNjAg@mail.gmail.com \
    --to=tbskyd@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.