To use Nova metadata service, metadata_ip and metadata_port in the L3 agent configuration file need to be configured. Accessing from VMs to Nova metadata service is forwarded to an external network through Quantum L3 router. Nova metadata service must be reachable from the external network. As the Limitations section says, note that Quantum overlapping IPs support and Nova metadata service cannot be used together.
metadata_ip = 10.56.51.210 metadata_port = 8775
In addition, a routing setting on the host running the metadata service is required. For example, when VM launched on a network 172.18.1.0/24 accesses the Nova metadata service, the source IP address is in the above subnet, so we need to add an additional routing entry by the following command. You need to configure routing entries like this for each subnet on which VMs will be launched.
route add -net 172.18.11.0/24 gw $ROUTER_GW_IP
where $ROUTER_GW_IP is an IP address of the interface of the Quantum router connected to the external network. This IP address can be obtained by the following command:
$ quantum port-list -- --device_id <router-id> --device_owner network:router_gateway
+--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------+
| id | name | mac_address | fixed_ips |
+--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------+
| b476808c-327a-4535-b64e-c1a4932ad962 | | fa:16:3e:2b:85:d7 | {"subnet_id": "22b5e685-aa18-4716-92cc-9d23f5f5050a", "ip_address": "172.24.4.226"} |
+--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------+

