首页 文章

Openstack-设置桥梁

提问于
浏览
-2

我在一个节点设置中安装了openstack pike- all(不使用devstack) .

我的主机:单个网卡,ubuntu服务器16.04 . 我使用brctl命令-br0添加了一个桥接网络

Ip范围主机134.x.x.x.具有网关10.0.0.1的网桥10.0.0.11的静态IP

在neutron的linuxbridge-agent文件中,我给了br0作为我的提供者接口 . Openstack工作正常,能够使用浮动ip-range 10.0.0.101-10.0.0.250和网关10.0.0.1启动实例 .

实例已启动并正在运行,但无法从主机ping实例 . 请帮我 .

1 回答

  • 1

    我用单个网卡为ocata版devstack安装做了,可能会有所帮助 .

    • 使用devstack ocata版本安装openstack

    • 删除现有/默认网络2.1删除所有路由器接口,然后删除路由器2.2删除所有网络

    • 创建公共和私有网络

    • 将路由器及其接口添加到公共和专用网络

    • 将TCP和ICMP添加到安全组 . (网络拓扑>安全组>管理规则>添加)

    • 在命令提示符下配置Bridge

    注意:确保根据需要更改网桥,接口,网络IP等详细信息 .

    • Public netwrok:10.0.15.0

    • private network:192.168.11.0

    • 外部桥梁:br-ex

    • interface:enp0s8

    • Ubuntu ip:10.0.15.20

    3创建网络私有

    project:admin
        project >
        network topology >
        create a network > 
        network name : private-net
        enable admin state: yes
        shared :no
        create subnet:yes
        next >
    
    
        subnet name : private-net-subnet
        Network Address Source : enter network address manually
        Network Address : 192.168.11.0/24
        IP Version : IPV4
        Gateway IP : 192.168.11.1
        Disable Gateway : No
        next >
    
        Enable DHCP : yes
        Allocation Pools : 192.168.11.120,192.168.11.140
        DNS Name Servers : 8.8.8.8
        Host Routes :
    

    3创建网络公共

    admin >
        networks > 
        Create Network >
        Name : public-net
        Project : demo
        Provider Network Type : Flat
        Physical Network : public
        Enable Admin State : yes
        Shared : yes
        External Network : yes
    
        public-net > 
        Create subnet >
        Subnet Name : public-net-subnet
        Network Address Source : enter network address manually
        Network Address : 10.0.15.0/24
        IP Version : IPV4
        Gateway IP : 10.0.15.1
        Disable Gateway : No
        next >
    
        Enable DHCP : yes
        Allocation Pools : 10.0.15.120,10.0.15.140
        DNS Name Servers : 10.0.9.10
        Host Routes :
    

    4将路由器及其接口添加到公共和专用网络

    admin >
        networks > 
        Routers >
        Create Router >
        Router Name : router 1
        Enable Admin State : yes
        External Network : public-net
        create Router > 
    
        project >
        networks > 
        Routers >
        router 1 >
        interfaces >
        add interface >
        subnet : private-net
        ip address : 
        submit >
    

    6在命令提示符下配置Bridge(ubuntu openstack host)

    sudo ifconfig br-ex promisc up
    sudo ovs-vsctl add-port br-ex enp0s8 & sudo ifconfig br-ex 10.0.15.20 netmask 255.255.255.0
    systemctl restart networking.service
    

相关问题