Merge branch 'mainstream'
[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, OVSBond or
31       OVSTunnel depending on whether you configure a bridge, port, an internal
32       port, a bond or a tunnel. 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_tunnel_type: For "OVSTunnel" interfaces, the type of the tunnel.
43       For example, "gre", "vxlan", etc.
44
45     - ovs_tunnel_options: For "OVSTunnel" interfaces, this field should be
46       used to specify the tunnel options like remote_ip, key, etc.
47
48     - ovs_options: This option lets you add extra arguments to a ovs-vsctl
49       command. See examples.
50
51     - ovs_extra: This option lets you run additional ovs-vsctl commands,
52       separated by "--" (double dash). Variables can be part of the "ovs_extra"
53       option. You can provide all the standard environmental variables
54       described in the interfaces(5) man page. You can also pass shell
55       commands.
56
57 More implementation specific details can be seen in the examples.
58
59 Examples:
60 --------
61 ex 1: A standalone bridge.
62
63 allow-ovs br0
64 iface br0 inet static
65     address 192.168.1.1
66     netmask 255.255.255.0
67     ovs_type OVSBridge
68
69 ex 2: A bridge with one port.
70
71 allow-ovs br0
72 iface br0 inet dhcp
73     ovs_type OVSBridge
74     ovs_ports eth0
75
76 allow-br0 eth0
77 iface eth0 inet manual
78     ovs_bridge br0
79     ovs_type OVSPort
80
81 ex 3: A bridge with multiple physical ports.
82
83 allow-ovs br0
84 iface br0 inet dhcp
85     ovs_type OVSBridge
86     ovs_ports eth0 eth1
87
88 allow-br0 eth0
89 iface eth0 inet manual
90     ovs_bridge br0
91     ovs_type OVSPort
92
93 allow-br0 eth1
94 iface eth1 inet manual
95     ovs_bridge br0
96     ovs_type OVSPort
97
98 ex 4: A bridge with an OVS internal port.
99
100 allow-ovs br1
101 iface br1 inet static
102     address 192.168.1.1
103     netmask 255.255.255.0
104     ovs_type OVSBridge
105     ovs_ports vlan100
106
107 allow-br1 vlan100
108 iface vlan100 inet manual
109     ovs_bridge br1
110     ovs_type OVSIntPort
111     ovs_options tag=100
112     ovs_extra set interface ${IFACE} external-ids:iface-id=$(hostname -s)
113
114 ex 5: Bonding.
115
116 allow-ovs br2
117 iface br2 inet static
118     address 192.170.1.1
119     netmask 255.255.255.0
120     ovs_type OVSBridge
121     ovs_ports bond0
122
123 allow-br2 bond0
124 iface bond0 inet manual
125     ovs_bridge br2
126     ovs_type OVSBond
127     ovs_bonds eth2 eth3
128     ovs_options bond_mode=balance-tcp lacp=active
129
130 ex 6: Tunnel.
131
132 allow-ovs br1
133 iface br1 inet static
134     address 192.168.1.1
135     netmask 255.255.255.0
136     ovs_type OVSBridge
137     ovs_ports gre1
138
139 allow-br1 gre1
140 iface gre1 inet manual
141     ovs_bridge br1
142     ovs_type OVSTunnel
143     ovs_tunnel_type gre
144     ovs_tunnel_options options:remote_ip=182.168.1.2 options:key=1
145
146 ex 7: Create and destroy bridges.
147
148 ifup --allow=ovs $list_of_bridges
149 ifdown --allow=ovs $list_of_bridges
150
151 -- Gurucharan Shetty <gshetty@nicira.com>, Fri, 04 May 2012 12:58:19 -0700