Portal:Cloud VPS/Admin/Network

This page explains how the CloudVPS network works, specifically the per-host networking and the Openstack Neutron component. For information on the physical network infra (maintained by SRE Netops) see WMCS Network Infra.
For the sake of explanation, this document uses the eqiad1 deployment as example, but may be others with same mechanisms.
= Network topology =
Networks used by cloud servers and other elements can be broadly divided into two categories:
* management plane networks: those used in physical servers for SSH, puppet, monitoring, etc. is a wiki-production network, usually in the 10.x.x.x range.
* control/data plane networks: includes he cloud-private networks, those used by CloudVPS virtual clients, and all the ingress/egress traffic at the edge of the network.
On the top-of-rack switches these networks are divided into separate VRFs, or routing-instances. This keeps them as two separate, private domains on cloudsw's, supporting the agreed separation of production and cloud realms. The CR (Core) routers are connected to both realms, and in some cases can forward traffic between them, although this is discouraged.
There are 3 routers involved:
* The neutron virtual router (by means of neutron-l3-agent, neutron-linuxbridge-agent, neutron-server, etc). This router connects the internal software-defined networks to the cloud edge network.
* The physical cloudgw router (a pair of linux servers). This router is the main gateway for the 'nerutron virutal router, handling all CloudVPS ingress/egress traffic, and is the main network endpoint facing the public internet.
* The physical cloudsw routers. These devices connect cloudgw to the rest of the internet, including wiki-production networks.
== Datacenter network ==
=== Cloud racks vs WMF racks ===
True "cloud hosts" should be placed in dedicated WMCS racks, connected to a cloudsw (currently C8/D5/E4/F4 in eqiad and B1 in codfw).
Certain hosts have names starting with 'cloud', but are not solely managed by the cloud services team, and don't connect to any cloud networks. These exceptions need to be racked in non-WMCS racks and connected to regular WMF production vlans:
clouddb
clouddumps
cloudelastic
cloudweb
Aside from those all hosts with names starting 'cloud*' are considered cloud hosts, and should be connected as described below.
=== Physical Connection ===
Cloud hosts require only a single physical switch connection, with the exception of cloudceph* nodes.
All cloud hosts connect to multiple networks, using 802.1q vlan tagging/trunking for separation on their single link. The naming convention for host sub-interfaces is vlan<VLAN_ID>, e.g. "vlan1105".
Cloud ceph hosts are the exception to this rule, and will continue to require two links until consensus can be reached on moving them to one link. There are also certain hosts in production with 2 physical network connections, but we are in the process of migrating those to single-link (see T319184).
DC-Ops should select cloud-hosts as the vlan type when adding any cloud host to netbox.
Prior to the host reimage step some manual Netbox changes are required, to set the switch-port to mode "tagged" and add the additional vlans needed. This will be automated soon (see T346428), until then feel free to reach out to Cathal to complete this step.
The vlan setup required for all cloud hosts is listed in the next section.
=== Networks by Server Type ===
Unless otherwise stated all cloud* hosts connect to these networks:
cloud-hosts (untagged - select rack-specific network for new hosts)
cloud-private
Certain hosts differ from this as follows:
==== cloudvirts ====
cloud-hosts (untagged)
cloud-private
cloud-instance
==== cloudnet ====
cloud-hosts (untagged)
cloud-private
cloud-instance
cloud-instance-transport
==== cloudgw ====
cloud-hosts (untagged)
cloud-gw-transport
cloud-instance-transport
==== cephosd ====
Physical Link 1:
cloud-hosts (untagged)
cloud-private
Physical Link 2:
cloud-storage (untagged)
==== cephmon / cephosd ====
Physical Link 1:
cloud-hosts (untagged)
cloud-private
Physical Link 2:
cloud-storage (untagged)
=== Network / Vlan usage ===
Information on how these networks are built on the netops-managed physical network can be found here. Below is a description of what each vlan is used for:
==== cloud-hosts (wmf production realm) ====
Every cloud host's primary connection is to a cloud-host vlan, which uses 10.x IPv4 addressing and belongs to the WMF production realm. This provides the management plane connection for hosts, used to bootstrap the device during reimage, puppet, ssh, management, monitoring etc. Host IPs on this network belong to the <site>.wmnet. domain. Traffic for this network is sent untagged on the wire.
==== cloud-private (cloud realm) ====
Every cloud host also has a connection to a cloud-private vlan, which uses 172.20.x IPv4 addressing and belongs to the cloud realm/vrf. This network is used by the openstack control plane and related services such as dns. Host IPs on this network belong to the private.<site>.wikimedia.cloud. domain. The connection is delivered using a vlan tag over the main physical link.
Certain hosts announce additional service IPs (both public and private) to the attached cloudsw using BGP over this vlan. Public service IPs announced in this way are reachable from the internet.
==== cloud-instances (cloud realm) ====
CloudVPS instances/VMs connect to a dedicated cloud-instance network. These use IPv4 addressing in the 172.16.x range, and belong to the cloud realm. OpenStack takes care of all IPAM for these ranges, which belong to the <site>.wikimedia.cloud. domain. Netbox has no role in IP assignment for the vlan, and no physical network elements have an IP in the subnet. Unlike the other vlans, which are local to each cloud switch/rack, this vlan is stretched across all cloud racks at layer-2.
==== cloud-storage (cloud realm) ====
Cloud-storage is used on cloud ceph hosts to provide the ceph 'cluster' network. Ceph hosts use IPv4 addressing in the 192.168.x range on this interface, which belongs to the cloud realm/vrf. Host IPs on these networks are managed by the cloud team outside of Netbox. This is currently delivered on a separate, secondary physical link to hosts.
==== cloud-instance-transport (cloud realm) ====
Cloud-instance-transport is a special network used for edge routing between cloudsw (netops) and cloudgw (wmcs). The two CloudGW servers at each site run keepalived over this interface to share a VIP. The cloudsw route the VPS instance and public NAT ranges to this VIP. IPs on this network are public and in the <site>.wikimediacloud.org domain. This connects the CloudGWs to the cloud realm/vrf, removing the need for them to have a leg in the cloud-private vlan (see T338334). The connection is delivered using a vlan tag over the main physical link.
==== cloud-gw-transport (cloud relam) ====
Cloud-gw-transport is a special network used for routing between cloudgw and cloudnet (neutron). The servers on both sides use a VIP to route traffic between each other for high-availability. The vlan exists only at layer-2 on the cloud switches, i.e. no switches have an IP in this range. IPs on this network are public in the <site>.wikimediacloud.org domain. The connection is delivered using a vlan tag over the main physical link.
== Edge network ==
* neutron manages floating IP NAT and all the software defined network in the virtual realm.
* cloudgw handles routing_source_ip and dmz_cidr and connects neutron to cloudsw.
* cloudsw connects to the internet and the rest of wiki-production networks.
== Virtual network ==
TODO. Inside the virtual realm.
== Topology data example ==
====Eqiad====
In the case of the eqiad1 deployment, the relevant elements for the cloud network are:
What 	Neutron network object 	Neutron subnet object 	Physical name 	Addressing 	Netbox
LAN for instances 	lan-flat-cloudinstances2b	cloud-instances2-b-eqiad	cloud-instances2-b-eqiad (vlan 1105) 	172.16.0.0/21 	vlan 1105 cidr
WAN for floating IPs	wan-transport-eqiad 	cloud-eqiad1-floating 	--- (no vlan) 	185.15.56.0/25 	cidr
WAN for transport 	wan-transport-eqiad 	cloud-gw-transport-eqiad	cloud-gw-transport-eqiad (vlan 1107) 	185.15.56.236/30	vlan 1107 cidr
WAN for transport 	--- (ignored by neutron) 	--- (ignored by neutron)	cloud-instances-transport1-b-eqiad (vlan 1120)	185.15.56.240/29	vlan 1120 cidr
Per-rack networks are shown below. 'Legacy' LAN ranges in the production realm connect existing hosts, but no new hosts should be added to them. The new, per-rack vlans/subnets get used instead.
Rack C8:
What 	Neutron network object 	Neutron subnet object 	Physical name 	Addressing 	Netbox
LAN provider (control plane) 	--- (ignored by neutron)	--- (ignored by neutron)	cloud-hosts1-c8-eqiad (vlan 1128)	10.64.151.0/24, 2620:0:861:11f::/64	vlan 1128 ipv4 ipv6
Legacy LAN provider (control plane)	--- (ignored by neutron)	--- (ignored by neutron)	cloud-hosts1-eqiad (vlan 1118) 	10.64.20.0/24, 2620:0:861:118::/64 	vlan 1118 ipv4 ipv6
Storage Network 	--- 	--- 	cloud-storage1-eqiad (vlan 1106) 	192.168.4.0/24 	vlan 1106 N/A
Rack D5:
What 	Neutron network object 	Neutron subnet object 	Physical name 	Addressing 	Netbox
LAN provider (control plane) 	--- (ignored by neutron)	--- (ignored by neutron)	cloud-hosts1-d5-eqiad (vlan 1127)	10.64.150.0/24, 2620:0:861:11e::/64	vlan 1127 ipv4 ipv6
Legacy LAN provider (control plane)	--- (ignored by neutron)	--- (ignored by neutron)	cloud-hosts1-eqiad (vlan 1118) 	10.64.20.0/24, 2620:0:861:118::/64 	vlan 1118 ipv4 ipv6
Storage Network 	--- 	--- 	cloud-storage1-eqiad (vlan 1106) 	192.168.4.0/24 	vlan 1106 N/A
Rack E4:
What 	Neutron network object 	Neutron subnet object 	Physical name 	Addressing 	Netbox
LAN provider (control plane)	--- (ignored by neutron)	--- (ignored by neutron)	cloud-hosts1-e4-eqiad (vlan 1123) 	10.64.148.0/24, 2620:0:861:11c::/64	vlan 1123 ipv4 ipv6
Storage Network 	--- 	--- 	cloud-storage1-e4-eqiad (vlan 1121)	192.168.5.0/24 	vlan 1121 [N/A]
Rack F4:
What 	Neutron network object 	Neutron subnet object 	Physical name 	Addressing 	Netbox
LAN provider (control plane)	--- (ignored by neutron)	--- (ignored by neutron)	cloud-hosts1-f4-eqiad (vlan 1124) 	10.64.149.0/24, 2620:0:861:11d::/64	vlan 1124 ipv4 ipv6
Storage Network 	--- 	--- 	cloud-storage1-e4-eqiad (vlan 1122)	192.168.6.0/24 	vlan 1122 [N/A]
====Codfw====
In the case of the codfw1dev deployment, the relevant elements are:
What 	Neutron network object 	Neutron subnet object 	Physical name 	Addressing 	Netbox
LAN for instances 	lan-flat-cloudinstances2b	cloud-instances2-b-codfw	cloud-instances2-b-codfw (vlan 2105) 	172.16.128.0/24 	vlan 2105 cidr
WAN for floating IPs 	wan-transport-codfw 	cloud-codfw1dev-floating	--- (no vlan) 	185.15.57.0/29 	cidr
WAN for transport 	wan-transport-codfw 	cloud-gw-transport-codfw	cloud-gw-transport-codfw (vlan 2107) 	185.15.57.8/30 	vlan 2107 cidr
LAN provider (HW servers)	--- (ignored by neutron) 	--- (ignored by neutron)	cloud-hosts1-b-codfw (vlan 2118) 	10.192.20.0/24 	vlan 2118 cidr
WAN for transport 	--- (ignored by neutron) 	--- (ignored by neutron)	cloud-instances-transport1-b-codfw (vlan 2120)	185.15.56.240/29	vlan 2120 cidr
= Ingress & Egress =
Some notes on the ingress & egress particularities.
== routing_source_ip==
By default, all the traffic from VMs to the Internet (egress) is source NATed using a single IPv4 address.
This address is called routing_source_ip.
There are 2 cases in which this egress NAT is not applied:
* the VM->destination is part of the #dmz_cidr exclusions
* the VM has an explicit floating ip associated (the floating ip will be used as both SNAT and DNAT)
== dmz_cidr ==
The dmz_cidr mechanisms allows us to define certain IP ranges to which VMs can talk to directly without NAT being involved.
A typical configuration per deployment looks like (please refer to ops/puppet.git for actual hiera values):
profile::openstack::eqiad1::cloudgw::dmz_cidr:
 # VMs --> wiki (text-lb.eqiad)
 - "172.16.0.0/21 . 208.80.154.224"
 # VMs --> wiki (upload-lb.eqiad)
 - "172.16.0.0/21 . 208.80.154.240"
You can read these config as: do not apply NAT to connections src:dst, src:dst, src:dst.
Please note that the dmz_cidr mechanism takes precedence over the routing_source_ip configuration.
A static route is required on the routers so return traffic knows what path to take to reach the Cloud Private IPs.
For example on cr1/2-eqiad: routing-options static route 172.16.0.0/21 next-hop 185.15.56.244/29
== Floating IPs ==
This mechanisms allows us to create an additional public IPv4 address in Neutron. Then this new IP address will be associated with a given instance and all of his egress/ingress
traffic will use it (both SNAT and DNAT).
A quota needs to be previously assigned to a project due to limited resources.
Please note that the dmz_cidr mechanism overrides floating IP NAT configurations, and you can see non-NATed packets arriving at VMs with a floating IP assigned.
Here is an example of 3 software defined floating IPs created by Neutron in the codfw1dev deployment, not using eqiad1 for brevity, but it works exactly the same:
root@cloudnet2003-dev:~ # nft -s list chain ip nat neutron-l3-agent-float-snat
table ip nat {
	chain neutron-l3-agent-float-snat {
		ip saddr 172.16.128.19 counter snat to 185.15.57.2 fully-random
		ip saddr 172.16.128.20 counter snat to 185.15.57.4 fully-random
		ip saddr 172.16.128.26 counter snat to 185.15.57.6 fully-random
	}
}
root@cloudnet2003-dev:~ # nft -s list chain ip nat neutron-l3-agent-OUTPUT
table ip nat {
	chain neutron-l3-agent-OUTPUT {
		ip daddr 185.15.57.2 counter dnat to 172.16.128.19
		ip daddr 185.15.57.4 counter dnat to 172.16.128.20
		ip daddr 185.15.57.6 counter dnat to 172.16.128.26
	}
}
=== traffic from instance to own floating IP ===
VM instances may try having traffic to its own floating IP. As described in T217681#5035533 - Cloud VPS instance with floating (public) IP can not ping that IP directly, this is not possible with default configuration.
That packet arriving the VM instance would be a martian packet.
A workaround of this is to instruct the network stack to allow this kind of martian packet:
sysctl net.ipv4.conf.all.accept_local=1
accept_local - BOOLEAN
	Accept packets with local source addresses. In combination with
	suitable routing, this can be used to direct packets between two
	local interfaces over the wire and have them accepted properly.
	default FALSE
== ingress & egress data example ==
Some important IP addresses in the eqiad1 deployment:
Type 	Name 	Address 	Explanation 	Where is defined, where to change it 	DNS FQDN
ingress	incoming gateway 	185.15.56.244/29	neutron address in the WAN transport subnet for ingress 	Core routers (static route) & neutron main router object 	cloudinstances2b-gw.openstack.eqiad1.wikimediacloud.org
egress 	routing_source_ip	185.15.56.1 	IP address for main source NAT for VMs (mind dmz_cidr exclusions)	/etc/neutron/l3_agent.ini in cloudnet nodes (puppet). No NIC has this IP assigned.	nat.openstack.eqiad1.wikimediacloud.org
Some important IP addresses in the codfw1dev deployment:
Type 	Name 	Address 	Explanation 	Where is defined, where to change it 	DNS FQDN
ingress	incoming gateway 	208.80.153.190/29	neutron address in the WAN transport subnet for ingress 	Core routers (static route) & neutron main router object 	cloudinstances2b-gw.openstack.codfw1dev.wikimediacloud.org
egress 	routing_source_ip	185.15.57.1 	IP address for main source NAT for VMs (mind dmz_cidr exclusions)	/etc/neutron/l3_agent.ini in cloudnet nodes (puppet). No NIC has this IP assigned.	nat.openstack.codfw1dev.wikimediacloud.org
= What Neutron is doing =
This section tries to give some light on how Neutron is implementing our network topology under the hood, and what is doing with all this configuration.
Neutron uses 2 specific boxes: cloudnetXXXX.site.wmnet and cloudnetXXXX.site.wmnet (active-standby).
The neutron-server service (daemon, API, etc) runs on cloudcontrol boxes.
All the agents run in cloudnet boxes, execept neutron-linuxbridge-agent, which runs in cloudvirt boxes.
root@cloudcontrol1007:~# openstack network agent list
+--------------------------------------+--------------------+--------------------+-------------------+-------+-------+---------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+--------------------+--------------------+-------------------+-------+-------+---------------------------+
| 0132a925-68a1-4efc-a495-f5e064dd2742 | Linux bridge agent | cloudvirt1049 | None | :-) | UP | neutron-linuxbridge-agent |
| 10445b2d-a083-43d8-b04f-0ca347ed00b4 | Linux bridge agent | cloudvirt1053 | None | :-) | UP | neutron-linuxbridge-agent |
| 165a5fa5-9e27-433d-911e-1bba97cf9a93 | Linux bridge agent | cloudvirt1064 | None | :-) | UP | neutron-linuxbridge-agent |
| 198c4e26-a835-4f31-863e-dcea5b462ddf | Linux bridge agent | cloudvirt1051 | None | :-) | UP | neutron-linuxbridge-agent |
| 1a3ec082-7221-4002-82d4-464b52c2634c | Linux bridge agent | cloudvirtlocal1002 | None | :-) | UP | neutron-linuxbridge-agent |
| 1c394148-02d0-4a06-892c-f5cec29ef0b0 | Linux bridge agent | cloudvirt1037 | None | :-) | UP | neutron-linuxbridge-agent |
| 1dca6733-29df-465e-bca7-a69dec7b07e6 | Linux bridge agent | cloudvirt1067 | None | :-) | UP | neutron-linuxbridge-agent |
| 20854226-8d18-4d1f-8da3-a68a8fd4dc9f | Linux bridge agent | cloudvirt1033 | None | :-) | UP | neutron-linuxbridge-agent |
| 276593cf-b604-4a1a-9a89-6ad12d5aff02 | Linux bridge agent | cloudvirt1054 | None | :-) | UP | neutron-linuxbridge-agent |
| 29547916-33cd-45d8-b33c-4947921ba728 | Linux bridge agent | cloudnet1005 | None | :-) | UP | neutron-linuxbridge-agent |
| 2c1109a9-505a-4e2a-b346-7c27978e835e | Linux bridge agent | cloudvirt1063 | None | :-) | UP | neutron-linuxbridge-agent |
| 2c9a8a8d-2ff4-47a9-80d4-645ac4c5ec50 | Linux bridge agent | cloudnet1006 | None | :-) | UP | neutron-linuxbridge-agent |
| 350cff0f-37db-442d-83fd-8e2ae95c22be | Linux bridge agent | cloudvirt1031 | None | :-) | UP | neutron-linuxbridge-agent |
| 356155d4-8a75-4965-8592-001442bf24a3 | Linux bridge agent | cloudvirtlocal1001 | None | :-) | UP | neutron-linuxbridge-agent |
| 3c4eb1fa-d039-46dc-8d72-0540e3043d47 | Linux bridge agent | cloudvirt1041 | None | XXX | UP | neutron-linuxbridge-agent |
| 3f54b3c2-503f-4667-8263-859a259b3b21 | L3 agent | cloudnet1006 | nova | :-) | UP | neutron-l3-agent |
| 3f73e703-8414-47a2-82b4-75bdea0ed80c | Linux bridge agent | cloudvirt1065 | None | :-) | UP | neutron-linuxbridge-agent |
| 3fbff0a4-bc7b-450c-9dae-fda214dee816 | Linux bridge agent | cloudvirt1045 | None | :-) | UP | neutron-linuxbridge-agent |
| 4076d982-5157-42ab-bbdb-edf055e40eb4 | Linux bridge agent | cloudvirt1058 | None | :-) | UP | neutron-linuxbridge-agent |
| 408f25f1-e09a-4e61-b8fb-8b0b8bdf16e2 | Linux bridge agent | cloudvirt1034 | None | :-) | UP | neutron-linuxbridge-agent |
| 40a4af74-77fb-4341-8589-ae3e8a5fce5a | DHCP agent | cloudnet1005 | nova | :-) | UP | neutron-dhcp-agent |
| 43ef3347-0eaa-482e-8cf1-daa850c56925 | Linux bridge agent | cloudvirt1047 | None | :-) | UP | neutron-linuxbridge-agent |
| 49a53961-ee67-458c-b7fd-c1e9d37e23c1 | Linux bridge agent | cloudvirt1044 | None | :-) | UP | neutron-linuxbridge-agent |
| 5bf8b31c-d752-4986-820e-c161d5fa70a9 | Linux bridge agent | cloudvirt1032 | None | :-) | UP | neutron-linuxbridge-agent |
| 62860de4-ca45-42ab-b0dd-4c57ee5183d2 | Linux bridge agent | cloudvirt1057 | None | :-) | UP | neutron-linuxbridge-agent |
| 64fd8ba7-f568-4957-8611-9b7da5dd1fb5 | Linux bridge agent | cloudvirt1059 | None | :-) | UP | neutron-linuxbridge-agent |
| 682e90e1-6457-4c24-b6f0-4f573d58710b | Linux bridge agent | cloudvirt1042 | None | :-) | UP | neutron-linuxbridge-agent |
| 6a88c860-29fb-4a85-8aea-6a8877c2e035 | L3 agent | cloudnet1005 | nova | :-) | UP | neutron-l3-agent |
| 70c898a1-f881-4474-bbbb-10fb8d060d1e | Linux bridge agent | cloudvirt-wdqs1002 | None | :-) | UP | neutron-linuxbridge-agent |
| 723d796e-e702-43c9-a0bc-f9645e3ad7d0 | Metadata agent | cloudnet1005 | None | :-) | UP | neutron-metadata-agent |
| 72ef8557-9154-4dec-b0c2-810ec486ce9e | Linux bridge agent | cloudvirt1055 | None | :-) | UP | neutron-linuxbridge-agent |
| 75e2efe0-0fcf-4eba-ab67-2da8cf2555fc | Linux bridge agent | cloudvirt1066 | None | :-) | UP | neutron-linuxbridge-agent |
| 7bbc9374-e1b0-4c80-ae69-62e6e90af281 | Linux bridge agent | cloudvirt1035 | None | :-) | UP | neutron-linuxbridge-agent |
| 8ddc212a-f327-4909-af64-4e913a46d48d | Linux bridge agent | cloudvirt1048 | None | :-) | UP | neutron-linuxbridge-agent |
| 8fb2e553-03d7-4d3a-a01d-d690a61255ce | Linux bridge agent | cloudvirt-wdqs1001 | None | :-) | UP | neutron-linuxbridge-agent |
| 90d775eb-1f79-4328-9901-1f8fa2831cd4 | Linux bridge agent | cloudvirtlocal1003 | None | :-) | UP | neutron-linuxbridge-agent |
| 97b30d69-fd14-4061-a7df-601186626a3c | Metadata agent | cloudnet1006 | None | :-) | UP | neutron-metadata-agent |
| aa714a6a-b44f-49b0-8a93-c16dc4626252 | Linux bridge agent | cloudvirt1043 | None | :-) | UP | neutron-linuxbridge-agent |
| ad813e11-74ce-4585-b5f5-daca6947bdda | Linux bridge agent | cloudvirt1062 | None | :-) | UP | neutron-linuxbridge-agent |
| af08efd1-9936-41dd-b04b-3b6d6039f9e5 | Linux bridge agent | cloudvirt1040 | None | :-) | UP | neutron-linuxbridge-agent |
| b04b8983-1703-4f5b-911d-91b2d771a439 | Linux bridge agent | cloudvirt1052 | None | :-) | UP | neutron-linuxbridge-agent |
| b4bb73f6-b4f2-47dd-b05e-b0d7f56feb16 | Linux bridge agent | cloudvirt1061 | None | :-) | UP | neutron-linuxbridge-agent |
| b77956b4-c836-4644-a490-1a16b6856323 | Linux bridge agent | cloudvirt-wdqs1003 | None | :-) | UP | neutron-linuxbridge-agent |
| c33d62cc-5b16-45a5-b31f-8332615cabbf | Linux bridge agent | cloudvirt1050 | None | :-) | UP | neutron-linuxbridge-agent |
| cb07848f-d4a0-4d64-81c9-03359cd46ee7 | Linux bridge agent | cloudvirt1039 | None | :-) | UP | neutron-linuxbridge-agent |
| ce4f0afc-d0c0-411b-9faa-9e4f83c746b0 | Linux bridge agent | cloudvirt1036 | None | :-) | UP | neutron-linuxbridge-agent |
| dd86d5cf-b8d1-4497-b2b3-f6e3053ec84b | Linux bridge agent | cloudvirt1046 | None | :-) | UP | neutron-linuxbridge-agent |
| e4f71e5d-e182-487d-8c5f-eb15f1ff2bf6 | DHCP agent | cloudnet1006 | nova | :-) | UP | neutron-dhcp-agent |
| e8e60646-0d34-4d3b-8d91-8881dd967382 | Linux bridge agent | cloudvirt1038 | None | :-) | UP | neutron-linuxbridge-agent |
| ec7a537a-9bc7-47b0-9bbb-eb8bb7bd3415 | Linux bridge agent | cloudvirt1060 | None | :-) | UP | neutron-linuxbridge-agent |
| fe76faf1-f9f4-4d27-ba31-345441e7b655 | Linux bridge agent | cloudvirt1056 | None | :-) | UP | neutron-linuxbridge-agent |
+--------------------------------------+--------------------+--------------------+-------------------+-------+-------+---------------------------+
When a virtual router is created, and assigned to an l3-agent, a linux network namespace (netns for short) will be created:
root@cloudnet1004:~# ip netns list | grep router
qrouter-d93771ba-2711-4f88-804a-8df6fd03978a
root@cloudcontrol1007:~# openstack network agent list --agent-type l3 --router d93771ba-2711-4f88-804a-8df6fd03978a --long
+--------------------------------------+------------+--------------+-------------------+-------+-------+------------------+----------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary | HA State |
+--------------------------------------+------------+--------------+-------------------+-------+-------+------------------+----------+
| 3f54b3c2-503f-4667-8263-859a259b3b21 | L3 agent | cloudnet1006 | nova | :-) | UP | neutron-l3-agent | standby |
| 6a88c860-29fb-4a85-8aea-6a8877c2e035 | L3 agent | cloudnet1005 | nova | :-) | UP | neutron-l3-agent | active |
+--------------------------------------+------------+--------------+-------------------+-------+-------+------------------+----------+
This netns will hold all the configuration: IP addresses (such as gateways, floating IPs), iptables rules (NAT, filtering, etc), and other information (static routes, etc).
Using virtual taps, this automatically-generated netns is connected to the main netns where the physical NICs live, along with bridges and vlan tagged subinterfaces.
All this is done in the eth1 interface, while eth0 is left for connection of the cloudnet box to the provider network.
When a virtual router is created, Neutron will decide in which l3-agent will be deploying it, taking into account HA parameters.
In our active-standby setup, only one l3-agent is active at a time, which means that all this netns/interfaces/iptables configuration is deployed by Neutron to just one node.
The 'q-' prefix in netns is from earlier development stages, Neutron was called Quantum.
= Security policy =
TODO: talk about security groups, dmz_cidr exclusion, core route filtering, etc
= See also =
* Neutron bootstrap 
* Deployment confidence checklist
* CloudVPS network and policy
* CloudVPS deployments
* Wikimedia_Cloud_Services_team/EnhancementProposals/2020_Network_refresh
* Cross-Realm_traffic_guidelines