[Openstack] can't get IP when I working with ml2 + GRE

Li, Chen chen.li at intel.com
Mon Dec 30 06:50:25 UTC 2013


Hi list,

I'm working under Centos 6.4 + Havana.

I have three nodes working:
server node: running neutron-server
network node: running neutron-openvswitch-agent and neutron-dhcp-agent
compute node: running neutron-openvswitch-agent

I created a gre network and booted a instance successfully.
No error can be found in log.
But, my instance can't get IP from dhcp agent.

Anyone know why this happen ??????

Thanks.
-chen



My network:

neutron net-show 1314f7bb-9b52-4db8-a677-a751e52aad0e
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | 1314f7bb-9b52-4db8-a677-a751e52aad0e |
| name | gre-1 |
| provider:network_type | gre |
| provider:physical_network | |
| provider:segmentation_id | 1 |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | c0774200-7aff-44bd-b122-4264368947da |
| tenant_id | 45c69667e2a64c889719ef8d8e0dd098 |
+---------------------------+--------------------------------------+



My instance:
nova show fc1e18df-448c-4c3a-ad9d-b0da9d79b8c6
+--------------------------------------+-----------------------------------------------------------+
| Property | Value |
+--------------------------------------+-----------------------------------------------------------+
| status | ACTIVE |
| updated | 2013-12-30T06:09:22Z |
| OS-EXT-STS:task_state | None |
| OS-EXT-SRV-ATTR:host | b-compute01 |
| key_name | None |
| image | base_image_on_file (a9879545-65a0-4204-81c7-a668947c126d) |
| gre-1 network | 20.1.100.2 |
| hostId | bea3a6565d82258df38fac1fc061bce013ad12c9a67d82baf0ace8b8 |
| OS-EXT-STS:vm_state | active |
| OS-EXT-SRV-ATTR:instance_name | instance-00000339 |
| OS-SRV-USG:launched_at | 2013-12-30T06:09:22.000000 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | b-compute01 |
| flavor | m1.tiny (1) |
| id | fc1e18df-448c-4c3a-ad9d-b0da9d79b8c6 |
| security_groups | [{u'name': u'default'}] |
| OS-SRV-USG:terminated_at | None |
| user_id | c4633e89685d41c4a2d20a2234b5025e |
| name | test-gre-1 |
| created | 2013-12-30T06:09:16Z |
| tenant_id | 45c69667e2a64c889719ef8d8e0dd098 |
| OS-DCF:diskConfig | MANUAL |
| metadata | {} |
| os-extended-volumes:volumes_attached | [] |
| accessIPv4 | |
| accessIPv6 | |
| progress | 0 |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-AZ:availability_zone | nova |
| config_drive | |
+--------------------------------------+-----------------------------------------------------------+



My ovs on network node:

 ovs-vsctl show
34e0c8b4-315c-42c5-9d7d-183d3a6fbd83
    Bridge br-tun
        Port patch-int
            Interface patch-int
                type: patch
                options: {peer=patch-tun}
        Port "gre-192.168.11.101"
            Interface "gre-192.168.11.101"
                type: gre
                options: {in_key=flow, local_ip="192.168.11.201", out_key=flow, remote_ip="192.168.11.101"}
        Port br-tun
            Interface br-tun
                type: internal
    Bridge br-int
        Port br-int
            Interface br-int
                type: internal
        Port "tap45bfc42b-93"
            tag: 1
            Interface "tap45bfc42b-93"
        Port patch-tun
            Interface patch-tun
                type: patch
                options: {peer=patch-int}
    ovs_version: "1.10.0"

ovs-ofctl dump-flows br-int
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=1532.459s, table=0, n_packets=1, n_bytes=78, idle_age=1531, priority=1 actions=NORMAL

ovs-ofctl dump-flows br-tun
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=1543.253s, table=0, n_packets=0, n_bytes=0, idle_age=1543, priority=1,in_port=1 actions=resubmit(,1)
 cookie=0x0, duration=1543.162s, table=0, n_packets=4, n_bytes=300, idle_age=1534, priority=0 actions=drop
 cookie=0x0, duration=1542.984s, table=1, n_packets=0, n_bytes=0, idle_age=1542, priority=0,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=resubmit(,21)
 cookie=0x0, duration=1543.072s, table=1, n_packets=0, n_bytes=0, idle_age=1543, priority=0,dl_dst=00:00:00:00:00:00/01:00:00:00:00:00 actions=resubmit(,20)
 cookie=0x0, duration=1540.754s, table=2, n_packets=0, n_bytes=0, idle_age=1540, priority=1,tun_id=0x1 actions=mod_vlan_vid:1,resubmit(,10)
 cookie=0x0, duration=1542.899s, table=2, n_packets=0, n_bytes=0, idle_age=1542, priority=0 actions=drop
 cookie=0x0, duration=1542.815s, table=3, n_packets=0, n_bytes=0, idle_age=1542, priority=0 actions=drop
 cookie=0x0, duration=1542.728s, table=10, n_packets=0, n_bytes=0, idle_age=1542, priority=1 actions=learn(table=20,hard_timeout=300,priority=1,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:0->NXM_OF_VLAN_TCI[],load:NXM_NX_TUN_ID[]->NXM_NX_TUN_ID[],output:NXM_OF_IN_PORT[]),output:1
 cookie=0x0, duration=1542.645s, table=20, n_packets=0, n_bytes=0, idle_age=1542, priority=0 actions=resubmit(,21)
 cookie=0x0, duration=1540.842s, table=21, n_packets=0, n_bytes=0, idle_age=1540, priority=1,dl_vlan=1 actions=strip_vlan,set_tunnel:0x1,ANY
 cookie=0x0, duration=1542.558s, table=21, n_packets=0, n_bytes=0, idle_age=1542, priority=0 actions=drop



My ovs on compute node:
ovs-vsctl show
d4c41787-8313-49a1-9fa8-1e34f7fa2086
    Bridge br-int
        Port patch-tun
            Interface patch-tun
                type: patch
                options: {peer=patch-int}
        Port br-int
            Interface br-int
                type: internal
        Port "qvo69786a37-83"
            tag: 1
            Interface "qvo69786a37-83"
    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-192.168.11.201"
            Interface "gre-192.168.11.201"
                type: gre
                options: {in_key=flow, local_ip="192.168.11.101", out_key=flow, remote_ip="192.168.11.201"}
    ovs_version: "1.10.0"

 ovs-ofctl dump-flows br-int
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=1626.522s, table=0, n_packets=80, n_bytes=26832, idle_age=132, priority=1 actions=NORMAL

 ovs-ofctl dump-flows br-tun
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=1630.885s, table=0, n_packets=79, n_bytes=26754, idle_age=138, priority=1,in_port=1 actions=resubmit(,1)
 cookie=0x0, duration=1595.202s, table=0, n_packets=0, n_bytes=0, idle_age=1595, priority=1,in_port=2 actions=resubmit(,2)
 cookie=0x0, duration=1630.8s, table=0, n_packets=4, n_bytes=300, idle_age=1622, priority=0 actions=drop
 cookie=0x0, duration=1630.628s, table=1, n_packets=79, n_bytes=26754, idle_age=138, priority=0,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=resubmit(,21)
 cookie=0x0, duration=1630.714s, table=1, n_packets=0, n_bytes=0, idle_age=1630, priority=0,dl_dst=00:00:00:00:00:00/01:00:00:00:00:00 actions=resubmit(,20)
 cookie=0x0, duration=1628.389s, table=2, n_packets=0, n_bytes=0, idle_age=1628, priority=1,tun_id=0x1 actions=mod_vlan_vid:1,resubmit(,10)
 cookie=0x0, duration=1630.541s, table=2, n_packets=0, n_bytes=0, idle_age=1630, priority=0 actions=drop
 cookie=0x0, duration=1630.455s, table=3, n_packets=0, n_bytes=0, idle_age=1630, priority=0 actions=drop
 cookie=0x0, duration=1630.369s, table=10, n_packets=0, n_bytes=0, idle_age=1630, priority=1 actions=learn(table=20,hard_timeout=300,priority=1,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:0->NXM_OF_VLAN_TCI[],load:NXM_NX_TUN_ID[]->NXM_NX_TUN_ID[],output:NXM_OF_IN_PORT[]),output:1
 cookie=0x0, duration=1630.283s, table=20, n_packets=0, n_bytes=0, idle_age=1630, priority=0 actions=resubmit(,21)
 cookie=0x0, duration=1628.475s, table=21, n_packets=79, n_bytes=26754, idle_age=138, hard_age=1595, priority=1,dl_vlan=1 actions=strip_vlan,set_tunnel:0x1,output:2
 cookie=0x0, duration=1630.197s, table=21, n_packets=0, n_bytes=0, idle_age=1630, priority=0 actions=drop



My configuration files for /etc/neutron/neutron.conf

[DEFAULT]
debug = True
core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin
service_plugins = neutron.services.l3_router.l3_router_plugin.L3RouterPlugin
api_paste_config = /etc/neutron/api-paste.ini
auth_strategy = keystone
allow_overlapping_ips = True
rpc_backend = neutron.openstack.common.rpc.impl_qpid
qpid_hostname = 192.168.11.11
api_workers = 0
[quotas]
quota_port = -1
[agent]
root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf
[keystone_authtoken]
auth_host = 192.168.11.11
auth_port = 5000
auth_protocol = http
auth_uri = https://192.168.11.11:5000<https://192.168.11.11:5000/>
admin_tenant_name = services
admin_user = quantum
admin_password = 123456
signing_dir = $state_path/keystone-signing
[database]
connection = mysql://neutron:neutron@192.168.11.11/ovs_ml2



/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini:
[ovs]
tenant_network_type = gre
enable_tunneling = True
tunnel_type = gre
tunnel_id_ranges = 1:10
integration_bridge = br-int
tunnel_bridge = br-tun
int_peer_patch_port = patch-tun
tun_peer_patch_port = patch-int
local_ip = 192.168.11.101
[agent]
tunnel_types = gre
vxlan_udp_port = 8472
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver



/etc/neutron/dhcp_agent.ini :
[DEFAULT]
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
ovs_use_veth = True
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
use_namespaces = True

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20131230/1f942631/attachment.html>


More information about the Openstack mailing list