局域网上无法访问 openstack 实例
Posted
技术标签:
【中文标题】局域网上无法访问 openstack 实例【英文标题】:openstack instance is not accessible on LAN 【发布时间】:2014-07-22 14:02:14 【问题描述】:我已经使用 devstack 设置了单机 openstack。我的实例在机器上运行。
openstack machine ip 192.168.2.32
instance machine ip 10.0.0.2 and 172.24.4.1
我可以从 openstack 机器 ping 172.24.4.1。但我无法从个人计算机 ping 这台机器。也无法访问实例。我该如何解决?
IP转发
/proc/sys/net/ipv4/ip_forward 1
/etc/nova/nova.conf
flat_interface = em1
flat_network_bridge = br100
vlan_interface = em1
public_interface = br100
network_manager = nova.network.manager.FlatDHCPManager
firewall_driver = nova.virt.libvirt.firewall.IptablesFirewallDriver
compute_driver = libvirt.LibvirtDriver
default_ephemeral_format = ext4...
如果配置
br100 Link encap:Ethernet HWaddr 00:26:55:4b:46:0a
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::707a:83ff:fe0f:4db0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:62087 errors:0 dropped:0 overruns:0 frame:0
TX packets:38260 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:71936261 (71.9 MB) TX bytes:5377931 (5.3 MB)
em1 Link encap:Ethernet HWaddr 00:26:55:4b:46:0a
inet6 addr: fe80::226:55ff:fe4b:460a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:63127 errors:0 dropped:0 overruns:0 frame:0
TX packets:39439 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:73159657 (73.1 MB) TX bytes:6162268 (6.1 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:163787 errors:0 dropped:0 overruns:0 frame:0
TX packets:163787 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:495519545 (495.5 MB) TX bytes:495519545 (495.5 MB)
virbr0 Link encap:Ethernet HWaddr de:30:60:02:bc:dc
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
vnet0 Link encap:Ethernet HWaddr fe:16:3e:11:ee:00
inet6 addr: fe80::fc16:3eff:fe11:ee00/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15 errors:0 dropped:0 overruns:0 frame:0
TX packets:474 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:1581 (1.5 KB) TX bytes:74117 (74.1 KB)
请帮忙。谢谢
【问题讨论】:
【参考方案1】:默认情况下会阻止 Ping。您应该在安全组中允许 ping。
1)首先找出哪个是安全组
单击实例名称 -> 安全组
(如果你没有配置,它将是default
)
2) 转到计算 -> 访问和安全 选择安全组 -> 管理规则 3) 点击添加规则
规则 - 所有 ICMP 方向 - 入口
然后点击添加 您将能够 ping 到分配给实例的浮动 IP。
【讨论】:
以上是关于局域网上无法访问 openstack 实例的主要内容,如果未能解决你的问题,请参考以下文章