summaryrefslogtreecommitdiffstats
path: root/meta-openstack/Documentation/README.networking_flat
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2014-05-23 23:49:49 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-05-23 23:49:49 -0400
commit649327f80dc331943d448e87f73ecaadcc78a22a (patch)
tree2d640deedbc19b925f5539a31da26f2f7a6249c8 /meta-openstack/Documentation/README.networking_flat
parentfb1d6f23fa01c0217ed3f6778d8033dd0030db2a (diff)
downloadmeta-cloud-services-649327f80dc331943d448e87f73ecaadcc78a22a.tar.gz
docs: move more READMEs into Documentation
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/Documentation/README.networking_flat')
-rw-r--r--meta-openstack/Documentation/README.networking_flat249
1 files changed, 249 insertions, 0 deletions
diff --git a/meta-openstack/Documentation/README.networking_flat b/meta-openstack/Documentation/README.networking_flat
new file mode 100644
index 0000000..ab18f6f
--- /dev/null
+++ b/meta-openstack/Documentation/README.networking_flat
@@ -0,0 +1,249 @@
1Networking - FLAT network
2=========================
3
4Description
5-----------
6The flat network will have the VMs share the management network
7(192.168.7.0/24). The dhcp-agent will provide the VMs addresses
8within the subnet and within its provisioned range. This type of
9network will not typically be deployed as everything is accessible by
10everything else (VMs can access VMs and the compute and controller
11nodes)
12
13
14Assumptions
15-----------
16It is assumed you have completed the steps described in
17README.networking and have provisioned the host vSwitch as well as
18created the br-eth0 bridges on the controller and compute nodes.
19
20At this point you should be able to ping 192.168.7.4 from 192.168.7.4
21and vise versa.
22
23You have built your controller image including the cirros image (for
24which you have already added the image to glance as myFirstImage).
25
26You have run 'source /etc/nova/openrc'
27
28Configuration updates
29---------------------
30On the controller and (all) compute nodes you must edit the file
31/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
32
33In the [OVS] section set
34network_vlan_ranges = ph-eth0:1:1
35bridge_mappings = ph-eth0:br-eth0
36
37(*** on compute nodes edit local_ip as well [192.168.7.4]***)
38
39Restart some services to allow these changes to take effect:
40/etc/init.d/neutron-openvswitch-agent reload
41(on controller)
42/etc/init.d/neutron-server reload
43/etc/init.d/neutron-dhcp-agent reload
44(on compute)
45/etc/init.d/nova-compute reload
46
47
48Create the net and subnet
49-------------------------
50neutron net-create --provider:physical_network=ph-eth0 \
51 --provider:network_type=flat \
52 --shared MY_FLAT_NET
53Created a new network:
54+---------------------------+--------------------------------------+
55| Field | Value |
56+---------------------------+--------------------------------------+
57| admin_state_up | True |
58| id | 3263aa7f-b86c-4ad3-a28c-c78d4c711583 |
59| name | MY_FLAT_NET |
60| provider:network_type | flat |
61| provider:physical_network | ph-eth0 |
62| provider:segmentation_id | |
63| shared | True |
64| status | ACTIVE |
65| subnets | |
66| tenant_id | b5890ba3fb234347ae317ca2f8358663 |
67+---------------------------+--------------------------------------+
68
69
70neutron subnet-create MY_FLAT_NET 192.168.7.0/24 --name MY_FLAT_SUBNET \
71 --no-gateway --host-route destination=0.0.0.0/0,nexthop=192.168.7.1 \
72 --allocation-pool start=192.168.7.230,end=192.168.7.234
73Created a new subnet:
74+------------------+--------------------------------------------------------+
75| Field | Value |
76+------------------+--------------------------------------------------------+
77| allocation_pools | {"start": "192.168.7.230", "end": "192.168.7.234"} |
78| cidr | 192.168.7.0/24 |
79| dns_nameservers | |
80| enable_dhcp | True |
81| gateway_ip | |
82| host_routes | {"destination": "0.0.0.0/0", "nexthop": "192.168.7.1"} |
83| id | bfa99d99-2ba5-47e9-b71e-0bd8a2961e08 |
84| ip_version | 4 |
85| name | MY_FLAT_SUBNET |
86| network_id | 3263aa7f-b86c-4ad3-a28c-c78d4c711583 |
87| tenant_id | b5890ba3fb234347ae317ca2f8358663 |
88+------------------+--------------------------------------------------------+
89
90Boot the image and test connectivity
91------------------------------------
92nova boot --image myFirstImage --flavor m1.small \
93 --nic net-id=3263aa7f-b86c-4ad3-a28c-c78d4c711583 myinstance
94+--------------------------------------+-----------------------------------------------------+
95| Property | Value |
96+--------------------------------------+-----------------------------------------------------+
97| OS-DCF:diskConfig | MANUAL |
98| OS-EXT-AZ:availability_zone | nova |
99| OS-EXT-SRV-ATTR:host | - |
100| OS-EXT-SRV-ATTR:hypervisor_hostname | - |
101| OS-EXT-SRV-ATTR:instance_name | instance-00000003 |
102| OS-EXT-STS:power_state | 0 |
103| OS-EXT-STS:task_state | scheduling |
104| OS-EXT-STS:vm_state | building |
105| OS-SRV-USG:launched_at | - |
106| OS-SRV-USG:terminated_at | - |
107| accessIPv4 | |
108| accessIPv6 | |
109| adminPass | 7Qe9nFekCjYD |
110| config_drive | |
111| created | 2014-04-10T04:13:38Z |
112| flavor | m1.small (2) |
113| hostId | |
114| id | f85da1da-c318-49fb-8da9-c07644400d4c |
115| image | myFirstImage (1da089b1-164d-45d6-9b6c-002f3edb8a7b) |
116| key_name | - |
117| metadata | {} |
118| name | myinstance |
119| os-extended-volumes:volumes_attached | [] |
120| progress | 0 |
121| security_groups | default |
122| status | BUILD |
123| tenant_id | b5890ba3fb234347ae317ca2f8358663 |
124| updated | 2014-04-10T04:13:38Z |
125| user_id | 1dfcb72ef6a7428d8dd7300bc7f303d9 |
126+--------------------------------------+-----------------------------------------------------+
127
128nova list
129+--------------------------------------+------------+--------+------------+-------------+---------------------------+
130| ID | Name | Status | Task State | Power State | Networks |
131+--------------------------------------+------------+--------+------------+-------------+---------------------------+
132| f85da1da-c318-49fb-8da9-c07644400d4c | myinstance | ACTIVE | - | Running | MY_FLAT_NET=192.168.7.231 |
133+--------------------------------------+------------+--------+------------+-------------+---------------------------+
134
135nova console-log myinstance
136---
137...skip
138Starting logging: OK
139Initializing random number generator... done.
140Starting network...
141udhcpc (v1.18.5) started
142Sending discover...
143Sending select for 192.168.7.231...
144Lease of 192.168.7.231 obtained, lease time 86400
145deleting routers
146...skip
147
148ping
149---
150root@controller:~# ping -c 1 192.168.7.231
151PING 192.168.7.231 (192.168.7.231) 56(84) bytes of data.
15264 bytes from 192.168.7.231: icmp_seq=1 ttl=64 time=2.98 ms
153
154--- 192.168.7.231 ping statistics ---
1551 packets transmitted, 1 received, 0% packet loss, time 0ms
156rtt min/avg/max/mdev = 2.988/2.988/2.988/0.000 ms
157
158You should also be able to ping the compute or controller or other VMs
159(if you start them) from within a VM. Pinging targets outside the
160subnet requires that you ensure the various interfaces, such as eth0
161have promisc on 'ip link set eth0 promisc on'
162
163The final Open vSwitch configs
164------------------------------
165
166Controller
167---
168root@controller:~# ovs-vsctl show
169524a6c84-226d-427b-8efa-732ed7e7fa43
170 Bridge "br-eth0"
171 Port "eth0"
172 Interface "eth0"
173 Port "br-eth0"
174 Interface "br-eth0"
175 type: internal
176 Port "phy-br-eth0"
177 Interface "phy-br-eth0"
178 Bridge br-int
179 Port "tap549fb0c7-1a"
180 tag: 1
181 Interface "tap549fb0c7-1a"
182 type: internal
183 Port "int-br-eth0"
184 Interface "int-br-eth0"
185 Port patch-tun
186 Interface patch-tun
187 type: patch
188 options: {peer=patch-int}
189 Port br-int
190 Interface br-int
191 type: internal
192 Bridge br-tun
193 Port "gre-2"
194 Interface "gre-2"
195 type: gre
196 options: {in_key=flow, local_ip="192.168.7.2", out_key=flow, remote_ip="192.168.7.4"}
197 Port br-tun
198 Interface br-tun
199 type: internal
200 Port patch-int
201 Interface patch-int
202 type: patch
203 options: {peer=patch-tun}
204 ovs_version: "2.0.0"
205
206
207Compute
208---
209root@compute:~# ovs-vsctl show
21099d365d2-f74e-40a8-b9a0-5bb60353675d
211 Bridge br-tun
212 Port "gre-1"
213 Interface "gre-1"
214 type: gre
215 options: {in_key=flow, local_ip="192.168.7.4", out_key=flow, remote_ip="192.168.7.2"}
216 Port br-tun
217 Interface br-tun
218 type: internal
219 Port patch-int
220 Interface patch-int
221 type: patch
222 options: {peer=patch-tun}
223 Bridge br-int
224 Port br-int
225 Interface br-int
226 type: internal
227 Port "int-br-eth0"
228 Interface "int-br-eth0"
229 Port patch-tun
230 Interface patch-tun
231 type: patch
232 options: {peer=patch-int}
233 Port "tap93a74250-ef"
234 tag: 1
235 Interface "tap93a74250-ef"
236 Bridge "br-eth0"
237 Port "phy-br-eth0"
238 Interface "phy-br-eth0"
239 Port "eth0"
240 Interface "eth0"
241 Port "br-eth0"
242 Interface "br-eth0"
243 type: internal
244 ovs_version: "2.0.0"
245
246
247References
248----------
249http://developer.rackspace.com/blog/neutron-networking-simple-flat-network.html \ No newline at end of file