diff options
author | Susant Sahani <susant@redhat.com> | 2014-07-03 13:34:11 +0530 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-07-03 11:00:02 +0200 |
commit | 30ae9dfda3788cdfaf1b84d124dbc7feb638c77b (patch) | |
tree | 854a45b96eb6cd48b9b2caed95a1ecb23de7b2ed /man | |
parent | 866ee3682213789f85b877700457fdca05695a0e (diff) |
networkd: Introduce tun/tap device
This patch introduces TUN/TAP device creation support
to networkd.
Example conf to create a tap device:
file: tap.netdev
------------------
[NetDev]
Name=tap-test
Kind=tap
[Tap]
OneQueue=true
MultiQueue=true
PacketInfo=true
User=sus
Group=sus
------------------
Test:
1. output of ip link
tap-test: tap pi one_queue UNKNOWN_FLAGS:900 user 1000 group 1000
id:
uid=1000(sus) gid=10(wheel) groups=10(wheel),1000(sus)
context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
Modifications:
Added:
1. file networkd-tuntap.c
3. netdev kind NETDEV_KIND_TUN and NETDEV_KIND_TAP
2. Tun and Tap Sections and config params to parse
conf and gperf conf parameters
[tomegun: tweak the 'kind' checking for received ifindex]
Diffstat (limited to 'man')
-rw-r--r-- | man/systemd.netdev.xml | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/man/systemd.netdev.xml b/man/systemd.netdev.xml index 5d033e77d3..a57ba7ad8c 100644 --- a/man/systemd.netdev.xml +++ b/man/systemd.netdev.xml @@ -340,6 +340,112 @@ </variablelist> </refsect1> <refsect1> + <title>[TUN] Section Options</title> + + <para>The <literal>[TUN]</literal> section only applies for netdevs of kind + <literal>tun</literal>, and accepts the following keys:</para> + + <variablelist class='network-directives'> + <varlistentry> + <term><varname>OneQueue=</varname></term> + <listitem><para>Takes a boolean argument. Configures whether + to enable disable one queue . it determines whether all packets + queue at the device (enabled), or a fixed number queue at the device and + the rest at the "qdisc". Defaults to <literal>no</literal>.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><varname>MultiQueue=</varname></term> + <listitem><para>Takes a boolean argument. Configures whether the + to disable or disable . Linux supports multiqueue tuntap which can + uses multiple file descriptors (queues) to parallelize + packets sending or receiving. The device allocation is the same as before, + and if user wants to create multiple queues. Defaults to + <literal>no</literal>.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><varname>PacketInfo=</varname></term> + <listitem><para>Takes a boolean argument. Configures whether the + to enable or disable . PacketInfo tells the kernel to not provide packet + information. The purpose of PacketInfo is to tell the kernel that packets + will be "pure" IP packets, with no added bytes. Otherwise (if PacketInfo is unset), + 4 extra bytes are added to the beginning of the packet (2 flag bytes and 2 protocol bytes). + Defaults to <literal>no</literal>.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><varname>User=</varname></term> + <listitem><para>User to be allowed to access this device. Give ownership to unprivileged users, + so that /dev/net/tun device to be usable by this user. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><varname>Group=</varname></term> + <listitem><para>Group to be allowed to access this device. Give ownership to unprivileged group, + so that /dev/net/tun device to be usable by this group.</para> + </listitem> + </varlistentry> + + </variablelist> + + </refsect1> + + <refsect1> + <title>[TAP] Section Options</title> + + <para>The <literal>[TAP]</literal> section only applies for netdevs of kind + <literal>tap</literal>, and accepts the following keys:</para> + </refsect1> + + <variablelist class='network-directives'> + <varlistentry> + <term><varname>OneQueue=</varname></term> + <listitem><para>Takes a boolean argument. Configures whether + to enable disable one queue . it determines whether all packets + queue at the device (enabled), or a fixed number queue at the device and + the rest at the "qdisc". Defaults to <literal>no</literal>.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><varname>MultiQueue=</varname></term> + <listitem><para>Takes a boolean argument. Configures whether the + to disable or disable . From version 3.8, Linux supports multiqueue + tuntap which can uses multiple file descriptors (queues) to parallelize + packets sending or receiving. The device allocation is the same as before, + and if user wants to create multiple queues. Defaults to + <literal>no</literal>.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><varname>PacketInfo=</varname></term> + <listitem><para>Takes a boolean argument. Configures whether the + to enable or disable . PacketInfo tells the kernel to not provide packet + information. The purpose of PacketInfo is to tell the kernel that packets + will be "pure" IP packets, with no added bytes. Otherwise (if PacketInfo is unset), + 4 extra bytes are added to the beginning of the packet (2 flag bytes and 2 protocol bytes). + Defaults to <literal>no</literal>.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><varname>User=</varname></term> + <listitem><para>User to be allowed to access this device. Give ownership to unprivileged users, + so that /dev/net/tun device to be usable by this user. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><varname>Group=</varname></term> + <listitem><para>Group to be allowed to access this device. Give ownership to unprivileged group, + so that /dev/net/tun device to be usable by this group.</para> + </listitem> + </varlistentry> + + </variablelist> + + + <refsect1> <title>Example</title> <example> <title>/etc/systemd/network/bridge.netdev</title> @@ -374,6 +480,15 @@ Local=192.168.223.238 Remote=192.169.224.239 TTL=64</programlisting> </example> + <example> + <title>/etc/systemd/network/tap.netdev</title> + <programlisting>[NetDev] +Name=tap-test +Kind=tap + +[Tap] +MultiQueue=true +PacketInfo=true</programlisting> </example> <example> <title>/etc/systemd/network/sit.netdev</title> |