| 1 |
<!-- SPDX-License-Identifier: LGPL-2.1+ --> |
| 2 |
|
| 3 |
<!DOCTYPE refentry PUBLIC @docdtd@ [ |
| 4 |
|
| 5 |
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml"> |
| 6 |
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml"> |
| 7 |
]> |
| 8 |
|
| 9 |
<refentry> |
| 10 |
|
| 11 |
<docinfo><date>@LXC_GENERATE_DATE@</date></docinfo> |
| 12 |
|
| 13 |
<refmeta> |
| 14 |
<refentrytitle>lxc-user-nic</refentrytitle> |
| 15 |
<manvolnum>1</manvolnum> |
| 16 |
</refmeta> |
| 17 |
|
| 18 |
<refnamediv> |
| 19 |
<refname>lxc-user-nic</refname> |
| 20 |
|
| 21 |
<refpurpose> |
| 22 |
Manage nics in another network namespace |
| 23 |
</refpurpose> |
| 24 |
</refnamediv> |
| 25 |
|
| 26 |
<refsynopsisdiv> |
| 27 |
<cmdsynopsis> |
| 28 |
<command>lxc-user-nic</command> |
| 29 |
<command>create</command> |
| 30 |
<arg choice="req"><replaceable>lxcpath</replaceable></arg> |
| 31 |
<arg choice="req"><replaceable>name</replaceable></arg> |
| 32 |
<arg choice="req"><replaceable>pid</replaceable></arg> |
| 33 |
<arg choice="req"><replaceable>type</replaceable></arg> |
| 34 |
<arg choice="req"><replaceable>bridge</replaceable></arg> |
| 35 |
<arg choice="req"><replaceable>container nicname</replaceable></arg> |
| 36 |
</cmdsynopsis> |
| 37 |
|
| 38 |
<cmdsynopsis> |
| 39 |
<command>lxc-user-nic</command> |
| 40 |
<command>delete</command> |
| 41 |
<arg choice="req"><replaceable>lxcpath</replaceable></arg> |
| 42 |
<arg choice="req"><replaceable>name</replaceable></arg> |
| 43 |
<arg choice="req"><replaceable>path to network namespace</replaceable></arg> |
| 44 |
<arg choice="req"><replaceable>type</replaceable></arg> |
| 45 |
<arg choice="req"><replaceable>bridge</replaceable></arg> |
| 46 |
<arg choice="req"><replaceable>container nicname</replaceable></arg> |
| 47 |
</cmdsynopsis> |
| 48 |
</refsynopsisdiv> |
| 49 |
|
| 50 |
<refsect1> |
| 51 |
<title>Description</title> |
| 52 |
|
| 53 |
<para> |
| 54 |
<command>lxc-user-nic</command> is a setuid-root program with which |
| 55 |
unprivileged users may manage network interfaces for use by a |
| 56 |
lxc container. |
| 57 |
</para> |
| 58 |
<para> |
| 59 |
It will consult the configuration file <filename>@LXC_USERNIC_CONF@</filename> |
| 60 |
to determine the number of interfaces which the calling user is allowed to |
| 61 |
create, and which bridge they may attach them to. It tracks the |
| 62 |
number of interfaces each user has created using the file |
| 63 |
<filename>@LXC_USERNIC_DB@</filename>. It ensures that the calling |
| 64 |
user is privileged over the network namespace to which the interface |
| 65 |
will be attached. |
| 66 |
<command>lxc-user-nic</command> also allows one to delete network devices. |
| 67 |
Currently only ovs ports can be deleted. |
| 68 |
</para> |
| 69 |
|
| 70 |
</refsect1> |
| 71 |
|
| 72 |
<refsect1> |
| 73 |
|
| 74 |
<title>Options</title> |
| 75 |
|
| 76 |
<variablelist> |
| 77 |
<varlistentry> |
| 78 |
<term> |
| 79 |
<option><replaceable>lxcpath</replaceable></option> |
| 80 |
</term> |
| 81 |
<listitem> |
| 82 |
<para> |
| 83 |
The path of the container. This is currently not used. |
| 84 |
</para> |
| 85 |
</listitem> |
| 86 |
</varlistentry> |
| 87 |
|
| 88 |
<varlistentry> |
| 89 |
<term> |
| 90 |
<option><replaceable>name</replaceable></option> |
| 91 |
</term> |
| 92 |
<listitem> |
| 93 |
<para> |
| 94 |
The name of the container. This is currently not used. |
| 95 |
</para> |
| 96 |
</listitem> |
| 97 |
</varlistentry> |
| 98 |
|
| 99 |
<varlistentry> |
| 100 |
<term> |
| 101 |
<option><replaceable>pid</replaceable></option> |
| 102 |
</term> |
| 103 |
<listitem> |
| 104 |
<para> |
| 105 |
The process id for the task to whose network namespace the interface |
| 106 |
should be attached. |
| 107 |
</para> |
| 108 |
</listitem> |
| 109 |
</varlistentry> |
| 110 |
|
| 111 |
<varlistentry> |
| 112 |
<term> |
| 113 |
<option><replaceable>type</replaceable></option> |
| 114 |
</term> |
| 115 |
<listitem> |
| 116 |
<para> |
| 117 |
The network interface type to attach. Currently only veth is |
| 118 |
supported. With this type, two interfaces representing each |
| 119 |
tunnel endpoint are created. One endpoint will be attached |
| 120 |
to the specified bridge, while the other will be passed into |
| 121 |
the container. |
| 122 |
</para> |
| 123 |
</listitem> |
| 124 |
</varlistentry> |
| 125 |
|
| 126 |
<varlistentry> |
| 127 |
<term> |
| 128 |
<option><replaceable>bridge</replaceable></option> |
| 129 |
</term> |
| 130 |
<listitem> |
| 131 |
<para> |
| 132 |
The bridge to which to attach the network interface, for |
| 133 |
instance <filename>lxcbr0</filename>. |
| 134 |
</para> |
| 135 |
</listitem> |
| 136 |
</varlistentry> |
| 137 |
|
| 138 |
<varlistentry> |
| 139 |
<term> |
| 140 |
<option><replaceable>container nicname</replaceable></option> |
| 141 |
</term> |
| 142 |
<listitem> |
| 143 |
<para> |
| 144 |
The desired interface name in the container. This will be |
| 145 |
<filename>eth0</filename> if unspecified. |
| 146 |
</para> |
| 147 |
</listitem> |
| 148 |
</varlistentry> |
| 149 |
|
| 150 |
<varlistentry> |
| 151 |
<term> |
| 152 |
<option><replaceable>path to network namespace</replaceable></option> |
| 153 |
</term> |
| 154 |
<listitem> |
| 155 |
<para> |
| 156 |
A path to open to get a file descriptor for the target |
| 157 |
network namespace. |
| 158 |
This is only relevant when an veth device is deleted. |
| 159 |
</para> |
| 160 |
</listitem> |
| 161 |
</varlistentry> |
| 162 |
|
| 163 |
</variablelist> |
| 164 |
|
| 165 |
</refsect1> |
| 166 |
|
| 167 |
<refsect1> |
| 168 |
<title>See Also</title> |
| 169 |
|
| 170 |
<simpara> |
| 171 |
<citerefentry> |
| 172 |
<refentrytitle><command>lxc</command></refentrytitle> |
| 173 |
<manvolnum>1</manvolnum> |
| 174 |
</citerefentry>, |
| 175 |
|
| 176 |
<citerefentry> |
| 177 |
<refentrytitle><command>lxc-start</command></refentrytitle> |
| 178 |
<manvolnum>1</manvolnum> |
| 179 |
</citerefentry>, |
| 180 |
|
| 181 |
<citerefentry> |
| 182 |
<refentrytitle><command>lxc-usernet</command></refentrytitle> |
| 183 |
<manvolnum>5</manvolnum> |
| 184 |
</citerefentry> |
| 185 |
</simpara> |
| 186 |
</refsect1> |
| 187 |
|
| 188 |
</refentry> |
| 189 |
|
| 190 |
<!-- Keep this comment at the end of the file |
| 191 |
Local variables: |
| 192 |
mode: sgml |
| 193 |
sgml-omittag:t |
| 194 |
sgml-shorttag:t |
| 195 |
sgml-minimize-attributes:nil |
| 196 |
sgml-always-quote-attributes:t |
| 197 |
sgml-indent-step:2 |
| 198 |
sgml-indent-data:t |
| 199 |
sgml-parent-document:nil |
| 200 |
sgml-default-dtd-file:nil |
| 201 |
sgml-exposed-tags:nil |
| 202 |
sgml-local-catalogs:nil |
| 203 |
sgml-local-ecat-files:nil |
| 204 |
End: |
| 205 |
--> |