无法访问提供商网络(Openstack Packstack Opendaylight集成)

时间:2018-01-24 11:30:00

标签: openstack opendaylight

我尝试使用OpenDayLight集成使用packstack(Centos)构建的Openstack。 这是我的拓扑

Openstack Controller : 10.210.210.10 & 10.211.211.10
- eth1 : 10.211.211.10/24
- eth0 : 10.210.210.10/24

Openstack Compute : 10.210.210.20 & 10.211.211.20
- eth1 : 10.211.211.20/24
- eth0 : 10.210.210.20/24

OpenDayLight : 10.210.210.30
- eth1 : 10.210.210.30/24

Provider Network : 10.211.211.0/24
Tenant Network : 10.210.210.0/24

Openstack Version : Newton
OpenDayLight Version : Nitrogen SR1

这是我的packstack配置更改

CONFIG_HEAT_INSTALL=y
CONFIG_NEUTRON_FWAAS=y
CONFIG_NEUTRON_VPNAAS=y
CONFIG_LBAAS_INSTALL=y

CONFIG_CINDER_INSTALL=n
CONFIG_SWIFT_INSTALL=n
CONFIG_CEILOMETER_INSTALL=n
CONFIG_AODH_INSTALL=n
CONFIG_GNOCCHI_INSTALL=n
CONFIG_NAGIOS_INSTALL=n
CONFIG_PROVISION_DEMO=n

CONFIG_COMPUTE_HOSTS=10.X0.X0.20
CONFIG_USE_EPEL=y
CONFIG_KEYSTONE_ADMIN_PW=rahasia
CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vxlan,gre,vlan,flat,local
CONFIG_NEUTRON_ML2_FLAT_NETWORKS=external
CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS=external:br-ex
CONFIG_NEUTRON_OVS_BRIDGE_IFACES=br-ex:eth1
CONFIG_NEUTRON_OVS_BRIDGES_COMPUTE=br-ex

我尝试按照本教程:http://docs.opendaylight.org/en/stable-nitrogen/submodules/netvirt/docs/openstack-guide/openstack-with-netvirt.html

实例在租户网络中获取dhcp并ping ip tenant路由器网关。但我无法ping所有提供商网络。

这是与opendaylight

集成时的所有配置

OPENDAYLIGHT

** Set ACL
mkdir -p etc/opendaylight/datastore/initial/config/
cp system/org/opendaylight/netvirt/aclservice-impl/0.5.1/aclservice-impl-0.5.1-config.xml etc/opendaylight/datastore/initial/config/netvirt-aclservice-config.xml
sed -i s/stateful/transparent/ etc/opendaylight/datastore/initial/config/netvirt-aclservice-config.xml

export JAVA_HOME=/usr/java/jdk1.8.0_162/jre
./bin/karaf 

** Install Feature
feature:install odl-dluxapps-nodes odl-dlux-core odl-dluxapps-topology odl-dluxapps-applications odl-netvirt-openstack odl-netvirt-ui odl-mdsal-apidocs

OPENSTACK CONTROLLER NODE

systemctl stop neutron-server
systemctl stop neutron-openvswitch-agent
systemctl disable neutron-openvswitch-agent
systemctl stop neutron-l3-agent
systemctl disable neutron-l3-agent

systemctl stop openvswitch
rm -rf /var/log/openvswitch/*
rm -rf /etc/openvswitch/conf.db
systemctl start openvswitch

ovs-vsctl set-manager tcp:10.210.210.30:6640
ovs-vsctl del-port br-int eth1
ovs-vsctl add-br br-ex
ovs-vsctl add-port br-ex eth1
ovs-vsctl set-controller br-ex tcp:10.210.210.30:6653

ovs-vsctl set Open_vSwitch . other_config:local_ip=10.210.210.10
ovs-vsctl get Open_vSwitch . other_config

yum -y install python-networking-odl

crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 mechanism_drivers opendaylight 
crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 tenant_network_types vxlan

cat <<EOT>> /etc/neutron/plugins/ml2/ml2_conf.ini 
[ml2_odl]
password = admin
username = admin
url = http://10.210.210.30:8080/controller/nb/v2/neutron
EOT

crudini --set /etc/neutron/plugins/neutron.conf DEFAULT service_plugins odl-router
crudini --set /etc/neutron/plugins/dhcp_agent.ini OVS ovsdb_interface vsctl

mysql -e "DROP DATABASE IF EXISTS neutron;"
mysql -e "CREATE DATABASE neutron CHARACTER SET utf8;"
neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head

systemctl start neutron-server
sudo ovs-vsctl set Open_vSwitch . other_config:provider_mappings=external:eth1

OPENSTACK COMPUTE NODE

systemctl stop neutron-openvswitch-agent
systemctl disable neutron-openvswitch-agent
systemctl stop neutron-l3-agent
systemctl disable neutron-l3-agent

systemctl stop openvswitch
rm -rf /var/log/openvswitch/*
rm -rf /etc/openvswitch/conf.db

systemctl start openvswitch

ovs-vsctl set-manager tcp:10.210.210.30:6640
ovs-vsctl set-manager tcp:10.210.210.30:6640
ovs-vsctl del-port br-int eth1
ovs-vsctl add-br br-ex
ovs-vsctl add-port br-ex eth1
ovs-vsctl set-controller br-ex tcp:10.210.210.30:6653

ovs-vsctl set Open_vSwitch . other_config:local_ip=10.210.210.20
ovs-vsctl get Open_vSwitch . other_config

yum -y install python-networking-odl

sudo ovs-vsctl set Open_vSwitch . other_config:provider_mappings=external:eth1

我尝试映射到eth1或br-ex,但同样如此。我无法ping所有提供商网络。 (仅来自控制器或计算节点的网关10.211.211.1)。谢谢:))

3 个答案:

答案 0 :(得分:0)

报告

OVS-VSCTL SHOW

CONTROLLER

[root@pod21-controller ~]# ovs-vsctl show
525fbe7c-e60c-4135-b0a5-178d76c04529
    Manager "ptcp:6640:127.0.0.1"
        is_connected: true
    Bridge br-tun
        Controller "tcp:127.0.0.1:6633"
            is_connected: true
        fail_mode: secure
        Port "gre-0ad2d214"
            Interface "gre-0ad2d214"
                type: gre
                options: {df_default="true", in_key=flow, local_ip="10.210.210.10", out_key=flow, remote_ip="10.210.210.20"}
        Port br-tun
            Interface br-tun
                type: internal
        Port "vxlan-0ad2d214"
            Interface "vxlan-0ad2d214"
                type: vxlan
                options: {df_default="true", in_key=flow, local_ip="10.210.210.10", out_key=flow,    remote_ip="10.210.210.20"}                                                                                                                
        Port patch-int                                                                                                
            Interface patch-int                                                                                       
                type: patch                                                                                           
                options: {peer=patch-tun}                                                                             
    Bridge br-ex                                                                                                      
        Controller "tcp:127.0.0.1:6633"                                                                               
            is_connected: true                                                                                        
        fail_mode: secure                                                                                             
        Port phy-br-ex                                                                                                
            Interface phy-br-ex
                type: patch
                options: {peer=int-br-ex}
        Port "eth1"
            Interface "eth1"
        Port br-ex
            Interface br-ex
                type: internal
    Bridge br-int
        Controller "tcp:127.0.0.1:6633"
            is_connected: true
        fail_mode: secure
        Port br-int
            Interface br-int
                type: internal
        Port int-br-ex
            Interface int-br-ex
                type: patch
                options: {peer=phy-br-ex}
        Port patch-tun
            Interface patch-tun
                type: patch
                options: {peer=patch-int}
    ovs_version: "2.6.1"

COMPUTE

[root@pod21-compute ~]# ovs-vsctl show
f4466d5a-c1f5-4c5c-91c3-636944cd0f97
    Manager "ptcp:6640:127.0.0.1"
        is_connected: true
    Bridge br-ex
        Controller "tcp:127.0.0.1:6633"
            is_connected: true
        fail_mode: secure
        Port phy-br-ex
            Interface phy-br-ex
                type: patch
                options: {peer=int-br-ex}
        Port br-ex
            Interface br-ex
                type: internal
        Port "eth1"
            Interface "eth1"
    Bridge br-int
        Controller "tcp:127.0.0.1:6633"
            is_connected: true
        fail_mode: secure                                                                                             
        Port int-br-ex                                                                                                
            Interface int-br-ex                                                                                       
                type: patch                                                                                           
                options: {peer=phy-br-ex}                                                                             
        Port br-int                                                                                                   
            Interface br-int                                                                                          
                type: internal                                                                                        
        Port patch-tun                                                                                                
            Interface patch-tun                                                                                       
                type: patch
                options: {peer=patch-int}
    Bridge br-tun
        Controller "tcp:127.0.0.1:6633"
            is_connected: true
        fail_mode: secure
        Port patch-int
            Interface patch-int
                type: patch
                options: {peer=patch-tun}
        Port "gre-0ad2d20a"
            Interface "gre-0ad2d20a"
                type: gre
                options: {df_default="true", in_key=flow, local_ip="10.210.210.20", out_key=flow, remote_ip="10.210.210.10"}
        Port br-tun
            Interface br-tun
                type: internal
        Port "vxlan-0ad2d20a"
            Interface "vxlan-0ad2d20a"
                type: vxlan
                options: {df_default="true", in_key=flow, local_ip="10.210.210.20", out_key=flow, remote_ip="10.210.210.10"}
    ovs_version: "2.6.1"
配置后

OVS-VSCTL

CONTROLLER

[root@pod21-controller ~]# ovs-vsctl show
71b22ef2-fbea-4cd4-ba6a-883b3df9c5f1
    Manager "tcp:10.210.210.30:6640"
        is_connected: true
    Bridge br-int
        Controller "tcp:10.210.210.30:6653"
            is_connected: true
        fail_mode: secure
        Port br-int
            Interface br-int
                type: internal
    Bridge br-ex
        Controller "tcp:10.210.210.30:6653"
            is_connected: true
        Port br-ex
            Interface br-ex
                type: internal
        Port "eth1"
            Interface "eth1"
    ovs_version: "2.6.1"

COMPUTE

[root@pod21-compute ~]# ovs-vsctl  show
3bede8e2-eb29-4dbb-97f0-4cbadb2c0195
    Manager "tcp:10.210.210.30:6640"
        is_connected: true
    Bridge br-ex
        Controller "tcp:10.210.210.30:6653"
            is_connected: true
        Port br-ex
            Interface br-ex
                type: internal
        Port "eth1"
            Interface "eth1"
    Bridge br-int
        Controller "tcp:10.210.210.30:6653"
            is_connected: true
        fail_mode: secure
        Port br-int
            Interface br-int
                type: internal
    ovs_version: "2.6.1"

添加实例后

CONTROLLER

[root@pod21-controller ~(keystone_admin)]# ovs-vsctl show
71b22ef2-fbea-4cd4-ba6a-883b3df9c5f1
    Manager "ptcp:6640:127.0.0.1"
        is_connected: true
    Manager "tcp:10.210.210.30:6640"
        is_connected: true
    Bridge br-int
        Controller "tcp:10.210.210.30:6653"
            is_connected: true
        fail_mode: secure
        Port "tapab981c1e-4b"
            Interface "tapab981c1e-4b"
                type: internal
        Port "qr-cba77b1d-73"
            Interface "qr-cba77b1d-73"
                type: internal
        Port br-int
            Interface br-int
                type: internal
        Port "tun7314cbc7b3e"
            Interface "tun7314cbc7b3e"
                type: vxlan
                options: {key=flow, local_ip="10.210.210.10", remote_ip="10.210.210.20"}
    Bridge br-ex
        Controller "tcp:10.210.210.30:6653"
            is_connected: true
        Port "qg-1ba8c01a-15"
            Interface "qg-1ba8c01a-15"
                type: internal
        Port br-ex
            Interface br-ex
                type: internal
        Port "eth1"
            Interface "eth1"
    ovs_version: "2.6.1"

COMPUTE

[root@pod21-compute ~]# ovs-vsctl show
3bede8e2-eb29-4dbb-97f0-4cbadb2c0195
    Manager "tcp:10.210.210.30:6640"
        is_connected: true
    Bridge br-ex
        Controller "tcp:10.210.210.30:6653"
            is_connected: true
        Port br-ex
            Interface br-ex
                type: internal
        Port "eth1"
            Interface "eth1"
    Bridge br-int
        Controller "tcp:10.210.210.30:6653"
            is_connected: true
        fail_mode: secure
        Port "tun51bba5158fe"
            Interface "tun51bba5158fe"
                type: vxlan
                options: {key=flow, local_ip="10.210.210.20", remote_ip="10.210.210.10"}
        Port "tap1e71587f-32"
            Interface "tap1e71587f-32"
        Port "tap5c0a404b-75"
            Interface "tap5c0a404b-75"
        Port br-int
            Interface br-int
                type: internal
    ovs_version: "2.6.1"

答案 1 :(得分:0)

我已经使用OpenStack和OpenDaylight成功部署了L3路由。

  1. 我在https://communities.cisco.com/community/developer/openstack/blog/2017/02/01/how-to-deploy-openstack-newton-with-opendaylight-boron-and-open-vswitch撰写了一篇关于它的博客。
  2. 参考配置位于https://github.com/vhosakot/Cisco-Live-Workshop/tree/master/openstack_ODL。请记住,新版本中的某些配置可能已更改。
  3. 使用https://github.com/openstack/networking-odl上的networking-odl项目,该项目使OpenDaylight自动安装OpenStack。
  4. https://github.com/openstack/networking-odl/blob/master/devstack/local.conf.example还有另一个示例/示例配置文件。

答案 2 :(得分:0)

你的意思是你不能ping 10.211.211.10吗?看来是因为你已经eth1添加br-ex,所以你不能直接ping eth1,你可以试试这个:

ifconfig eth1 0
ifconfig br-ex 10.211.211.10

或者您只需从eth1删除端口br-ex

ovs-vsctl del-port br-ex eth1