← Back to team overview

openstack team mailing list archive

Re: Quantum DHCP support.

 

Thank you for investigate this problem.

> 1. Can you send me the results of ps aux |grep dnsmasq
nobody   12592  0.0  0.0  28812  1084 ?        S    Sep03   0:00
dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces
--interface=tapbd10a19b-a6 --except-interface=lo
--domain=openstacklocal
--pid-file=/opt/stack/data/dhcp/069f4cfc-3f97-4018-b08e-4a4868f3ca94/pid
--dhcp-hostsfile=/opt/stack/data/dhcp/069f4cfc-3f97-4018-b08e-4a4868f3ca94/host
--dhcp-optsfile=/opt/stack/data/dhcp/069f4cfc-3f97-4018-b08e-4a4868f3ca94/opts
--leasefile-ro --dhcp-range=set:tag0,192.168.10.0,static,120s

> 2. Can you also please send the ifconfig. The tap devices for also ip
> address. Can you please send me ip addr. (my gut feeling is that we do not
> configure 192.168.30.2 but rather 192.168.10.2.

- ifconfig
tap0118eb34-42 Link encap:Ethernet  HWaddr de:fe:b2:24:cc:0f
          inet6 addr: fe80::dcfe:b2ff:fe24:cc0f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:33 errors:0 dropped:0 overruns:0 frame:0
          TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:4770 (4.7 KB)  TX bytes:4770 (4.7 KB)

tap0e74b599-a1 Link encap:Ethernet  HWaddr 36:42:91:96:44:14
          inet6 addr: fe80::3442:91ff:fe96:4414/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7129 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7140 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:1763458 (1.7 MB)  TX bytes:1699484 (1.6 MB)

tap0fb10fc2-62 Link encap:Ethernet  HWaddr 92:bf:8b:95:b2:7b
          inet6 addr: fe80::90bf:8bff:fe95:b27b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:27 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:4302 (4.3 KB)  TX bytes:3804 (3.8 KB)

tap38bea316-b0 Link encap:Ethernet  HWaddr fa:68:38:20:63:60
          inet6 addr: fe80::f868:38ff:fe20:6360/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7091 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7009 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:1761232 (1.7 MB)  TX bytes:1692872 (1.6 MB)

- ipaddr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether d4:ae:52:67:54:a0 brd ff:ff:ff:ff:ff:ff
    inet *.*.*.*/* brd 192.168.100.255 scope global eth0
    inet6 fe80::d6ae:52ff:fe67:54a0/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether d4:ae:52:67:54:a1 brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:1b:21:d8:ef:38 brd ff:ff:ff:ff:ff:ff
5: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:1b:21:d8:ef:39 brd ff:ff:ff:ff:ff:ff
6: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
state DOWN
    link/ether 9e:9f:7d:e9:66:f9 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
18: tap8f8a93a5-68: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast
state DOWN qlen 500
    link/ether 3a:2c:83:b2:a6:1f brd ff:ff:ff:ff:ff:ff
19: tap4002a239-42: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast
state DOWN qlen 500
    link/ether 16:f5:da:f9:ad:a7 brd ff:ff:ff:ff:ff:ff
21: tap1be70123-2e: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast
state DOWN qlen 500
    link/ether 52:4d:f8:0c:5e:8c brd ff:ff:ff:ff:ff:ff
22: tapbc94fdb2-97: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast
state DOWN qlen 500
    link/ether 62:9a:d5:74:32:53 brd ff:ff:ff:ff:ff:ff
25: tap2142521d-5f: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast
state DOWN qlen 500
    link/ether c2:5e:48:0a:7b:20 brd ff:ff:ff:ff:ff:ff
27: tap0c3e2dff-86: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast
state DOWN qlen 500
    link/ether 76:8c:30:bc:f8:e4 brd ff:ff:ff:ff:ff:ff
28: tapcffed6f3-c7: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast
state DOWN qlen 500
    link/ether 42:b4:fb:5e:48:05 brd ff:ff:ff:ff:ff:ff
31: tapb4d4ef2a-ae: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast
state DOWN qlen 500
    link/ether 9a:03:a6:fc:b2:30 brd ff:ff:ff:ff:ff:ff
32: tap78dbef47-a5: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast
state DOWN qlen 500
    link/ether c6:29:cc:f1:bb:53 brd ff:ff:ff:ff:ff:ff
33: tap1abc032d-e3: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast
state DOWN qlen 500
    link/ether 1e:c5:b8:19:5f:ba brd ff:ff:ff:ff:ff:ff
34: tapa52d8c40-61: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast
state DOWN qlen 500
    link/ether 62:fe:48:04:04:18 brd ff:ff:ff:ff:ff:ff
95: br-int: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether a6:22:56:a0:13:4c brd ff:ff:ff:ff:ff:ff
108: tap0e74b599-a1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
pfifo_fast state UP qlen 500
    link/ether 36:42:91:96:44:14 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::3442:91ff:fe96:4414/64 scope link
       valid_lft forever preferred_lft forever
109: tap38bea316-b0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
pfifo_fast state UP qlen 500
    link/ether fa:68:38:20:63:60 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::f868:38ff:fe20:6360/64 scope link
       valid_lft forever preferred_lft forever
110: tap0118eb34-42: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
pfifo_fast state UP qlen 500
    link/ether de:fe:b2:24:cc:0f brd ff:ff:ff:ff:ff:ff
    inet6 fe80::dcfe:b2ff:fe24:cc0f/64 scope link
       valid_lft forever preferred_lft forever
111: tap0fb10fc2-62: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
pfifo_fast state UP qlen 500
    link/ether 92:bf:8b:95:b2:7b brd ff:ff:ff:ff:ff:ff
    inet6 fe80::90bf:8bff:fe95:b27b/64 scope link
       valid_lft forever preferred_lft forever
115: br-tun: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether 5a:86:d9:8f:14:42 brd ff:ff:ff:ff:ff:ff

Hope this help.
Thanks!
Suzuki

On Tue, Sep 4, 2012 at 8:22 PM, Gary Kotton <gkotton@xxxxxxxxxx> wrote:
> Hi,
> Just a few more questions:
> 1. Can you send me the results of ps aux |grep dnsmasq
> 2. Can you also please send the ifconfig. The tap devices for also ip
> address. Can you please send me ip addr. (my gut feeling is that we do not
> configure 192.168.30.2 but rather 192.168.10.2.
> Thanks
> Gary
>
>
> On 09/04/2012 12:56 PM, Takaaki Suzuki wrote:
>>>
>>> Can you also please provide sudo ovs-vsctl show?
>>
>> sure.
>>
>> midokura16:~/devstack# ovs-vsctl show
>> d699f1f2-792c-4eb9-8306-32a622316389
>>      Bridge br-tun
>>          Port br-tun
>>              Interface br-tun
>>                  type: internal
>>          Port patch-int
>>              Interface patch-int
>>                  type: patch
>>                  options: {peer=patch-tun}
>>      Bridge br-int
>>          Port "tapee78cf13-65"
>>              tag: 4
>>              Interface "tapee78cf13-65"
>>                  type: internal
>>          Port "tap0e74b599-a1"
>>              tag: 3
>>              Interface "tap0e74b599-a1"
>>          Port "tapc2df9bdf-da"
>>              tag: 1
>>              Interface "tapc2df9bdf-da"
>>                  type: internal
>>          Port "tapda44c6f5-b4"
>>              tag: 3
>>              Interface "tapda44c6f5-b4"
>>                  type: internal
>>          Port br-int
>>              Interface br-int
>>                  type: internal
>>          Port patch-tun
>>              Interface patch-tun
>>                  type: patch
>>                  options: {peer=patch-int}
>>          Port "tap0fb10fc2-62"
>>              tag: 2
>>              Interface "tap0fb10fc2-62"
>>          Port "tap0118eb34-42"
>>              tag: 2
>>              Interface "tap0118eb34-42"
>>          Port "tapbd10a19b-a6"
>>              tag: 2
>>              Interface "tapbd10a19b-a6"
>>                  type: internal
>>          Port "tap38bea316-b0"
>>              tag: 3
>>              Interface "tap38bea316-b0"
>>      ovs_version: "1.6.1"
>>
>> Thanks!
>> Suzuki
>>
>> On Tue, Sep 4, 2012 at 6:52 PM, Gary Kotton<gkotton@xxxxxxxxxx>  wrote:
>>>
>>> On 09/04/2012 12:48 PM, Takaaki Suzuki wrote:
>>>>
>>>> Hi Gary
>>>>
>>>> Thank you for your support.
>>>> I share with you information.
>>>
>>>
>>> Can you also please provide sudo ovs-vsctl show?
>>>
>>> Thanks
>>> Gary
>>>
>>>>> 1. can you please do quantum port-list?
>>>>
>>>> quantum --os_token f095d7163a564456b60bf47b078537a7 --os_url
>>>> http://localhost:9696/ port-list
>>>>
>>>> - VM port
>>>> admin_state_up : True
>>>> device_id          : d6f9eb16-fb54-4c6c-8c1f-dd7859696910
>>>> device_owner    :
>>>> fixed_ips           :{"subnet_id":
>>>> "2c6e941e-cf21-40c9-8f1a-37db0e2e9a46", "ip_address": "192.168.30.3"}
>>>> id                     : 0118eb34-424f-460e-8e12-42ecffb2dad8
>>>> mac_address    : fa:16:3e:0d:e6:31
>>>> name                :
>>>> network_id        : 069f4cfc-3f97-4018-b08e-4a4868f3ca94
>>>> status               : ACTIVE
>>>> tenant_id           :cf67ba5e70e346b9a080fb349b5e1125
>>>>
>>>> - DHCP agent port
>>>> admin_state_up : True
>>>> device_id          :
>>>>
>>>>
>>>> dhcp72aca792-f411-52a0-a641-defa1b398574-069f4cfc-3f97-4018-b08e-4a4868f3ca94
>>>> device_owner    : network:dhcp
>>>> fixed_ips           : {"subnet_id":
>>>> "bf07d0cd-7abb-4bf0-83a2-dfc1f3c21f8e", "ip_address": "192.168.10.2"},
>>>> {"subnet_id": "2c6e941e-cf21-40c9-8f1a-37db0e2e9a46", "ip_address":
>>>> "192.168.30.2"}
>>>> id                     : bd10a19b-a679-4b65-b36b-7beffcdae1ba
>>>> mac_address    : fa:16:3e:6c:f0:b5
>>>> name                : DHCP Agent
>>>> network_id        : 069f4cfc-3f97-4018-b08e-4a4868f3ca94
>>>> status               : ACTIVE
>>>> tenant_id           :cf67ba5e70e346b9a080fb349b5e1125
>>>>
>>>>
>>>>> 2. Is the DHCP agent running (q-dhcp in stackrc)?
>>>>
>>>> Yes, DHCP agent running. I added "enable_service q-dhcp".
>>>>
>>>>> 3. How did you launch the VM's? Did you use nova boot --nic
>>>>> net-id=quantum
>>>>> network ID?
>>>>
>>>> I use Horizon for Quantum V2 (https://github.com/amotoki/horizon).
>>>>
>>>>> 4. Can you please check that the host files has the MAC address and IP
>>>>> address of your VM - this is under /opt/stack/data/dhcp/<network id>/..
>>>>
>>>> midokura16:/opt/stack/data/dhcp/069f4cfc-3f97-4018-b08e-4a4868f3ca94#
>>>> cat
>>>> host
>>>> fa:16:3e:0d:e6:31,192-168-30-3.openstacklocal,192.168.30.3
>>>> fa:16:3e:6c:f0:b5,192-168-10-2.openstacklocal,192.168.10.2
>>>> fa:16:3e:6c:f0:b5,192-168-30-2.openstacklocal,192.168.30.2
>>>>
>>>> - dnsmasq syslog when launch VM.
>>>> dnsmasq-dhcp[12592]: DHCPDISCOVER(tapbd10a19b-a6) fa:16:3e:0d:e6:31 no
>>>> address available
>>>> dnsmasq-dhcp[12592]: last message repeated 2 times
>>>> dnsmasq-dhcp[12592]: DHCPDISCOVER(tapbd10a19b-a6) fa:16:3e:15:62:6a no
>>>> address available
>>>> dnsmasq-dhcp[12592]: last message repeated 2 times
>>>>
>>>> - sudo ip netns exec 069f4cfc-3f97-4018-b08e-4a4868f3ca94 ip link
>>>> 104: tapbd10a19b-a6:<BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP>   mtu
>>>> 1500 qdisc noqueue state UNKNOWN
>>>>       link/ether fa:16:3e:6c:f0:b5 brd ff:ff:ff:ff:ff:ff
>>>>
>>>> - sudo ip netns exec 069f4cfc-3f97-4018-b08e-4a4868f3ca94 ip route
>>>> 192.168.10.0/24 dev tapbd10a19b-a6  proto kernel  scope link  src
>>>> 192.168.10.2
>>>> 192.168.30.0/24 dev tapbd10a19b-a6  proto kernel  scope link  src
>>>> 192.168.30.2
>>>>
>>>> - quantum-dhcp agent spawn dnsmasq for test04 network
>>>> dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces
>>>> --interface=tapbd10a19b-a6 --except-interface=lo
>>>> --domain=openstacklocal
>>>> --pid-file=/opt/stack/data/dhcp/069f4cfc-3f97-4018-b08e-4a4868f3ca94/pid
>>>>
>>>>
>>>> --dhcp-hostsfile=/opt/stack/data/dhcp/069f4cfc-3f97-4018-b08e-4a4868f3ca94/host
>>>>
>>>>
>>>> --dhcp-optsfile=/opt/stack/data/dhcp/069f4cfc-3f97-4018-b08e-4a4868f3ca94/opts
>>>> --leasefile-ro --dhcp-range=set:tag0,192.168.10.0,static,120s
>>>>
>>>> Hope that helped.
>>>> Thanks!
>>>>
>>>> Suzuki
>>>>
>>>> On Tue, Sep 4, 2012 at 6:13 PM, Gary Kotton<gkotton@xxxxxxxxxx>   wrote:
>>>>>
>>>>> On 09/04/2012 12:03 PM, Takaaki Suzuki wrote:
>>>>>>
>>>>>> Hi
>>>>>>
>>>>>> Currently, I see that DHCP instance is created per network, at least
>>>>>> from looking at the Dnsmasq implementation.
>>>>>>
>>>>>> I'm curious to know how a DHCP instance can provide services to a VM
>>>>>> attached to a port on a network that has multiple subnets.
>>>>>>
>>>>>> It doesn't seem possible to me that a VM can get two IP addresses on
>>>>>> an interface from this DHCP server. Is this feature supported in
>>>>>> Quantum?
>>>>>>
>>>>>> I ran a quick test using Devstack + QuantumV2 + OVS plugin.  I created
>>>>>> one network called "test04", and two subnets for tor the network,
>>>>>> 192.168.10.0/24 and 192.168.30.0/24.
>>>>>
>>>>> When a Quantum port is allocated an IP address is selected from one of
>>>>> the
>>>>> subnets configured on the network (unless the user has requested more
>>>>> than
>>>>> one IP address). The DHCP agent will learn this IP address and update
>>>>> the
>>>>> hosts file.
>>>>>
>>>>> Can you please provide the following information:
>>>>> 1. can you please do quantum port-list?
>>>>> 2. Is the DHCP agent running (q-dhcp in stackrc)?
>>>>> 3. How did you launch the VM's? Did you use nova boot --nic
>>>>> net-id=quantum
>>>>> network ID?
>>>>> 4. Can you please check that the host files has the MAC address and IP
>>>>> address of your VM - this is under /opt/stack/data/dhcp/<network id>/..
>>>>>
>>>>> Thanks
>>>>> Gary
>>>>>>
>>>>>> With Dnsmasq running as the DHCP server, I launched a VM, and as
>>>>>> suspected, it did not receive any IP address.  I checked the Dnsmasq
>>>>>> log and it looked like it did receive DHCPDISCOVER message but it did
>>>>>> not offer anything back.
>>>>>>
>>>>>> I would love to know there is actually a way to get this to work, or
>>>>>> if I'm missing some critical steps here.
>>>>>>
>>>>>> Thanks!
>>>>>> Suzuki
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~openstack
>>>>>> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
>>>>>> Unsubscribe : https://launchpad.net/~openstack
>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Mailing list: https://launchpad.net/~openstack
>>>>> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
>>>>> Unsubscribe : https://launchpad.net/~openstack
>>>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>


Follow ups

References