All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sahil Gupta <sg5414@rit.edu>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: RTNETLINK answers: Operation not supported
Date: Sun, 6 Aug 2017 14:31:22 -0400	[thread overview]
Message-ID: <CAA8CD9tQ8cQekHK1dF-SPcxRHswWgAuJ6zsxqwvmPK4cbz8oVQ@mail.gmail.com> (raw)
In-Reply-To: <CAHmME9r6wpShD12r+RYGC84EZVYRXAFgaoMAWjGAz0uktKWuGw@mail.gmail.com>

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

Thanks for reply.
That problem is resolve.
I am in new difficultly now.

Scenario.
We have three system say laptop L1, laptop L2 and raspberry pi (say pi).
L1 and L2 are connected with wireless interface(wlan0). L1 and pi connected
from ethernet interface via ethernet cable.

Now,
L1 wlan  ip: 192.168.0.9
L1 eth0 ip: 10.42.0.1
L2 wlan ip: 192.168.0.11
pi eth0 ip: 10.42.0.2
L1 wg0 ip: 10.0.0.6
L2 wg0 ip: 10.0.0.2
pi wg0 ip: 10.0.0.3

Now problem is L1 and pi executing ping command but L1 and L2 don't.

<============================================================================================>
*Connectivity:*
L1(eth0 : 10.42.0.1, wg0 : 10.0.0.6, wlan0 : 192.168.0.9)         ⇔
 L2(wlan0 : 192.168.0.11,wg0 : 10.0.0.2 )

⇕

pi (eth0:10.42.0.2,wg0:10.0.0.3)
<=============================================================================================>
*Config file of L1:*
[Interface]
PrivateKey = 6Ew/TWF8+ofWSnk1Mxmb+8D8Kx9ZIP2SjcxBKkmXnGo=
ListenPort = 12345
Address = 10.0.0.6/24

[Peer]
PublicKey = r+F7hbLjN3J4qc75V734DW2H28BVh8ydkCkK1Lf8blY=
Endpoint = 192.168.0.11:12345
AllowedIPs = 10.0.0.0/24

[Peer]
PublicKey = hkZUDze5qDILltpjoaYe+vG1qcYqTtKg8E3nawix92k=
Endpoint = 10.42.0.2:12345
AllowedIPs = 10.0.0.0/24
<=============================================================================================>
*Config file of L2:*
[Interface]
PrivateKey = SICBGQ/vbASs5Xoo0AK1cMy9CbLpfxlCAD2Ap+TACEo=
ListenPort = 12345
Address = 10.0.0.2/24

[Peer]
PublicKey = duJE8ANouuvgL5IZM7oMWCdluvMlCvjZCDe8BJIVg34=
Endpoint = 192.168.0.9:12345
AllowedIPs = 10.0.0.0/24
<=============================================================================================>
*Config file of pi:*
[Interface]
PrivateKey = kNFqEj9bB8CUx7mfGdc4UR1uYtj647X5HKdx7XPbGFA=
ListenPort = 12345
Address = 10.0.0.3/24

[Peer]
PublicKey = duJE8ANouuvgL5IZM7oMWCdluvMlCvjZCDe8BJIVg34=
Endpoint = 10.42.0.1:12345
AllowedIPs = 10.0.0.0/24
<=============================================================================================>
*Terminal of L1:*
sahilgupta221@sahilgupta221-Inspiron-3543:/etc/wireguard$ sudo wg-quick up
wg0
Warning: `/etc/wireguard/wg0.conf' is world accessible
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip address add 10.0.0.6/24 dev wg0
[#] ip link set mtu 1420 dev wg0
[#] ip link set wg0 up
sahilgupta221@sahilgupta221-Inspiron-3543:/etc/wireguard$ ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
^C
--- 10.0.0.2 ping statistics ---
294 packets transmitted, 0 received, 100% packet loss, time 293003ms

sahilgupta221@sahilgupta221-Inspiron-3543:/etc/wireguard$ ping 10.0.0.3
PING 10.0.0.3 (10.0.0.3) 56(84) bytes of data.
64 bytes from 10.0.0.3: icmp_seq=1 ttl=64 time=13.1 ms
64 bytes from 10.0.0.3: icmp_seq=2 ttl=64 time=0.922 ms
64 bytes from 10.0.0.3: icmp_seq=3 ttl=64 time=0.934 ms
64 bytes from 10.0.0.3: icmp_seq=4 ttl=64 time=0.718 ms
64 bytes from 10.0.0.3: icmp_seq=5 ttl=64 time=0.949 ms
64 bytes from 10.0.0.3: icmp_seq=6 ttl=64 time=0.902 ms
64 bytes from 10.0.0.3: icmp_seq=7 ttl=64 time=0.829 ms
64 bytes from 10.0.0.3: icmp_seq=8 ttl=64 time=0.907 ms
^C
--- 10.0.0.3 ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 7004ms
rtt min/avg/max/mdev = 0.718/2.410/13.120/4.048 ms
sahilgupta221@sahilgupta221-Inspiron-3543:/etc/wireguard$
<=============================================================================================>
*Terminal of L2*:
sahilgupta221@sahilgupta221-900X3B-900X4B:/etc/wireguard$ sudo wg-quick up
wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip address add 10.0.0.2/24 dev wg0
[#] ip link set mtu 1420 dev wg0
[#] ip link set wg0 up
sahilgupta221@sahilgupta221-900X3B-900X4B:/etc/wireguard$ ping 10.0.0.6
PING 10.0.0.6 (10.0.0.6) 56(84) bytes of data.
^C
--- 10.0.0.6 ping statistics ---
246 packets transmitted, 0 received, 100% packet loss, time 250882ms

sahilgupta221@sahilgupta221-900X3B-900X4B:/etc/wireguard$ ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.129 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.074 ms
64 bytes from 10.0.0.2: icmp_seq=3 ttl=64 time=0.080 ms
64 bytes from 10.0.0.2: icmp_seq=4 ttl=64 time=0.077 ms
64 bytes from 10.0.0.2: icmp_seq=5 ttl=64 time=0.073 ms
64 bytes from 10.0.0.2: icmp_seq=6 ttl=64 time=0.072 ms
64 bytes from 10.0.0.2: icmp_seq=7 ttl=64 time=0.070 ms
64 bytes from 10.0.0.2: icmp_seq=8 ttl=64 time=0.075 ms
64 bytes from 10.0.0.2: icmp_seq=9 ttl=64 time=0.076 ms
^C
--- 10.0.0.2 ping statistics ---
9 packets transmitted, 9 received, 0% packet loss, time 8200ms
rtt min/avg/max/mdev = 0.070/0.080/0.129/0.020 ms
sahilgupta221@sahilgupta221-900X3B-900X4B:/etc/wireguard$ ping 10.0.0.3
PING 10.0.0.3 (10.0.0.3) 56(84) bytes of data.
^C
--- 10.0.0.3 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1007ms

sahilgupta221@sahilgupta221-900X3B-900X4B:/etc/wireguard$ sudo chmod 777 *
[sudo] password for sahilgupta221:
sahilgupta221@sahilgupta221-900X3B-900X4B:/etc/wireguard$
<=============================================================================================>
*Terminal of pi:*
pi@raspberrypi:~ $ sudo wg-quick up wg0
Warning: `/etc/wireguard/wg0.conf' is world accessible
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip address add 10.0.0.3/24 dev wg0
[#] ip link set mtu 1420 dev wg0
[#] ip link set wg0 up
pi@raspberrypi:~ $ ping 10.0.0.6
PING 10.0.0.6 (10.0.0.6) 56(84) bytes of data.
64 bytes from 10.0.0.6: icmp_seq=1 ttl=64 time=5015 ms
64 bytes from 10.0.0.6: icmp_seq=2 ttl=64 time=4009 ms
64 bytes from 10.0.0.6: icmp_seq=3 ttl=64 time=2969 ms
64 bytes from 10.0.0.6: icmp_seq=4 ttl=64 time=1929 ms
64 bytes from 10.0.0.6: icmp_seq=5 ttl=64 time=890 ms
64 bytes from 10.0.0.6: icmp_seq=6 ttl=64 time=0.829 ms
64 bytes from 10.0.0.6: icmp_seq=7 ttl=64 time=4.16 ms
64 bytes from 10.0.0.6: icmp_seq=8 ttl=64 time=0.883 ms
64 bytes from 10.0.0.6: icmp_seq=9 ttl=64 time=0.849 ms
64 bytes from 10.0.0.6: icmp_seq=10 ttl=64 time=4.08 ms
^C
--- 10.0.0.6 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9245ms
rtt min/avg/max/mdev = 0.829/1482.655/5015.674/1805.291 ms, pipe 5
pi@raspberrypi:~ $ ^C
pi@raspberrypi:~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:ab:0e:3b
          inet addr:10.42.0.2  Bcast:10.42.0.255  Mask:255.255.255.0
          inet6 addr: fe80::ba27:ebff:feab:e3b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:638 errors:0 dropped:0 overruns:0 frame:0
          TX packets:316 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:73672 (71.9 KiB)  TX bytes:38774 (37.8 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wg0       Link encap:UNSPEC  HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:10.0.0.3  P-t-P:10.0.0.3  Mask:255.255.255.0
          UP POINTOPOINT RUNNING NOARP  MTU:1420  Metric:1
          RX packets:307 errors:0 dropped:0 overruns:0 frame:0
          TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:25812 (25.2 KiB)  TX bytes:3988 (3.8 KiB)

pi@raspberrypi:~ $ nano w
pi@raspberrypi:~ $ ^C
pi@raspberrypi:~ $ cd /etc/wireguard/
pi@raspberrypi:/etc/wireguard $ nano wg0.conf
pi@raspberrypi:/etc/wireguard $ ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
^C
--- 10.0.0.2 ping statistics ---
23 packets transmitted, 0 received, 100% packet loss, time 22891ms
<=============================================================================================>

*Summarry*:
Q1: How can I connectivity between L1 and L2?
Q2: Do I need to maintain two different wireguard interfaces for each LAN
connection?
Q3: If answer to Q2 is yes then how L2 can ping to pi?
Q4: Why pi can't ping to L2?
Terminal response will verifies the problem.

<============================================================================================>

*PS: Apologies for disturbing on weekends. Didn't realize weekend part. *


*These are summer holidays here. Each day is same to me.Some of people
like, you, Eric,Christian Hesse etc. are super experts on certain
matters.My selfishness is that I want the quick response to accelerate
work.*


*So approached in this manner.*



*Not sure of duplicate part. I think I only send two messages.One solution
to problem and other requesting the tutorial.Next time I will maintain
single thread for particular problem.Please reply whenever feel free.*
😊

Sorry and Thanks again
Sahil Gupta

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

  reply	other threads:[~2017-08-06 18:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-05 19:38 RTNETLINK answers: Operation not supported Sahil Gupta
2017-08-06 16:30 ` Sahil Gupta
2017-08-06 16:33   ` Sahil Gupta
2017-08-06 16:34     ` Jason A. Donenfeld
2017-08-06 18:31       ` Sahil Gupta [this message]
2017-08-06 18:36         ` Jason A. Donenfeld
  -- strict thread matches above, loose matches on Subject: below --
2017-02-28 16:08 William Clark
2017-02-28 22:21 ` Lucian Cristian
2017-03-01  8:14 ` Jörg Thalheim

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=CAA8CD9tQ8cQekHK1dF-SPcxRHswWgAuJ6zsxqwvmPK4cbz8oVQ@mail.gmail.com \
    --to=sg5414@rit.edu \
    --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.