1 .\" Copyright (c) 2002, 2003 Marko Zec <zec@fer.hr>
2 .\" Copyright (c) 2009 University of Zagreb
3 .\" Copyright (c) 2009 FreeBSD Foundation
5 .\" All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 .Nd manage virtual network stacks
40 .Op Ar param=value ...
58 utility is an alternative user interface for controlling virtual network
59 stacks in FreeBSD, aimed primarily at supporting legacy applications
60 which are not yet converted to using
67 A virtual image or vimage is a jail with its own independent network
69 Every process, socket and network interface present in the system is always
70 attached to one, and only one, virtual network stack instance (vnet).
71 During system bootup sequence a default vnet is created to which all the configured
72 interfaces and user processes are initially attached.
73 Assuming that enough system resources are are available, a user with sufficient
74 privileges can create and manage a hierarchy of subordinated virtual images.
77 command allows for creation, deletion and monitoring of virtual images,
78 as well as for execution of arbitrary processes in a targeted virtual image.
80 If invoked with no modifiers, the
82 command spawns a new interactive shell in virtual image
84 If optional additional arguments following
86 are provided, the first of those will be executed in place of the
87 interactive shell, and the rest of the arguments will be passed as
88 arguments to the executed command.
90 The following modifiers are available:
91 .Bl -tag -width indent
93 Create a new virtual image named
95 Additional arguments, if provided, may be used to specify operating
96 parameters different from defaults, in format
100 for an extensive list of available parameters.
102 Modify the parameters of a virtual image named
104 using the same syntax as with the -c form of the command.
106 Delete the virtual image
108 No processes and/or sockets should exist in the target virtual image
109 in order for the delete request to succeed.
110 Non-loopback interfaces residing in the target virtual image
111 will be reassigned to the virtual image's parent.
113 List the properties and statistics for virtual images one level below
114 the current one in the hierarchy.
115 If an optional argument
117 is provided, only the information regarding the target virtual image
122 switch enabled the list will include all virtual images below the
123 current level in the vimage hierarchy.
124 Enabling the optional
128 switches results in a more detailed output.
132 to the target virtual image
134 Interfaces will be automatically renamed to
138 unless an optional argument specifying the desired interface name
143 Create a new virtual image named
146 which is allowed to create and manage an own subhierarchy of vimages:
148 .Dl vimage -c v1 children.max=100
152 .Sc command in the virtual image
156 .Dl vimage v1 ifconfig
160 .Sc to the virtual image
162 .Sc while renaming the interface as
167 .Dl vimage -i v1 vlan0 ve0
169 Show the status information for virtual image
177 command exits 0 on success, and >0 if an error occurs.
183 Network stack virtualization framework first appeared as a patchset
186 kernel in 2002, and was maintained outside of the main FreeBSD tree.
187 As a result of a project sponsored by the FreeBSD Foundation and
188 Stiching NLNet, integrated virtualized network stack first appeared in
191 .An Marko Zec Aq Mt zec@fer.hr
193 Deletion of vimages / vnets is known to leak kernel memory and fail at
194 stopping various timers, hence may lead to system crashes.