1 .\" Copyright (c) 2002, 2003 Marko Zec <zec@tel.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
54 command is an interm user interface for controlling the virtual network
57 A virtual image reprepresents an isolated operating environment with its
58 own independent network stack instance. Every process, socket and network
59 interface present in the system is always attached to one, and only one,
60 virtual image i.e. virtual network stack instance.
61 During the system bootup sequence default virtual image is created to
62 which all the configured interfaces and user processes are initially
64 Assuming that enough system resources and per virtual image privileges
65 are provided, the super-user can create and manage a hierarchy of
66 subordinated virtual images. The
68 command allows for creation, deletion and monitoring of virtual images,
69 as well as for execution of arbitrary processes in a targeted virtual
72 If invoked with no modifiers, the
74 command spawns a new shell process in virtual image
76 If provided, the optional arguments following the virtual image name
78 are interpreted as a standard command line issued at a shell,
79 otherwise an interactive shell is started in the target virtual image.
81 The following parameters are available:
82 .Bl -tag -width indent
84 Create a new virtual image named
89 Delete the virtual image
91 No processes and/or sockets should exist in the target virtual image
92 in order for the delete request to succeed. Non-loopback interfaces
93 residing in the target virtual image will be reassigned to the virtual
96 List the properties and statistics for virtual images one level
97 below the current one in the hierarchy. If an optional argument
99 is provided, only the information regarding the target virtual image
103 List the properties and statistics for all virtual images in
104 the hierarchy of subordinated vimages. If an optional argument
106 is provided, the hierarchy will be traversed at and below the
112 to the target virtual image
119 the interface is returned to the parent of the current virtual image.
122 Create a new virtual image named
130 .Sc command in the virtual image
134 .Dl vimage v1 ifconfig
138 .Sc to the virtual image
142 .Dl vimage -i v1 vlan0
144 Show the status information for virtual image
152 command exits 0 on success, and >0 if an error occurs.
156 If memory allocation failure occurs during the vimage creation, it will remain
157 undetected/ignored in the current implementation, thus latently scheduling
158 an almost imminent system crash in the future.
160 .An "Marko Zec" Aq zec@fer.hr
164 facility first appeared as a patch against FreeBSD 4.7-RELEASE in 2002.