Before completing a series of preparations, this section begins with the creation of a variety of neutorn networks, first of all we discuss the local network.
The local network is characterized by no connection to any of the host's physical network cards, and no VLAN ID associated with it.
For each local NETWROK,ML2 Linux-bridge will create a bridge,instance tap device that will connect to bridge. The instance in the same local network will be connected to the same bridge so that the instance can communicate.
Because bridge is not connected to the physical NIC, instance cannot communicate with the network outside the host. Also, because each local network has its own bridge,bridge, there is no connectivity between the two local networks, even if they are on the same host.
is an example of the local network:
Two local network were created, corresponding to two bridges brqxxxx and brqyyyy.
VM0 and VM1 are connected to brqxxxx through Tap0 and Tap1.
The VM2 is connected to the brqyyyy via Tap0 and TAP2.
VM0 and VM1 in the same local network, they can communicate.
VM2 is located in another local network, VM2 cannot communicate with VM0 and VM1 because Brqxxxx and brqyyyy are not connected.
Next we will implement the local network step-by-step.
enable local network in the ML2 configuration
Make sure that ML2 has loaded the local type driver before you create the local network. The ML2 configuration file is located in/etc/neutron/plugins/ml2/ml2_conf.ini.
Type_drivers tells ML2 to load all 5 types of network type driver.
Type_drivers = Local,flat,vlan,gre,vxlan
This allows us to create all types of networks (although only the local network is created in this section).
Both the normal user and the admin can create the network through the CLI or the Web GUI, but only Amdin can specify the type of the network, so you need to use Tenant_network_types to tell ML2 when the ordinary user in their own tenant (Project) Create When you build a network, which type of network is created by default, where type is local.
Tenant_network_types = Local
Tenant_network_types can specify multiple types, such as:
Tenant_network_types = VLAN, local
The function is to create a VLAN network and create a local network when no VLANs are created (such as when the VLAN ID is exhausted).
When the configuration file has changed, the Neutron related service needs to be restarted to make it effective.
With these preparations, we can begin to learn more about how Linux bridge implements each type of network.
The next section creates the first local network.
Enable local network in ML2-5 minutes a day to play OpenStack (79)