view tools/vnet/doc/vnet-module.txt @ 8740:3d7ea7972b39

Update patches for linux 2.6.15.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Thu Feb 02 17:16:00 2006 +0000 (2006-02-02)
parents 06d84bf87159
children 71b0f00f6344
line source
1 Vnet Module Command Interface
2 Mike Wray <mike.wray@hp.com>
3 2005/08/25
5 When insmod the vnet-module creates /proc/vnet/policy which
6 can be used to control the module by writing commands into it.
7 The return code from the command should be returned by close.
8 Xend uses these commands to implement its vnet interface.
10 The commands are:
12 (vnet.add (id <id>) [(vnetif <ifname>)] [(security { none | auth | conf } )] )
14 Create the vnet with id <id> and the given security level (default none).
15 Vnet ids are 128-bit and can be specified as 8 fields of 1 to 4 hex digits
16 separated by colons. A vnet id with no colons is treated as one with the first
17 7 fields zero. Examples:
19 1500 - equivalent to 0:0:0:0:0:0:0:1500
20 aaff:0:0:0:0:0:77:88
22 Security levels:
23 - none: no security
24 - auth: message authentication (IPSEC hmac)
25 - conf: message confidentiality (IPSEC hmac and encryption)
27 The <ifname> is the name of the network device created for the vnet.
28 If not given it defaults to vnif<N>, where <N> is the hex for the
29 8-th field in the id. Note that network device names can have a
30 maximum of 14 characters.
32 (vnet.del (id <id>))
34 Delete the vnet with id <id>.
36 (vif.add (vnet <vnetid>) (vmac <macaddr>))
38 Add the vif with MAC address <macaddr> to the vnet with id <vnetid>.
39 This makes the vnet module respond to VARP requests for <macaddr>
40 on vnet <vnetid>.
42 (vif.del (vnet <vnetid>) (vmac <macaddr>))
44 Remove the vif with MAC address <macaddr> from the vnet with id <vnetid>.
45 The vnet module will stop responding to VARP for the vif.
47 (vif.print)
49 Print the known vnets, vifs and varp cache on the console.
51 Examples:
53 To create vnet 10 with no security:
55 echo '(vnet.add (id 10))' > /proc/vnet/policy
57 This creates a device vnif0010.
59 To create vnet 11 with message authentication:
61 echo '(vnet.add (id 11) (security auth))' > /proc/vnet/policy
63 To add the vif with vmac "aa:00:00:bc:34:ae" to vnet 10:
65 echo '(vif.add (vnet 10) (vmac aa:00:00:bc:34:ae))' > /proc/vnet/policy
67 To remove the vif from the vnet:
69 echo '(vif.del (vnet 10) (vmac aa:00:00:bc:34:ae))' > /proc/vnet/policy