Ask Your Question
1

Instance couldn't get IP from DHCP [closed]

asked 2015-07-28 02:19:10 -0600

Cheng Liu gravatar image

Hi, I've installed Openstack Kilo release on my ubuntu 14.04. I followed the installation guide of creating neutron network, and created several instances. However, none of them could ping each other. I checked ifconfig on each instance, and found that none of them got an IP.

I'm following OpenStack Networking (neutron), installed Controller Node and Network Node on one machine, and Compute Node on the other. test1 is the instance I created. Since there are only two network cards on my computers, I use em1 as management network interface, em2 as tunnel network and external network interface.

Now I can assign floating IP from Horizon, but it has no effect on instances at all. Is there anything wrong with my configurations?

Thanks in advance!

ifconfig result on network node:

root@networknode: /# ifconfig
br-ex     Link encap:Ethernet  HWaddr 74:86:7a:e0:63:68  
          inet addr:192.168.173.220  Bcast:192.168.173.255  Mask:255.255.255.0
          inet6 addr: fe80::7686:7aff:fee0:6368/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:32882 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:4134630 (4.1 MB)  TX bytes:774 (774.0 B)

em1       Link encap:Ethernet  HWaddr 74:86:7a:e0:63:66  
          inet addr:192.168.1.220  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1266208 errors:0 dropped:114 overruns:0 frame:0
          TX packets:980797 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:151512706 (151.5 MB)  TX bytes:213464804 (213.4 MB)
          Interrupt:16 

em2       Link encap:Ethernet  HWaddr 74:86:7a:e0:63:68  
          inet addr:192.168.173.220  Bcast:192.168.173.255  Mask:255.255.255.0
          inet6 addr: fe80::7686:7aff:fee0:6368/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:63540 errors:0 dropped:0 overruns:0 frame:0
          TX packets:229 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:8037486 (8.0 MB)  TX bytes:15112 (15.1 KB)
          Interrupt:17 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2901884 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2901884 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:868974098 (868.9 MB)  TX bytes:868974098 (868.9 MB)

ifconfig result on test1:

### ifconfig -a
eth0      Link encap:Ethernet  HWaddr FA:16:3E:44:EA:87  
          inet6 addr: fe80::f816:3eff:fe44:ea87/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Cheng Liu
close date 2015-07-29 11:15:02.765960

3 answers

Sort by » oldest newest most voted
1

answered 2015-07-29 10:58:36 -0600

Cheng Liu gravatar image

After searching again and again in /var/log/nova /var/log/neutron, I didn't find any error related to this issue. However, executing ifconfigin network node only returns one host related to openvswitch. After a correct configuration according to installation guide, network node should be like this(there's at least br-ex, br-int, br-tun in this list):

br-ex     Link encap:Ethernet  HWaddr 74:86:7a:e0:63:68  
          inet addr:192.168.173.220  Bcast:192.168.173.255  Mask:255.255.255.0
          inet6 addr: fe80::7686:7aff:fee0:6368/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:387225 errors:0 dropped:0 overruns:0 frame:0
          TX packets:327481 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1648135753 (1.6 GB)  TX bytes:34499863 (34.4 MB)

br-int    Link encap:Ethernet  HWaddr 76:01:54:f2:f1:4c  
          inet6 addr: fe80::7401:54ff:fef2:f14c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:115894 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4458 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:14059640 (14.0 MB)  TX bytes:1522548 (1.5 MB)

br-tun    Link encap:Ethernet  HWaddr 86:a9:f8:4b:dd:42  
          inet6 addr: fe80::84a9:f8ff:fe4b:dd42/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4509 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:1538190 (1.5 MB)

br-tunnel Link encap:Ethernet  HWaddr a2:80:da:bc:1b:48  
          inet6 addr: fe80::a080:daff:febc:1b48/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4511 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:1540674 (1.5 MB)

em1       Link encap:Ethernet  HWaddr 74:86:7a:e0:63:66  
...

So I rechecked configuration files. In /etc/neutron/neutron.confof network node, I forgot adding this line.

auth_region = RegionOne

After adding and restarting openvswitch, the network finally worked.

edit flag offensive delete link more
1

answered 2015-07-28 02:59:46 -0600

You'll have to use tcpdump starting from inside your VM to see where the DHCP packets get lost. Go from there, then on the compute node, then to the network node (beware of the network namespaces : ip netns XXXXX exec tcpdump [...]). Be careful to take eventual encapsulation (GRE) into account when tcpdump'ing.

You'll have to ensure the dnsmasq processes are properly running(*) on your network node, that they get the DHCP requests, that they answer properly. Then follow the response packet back to the VM, verifying at each network step that they get through.

When you'll have found where they get blocked, you'll know where to search for the cause of that.

(*) they should be configured properly, and running in the right network namespace, etc...

edit flag offensive delete link more

Comments

Thanks! I'll try following your steps.

Cheng Liu gravatar imageCheng Liu ( 2015-07-28 03:27:42 -0600 )edit

And please come back here, to tell us what was the problem, and how you solved it.

vincent-legoll gravatar imagevincent-legoll ( 2015-07-29 02:33:23 -0600 )edit

Finally I found the problem. It was my carelessness during configuration. Thanks for your tips on trouble shooting, it was through your steps that I figured out the problem!

Cheng Liu gravatar imageCheng Liu ( 2015-07-29 11:01:53 -0600 )edit

Hi I have similar problem like you, the instance can not get ip address from dnsmasq. And I tried to capture the packet along the way from instance to the dnsmasq server. When the cirros instance send dhcp discover, I can only capture the packet at the qvoXXXXX port on br-int

sha gravatar imagesha ( 2015-10-09 01:27:24 -0600 )edit

But no packet from port on br-tun in the compute node, and not any packets on the network node either. So how did you find your problem by the doing tcpdump? the br-int and br-tun device is previous DOWN on my setup too, I tried to bring up them, and now I can see both using ifconfig,still no ip

sha gravatar imagesha ( 2015-10-09 01:31:15 -0600 )edit
0

answered 2015-10-09 09:19:40 -0600

updated 2015-10-09 09:20:52 -0600

@sha: So you made a port that was in down state now show as up ?

If so you may retry the tcpdump'ing to look at the dhcp packets go from one step to the other and look where they stop.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-07-28 02:19:10 -0600

Seen: 486 times

Last updated: Oct 09 '15