UnderstandingFlatNetworking

UnderstandingFlatNetworking

目录

 [隐藏] 
  • 1 Understanding FlatNetworking
    • 1.1 FlatNetworking
      • 1.1.1 Single Adapter, All in one setup
      • 1.1.2 Multiple nodes with a single adapter
      • 1.1.3 Multiple nodes, multiple adapters
    • 1.2 Outbound Traffic Flow
      • 1.2.1 Single adapter hosts
      • 1.2.2 Multiple adapter hosts
    • 1.3 Inbound Traffic

Understanding FlatNetworking

(this took me quite a while to get into my head, so I'm writing it down for anyone else)

OpenStack/Nova has two general catagories (as of Cactus/Diablo releases) for networking:

  • FlatNetworking
  • VLANNetworking

FlatNetworking

FlatNetworking uses ethernet adapters configured as bridges to allow network traffic to transit between all the various nodes. This setup can be done with a single adapter on the physical host, or multiple. This option _*does not*_ require a switch that does VLAN tagging (VLANNetworking does) - and is a common development installation or proof of concept setup.

Single Adapter, All in one setup

  • extremely common development setup

Multiple nodes with a single adapter

  • smoke testing, proof of concept layout

Multiple nodes, multiple adapters

  • server setup with separate admin and data traffic

Outbound Traffic Flow

In any set up with FlatNetworking, the host with `nova-network` on it is responsible for forwarding traffic from the private network configured with the {{--fixed_range=...} directive in nova.conf. This host needs to have br100 configured and talking to any other nodes that are hosting VMs. With either of the Flat Networking options, the default gateway for the virtual machines is set to the host which is running `nova-network`. You must set the --flat_network_bridge flag or create networks with the bridge parameter in order to avoid raising an error.

Single adapter hosts

  • When a virtual machine sends traffic out to the public networks, it sends it first to it's default gateway (where ever `nova-network` is configured)

  • Then the host on which `nova-network` is configured acts as a router and forwards the traffic out to the Internet.

#!wiki caution
If you're using a single interface, then that interface (often eth0) needs to be set into promiscuous mode for the forwarding to happen correctly. This _does not_ appear to be needed if you're running with physical hosts that have and use two interfaces.

Multiple adapter hosts

  • When a virtual machine sends traffic out to the public networks, it sends it first to it's default gateway (where ever `nova-network` is configured). In a multiple adapter setup, this is over the adapter that is configured as a bridge interface and connected to the other hosts via a switch.

  • Then the host on which `nova-network` is configured acts as a router and forwards the traffic out to the Internet. Typically over the second interface, which has been configured with the hosts internet IP address.

Inbound Traffic

For inbound traffic (assuming a floating IP address has been set up), the `nova-network` host is responsible for hosting that IP address and doing the DNAT/SNAT addressing to route the traffic to the appropriate virtual machine.


源自:https://wiki.openstack.org/wiki/UnderstandingFlatNetworking

你可能感兴趣的:(UnderstandingFlatNetworking)