Ask Your Question
0

vm can not get private ip from dhcp

asked 2016-02-03 09:51:16 -0500

James Zhu gravatar image

updated 2016-02-03 22:33:00 -0500

My environment: 2 host running CentOS 7 as virtual machines on virtual box. I created public network/subnet and private network/subnet

Problems: 1. when launch a instance in the public network, the instance will get IP in the OS 2. but when launch a instance in private network, the instance cannot get the private IP, even though the IP is shown on the dashboard for the instance. as you can see below, the instance has a IP assigned, but login the OS, the IP is not there.

    [root@controller ~]# ip netns
    qdhcp-fbefe059-58dd-4cd6-a12e-29d545984037 (id: 0)
    qdhcp-e25b02e3-3109-4c14-9b49-7530f315983a (id: 1)
    [root@controller ~]# neutron net-list
    +--------------------------------------+---------+------------------------------------------------------+
    | id                                   | name    | subnets                                              |
    +--------------------------------------+---------+------------------------------------------------------+
    | e25b02e3-3109-4c14-9b49-7530f315983a | private | 92eacb1e-8c6d-4fa5-a145-057530e38569 192.168.2.0/24  |
    |                                      |         | b35ee090-5a18-452c-97e0-38cadcc32f46 192.168.1.0/24  |
    | fbefe059-58dd-4cd6-a12e-29d545984037 | public  | 5559cd16-6795-4cc4-ac99-8c06101496d2 10.129.248.0/24 |
    +--------------------------------------+---------+------------------------------------------------------+
    [root@controller ~]# neutron subnet-list
    +--------------------------------------+---------+-----------------+------------------------------------------------------+
    | id                                   | name    | cidr            | allocation_pools                                     |
    +--------------------------------------+---------+-----------------+------------------------------------------------------+
    | 92eacb1e-8c6d-4fa5-a145-057530e38569 | priv02  | 192.168.2.0/24  | {"start": "192.168.2.2", "end": "192.168.2.254"}     |
    | 5559cd16-6795-4cc4-ac99-8c06101496d2 | public  | 10.129.248.0/24 | {"start": "10.129.248.227", "end": "10.129.248.237"} |
    | b35ee090-5a18-452c-97e0-38cadcc32f46 | private | 192.168.1.0/24  | {"start": "192.168.1.2", "end": "192.168.1.254"}     |
    +--------------------------------------+---------+-----------------+------------------------------------------------------+
    [root@controller ~]# nova list --all-tenants
    +--------------------------------------+------------+----------------------------------+--------+------------+-------------+---------------------+
    | ID                                   | Name       | Tenant ID                        | Status | Task State | Power State | Networks            |
    +--------------------------------------+------------+----------------------------------+--------+------------+-------------+---------------------+
    | e14ca230-c7d0-46e1-9fd7-3f209ab98e7e | instance01 | 204a23b9e3854f00b5e67ca6371ead9a | ACTIVE | -          | Running     | private=192.168.2.3 |
    +--------------------------------------+------------+----------------------------------+--------+------------+-------------+---------------------+
[root@controller ~]# neutron agent-list
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
| id                                   | agent_type         | host       | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
| 311c7ad6-bb3c-4334-b2b5-b34e878794c3 | Metadata agent     | controller | :-)   | True           | neutron-metadata-agent    |
| 8f01f335-53d9-47a3-a2ef-08d3df748d60 | L3 agent           | controller | :-)   | True           | neutron-l3-agent          |
| a0342424-00d8-4c29-a2bf-3c48c6cecc74 | Linux bridge agent | controller | :-)   | True           | neutron-linuxbridge-agent |
| acfc0298-3461-40a0-8d15-14742b35c641 | Linux bridge agent | compute01  | :-)   | True           | neutron-linuxbridge-agent |
| b9fb8103-98ed-4659-a1f4-782daf4b48b2 | DHCP agent         | controller | :-)   | True           | neutron-dhcp-agent        |
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+

Please let me know if you need anymore information!

Thanks!

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2017-04-09 14:41:50 -0500

updated 2017-04-09 14:42:14 -0500

Hello, Did anyone answered or did you solved your issue? I am dealing with a similar one. Thanks

edit flag offensive delete link more
0

answered 2016-02-03 18:20:38 -0500

James Zhu gravatar image

Anyone can help on this! Thanks!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-02-03 09:46:15 -0500

Seen: 255 times

Last updated: Apr 09 '17