debian: Add network integration scripts.
[sliver-openvswitch.git] / debian / openvswitch-switch.README.Debian
1 README.Debian for openvswitch-switch
2 ---------------------------------
3
4 * The switch must be configured before it can be used.  Edit
5   /etc/default/openvswitch-switch, then start the switch manually with
6   "/etc/init.d/openvswitch-switch start".
7
8 * To use the Linux kernel-based switch implementation, you will need
9   to build and install the Open vSwitch kernel module.  To do so, install
10   the openvswitch-datapath-source package, then follow the instructions
11   given in /usr/share/doc/openvswitch-datapath-source/README.Debian
12
13 * This package does not yet support the userspace datapath-based
14   switch implementation.
15
16  -- Ben Pfaff <blp@nicira.com>, Mon, 30 Aug 2010 09:51:19 -0700
17
18 Debian network scripts integration
19 ----------------------------------
20 This package lets a user to optionally configure Open vSwitch bridges
21 and ports from /etc/network/interfaces. Please refer to the interfaces(5)
22 manpage for more details regarding /etc/network/interfaces.
23
24 The stanzas that configure the OVS bridges should begin with "allow-ovs"
25 followed by name of the bridge. Here is an example.
26 allow-ovs br0
27
28 The stanzas that configure the OVS ports should begin with
29 "allow-${bridge-name}" followed by name of the port. Here is an example.
30 allow-br0 eth0
31
32 The following OVS specific "command" options are supported:
33
34     - ovs_type: This can either be OVSBridge, OVSPort, OVSIntPort or OVSBond
35       depending on whether you configure a bridge, port, an internal port or
36       a bond. This is a required option.
37
38     - ovs_ports: This option specifies all the ports that belong to a bridge.
39
40     - ovs_bridge: This options specifies a bridge to which a port belongs.
41       This is a required option for a port.
42
43     - ovs_bonds: This option specifies the list of physical interfaces to be
44       bonded together.
45
46     - ovs_options: This option lets you add extra arguments to a ovs-vsctl
47       command. See examples.
48
49     - ovs_extra: This option lets you run additional ovs-vsctl commands,
50       separated by "--" (double dash). Variables can be part of the "ovs_extra"
51       option. You can provide all the standard environmental variables
52       described in the interfaces(5) man page. You can also pass shell
53       commands.
54
55 More implementation specific details can be seen in the examples.
56
57 Examples:
58 --------
59 ex 1: A standalone bridge.
60
61 allow-ovs br0
62 iface br0 inet static
63     address 192.168.1.1
64     netmask 255.255.255.0
65     ovs_type OVSBridge
66
67 ex 2: A bridge with one port.
68
69 allow-ovs br0
70 iface br0 inet dhcp
71     ovs_type OVSBridge
72     ovs_ports eth0
73
74 allow-br0 eth0
75 iface eth0 inet manual
76     ovs_bridge br0
77     ovs_type OVSPort
78
79 ex 3: A bridge with multiple physical ports.
80
81 allow-ovs br0
82 iface br0 inet dhcp
83     ovs_type OVSBridge
84     ovs_ports eth0 eth1
85
86 allow-br0 eth0
87 iface eth0 inet manual
88     ovs_bridge br0
89     ovs_type OVSPort
90
91 allow-br0 eth1
92 iface eth1 inet manual
93     ovs_bridge br0
94     ovs_type OVSPort
95
96 ex 4: A bridge with an OVS internal port.
97
98 allow-ovs br1
99 iface br1 inet static
100     address 192.168.1.1
101     netmask 255.255.255.0
102     ovs_type OVSBridge
103     ovs_ports vlan100
104
105 allow-br1 vlan100
106 iface vlan100 inet manual
107     ovs_bridge br1
108     ovs_type OVSIntPort
109     ovs_options tag=100
110     ovs_extra set interface ${IFACE} external-ids:iface-id=$(hostname -s)
111
112 ex 5: Bonding.
113
114 allow-ovs br2
115 iface br2 inet static
116     address 192.170.1.1
117     netmask 255.255.255.0
118     ovs_type OVSBridge
119     ovs_ports bond0
120
121 allow-br2 bond0
122 iface bond0 inet manual
123     ovs_bridge br2
124     ovs_type OVSBond
125     ovs_bonds eth2 eth3
126     ovs_options bond_mode=balance-tcp lacp=active
127
128 ex 6: Create and destroy bridges.
129
130 ifup --allow=ovs $list_of_bridges
131 ifdown --allow=ovs $list_of_bridges
132
133 -- Gurucharan Shetty <gshetty@nicira.com>, Fri, 04 May 2012 12:58:19 -0700