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