SLAAC IPv6 addressing doesn't work with more than one subnet
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Xu Han Peng | ||
Juno |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When network has more than one IPv6 SLAAC (or dhcp-stateless) subnets, the port receives SLAAC address only from first one, the second address is from fixed IPs range.
Scenario:
1) create a network and two SLAAC subnets:
~$ neutron net-create net12
~$ neutron subnet-create net12 --ipv6-
| allocation_pools | {"start": "2003::2", "end": "2003::
| cidr | 2003::/64 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 2003::1 |
| host_routes | |
| id | 220b7e4e-
| ip_version | 6 |
| ipv6_address_mode | slaac |
| ipv6_ra_mode | slaac |
| name | |
| network_id | 4cfe1699-
| tenant_id | 834b2e7732cb4ad
~$ neutron subnet-create --name=additional net12 --ipv6-
| allocation_pools | {"start": "2004::2", "end": "2004::
| cidr | 2004::/64 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 2004::1 |
| host_routes | |
| id | e48e5d96-
| ip_version | 6 |
| ipv6_address_mode | slaac |
| ipv6_ra_mode | slaac |
| name | additional |
| network_id | 4cfe1699-
| tenant_id | 834b2e7732cb4ad
Now let's create port in this network:
~$ neutron port-create net12
Created a new port:
+------
| Field | Value |
+------
| admin_state_up | True |
| allowed_
| binding:vnic_type | normal |
| device_id | |
| device_owner | |
| fixed_ips | {"subnet_id": "220b7e4e-
| | {"subnet_id": "e48e5d96-
| id | 12c29fd4-
| mac_address | fa:16:3e:55:62:97 |
| name | |
| network_id | 4cfe1699-
| security_groups | 65e77cc0-
| status | DOWN |
| tenant_id | 834b2e7732cb4ad
As we see we get SLAAC IP from first subnet and fixed IP from second one.
Expected is to get SLAAC IPs from both subnets.
Changed in neutron: | |
assignee: | nobody → Eugene Nikanorov (enikanorov) |
importance: | Undecided → Medium |
Changed in neutron: | |
status: | New → Confirmed |
Changed in neutron: | |
milestone: | none → kilo-2 |
status: | Fix Committed → Fix Released |
Changed in neutron: | |
milestone: | kilo-2 → 2015.1.0 |
the problem seems to be in _allocate_ ips_for_ port() in db_base_ plugin_ v2.py, with the statement:
v6.remove( subnet)
v6 is the loop iterator, and its item shouldn't be removed while looping over it.
Another thing is that it used to be allocating one IP from each address family. The behavior seems to be changed by this code. Multiple prefixes are being addressed by the blueprint: https:/ /blueprints. launchpad. net/neutron/ +spec/multiple- ipv6-prefixes