~ubuntu-cloud-archive/ubuntu/precise/nova/trunk

« back to all changes in this revision

Viewing changes to doc/source/runnova/network.vlan.rst

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-05-24 13:12:53 UTC
  • mfrom: (1.1.55)
  • Revision ID: package-import@ubuntu.com-20120524131253-ommql08fg1en06ut
Tags: 2012.2~f1-0ubuntu1
* New upstream release.
* Prepare for quantal:
  - Dropped debian/patches/upstream/0006-Use-project_id-in-ec2.cloud._format_image.patch
  - Dropped debian/patches/upstream/0005-Populate-image-properties-with-project_id-again.patch
  - Dropped debian/patches/upstream/0004-Fixed-bug-962840-added-a-test-case.patch
  - Dropped debian/patches/upstream/0003-Allow-unprivileged-RADOS-users-to-access-rbd-volumes.patch
  - Dropped debian/patches/upstream/0002-Stop-libvirt-test-from-deleting-instances-dir.patch
  - Dropped debian/patches/upstream/0001-fix-bug-where-nova-ignores-glance-host-in-imageref.patch 
  - Dropped debian/patches/0001-fix-useexisting-deprecation-warnings.patch
* debian/control: Add python-keystone as a dependency. (LP: #907197)
* debian/patches/kombu_tests_timeout.patch: Refreshed.
* debian/nova.conf, debian/nova-common.postinst: Convert to new ini
  file configuration
* debian/patches/nova-manage_flagfile_location.patch: Refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
..
2
 
      Copyright 2010-2011 United States Government as represented by the
3
 
      Administrator of the National Aeronautics and Space Administration.
4
 
      All Rights Reserved.
5
 
 
6
 
      Licensed under the Apache License, Version 2.0 (the "License"); you may
7
 
      not use this file except in compliance with the License. You may obtain
8
 
      a copy of the License at
9
 
 
10
 
          http://www.apache.org/licenses/LICENSE-2.0
11
 
 
12
 
      Unless required by applicable law or agreed to in writing, software
13
 
      distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
 
      WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
 
      License for the specific language governing permissions and limitations
16
 
      under the License.
17
 
 
18
 
 
19
 
VLAN Network Mode
20
 
=================
21
 
VLAN Network Mode is the default mode for Nova.  It provides a private network
22
 
segment for each project's instances that can be accessed via a dedicated
23
 
VPN connection from the Internet.
24
 
 
25
 
In this mode, each project gets its own VLAN, Linux networking bridge, and subnet. The subnets are specified by the network administrator, and are assigned dynamically to a project when required. A DHCP Server is started for each VLAN to pass out IP addresses to VM instances from the subnet assigned to the project. All instances belonging to one project are bridged into the same VLAN for that project. The Linux networking bridges and VLANs are created by Nova when required, described in more detail in Nova VLAN Network Management Implementation.
26
 
 
27
 
..
28
 
    (this text revised above)
29
 
    Because the flat network and flat DhCP network are simple to understand and yet do not scale well enough for real-world cloud systems, this section focuses on the VLAN network implementation by the VLAN Network Manager.
30
 
 
31
 
 
32
 
    In the VLAN network mode, all the VM instances of a project are connected together in a VLAN with the specified private subnet. Each running VM instance is assigned an IP address within the given private subnet.
33
 
 
34
 
.. image:: /images/Novadiagram.png
35
 
   :width: 790
36
 
 
37
 
While network traffic between VM instances belonging to the same VLAN is always open, Nova can enforce isolation of network traffic between different projects by enforcing one VLAN per project.
38
 
 
39
 
In addition, the network administrator can specify a pool of public IP addresses that users may allocate and then assign to VMs, either at boot or dynamically at run-time. This capability is similar to Amazon's 'elastic IPs'. A public IP address may be associated with a running instances, allowing the VM instance to be accessed from the public network. The public IP addresses are accessible from the network host and NATed to the private IP address of the project. A public IP address could be associated with a project using the euca-allocate-address commands.
40
 
 
41
 
This is the default networking mode and supports the most features.  For multiple machine installation, it requires a switch that supports host-managed vlan tagging.  In this mode, nova will create a vlan and bridge for each project.  The project gets a range of private ips that are only accessible from inside the vlan.  In order for a user to access the instances in their project, a special vpn instance (code named :ref:`cloudpipe <cloudpipe>`) needs to be created.  Nova generates a certificate and key for the user to access the vpn and starts the vpn automatically. More information on cloudpipe can be found :ref:`here <cloudpipe>`.
42
 
 
43
 
The following diagram illustrates how the communication that occurs between the vlan (the dashed box) and the public internet (represented by the two clouds)
44
 
 
45
 
.. image:: /images/cloudpipe.png
46
 
   :width: 100%
47
 
 
48
 
Goals
49
 
-----
50
 
 
51
 
For our implementation of Nova, our goal is that each project is in a protected network segment. Here are the specifications we keep in mind for meeting this goal.
52
 
 
53
 
  * RFC-1918 IP space
54
 
  * public IP via NAT
55
 
  * no default inbound Internet access without public NAT
56
 
  * limited (project-admin controllable) outbound Internet access
57
 
  * limited (project-admin controllable) access to other project segments
58
 
  * all connectivity to instance and cloud API is via VPN into the project segment
59
 
 
60
 
We also keep as a goal a common DMZ segment for support services, meaning these items are only visible from project segment:
61
 
 
62
 
  * metadata
63
 
  * dashboard
64
 
 
65
 
Limitations
66
 
-----------
67
 
 
68
 
We kept in mind some of these limitations:
69
 
 
70
 
* Projects / cluster limited to available VLANs in switching infrastructure
71
 
* Requires VPN for access to project segment
72
 
 
73
 
Implementation
74
 
--------------
75
 
Currently Nova segregates project VLANs using 802.1q VLAN tagging in the
76
 
switching layer.  Compute hosts create VLAN-specific interfaces and bridges
77
 
as required.
78
 
 
79
 
The network nodes act as default gateway for project networks and contain
80
 
all of the routing and firewall rules implementing security groups.  The
81
 
network node also handles DHCP to provide instance IPs for each project.
82
 
 
83
 
VPN access is provided by running a small instance called CloudPipe
84
 
on the IP immediately following the gateway IP for each project.  The
85
 
network node maps a dedicated public IP/port to the CloudPipe instance.
86
 
 
87
 
Compute nodes have per-VLAN interfaces and bridges created as required.
88
 
These do NOT have IP addresses in the host to protect host access.
89
 
Compute nodes have iptables/ebtables entries created per project and
90
 
instance to protect against IP/MAC address spoofing and ARP poisoning.
91
 
 
92
 
The network assignment to a project, and IP address assignment to a VM instance, are triggered when a user starts to run a VM instance. When running a VM instance, a user needs to specify a project for the instances, and the security groups (described in Security Groups) when the instance wants to join. If this is the first instance to be created for the project, then Nova (the cloud controller) needs to find a network controller to be the network host for the project; it then sets up a private network by finding an unused VLAN id, an unused subnet, and then the controller assigns them to the project, it also assigns a name to the project's Linux bridge (br100 stored in the Nova database), and allocating a private IP within the project's subnet for the new instance.
93
 
 
94
 
If the instance the user wants to start is not the project's first, a subnet and a VLAN must have already been assigned to the project; therefore the system needs only to find an available IP address within the subnet and assign it to the new starting instance. If there is no private IP available within the subnet, an exception will be raised to the cloud controller, and the VM creation cannot proceed.
95
 
 
96
 
 
97
 
External Infrastructure
98
 
-----------------------
99
 
 
100
 
Nova assumes the following is available:
101
 
 
102
 
* DNS
103
 
* NTP
104
 
* Internet connectivity
105
 
 
106
 
 
107
 
Example
108
 
-------
109
 
 
110
 
This example network configuration demonstrates most of the capabilities
111
 
of VLAN Mode.  It splits administrative access to the nodes onto a dedicated
112
 
management network and uses dedicated network nodes to handle all
113
 
routing and gateway functions.
114
 
 
115
 
It uses a 10GB network for instance traffic and a 1GB network for management.
116
 
 
117
 
 
118
 
Hardware
119
 
~~~~~~~~
120
 
 
121
 
* All nodes have a minimum of two NICs for management and production.
122
 
 
123
 
  * management is 1GB
124
 
  * production is 10GB
125
 
  * add additional NICs for bonding or HA/performance
126
 
 
127
 
* network nodes should have an additional NIC dedicated to public Internet traffic
128
 
* switch needs to support enough simultaneous VLANs for number of projects
129
 
* production network configured as 802.1q trunk on switch
130
 
 
131
 
 
132
 
Operation
133
 
~~~~~~~~~
134
 
 
135
 
The network node controls the project network configuration:
136
 
 
137
 
* assigns each project a VLAN and private IP range
138
 
* starts dnsmasq on project VLAN to serve private IP range
139
 
* configures iptables on network node for default project access
140
 
* launches CloudPipe instance and configures iptables access
141
 
 
142
 
When starting an instance the network node:
143
 
 
144
 
* sets up a VLAN interface and bridge on each host as required when an
145
 
  instance is started on that host
146
 
* assigns private IP to instance
147
 
* generates MAC address for instance
148
 
* update dnsmasq with IP/MAC for instance
149
 
 
150
 
When starting an instance the compute node:
151
 
 
152
 
* sets up a VLAN interface and bridge on each host as required when an
153
 
  instance is started on that host
154
 
 
155
 
 
156
 
Setup
157
 
~~~~~
158
 
 
159
 
* Assign VLANs in the switch:
160
 
 
161
 
  * public Internet segment
162
 
  * production network
163
 
  * management network
164
 
  * cluster DMZ
165
 
 
166
 
* Assign a contiguous range of VLANs to Nova for project use.
167
 
* Configure management NIC ports as management VLAN access ports.
168
 
* Configure management VLAN with Internet access as required
169
 
* Configure production NIC ports as 802.1q trunk ports.
170
 
* Configure Nova (need to add specifics here)
171
 
 
172
 
  * public IPs
173
 
  * instance IPs
174
 
  * project network size
175
 
  * DMZ network
176