netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Queries regarding TAP interface
@ 2017-05-12  5:02 Kashyap, Saurav
  2017-05-12 15:52 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Kashyap, Saurav @ 2017-05-12  5:02 UTC (permalink / raw)
  To: netdev@vger.kernel.org

Hi,

I am using upstream kernel 4.11.0 and base is RHEL 7.2. I am playing around with TAP devices and created it using following commands
=======
ip tuntap add tap10 mode tap
ip addr add 172.28.12.1/24 dev tap10
ip link set tap10 up
ethtool -s tap10 msglvl 1
=======

I enabled debug in driver and also added some prints in tun_net_xmit function. I tried to ping using tap10 but I don’t see request reaching driver. I also tried to create a bridge using brctl and link with physical ethernet interface but it didn’t work.

Second experiment I did was to create two tap device on same system and try pinging one from another, that also didn’t worked. 
I have following queries
1) Is I am missing something? 
2) Is is possible to hook my own tx/rx to that tap device, so that data packets actually goes on wire?
3) Does DHCP works with tap devices?


Thanks,
~Saurav


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

* Re: Queries regarding TAP interface
  2017-05-12  5:02 Queries regarding TAP interface Kashyap, Saurav
@ 2017-05-12 15:52 ` Stephen Hemminger
  2017-05-15  5:00   ` Kashyap, Saurav
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2017-05-12 15:52 UTC (permalink / raw)
  To: Kashyap, Saurav; +Cc: netdev@vger.kernel.org

On Fri, 12 May 2017 05:02:37 +0000
"Kashyap, Saurav" <Saurav.Kashyap@cavium.com> wrote:

> Hi,
> 
> I am using upstream kernel 4.11.0 and base is RHEL 7.2. I am playing around with TAP devices and created it using following commands
> =======
> ip tuntap add tap10 mode tap
> ip addr add 172.28.12.1/24 dev tap10
> ip link set tap10 up
> ethtool -s tap10 msglvl 1
> =======
> 
> I enabled debug in driver and also added some prints in tun_net_xmit function. I tried to ping using tap10 but I don’t see request reaching driver. I also tried to create a bridge using brctl and link with physical ethernet interface but it didn’t work.
> 
> Second experiment I did was to create two tap device on same system and try pinging one from another, that also didn’t worked. 
> I have following queries
> 1) Is I am missing something? 
> 2) Is is possible to hook my own tx/rx to that tap device, so that data packets actually goes on wire?
> 3) Does DHCP works with tap devices?
> 
> 
> Thanks,
> ~Saurav
> 

Don't you need an application reading/writing the tap device?
The carrier state of tap device is up/down based on whether the corresponding tap device is open

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

* Re: Queries regarding TAP interface
  2017-05-12 15:52 ` Stephen Hemminger
@ 2017-05-15  5:00   ` Kashyap, Saurav
  0 siblings, 0 replies; 3+ messages in thread
From: Kashyap, Saurav @ 2017-05-15  5:00 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev@vger.kernel.org

Hi Stephen,
Comments inline.



>On Fri, 12 May 2017 05:02:37 +0000
>"Kashyap, Saurav" <Saurav.Kashyap@cavium.com> wrote:
>
>> Hi,
>> 
>> I am using upstream kernel 4.11.0 and base is RHEL 7.2. I am playing around with TAP devices and created it using following commands
>> =======
>> ip tuntap add tap10 mode tap
>> ip addr add 172.28.12.1/24 dev tap10
>> ip link set tap10 up
>> ethtool -s tap10 msglvl 1
>> =======
>> 
>> I enabled debug in driver and also added some prints in tun_net_xmit function. I tried to ping using tap10 but I don’t see request reaching driver. I also tried to create a bridge using brctl and link with physical ethernet interface but it didn’t work.
>> 
>> Second experiment I did was to create two tap device on same system and try pinging one from another, that also didn’t worked. 
>> I have following queries
>> 1) Is I am missing something? 
>> 2) Is is possible to hook my own tx/rx to that tap device, so that data packets actually goes on wire?
>> 3) Does DHCP works with tap devices?
>> 
>> 
>> Thanks,
>> ~Saurav
>> 
>
>Don't you need an application reading/writing the tap device?
<SK> So ping is not intelligent enough to work with TAP? I had wrote a simple tap program that open a tun device (/dev/net/tun) and does read/write. With this program I can see that calls are going to the driver. I ran this program and from other terminal I tried ping but ping failed. Does ping/arping/dhcp utilities work with TAP interface?

>The carrier state of tap device is up/down based on whether the corresponding tap device is open

<SK> Yes, thank for an info.

Thanks,
~Saurav

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

end of thread, other threads:[~2017-05-15  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-12  5:02 Queries regarding TAP interface Kashyap, Saurav
2017-05-12 15:52 ` Stephen Hemminger
2017-05-15  5:00   ` Kashyap, Saurav

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).