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

ip tuntap del



Anyone know why ip tuntap del requires the "mode"?

# ifconfig tapz
tapz: error fetching interface information: Device not found
# ip tuntap add mode tap tapz
# ifconfig tapz
tapz      Link encap:Ethernet  HWaddr 06:b8:f7:41:bf:08
          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:500
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# ip tuntap del tapz
ioctl(TUNSETIFF): Invalid argument
# ifconfig tapz
tapz      Link encap:Ethernet  HWaddr 06:b8:f7:41:bf:08
          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:500
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# ip tuntap del mode tap tapz
# ifconfig tapz
tapz: error fetching interface information: Device not found

We see that when deleting a tap device, we still have to include the
mode. From a user perspective that ought to be superfluous. Perhaps it
is some kernel driver optimization thing, which has not bee papered
over by ip command. A minor point in the scheme of things I guess.

So could the Usage output be made a little more accurate (possibly
not, without duplicating it for each of add and del subcommands):

# ip tuntap help
Usage: ip tuntap { add | del } [ dev PHYS_DEV ]
          [ mode { tun | tap } ] [ user USER ] [ group GROUP ]
          [ one_queue ] [ pi ] [ vnet_hdr ]

Where: USER  := { STRING | NUMBER }
       GROUP := { STRING | NUMBER }

Also, how can I find out what one_queue, pi and vnet_hdr options could be?

I am wondering if this interface of command "ip" could be made more
discoverable for users like myself, and how to go about 'suggesting'
that in an appropriate way?

TIA
Zenaan


Reply to: