IP addresses are not properly reported with radvd stateful subnets

Bug #1402640 reported by Nir Magnezi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Expired
Undecided
Unassigned

Bug Description

Description of problem:
=======================
I Created n radvd IPv6 subnet with:
 - ipv6_ra_mode: dhcpv6-stateful
 - ipv6_address_mode: dhcpv6-stateful

Meaning:
a. The Neutron DHCP agent (dnsmasq) provides IP addresses and additional parameters.
b. Neutron router (radvd) sends out RAs.

Version-Release number of selected component (if applicable):
=============================================================
openstack-neutron-2014.2.1-2

How reproducible:
=================
2/2

Steps to Reproduce:
===================
1. Create an IPv6 neutron network:
   # neutron net-create tenant_a_radvd_stateful --shared --provider:physical_network=ipv6_vlan_range --provider:network_type=vlan --provider:segmentation_id=64

2. Create an IPv6 subnet:
   # neutron subnet-create <IPv6_net_id> 2001:64:64:64::1/64 --name tenant_a_radvd_stateless_subnet --ipv6-ra-mode dhcpv6-stateless --ipv6-address-mode dhcpv6-stateless --dns-nameserver 2001:4860:4860::8888 --ip-version 6
3. Create a neutron router:
   # neutron router-create router1

4. Attach subnet to the router
   # neutron router-interface-add <router_id> <ipv6_subnet>

5. boot an instance with that network
   # nova boot tenant_a_instance_radvd_stateful --flavor m1.small --image <image_id> --key-name keypair --security-groups default --nic net-id=<ipv6_net_id>

Actual results:
===============
# nova show <instance_id> | grep network
| tenant_a_radvd_stateful network | 2001:64:64:64::5 |

# neutron port-show <port_id> | grep fixed_ips
| fixed_ips | {"subnet_id": "<subnet_id>", "ip_address": "2001:64:64:64::5"} |

Dispite that fact that the port mac address matches the instance NIC, the IP obtained by the instance is different.

Expected results:
=================
In this case, the NIC IP address is: 2001:64:64:64:f816:3eff:fe2b:6197

Additional info:
================
1. Instance guest image: rhel7
2. Hypervisor: rhel7

radvd:
======
# cat /var/lib/neutron/ra/76f98730-bb40-40e7-bc57-e89f120efd4a.radvd.conf
interface qr-23b0614a-cd
{
   AdvSendAdvert on;
   MinRtrAdvInterval 3;
   MaxRtrAdvInterval 10;
   prefix 2001:65:65:65::/64
   {
        AdvOnLink on;
        AdvAutonomous on;
   };
};
interface qr-9741429b-bf
{
   AdvSendAdvert on;
   MinRtrAdvInterval 3;
   MaxRtrAdvInterval 10;
   prefix 2001:63:63:63::/64
   {
        AdvOnLink on;
        AdvAutonomous on;
   };
};
interface qr-ace4c312-6c
{
   AdvSendAdvert on;
   MinRtrAdvInterval 3;
   MaxRtrAdvInterval 10;
};

dnsmasq:
========
nobody 12197 1 0 Dec14 ? 00:00:01 dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces --interface=tap74f92a94-90 --except-interface=lo --pid-file=/var/lib/neutron/dhcp/308b1dd1-185c-451b-8912-2a323616acce/pid --dhcp-hostsfile=/var/lib/neutron/dhcp/308b1dd1-185c-451b-8912-2a323616acce/host --addn-hosts=/var/lib/neutron/dhcp/308b1dd1-185c-451b-8912-2a323616acce/addn_hosts --dhcp-optsfile=/var/lib/neutron/dhcp/308b1dd1-185c-451b-8912-2a323616acce/opts --leasefile-ro --dhcp-range=set:tag0,2001:64:64:64::,static,86400s --dhcp-lease-max=16777216 --conf-file=/etc/neutron/dnsmasq-neutron.conf --domain=openstacklocal

# cat /var/lib/neutron/dhcp/308b1dd1-185c-451b-8912-2a323616acce/host
fa:16:3e:07:2d:5d,host-2001-64-64-64--1.openstacklocal,[2001:64:64:64::1]
fa:16:3e:2b:61:97,host-2001-64-64-64--5.openstacklocal,[2001:64:64:64::5]
fa:16:3e:31:94:88,host-2001-64-64-64--6.openstacklocal,[2001:64:64:64::6]
fa:16:3e:a9:e0:e8,host-2001-64-64-64--7.openstacklocal,[2001:64:64:64::7]

# cat /var/lib/neutron/dhcp/308b1dd1-185c-451b-8912-2a323616acce/addn_hosts
2001:64:64:64::1 host-2001-64-64-64--1.openstacklocal host-2001-64-64-64--1
2001:64:64:64::5 host-2001-64-64-64--5.openstacklocal host-2001-64-64-64--5
2001:64:64:64::6 host-2001-64-64-64--6.openstacklocal host-2001-64-64-64--6
2001:64:64:64::7 host-2001-64-64-64--7.openstacklocal host-2001-64-64-64--7

# cat /var/lib/neutron/dhcp/308b1dd1-185c-451b-8912-2a323616acce/opts
tag:tag0,option6:dns-server,[2001:4860:4860::8888]
tag:tag0,option6:domain-search,openstacklocal

# cat /etc/neutron/dnsmasq-neutron.conf
dhcp-option-force=26,1400

Tags: ipv6
Revision history for this message
Nir Magnezi (nmagnezi) wrote :

I've found that the issue reproduces with provider statful subnet as well:
 - ipv6_ra_mode: not set
 - ipv6-address-mode: dhcpv6-stateful

Henry Gessau (gessau)
tags: added: ipv6
Revision history for this message
Baodong (Robert) Li (baoli) wrote :

kind of lost reading the description. At step 2, a stateless 2001:65:65:65::/64 subnet was created. But the expected results were:

Expected results:
=================
In this case, the NIC IP address is: 2001:64:64:64:f816:3eff:fe2b:6197

Please clarify the description.

Changed in neutron:
assignee: nobody → Sridhar Gaddam (sridhargaddam)
Revision history for this message
Nir Magnezi (nmagnezi) wrote :

Hi Baodong,
Thank you for that. my bad.

The correct NIC IP address would be: 2001:65:65:65:f816:3eff:fe2b:6197

I'll modify the bug description accordingly. (please also disregard comment #3)

description: updated
Changed in neutron:
importance: Undecided → Medium
Revision history for this message
Sridhar Gaddam (sridhargaddam) wrote :

I could not reproduce this issue (used latest neutron code) for a dhcpv6-stateful subnet both in provider network and tenant network.
However, in my setup I've used a fedora image and not a rhel7 guest image.
When Fedora VM was up, eth0 interface had only a LLA and not the dhcpv7-stateful address.
I had manually run "dhclient -6 eth0" and could see that it acquires the same IPv6 address assigned by Neutron (i.e., nova show <instance_id> | grep network).

Do you see this problem in Fedora at your end or is it only seen with rhel7?
Also it would be good if you can please correct the steps/bug-report (i.e., bug report says radvd stateful subnet, but in "steps to reproduce" the subnet is created with dhcpv6-stateless).

Changed in neutron:
assignee: Sridhar Gaddam (sridhargaddam) → nobody
Revision history for this message
Wei Hu (huwei-xtu) wrote :

I reported another bug.
1.Create an ipv6 subnet with ra-mode is stateless or slaac and none of address mode.
2.Creaete a router.
3.Attach this router to the subnet.
4.Boot an instance with this subnet.
Neutron will allocate the instance an stateful address. But the instance acutually get an slaac ip address.
https://bugs.launchpad.net/neutron/+bug/1406436

Revision history for this message
Wei Hu (huwei-xtu) wrote :

Not sure bug 1406436 is same with this one, but seems there has some relation between them.

Changed in neutron:
assignee: nobody → Aniruddha Singh Gautam (aniruddha-gautam)
Revision history for this message
Kannan Raman (rkannan-x) wrote :

Hi everybody,

Based on my investigation this is not actual bugs and its misconfiguration of neutron subnet creation command.

Let me explain the problem :

<===As per your command reference ==>

neutron subnet-create <IPv6_net_id> 2001:64:64:64::1/64 --name tenant_a_radvd_stateless_subnet --ipv6-ra-mode dhcpv6-stateless --ipv6-address-mode dhcpv6-stateless --dns-nameserver 2001:4860:4860::8888 --ip-version 6

Here subnet ID always should be like 2001:64:64:64::/64

If you want you use Ipv6 host bit as EUI-64 method to your VM machine , you should include following command while creating IPv6 subnet

 --enable-dhcp

One more thing i would like to explain here ,

DHCPv6 pool range always in IPv6 start like 1111::1 - End 1111::ffff:ffff:ffff:fffe
Why because the EUI-64 mechanism comes under 1 to ffff:ffff:ffff:fffe.
So please dont worry about DHCPv6 allocation pool ranges

<=== Exact Command ===>
Step 1:

 neutron net-create bugs

Step 2:

neutron subnet-create --ip_version 6 --name sub_bugs6 bugs 1111::/64 --enable-dhcp --ipv6-address-mode dhcpv6-stateless --ipv6-address-mode dhcpv6-stateless --dns-nameserver 2010::1

Step 3:

neutron router-interface-del router90 sub_bugs6

The following output i got it

[root@openstack-aio ~(keystone_admin)]# nova show 8df2e5af-bcbc-4432-8bb0-abc7e25a6189 | grep network
| bugs network | 1111::f816:3eff:fe4d:3217 |
| private network | 192.168.100.224, 172.168.2.191 |

[root@openstack-aio ~(keystone_admin)]# neutron port-show a3f2c016-0518-4545-a4e0-143d4bc2917c | grep fixed_ips
| fixed_ips | {"subnet_id": "24857bb8-0bec-47dd-ba8b-7907db813139", "ip_address": "1111::f816:3eff:fe90:1851"} |

Based on our requirement only we will use DHCPv6 server configuration

Please refer this link for DHCPv6 server usage combination

https://git.openstack.org/cgit/openstack/neutron-specs/tree/specs/juno/ipv6-radvd-ra.rst

if you have any clarification please let me know

Revision history for this message
Kannan Raman (rkannan-x) wrote :

Hi Nir Magnezi,

I have not seen any bugs here and its misconfiguration of subnet creation command

So check and let me know the status

Revision history for this message
Sean M. Collins (scollins) wrote :

This bug is very old, if this bug is still valid on mitaka please indicate it as such, otherwise let's allow this to expire.

Changed in neutron:
status: New → Incomplete
assignee: Aniruddha Singh Gautam (aniruddha-gautam) → nobody
importance: Medium → Undecided
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for neutron because there has been no activity for 60 days.]

Changed in neutron:
status: Incomplete → Expired
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.