blob: 1d56c3367ee01eb98311bbed901593e36df9b1fb [file] [log] [blame]
Sean Daguebc883df2016-08-12 07:21:59 -04001=====================
2 DevStack Networking
3=====================
4
5An important part of the DevStack experience is networking that works
6by default for created guests. This might not be optimal for your
7particular testing environment, so this document tries it's best to
8explain what's going on.
9
10Defaults
11========
12
13If you don't specify any configuration you will get the following:
14
15* neutron (including l3 with openvswitch)
16* private project networks for each openstack project
17* a floating ip range of 172.24.4.0/24 with the gateway of 172.24.4.1
18* the demo project configured with fixed ips on 10.0.0.0/24
19* a ``br-ex`` interface controlled by neutron for all it's networking
20 (this is not connected to any physical interfaces).
21* DNS resolution for guests based on the resolv.conf for you host
22* an ip masq rule that allows created guests to route out
23
24This creates an environment which is isolated to the single
25host. Guests can get to the external network for package
26updates. Tempest tests will work in this environment.
27
28.. note::
29
30 By default all OpenStack environments have security group rules
31 which block all inbound packets to guests. If you want to be able
32 to ssh / ping your created guests you should run the following.
33
34 .. code-block:: bash
35
36 openstack security group rule create --proto icmp --dst-port 0 default
37 openstack security group rule create --proto tcp --dst-port 22 default
38
39Locally Accessible Guests
40=========================
41
42If you want to make you guests accessible other machines on your
43network, we have to connect ``br-ex`` to a physical interface.
44
45Dedicated Guest Interface
46-------------------------
47
48If you have 2 or more interfaces on your devstack server, you can
49allocate an interface to neutron to fully manage. This **should not**
50be the same interface you use to ssh into the devstack server itself.
51
52This is done by setting with the ``PUBLIC_INTERFACE`` attribute.
53
54.. code-block:: bash
55
56 [[local|localrc]]
57 PUBLIC_INTERFACE=eth1
58
59That will put all layer 2 traffic from your guests onto the main
60network. When running in this mode the ip masq rule is **not** added
61in your devstack, you are responsible for making routing work on your
62local network.
63
64Shared Guest Interface
65----------------------
66
67.. warning::
68
69 This is not a recommended configuration. Because of interactions
70 between ovs and bridging, if you reboot your box with active
71 networking you may loose network connectivity to your system.
72
73If you need your guests accessible on the network, but only have 1
74interface (using something like a NUC), you can share your one
75network. But in order for this to work you need to manually set a lot
76of addresses, and have them all exactly correct.
77
78.. code-block:: bash
79
80 [[local|localrc]]
81 PUBLIC_INTERFACE=eth0
82 HOST_IP=10.42.0.52
83 FLOATING_RANGE=10.42.0.52/24
84 PUBLIC_NETWORK_GATEWAY=10.42.0.1
85 Q_FLOATING_ALLOCATION_POOL=start=10.42.0.250,end=10.42.0.254
86
87In order for this scenario to work the floating ip network must match
88the default networking on your server. This breaks HOST_IP detection,
89as we exclude the floating range by default, so you have to specify
90that manually.
91
92The ``PUBLIC_NETWORK_GATEWAY`` is the gateway that server would normally
93use to get off the network. ``Q_FLOATING_ALLOCATION_POOL`` controls
94the range of floating ips that will be handed out. As we are sharing
95your existing network, you'll want to give it a slice that your local
96dhcp server is not allocating. Otherwise you could easily have
97conflicting ip addresses, and cause havoc with your local network.