← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1578281] Re: IPv6 IP allocated on port-create for IPv4 subnet

 

This is the intended behavior

http://specs.openstack.org/openstack/neutron-specs/specs/kilo/multiple-
ipv6-prefixes.html

** Changed in: neutron
       Status: In Progress => Opinion

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1578281

Title:
  IPv6 IP allocated on port-create for IPv4 subnet

Status in neutron:
  Opinion

Bug description:
  * High level description:  When you have a network that has both IPv4
  subnet and a IPv6 stateless subnet, a neutron port-create in which
  only a IPv4 subnet is requested (via fixed_ip) results in both IPv4
  and IPv6 addresses being allocated for the port.   An IPv6 address
  should not be allocated in this case.

  * Pre-conditions:  None.  CLI commands executed as tenant user.

  * Step-by-step reproduction steps:  CLI commands shown below

  * Expected output: When creating neutron port with fixed_ip of IPv4
  subnet, expected the resulting port to contain only an IPv4 address.

  * Actual output: IPv6 and IPv4 addresses were allocated on the port-
  create

  * Version:  master / DevStack

  * Steps to re-create:

  
  Create a neutron network with 2 subnets (v4 and v6-slaac)

  $ neutron net-create  network
  $ neutron subnet-create --name subnet_v4 --ip-version 4  network  172.16.1.0/24 
  $ neutron subnet-create --name subnet_v6 --ip-version 6 --ipv6-ra-mode slaac --ipv6-address-mode slaac  network  2001:db8::/64
  $ neutron net-list
  +--------------------------------------+---------+-----------------------------------------------------+
  | id                                   | name    | subnets                                             |
  +--------------------------------------+---------+-----------------------------------------------------+
  | e0c605e7-f117-4319-8eab-6429c8d53b4b | network | bba5da3a-500c-466b-9d1d-f917d5c24d64 172.16.1.0/24  |
  |                                      |         | 49d0ce59-6888-4e0c-8aff-7def31087524 2001:db8::/64  |
  |+--------------------------------------+---------+-----------------------------------------------------+

  
  When creating a neutron port, an IP address is allocated out of both subnets (as expected). 

  $ neutron port-create network
  Created a new port:
  +-----------------------+------------------------------------------------------------------------------------------------------+
  | Field                 | Value                                                                                                |
  +-----------------------+------------------------------------------------------------------------------------------------------+
  | admin_state_up        | True                                                                                                 |
  | allowed_address_pairs |                                                                                                      |
  | binding:vnic_type     | normal                                                                                               |
  | created_at            | 2016-05-04T15:33:08                                                                                  |
  | description           |                                                                                                      |
  | device_id             |                                                                                                      |
  | device_owner          |                                                                                                      |
  | dns_name              |                                                                                                      |
  | extra_dhcp_opts       |                                                                                                      |
  | fixed_ips             | {"subnet_id": "bba5da3a-500c-466b-9d1d-f917d5c24d64", "ip_address": "172.16.1.3"}                    |
  |                       | {"subnet_id": "49d0ce59-6888-4e0c-8aff-7def31087524", "ip_address": "2001:db8::f816:3eff:feb6:75cc"} |
  | id                    | 0e631b7c-0a1d-4d90-a2d6-23f006d7a345                                                                 |
  | mac_address           | fa:16:3e:b6:75:cc                                                                                    |
  | name                  |                                                                                                      |
  | network_id            | e0c605e7-f117-4319-8eab-6429c8d53b4b                                                                 |
  | port_security_enabled | True                                                                                                 |
  | security_groups       | b886de86-0fdf-4dff-8f07-e67fb7a9a1aa                                                                 |
  | status                | DOWN                                                                                                 |
  | tenant_id             | ec507c583aa64f1ca186bc5d7944895e                                                                     |
  | updated_at            | 2016-05-04T15:33:08                                                                                  |
  +-----------------------+------------------------------------------------------------------------------------------------------+

  
  When creating a neutron port and requesting just an IPv6 address, the port is allocated with just an IPv6 address  (as expected). 

  $ neutron port-create --fixed-ip subnet_id=49d0ce59-6888-4e0c-8aff-7def31087524 network
  Created a new port:
  +-----------------------+------------------------------------------------------------------------------------------------------+
  | Field                 | Value                                                                                                |
  +-----------------------+------------------------------------------------------------------------------------------------------+
  | admin_state_up        | True                                                                                                 |
  | allowed_address_pairs |                                                                                                      |
  | binding:vnic_type     | normal                                                                                               |
  | created_at            | 2016-05-04T15:34:22                                                                                  |
  | description           |                                                                                                      |
  | device_id             |                                                                                                      |
  | device_owner          |                                                                                                      |
  | dns_name              |                                                                                                      |
  | extra_dhcp_opts       |                                                                                                      |
  | fixed_ips             | {"subnet_id": "49d0ce59-6888-4e0c-8aff-7def31087524", "ip_address": "2001:db8::f816:3eff:fe90:e030"} |
  | id                    | 1a3984a0-d0d5-4fc5-af60-e852c81c3ce7                                                                 |
  | mac_address           | fa:16:3e:90:e0:30                                                                                    |
  | name                  |                                                                                                      |
  | network_id            | e0c605e7-f117-4319-8eab-6429c8d53b4b                                                                 |
  | port_security_enabled | True                                                                                                 |
  | security_groups       | b886de86-0fdf-4dff-8f07-e67fb7a9a1aa                                                                 |
  | status                | DOWN                                                                                                 |
  | tenant_id             | ec507c583aa64f1ca186bc5d7944895e                                                                     |
  | updated_at            | 2016-05-04T15:34:22                                                                                  |
  +-----------------------+------------------------------------------------------------------------------------------------------+

  
  When creating a neutron port and requesting just an IPv4 address, the port is allocated with an IP address from both subnets.

  $ neutron port-create --fixed-ip subnet_id=bba5da3a-500c-466b-9d1d-f917d5c24d64  network
  Created a new port:
  +-----------------------+------------------------------------------------------------------------------------------------------+
  | Field                 | Value                                                                                                |
  +-----------------------+------------------------------------------------------------------------------------------------------+
  | admin_state_up        | True                                                                                                 |
  | allowed_address_pairs |                                                                                                      |
  | binding:vnic_type     | normal                                                                                               |
  | created_at            | 2016-05-04T15:40:29                                                                                  |
  | description           |                                                                                                      |
  | device_id             |                                                                                                      |
  | device_owner          |                                                                                                      |
  | dns_name              |                                                                                                      |
  | extra_dhcp_opts       |                                                                                                      |
  | fixed_ips             | {"subnet_id": "bba5da3a-500c-466b-9d1d-f917d5c24d64", "ip_address": "172.16.1.4"}                    |
  |                       | {"subnet_id": "49d0ce59-6888-4e0c-8aff-7def31087524", "ip_address": "2001:db8::f816:3eff:fe56:fc6e"} |
  | id                    | fb3e6820-0448-47c0-b028-4659a6f6c833                                                                 |
  | mac_address           | fa:16:3e:56:fc:6e                                                                                    |
  | name                  |                                                                                                      |
  | network_id            | e0c605e7-f117-4319-8eab-6429c8d53b4b                                                                 |
  | port_security_enabled | True                                                                                                 |
  | security_groups       | b886de86-0fdf-4dff-8f07-e67fb7a9a1aa                                                                 |
  | status                | DOWN                                                                                                 |
  | tenant_id             | ec507c583aa64f1ca186bc5d7944895e                                                                     |
  | updated_at            | 2016-05-04T15:40:29                                                                                  |
  +-----------------------+------------------------------------------------------------------------------------------------------+
   

  If the user requested only the IPv4 subnet, an IPv6 address should not
  be allocated.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1578281/+subscriptions


References