Instance can't access outside network

asked 2017-05-27 10:00:17 -0600

openstackplz gravatar image

updated 2017-05-27 10:13:18 -0600

I launched a new instance and successfully console into it by ssh@10.0.0.3. But in the instance, it cannot ping the external network, like ping 8.8.8.8, it can ping the host machine ip address which is 192.168.159.4 but cannot ping 192.168.159.1. I tried to solve this by modify /etc/sysctl.conf file and let net.ipv4.ip_forward=1 but it did't work.

So where is the problem? Thank you in advance for any ideas.

My local.conf file is:

[[local|localrc]]
HOST_IP=192.168.159.4
PUBLIC_INTERFACE=eth1
FLOATING_RANGE=192.168.159.225/27
PUBLIC_NETWORK_GATEWAY=192.168.159.226
FIXED_RANGE=10.0.0.0/24
NETWORK_GATEWAY=10.0.0.1
FIXED_NETWORK_SIZE=28
FLAT_INTERFACE=eth0

LOGFILE=/opt/stack/logs/stack.sh.log

disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta

The ip a result for host is:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:71:a4:c8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.159.4/24 brd 192.168.159.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe71:a4c8/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:11:e9:c1 brd ff:ff:ff:ff:ff:ff
    inet 192.168.56.10/24 brd 192.168.56.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe11:e9c1/64 scope link 
       valid_lft forever preferred_lft forever
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 3a:75:8e:d6:14:e5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
5: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1
    link/ether ba:f8:b9:d3:f2:73 brd ff:ff:ff:ff:ff:ff
14: br-int: <BROADCAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN group default qlen 1
    link/ether 46:b0:a5:a2:bb:43 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::4057:d1ff:fe88:9eaf/64 scope link 
       valid_lft forever preferred_lft forever
15: br-ex: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1
    link/ether 8a:88:a0:e4:7d:48 brd ff:ff:ff:ff:ff:ff
    inet 192.168.159.226/27 scope global br-ex
       valid_lft forever preferred_lft forever
    inet6 2001:db8::2/64 ...
(more)
edit retag flag offensive close merge delete