use devstack vm can not get fixed ip

Asked by Chongyang Wang

OS: ubuntu(x86_64) 12.04

in vm:
 ifconfig eth0 192.168.2.3 netmask 255.255.255.0 up
 route add default gw 192.168.2.2
then:
 ping 192.168.2.2
but:
 no reply
why?

rick@/opt/vdisk$ ovs-vsctl show
7e359060-4b48-4d6a-8a08-aed87f20922c
    Bridge br-ex
        Port "qg-c69aa6e2-3d"
            Interface "qg-c69aa6e2-3d"
                type: internal
        Port br-ex
            Interface br-ex
                type: internal
    Bridge br-int
        Port "qvo756286e1-d2"
            tag: 1
            Interface "qvo756286e1-d2"
        Port "qr-a629fd5f-d7"
            tag: 1
            Interface "qr-a629fd5f-d7"
                type: internal
        Port br-int
            Interface br-int
                type: internal
        Port "tapf2e57c04-62"
            tag: 1
            Interface "tapf2e57c04-62"
                type: internal
    ovs_version: "1.4.0+build0"

rick@/opt/vdisk$ ip l
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
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:24:e8:83:56:7c brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether c4:17:fe:c3:c5:35 brd ff:ff:ff:ff:ff:ff
5: br-ex: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/ether 6e:b0:99:0b:1a:4d brd ff:ff:ff:ff:ff:ff
9: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
    link/ether fe:2d:cc:55:60:3f brd ff:ff:ff:ff:ff:ff
16: br-int: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether e6:41:49:84:0f:44 brd ff:ff:ff:ff:ff:ff
25: qbr756286e1-d2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
    link/ether b6:89:70:da:f4:7a brd ff:ff:ff:ff:ff:ff
26: qvo756286e1-d2: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether fe:0d:f0:fb:24:3f brd ff:ff:ff:ff:ff:ff
27: qvb756286e1-d2: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master qbr756286e1-d2 state UP qlen 1000
    link/ether b6:89:70:da:f4:7a brd ff:ff:ff:ff:ff:ff
28: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master qbr756286e1-d2 state UNKNOWN qlen 500
    link/ether fe:16:3e:44:cc:ca brd ff:ff:ff:ff:ff:ff

rick@/opt/vdisk$ brctl show
bridge name bridge id STP enabled interfaces
br-ex 0000.6eb0990b1a4d no qg-c69aa6e2-3d
br-int 0000.e64149840f44 no qr-a629fd5f-d7
       qvo756286e1-d2
       tapf2e57c04-62
qbr756286e1-d2 8000.b68970daf47a no qvb756286e1-d2
       vnet0
virbr0 8000.000000000000 yes

rick@/opt/vdisk$ ip netns
qrouter-c7808ea1-ac21-43b7-a278-c122d01a5d7d
qdhcp-8393d883-3b8b-4464-9822-1440e76cd49e
rick@/opt/vdisk$ ip netns exec qdhcp-8393d883-3b8b-4464-9822-1440e76cd49e ip a
18: tapf2e57c04-62: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/ether fe:16:3e:c6:4f:14 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.2/24 brd 192.168.2.255 scope global tapf2e57c04-62
    inet6 fe80::fc16:3eff:fec6:4f14/64 scope link
       valid_lft forever preferred_lft forever
19: 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
rick@/opt/vdisk$ ip netns exec qrouter-c7808ea1-ac21-43b7-a278-c122d01a5d7d ip a
20: 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
29: qr-a629fd5f-d7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/ether fe:16:3e:12:4d:f9 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.1/24 brd 192.168.2.255 scope global qr-a629fd5f-d7
    inet6 fe80::fc16:3eff:fe12:4df9/64 scope link
       valid_lft forever preferred_lft forever
30: qg-c69aa6e2-3d: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/ether fe:16:3e:23:88:6e brd ff:ff:ff:ff:ff:ff
    inet 172.24.254.2/24 brd 172.24.254.255 scope global qg-c69aa6e2-3d
    inet6 fe80::fc16:3eff:fe23:886e/64 scope link
       valid_lft forever preferred_lft forever

rick@/opt/vdisk$ sudo tcpdump -i qvb756286e1-d2 -n
tcpdump: WARNING: qvb756286e1-d2: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on qvb756286e1-d2, link-type EN10MB (Ethernet), capture size 65535 bytes
14:44:45.877851 ARP, Request who-has 192.168.2.2 tell 192.168.2.3, length 28
14:44:45.878252 ARP, Reply 192.168.2.2 is-at fe:16:3e:c6:4f:14, length 28
14:44:46.877159 ARP, Request who-has 192.168.2.2 tell 192.168.2.3, length 28
14:44:46.877220 ARP, Reply 192.168.2.2 is-at fe:16:3e:c6:4f:14, length 28
14:44:47.877855 ARP, Request who-has 192.168.2.2 tell 192.168.2.3, length 28
14:44:47.877919 ARP, Reply 192.168.2.2 is-at fe:16:3e:c6:4f:14, length 28
^C

rick@/opt/vdisk$ sudo tcpdump -i vnet0 -n
tcpdump: WARNING: vnet0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on vnet0, link-type EN10MB (Ethernet), capture size 65535 bytes
14:46:20.312699 IP 0.0.0.0 > 224.0.0.1: igmp query v2
14:46:20.312723 IP6 fe80::2039:69ff:fe00:72e > ff02::1: HBH ICMP6, multicast listener querymax resp delay: 1000 addr: ::, length 24
14:46:20.993181 IP6 :: > ff02::1:ff44:ccca: HBH ICMP6, multicast listener reportmax resp delay: 0 addr: ff02::1:ff44:ccca, length 24
14:46:21.316698 ARP, Request who-has 192.168.2.2 tell 192.168.2.3, length 28
14:46:21.316730 ARP, Request who-has 192.168.2.2 tell 192.168.2.3, length 28
14:46:22.313076 ARP, Request who-has 192.168.2.2 tell 192.168.2.3, length 28
14:46:22.313107 ARP, Request who-has 192.168.2.2 tell 192.168.2.3, length 28
14:46:23.313042 ARP, Request who-has 192.168.2.2 tell 192.168.2.3, length 28
14:46:23.313072 ARP, Request who-has 192.168.2.2 tell 192.168.2.3, length 28
^C

===============================

rick@/opt/vdisk$ cat /etc/quantum/quantum.conf
[DEFAULT]
rabbit_password = 123456
rabbit_host = localhost
auth_strategy = keystone
verbose = True
debug = True
bind_host = 0.0.0.0
bind_port = 9696
core_plugin = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2
api_paste_config = api-paste.ini
base_mac = fe:16:3e:00:00:00
control_exchange = quantum
notification_driver = quantum.openstack.common.notifier.list_notifier
list_notifier_drivers = quantum.openstack.common.notifier.rabbit_notifier
[QUOTAS]

rick@/opt/vdisk$ cat /etc/quantum/l3_agent.ini
[DEFAULT]
external_network_bridge = br-ex
use_namespaces = True
metadata_ip =
debug = True
verbose = True
interface_driver = quantum.agent.linux.interface.OVSInterfaceDriver
auth_url = http://127.0.0.1:35357/v2.0
auth_region = RegionOne
admin_tenant_name = service
admin_user = quantum
admin_password = 999888777666
root_helper = sudo

rick@/opt/vdisk$ cat /etc/quantum/dhcp_agent.ini
[DEFAULT]
admin_password = 999888777666
admin_user = quantum
admin_tenant_name = service
auth_url = http://127.0.0.1:35357/v2.0
use_namespaces = True
debug = True
verbose = True
state_path = /opt/stack/data
interface_driver = quantum.agent.linux.interface.OVSInterfaceDriver
dhcp_driver = quantum.agent.linux.dhcp.Dnsmasq
root_helper = sudo

rick@/opt/vdisk$ cat /etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini
[DATABASE]
sql_connection = mysql://root:123456@localhost/ovs_quantum?charset=utf8
reconnect_interval = 2
[OVS]
[AGENT]
polling_interval = 2
root_helper = sudo

Question information

Language:
English Edit question
Status:
Solved
For:
neutron Edit question
Assignee:
No assignee Edit question
Solved by:
Chongyang Wang
Solved:
Last query:
Last reply:
Revision history for this message
yong sheng gong (gongysh) said :
#1

can u use udhcpc to get the ip for vm since we have enabled the dhcp server on the network?

Revision history for this message
Chongyang Wang (ricky99-wang) said :
#2

quantum-dhcp-agent has already been running.
I can get the arp reply in the bridge ''qbr756286e1-d2" and "qvb756286e1-d2" one of the veth ports, but the vnet0 in the same bridge "qbr756286e1-d2" can not get the reply.
I have executed "ebtable -t nat -F".

Revision history for this message
yong sheng gong (gongysh) said :
#3

Are u using xen? can u print the iptables-save?

Revision history for this message
yong sheng gong (gongysh) said :
#4

and see if this bug https://bugs.launchpad.net/quantum/+bug/1053312 describes your problem.

Revision history for this message
Chongyang Wang (ricky99-wang) said :
#5

It's my mistake, to set 'base_mac=fe:16:xx:xx' in the quantum.conf. It shouldn't be starting with 'fe', which conflicts with libvirt.
Tanks gonysh, it's ok.