Ask Your Question
1

No ip from DHCP

asked 2013-07-25 08:31:39 -0500

CJ Chang gravatar image

I created a VM but cannot get the ip address from DHCP server. I traced the dhcp request and found it entered the br-eth2 but never come to eth2.

I am using the vlan netwrok type. Here are the output of my setup at my compute node. I have already created a VM but cannot get the ip address so I login to the VM and use "sudo hdhcpc" to trigger the dhcp discovery request so I can trace the dhcp requests..

root@dev1-openstack05:~# ovs-vsctl show c477a1a3-a1f4-4e94-9104-9d380eaca3b2

Bridge "br-eth1" Port "eth1" Interface "eth1" Port "br-eth1" Interface "br-eth1" type: internal Port "phy-br-eth1" Interface "phy-br-eth1"

Bridge br-tun Port patch-int Interface patch-int type: patch options: {peer=patch-tun} Port br-tun Interface br-tun type: internal Port "gre-1" Interface "gre-1" type: gre options: {in_key=flow, out_key=flow, remote_ip="172.16.59.119"}

Bridge br-int Port "int-br-eth2" Interface "int-br-eth2" Port br-int Interface br-int type: internal Port "int-br-eth1" Interface "int-br-eth1" Port "tap271d020a-72" tag: 2 Interface "tap271d020a-72"

Bridge "br-eth2" Port "br-eth2" Interface "br-eth2" type: internal Port "phy-br-eth2" Interface "phy-br-eth2" Port "eth2" Interface "eth2" ovs_version: "1.4.0+build0"

I use "sudo hdhcpc" to trigger the dhcp discovery request and I can see the request coming to phy-br-eth2

root@dev1-openstack05:~# tcpdump -v -n -i phy-br-eth2 | grep DHCP tcpdump: WARNING: phy-br-eth2: no IPv4 address assigned tcpdump: listening on phy-br-eth2, link-type EN10MB (Ethernet), capture size 65535 bytes 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from fa:16:3e:f3:21:c4, length 280, xid 0x3427836a, Flags [none] DHCP-Message Option 53, length 1: Discover 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from fa:16:3e:f3:21:c4, length 280, xid 0x3427836a, Flags [none] DHCP-Message Option 53, length 1: Discover

but not eth2

root@dev1-openstack05:~# tcpdump -v -n -i eth2 | grep DHCP tcpdump: WARNING: eth2: no IPv4 address assigned tcpdump: listening on eth2, link-type EN10MB (Ethernet), capture size 65535 bytes

By looking at the br-eth2, they are flows added by ovs agent.

root@dev1-openstack05:~# ovs-ofctl dump-flows br-eth2 NXST_FLOW reply (xid=0x4): cookie=0x0, duration=40091.757s, table=0, n_packets=5314, n_bytes=1615912, priority=2,in_port=2 actions=drop cookie=0x0, duration=40092.898s, table=0, n_packets=40296, n_bytes=2417760, priority=1 actions=NORMAL

root@dev1-openstack05:~# ovs-ofctl show br-eth2 | grep '^ [0-9]' 1(eth2): addr:18:03:73:f1:93:69 2(phy-br-eth2): addr:8a:7c:3d:1e:69:cd

Here is the iptables

Generated by iptables-save v1.4.12 on Thu Jul 25 05:34:15 2013 *nat :PREROUTING ACCEPT [620:153002] :INPUT ACCEPT [620:153002] :OUTPUT ACCEPT [4470:274293] :POSTROUTING ACCEPT [4470:274293] :quantum-openvswi-OUTPUT - [0:0] :quantum-openvswi-POSTROUTING - [0:0] :quantum-openvswi-PREROUTING - [0:0] :quantum-openvswi-float-snat - [0:0] :quantum-openvswi-snat - [0:0] :quantum-postrouting-bottom - [0:0] -A PREROUTING -j quantum-openvswi-PREROUTING -A OUTPUT -j quantum-openvswi-OUTPUT -A POSTROUTING -j quantum-openvswi-POSTROUTING -A POSTROUTING -j quantum-postrouting-bottom -A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 ... (more)

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2013-07-26 10:17:21 -0500

CJ Chang gravatar image

This issue has been resolved. As I mentioned before that the DHCP request entered into the br-eth2 but was dropped and never came out. Bu using ovs-ofctl, it shows up as

root@dev1-openstack01:~# ovs-ofctl dump-flows br-eth2    
cookie=0x0, duration=137361.445s, table=0, n_packets=2451, n_bytes=611718, priority=2,in_port=3 actions=drop    
cookie=0x0, duration=137363.594s, table=0, n_packets=145375, n_bytes=9701297, priority=1 actions=NORMAL

However, the right flows should be

root@dev1-openstack01:~# ovs-ofctl dump-flows br-eth2
cookie=0x0, duration=137361.445s, table=0, n_packets=2451, n_bytes=611718, priority=2,in_port=3 actions=drop
cookie=0x0, duration=137358.345s, table=0, n_packets=3355, n_bytes=679043, priority=4,in_port=3,dl_vlan=1 actions=mod_vlan_vid:1000,NORMAL
cookie=0x0, duration=137363.594s, table=0, n_packets=145375, n_bytes=9701297, priority=1 actions=NORMAL

The second flow above is the one that will modify the DHCP request internal vlan tag 1 to external vlan tag 1000 and pass it through. The reason that it is missing from the original flows is because I have physical network typo in my configuration file. When ovs agent hit the error and stopped setting up the virtual bridge or did not know how to set it up, it caused the issue. After it is fixed, it went through correctly

edit flag offensive delete link more
0

answered 2018-03-09 09:51:05 -0500

I know it's been while, do you still remember which physical network you made changes, can you point your old config and new config before and after here thank you

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: 2013-07-25 08:31:39 -0500

Seen: 1,380 times

Last updated: Jul 26 '13