Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

No ip from DHCP

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 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -j MASQUERADE -A quantum-openvswi-snat -j quantum-openvswi-float-snat -A quantum-postrouting-bottom -j quantum-openvswi-snat COMMIT Completed on Thu Jul 25 05:34:15 2013 Generated by iptables-save v1.4.12 on Thu Jul 25 05:34:15 2013 *mangle :PREROUTING ACCEPT [173069:48210090] :INPUT ACCEPT [173069:48210090] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [248281:59539177] :POSTROUTING ACCEPT [248281:59539177] -A POSTROUTING -o virbr0 -p udp -m udp --dport 68 -j CHECKSUM --checksum-fill COMMIT

*filter :INPUT ACCEPT [156367:36188612] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [223738:54040760] :quantum-filter-top - [0:0] :quantum-openvswi-FORWARD - [0:0] :quantum-openvswi-INPUT - [0:0] :quantum-openvswi-OUTPUT - [0:0] :quantum-openvswi-i271d020a-7 - [0:0] :quantum-openvswi-local - [0:0] :quantum-openvswi-o271d020a-7 - [0:0] :quantum-openvswi-sg-chain - [0:0] :quantum-openvswi-sg-fallback - [0:0] -A INPUT -j quantum-openvswi-INPUT -A INPUT -p gre -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A FORWARD -j quantum-filter-top -A FORWARD -j quantum-openvswi-FORWARD -A FORWARD -d 192.168.122.0/24 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/24 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable -A OUTPUT -j quantum-filter-top -A OUTPUT -j quantum-openvswi-OUTPUT -A quantum-filter-top -j quantum-openvswi-local -A quantum-openvswi-FORWARD -m physdev --physdev-out tap271d020a-72 --physdev-is-bridged -j quantum-openvswi-sg-chain -A quantum-openvswi-FORWARD -m physdev --physdev-in tap271d020a-72 --physdev-is-bridged -j quantum-openvswi-sg-chain -A quantum-openvswi-INPUT -m physdev --physdev-in tap271d020a-72 --physdev-is-bridged -j quantum-openvswi-o271d020a-7 -A quantum-openvswi-i271d020a-7 -m state --state INVALID -j DROP -A quantum-openvswi-i271d020a-7 -m state --state RELATED,ESTABLISHED -j RETURN -A quantum-openvswi-i271d020a-7 -s 192.168.2.3/32 -j RETURN -A quantum-openvswi-i271d020a-7 -s 192.168.2.2/32 -j RETURN -A quantum-openvswi-i271d020a-7 -s 192.168.2.5/32 -p udp -m udp --sport 67 --dport 68 -j RETURN -A quantum-openvswi-i271d020a-7 -j quantum-openvswi-sg-fallback -A quantum-openvswi-o271d020a-7 -m mac ! --mac-source FA:16:3E:F3:21:C4 -j DROP -A quantum-openvswi-o271d020a-7 -p udp -m udp --sport 68 --dport 67 -j RETURN -A quantum-openvswi-o271d020a-7 ! -s 192.168.2.7/32 -j DROP -A quantum-openvswi-o271d020a-7 -p udp -m udp --sport 67 --dport 68 -j DROP -A quantum-openvswi-o271d020a-7 -m state --state INVALID -j DROP -A quantum-openvswi-o271d020a-7 -m state --state RELATED,ESTABLISHED -j RETURN -A quantum-openvswi-o271d020a-7 -j RETURN -A quantum-openvswi-o271d020a-7 -j quantum-openvswi-sg-fallback -A quantum-openvswi-sg-chain -m physdev --physdev-out tap271d020a-72 --physdev-is-bridged -j quantum-openvswi-i271d020a-7 -A quantum-openvswi-sg-chain -m physdev --physdev-in tap271d020a-72 --physdev-is-bridged -j quantum-openvswi-o271d020a-7 -A quantum-openvswi-sg-chain -j ACCEPT -A quantum-openvswi-sg-fallback -j DROP COMMIT

Not sure why the dhcp request are dropped in br-eth2. I may miss something or looking at wrong places?