Multiple IPv6 subnets with SLAAC

Bug #1849510 reported by LIU Yulong
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
New
Undecided
Unassigned

Bug Description

For one network with multiple slaac IPv6 subnets, the created port will have all IPv6 subnets address automatically by default. For some use case, we do not want the port to have all the IPv6 address from all IPv6 subnets, but only one of it. It is a behavior for neutron now. This is the code:
https://github.com/openstack/neutron/blob/master/neutron/db/ipam_pluggable_backend.py#L256

How to reproduce:
$ openstack network create ipv6-net
$ openstack subnet create --network ipv6-net --ip-version 4 --subnet-range 192.168.1.0/24 ipv4-sub-1
$ openstack subnet create --network ipv6-net --ip-version 4 --subnet-range 192.168.2.0/24 ipv4-sub-2
$ openstack subnet create --network ipv6-net --ip-version 6 --subnet-range 2001::/64 --ipv6-ra-mode slaac --ipv6-address-mode slaac ipv6-sub-1
$ openstack subnet create --network ipv6-net --ip-version 6 --subnet-range 2002::/64 --ipv6-ra-mode slaac --ipv6-address-mode slaac ipv6-sub-2

create a port, you will see it will have all IPv6 address from all IPv6 subnets:
openstack port create --network ipv6-net ipv6-port-1

| fixed_ips | ip_address='192.168.1.19', subnet_id='8e0d9fc0-de72-47fa-b3fc-384f19f6c0ae' |
| | ip_address='2001::f816:3eff:fe49:651b', subnet_id='6352875f-c406-4a7c-9722-857ee9c58455' |
| | ip_address='2002::f816:3eff:fe49:651b', subnet_id='193b76ec-8527-4c48-9ad6-7922d0d2e63d' |
| id | 1736e437-fb8e-442b-9b04-343eae48a250 |
| ip_address | None |
| mac_address | fa:16:3e:49:65:1b |

Revision history for this message
LIU Yulong (dragon889) wrote :

Just to make it clear, event set two specific subnet IDs for the port creation fixed_ips, it sill will also have all IPv6 subnets IPs:
$ openstack port create --network ipv6-net --fixed-ip subnet=8e0d9fc0-de72-47fa-b3fc-384f19f6c0ae --fixed-ip subnet=193b76ec-8527-4c48-9ad6-7922d0d2e63d ipv6-port-2

| fixed_ips | ip_address='192.168.1.8', subnet_id='8e0d9fc0-de72-47fa-b3fc-384f19f6c0ae' |
| | ip_address='2001::f816:3eff:fe3c:a095', subnet_id='6352875f-c406-4a7c-9722-857ee9c58455' |
| | ip_address='2002::f816:3eff:fe3c:a095', subnet_id='193b76ec-8527-4c48-9ad6-7922d0d2e63d' |
| id | 3c8e4aa8-3af8-45f0-9712-81bb326b59cf |
| ip_address | None |
| mac_address | fa:16:3e:3c:a0:95 |

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.