discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] TUN/TAP PDU not working


From: Cinaed Simson
Subject: Re: [Discuss-gnuradio] TUN/TAP PDU not working
Date: Thu, 15 Jun 2017 14:49:02 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

On 06/15/2017 08:15 AM, Mojtaba Mansour Abadi wrote:
> Hi,
> 
> These are the output of the commands:
> 
> PC1:
> 
> enp0s31f6 Link encap:Ethernet  HWaddr f4:8e:38:b3:42:db  
>           UP BROADCAST MULTICAST  MTU:1500  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:1000 
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
>           Interrupt:19 Memory:f7e80000-f7ea0000 
> 
> enp5s0    Link encap:Ethernet  HWaddr 00:0a:f7:93:1a:93  
>           UP BROADCAST MULTICAST  MTU:1500  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:1000 
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
>           Interrupt:18 
> 
> 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:8305 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:8305 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1 
>           RX bytes:617488 (617.4 KB)  TX bytes:617488 (617.4 KB)
> 
> tap0      Link encap:Ethernet  HWaddr 02:89:56:03:96:e1  
>           inet addr:192.168.200.1  Bcast:192.168.200.255  Mask:255.255.255.0
>           inet6 addr: fe80::89:56ff:fe03:96e1/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:10000  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000 
>           RX bytes:0 (0.0 B)  TX bytes:732 (732.0 B)
> 
> 
> 
> PC2:
> 
> enp0s31f6 Link encap:Ethernet  HWaddr d4:81:d7:9b:de:e5  
>           UP BROADCAST MULTICAST  MTU:1500  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:1000 
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
>           Interrupt:16 Memory:ef300000-ef320000 
> 
> 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:1428 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:1428 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1 
>           RX bytes:108539 (108.5 KB)  TX bytes:108539 (108.5 KB)
> 
> tap0      Link encap:Ethernet  HWaddr 86:2f:2a:03:4c:35  
>           inet addr:192.168.200.10  Bcast:192.168.200.255
>  Mask:255.255.255.0
>           inet6 addr: fe80::842f:2aff:fe03:4c35/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:10000  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000 
>           RX bytes:0 (0.0 B)  TX bytes:732 (732.0 B)
> 
> wlp2s0    Link encap:Ethernet  HWaddr 14:ab:c5:3c:96:73  
>           inet6 addr: fe80::2c1a:98d8:1f9f:9d23/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:618 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:128 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000 
>           RX bytes:75975 (75.9 KB)  TX bytes:14759 (14.7 KB)
> 
Neither of these machines have an IP address attached to it's Ethernet
card.

It just keeps getting worse.

So I have to ask - since you're not giving me any clues - do both of
these machines and the USBP have an Ethernet cables?

And if they do have Ethernet cables, what are they plugged into?

I'll assume they're connected correctly.

On the both PC1 and PC2, type

  ip tuntap del dev tap0 mode tap

On PC1, type

  ifconfig enp0s31f6 inet 192.168.200.1 netmask 255.255.255.0
  ifconfig enp0s31f6 up

On PC2, type

  ifconfig enp0s31f6 inet 192.168.200.3 netmask 255.255.255.0
  ifconfig enp0s31f6 up

Then on either PC, ping the other one. Try pinging the USRP. The pinging
shoud work - unless you have more than one Ethernet card and you plugged
the cable into the wrong card.

The idea is a tap relies on the existing Ethernet framing (and hence
routing) so if the machines are connected correctly then configuring
their Ethernet cards should provide the necessary infrastructure.

Also, you need to go the USRP mailing list and ask them how to change
the IP address of the B210 - it's something you should know how to do.

In general, the tap address on the B210 should have the same network
address as your PC.

The network address of PC1 is 192.168.200.0 and the host address
192.168.200.1.

-- Cinaed

> 
> 
> I also noticed something odd.
> When I run the flowgraph on the machines. Tx and Rx LEDs are one on both
> USRPS.
> However as soon as I assign an IP Address to the virtual eth cards, the
> Rx LED on one of the USRPs goes off.
> It happens randomly so sometimes it is PC1 side and sometimes PC2.
> 
> Cheers.
> 
> On 14 June 2017 at 23:05, Cinaed Simson <address@hidden
> <mailto:address@hidden>> wrote:
> 
>     On 06/14/2017 12:15 AM, address@hidden
>     <mailto:address@hidden> wrote:
>     > I don't know exactly what you mean by bringing up interfaces.
>     >
>     > Let's say I assign 192.168.200.1 to PC1.
>     > For sure I can ping 192.168.200.1 on PC1.
>     > But from PC2, this destination is unreachable.
>     >
>     > I don't know what the issue could be. Since. I'm just a Linux user (not 
> an expert) I have no clue where the problem is.
> 
>     I'm going to assume the B210 isn't using the IP address
> 
>       192.168.200.1
> 
>     Can you ping the B210 from PC1?
> 
>     The B210 should be using the IP address
> 
>       192.168.200.2
> 
>     Unless you create a virtual Ethernet device on PC2 you'll never be able
>     to ping the PC1 or the B210 from PC2.
> 
>     Also, post the outputs of
> 
>       ifconfig
> 
>     for PC1 and PC2.
> 
>     Also, I don't know anything about the B210 - it may not be possible to
>     do what you're trying to do - but try it anyway.
> 
>     -- Cinaed
> 
> 
> 
>     >
>     > Cheers.
>     >
>     > Sincerely,
>     > Mansour.
>     >
>     >> On 14 Jun 2017, at 00:39, Cinaed Simson <address@hidden
>     <mailto:address@hidden>> wrote:
>     >>
>     >>> On 06/13/2017 12:41 PM, Mojtaba Mansour Abadi wrote:
>     >>> Hi Everyone,
>     >>>
>     >>>
>     >>>
>     >>> I am trying to connect two PCs using B210 USRPs and tunnelling
>     method.
>     >>>
>     >>>
>     >>>
>     >>> After going through examples and documents I came ups with the
>     attached
>     >>> flowgraph.
>     >>>
>     >>>
>     >>>
>     >>> I run the flowgraph on both machines and once the virtual
>     Ethernet card
>     >>> is created I use “ifconfig” command to assign an IP address to it.
>     >>>
>     >>>
>     >>>
>     >>> However the machines cannot ping each other.
>     >>
>     >> Did you bring up the interfaces?
>     >>
>     >> Are the IP addresses of the tuntaps reachable with a ping from
>     your PC?
>     >>
>     >> -- Cinaed
>     >>
>     >>>
>     >>>
>     >>>
>     >>> I use USB GNURadioLiveDVD
>     >>> <https://wiki.gnuradio.org/index.php/GNURadioLiveDVD
>     <https://wiki.gnuradio.org/index.php/GNURadioLiveDVD>> as the OS.
>     >>>
>     >>>
>     >>>
>     >>> I wonder which part is not right. The flowgraph is also attached
>     to the
>     >>> email.
>     >>>
>     >>>
>     >>>
>     >>>
>     >>>
>     >>> Regards,
>     >>> Mansour.
>     >>>
>     >>> https://www.linkedin.com/in/mojtaba-mansour-abadi-4311b451
>     <https://www.linkedin.com/in/mojtaba-mansour-abadi-4311b451>
>     >>>
>     >>> Mojtaba Mansour Abadi
>     >>> Editorial Board
>     >>> Journal of Advanced Engineering
>     >>> IGRPS
>     >>>
>     >>> http://igrps.org/journal-of-advanced-engineering.php
>     <http://igrps.org/journal-of-advanced-engineering.php>
>     >>>
>     >>>
>     >>>
>     >>>
>     >>>
>     >>> _______________________________________________
>     >>> Discuss-gnuradio mailing list
>     >>> address@hidden <mailto:address@hidden>
>     >>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>     <https://lists.gnu.org/mailman/listinfo/discuss-gnuradio>
>     >>>
>     >>
>     >>
>     >> _______________________________________________
>     >> Discuss-gnuradio mailing list
>     >> address@hidden <mailto:address@hidden>
>     >> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>     <https://lists.gnu.org/mailman/listinfo/discuss-gnuradio>
>     >
>     > _______________________________________________
>     > Discuss-gnuradio mailing list
>     > address@hidden <mailto:address@hidden>
>     > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>     <https://lists.gnu.org/mailman/listinfo/discuss-gnuradio>
>     >
> 
> 
>     _______________________________________________
>     Discuss-gnuradio mailing list
>     address@hidden <mailto:address@hidden>
>     https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>     <https://lists.gnu.org/mailman/listinfo/discuss-gnuradio>
> 
> 
> 
> 
> -- 
> 
> Regards,
> Mansour.
> 
> Research Assistant, School of Engineering
> University of Glasgow
> https://www.linkedin.com/in/mojtaba-mansour-abadi-4311b451
> 
> Editorial Board
> Journal of Advanced Engineering
> IGRPS
> http://igrps.org/journal-of-advanced-engineering.php
> 
> Tel: (+44) 0141 330 2000, Ext: 3053
> Cell: (+44) 0745 193 4064
> Alternative Emails: address@hidden
> 
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]