On the controller node :
Create database for Neutron service
CREATE DATABASE neutron;
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit
Create neutron user and add admin role
. admin-openrc
openstack user create --domain default --password-prompt neutron
openstack role add --project homelab --user neutron admin
Create service entity and end points
openstack service create --name neutron --description "OpenStack Networking" network
openstack endpoint create --region RegionOne network public http://controller:9696
openstack endpoint create --region RegionOne network internal http://controller:9696
openstack endpoint create --region RegionOne network admin http://controller:9696
Install the required components
apt install -y neutron-server neutron-plugin-ml2 neutron-linuxbridge-agent neutron-dhcp-agent neutron-metadata-agent neutron-l3-agent
Update /etc/neutron/neutron.conf with following configurations in respective sections
[DEFAULT]
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = true
transport_url = rabbit://openstack:password@controller
auth_strategy = keystone
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true
[database]
connection = mysql+pymysql://neutron:password@controller/neutron
[keystone_authtoken]
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = homelab
username = neutron
password = password
[nova]
auth_url = http://controller:5000
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = homelab
username = nova
password = password
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
Configure the Modular Layer 2 (ML2) plug-in – edit /etc/neutron/plugins/ml2/ml2_conf.ini and update the following configurations in respective sections
[ml2]
type_drivers = flat,vlan,vxlan
tenant_network_types = vxlan
mechanism_drivers = linuxbridge,l2population
extension_drivers = port_security
[ml2_type_flat]
flat_networks = provider
[ml2_type_vxlan]
vni_ranges = 1:1000
[securitygroup]
enable_ipset = true
Configure the Linux bridge agent – edit /etc/neutron/plugins/ml2/linuxbridge_agent.ini and update the following configurations in respective sections
[linux_bridge]
physical_interface_mappings = provider:eno2
[vxlan]
enable_vxlan = true
local_ip = 10.99.1.3
l2_population = true
[securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
Configure the layer-3 agent – edit /etc/neutron/l3_agent.ini
[DEFAULT]
interface_driver = linuxbridge
Configure the DHCP agent – edit /etc/neutron/dhcp_agent.ini
and update the following configurations
[DEFAULT]
interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true
Configure the metadata agent – Edit /etc/neutron/metadata_agent.ini
[DEFAULT]
nova_metadata_host = controller
metadata_proxy_shared_secret = password
Configure the Compute service to use the Networking service – Edit the /etc/nova/nova.conf
[neutron]
auth_url = http://controller:5000
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = homelab
username = neutron
password = password
service_metadata_proxy = true
metadata_proxy_shared_secret = password
Populate the database
su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
Restart the Compute API service, Networking services
service nova-api restart
service neutron-server restart
service neutron-linuxbridge-agent restart
service neutron-dhcp-agent restart
service neutron-metadata-agent restart
service neutron-l3-agent restart
Verify (only one linux-bridge agent, host=controller)
. admin-openrc
openstack network agent list
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| 1999125d-e584-4746-b0fc-43b1ec496266 | L3 agent | controller | nova | :-) | UP | neutron-l3-agent |
| 3ba9cd5b-0259-4237-8aa2-49d79857401d | DHCP agent | controller | nova | :-) | UP | neutron-dhcp-agent |
| 9c45cf40-0908-45d1-a408-56a9956c2fe3 | Metadata agent | controller | None | :-) | UP | neutron-metadata-agent |
| fd074e21-ded1-4ba9-a0f5-7de5535d46da | Linux bridge agent | controller | None | :-) | UP | neutron-linuxbridge-agent |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
On the compute node :
apt install -y neutron-common neutron-plugin-ml2 neutron-linuxbridge-agent
Edit /etc/neutron/neutron.conf and update the following configurations in respective sections
[DEFAULT]
transport_url = rabbit://openstack:password@controller
auth_strategy = keystone
core_plugin = ml2
service_plugins = router
state_path = /var/lib/neutron
allow_overlapping_ips = True
[agent]
root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
[keystone_authtoken]
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = homelab
username = neutron
password = password
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
Edit /etc/neutron/plugins/ml2/ml2_conf.ini and update the following configurations in respective sections
[ml2]
type_drivers = flat,vlan,vxlan
tenant_network_types =
mechanism_drivers = linuxbridge,l2population
extension_drivers = port_security
Edit /etc/neutron/plugins/ml2/linuxbridge_agent.ini and update update the following configurations in respective sections
[securitygroup]
enable_security_group = True
firewall_driver = iptables
enable_ipset = True
[vxlan]
enable_vxlan = true
local_ip = 10.99.1.3
l2_population = true
Edit /etc/nova/nova.conf and update the following configurations in respective sections
[DEFAULT]
use_neutron = True
linuxnet_interface_driver = nova.network.linux_net.LinuxBridgeInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver
vif_plugging_is_fatal = True
vif_plugging_timeout = 300
[neutron]
auth_url = http://controller:5000
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = homelab
username = neutron
password = password
Finalize configurations and restart service
ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
systemctl restart nova-compute neutron-linuxbridge-agent
systemctl enable neutron-linuxbridge-agent
On the controller node :
Verify (two linux-bridge agents)
. admin-openrc
openstack network agent list
root@controller:~# openstack network agent list
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| 85b41dc2-2ed6-42f5-91fa-ac3b272d61a8 | Metadata agent | controller | None | :-) | UP | neutron-metadata-agent |
| 8e528213-e8ca-4171-a00b-9f451c1f28ab | L3 agent | controller | nova | :-) | UP | neutron-l3-agent |
| 9274c240-98e0-43ee-a1e0-d8255cc2e214 | DHCP agent | controller | nova | :-) | UP | neutron-dhcp-agent |
| 99197a0a-1aee-4b54-9d6a-971adac3b648 | Linux bridge agent | controller | None | :-) | UP | neutron-linuxbridge-agent |
| c4f324c7-004d-4e54-a1e6-208e7733b07f | Linux bridge agent | compute | None | :-) | UP | neutron-linuxbridge-agent |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
<<< Nova Horizon >>>