Technology & Troubleshooting

OpenStack cannot ping external gateway | [Solved]

To solve, OpenStack cannot ping external gateway issue, Please follow the steps given in this article .

This article is about to configure OpenStack VM in a such a way that we can able ping out side network and get access to the internet in OpenStack virtual machine (VM).

Note : Please make a snapshot of a current state if your OpenStack is installed in Oracle Virtual Box. Hence if in case of any error we can easily get back to previous working state.

Step 1 :

At the beginning, we need to find out the public network configuration. To check configuration please follow the below steps.

1. Login to OpenStack Dashboard

2. Go to admin section

3. Press networks tab (here you can see all available/created networks list)

4. Select public network (here you can see the public network details like, sub-nets, ports etc.)

5. Please follow the below steps if your OpenStack public network ip is different from the real network (in my case OpenStack public ip was : and the real network ip was 10.##.##.##/24)

Step 2 :

Now go to your virtual machine where you have installed OpenStack (I have installed OpenStack on Ubuntu 18.04 LTS) and type below commands in terminal

Step 3 :

$ sudo ifconfig -a

This command will give you all configured interface details.Find out the device/bridge_name which is responsible for providing the internet connectivity (in my case enp0s3 is the device we need to concern about)

ifconfig -a

Step 4 :

$ sudo arp -a

This command will give you the getaway IP details which will further be useful for the configuration

sudp arp -a

Step 5 :

Note : Before trying below steps you should have knowledge about OpenStack Networking

Follow below steps to make OpenStack public configuration feasible with the external network.

  1. Go to instances section using OpenStack dashboard and delete all the instances which are directly connected to the public network
  2. After the deletion of the instances, go to the floating-IP section and release all the floating ips which are associated to public network
  3. After the successful releasing the floatingIPs go to the router section and delete all the inter faces that are connected to the public network
  4. Now come back to the admin>network>public> and delete all the sub-nets and ports
  5. Now you can able to give the exact sub-net IPs that are similar to the external network as shown in the step 3 and 4 (output of both the command are now going to be used in configuration)

Step 6 :

Now open admin>network>public>sub-nets and fill all the necessary information as below

OpenStack cannot ping external gateway
OpenStack cannot ping external gateway
  • You can leave it blank if you don’t want to allocate specific ID’s

Step 7 :

Now after public network configuration is done, please go to router and attach the public interface.Also set getway to public network in the router configurations

OpenStack cannot ping external gateway
OpenStack cannot ping external gateway

Step 8 :

 In this step, we are configuring the br-ex (external bridge).

To configure br-ex, we need all the detailed information about br-ex’s ports, interfaces etc. With the help of the below command we can get the br-ex details

$ sudo ovs-vsctl show (type this command on the device where you have configured OpenStack)

If the br-ex is not having same port that provide internet (in my case enp0s3), you have to configure this using the following command

$sudo ovs-vsctl add-port br-ex enp0s3

$sudo ifconfig enp0s3

$ ifconfig br-ex <your ip that is allocated to enp0s3 device> netmask <your netmask that is allocated to enp0s3 device>

Step 9 :

reboot your system

Step 10 :

Create VM in using OpeStack and allocate public network to that VM.

Note: Please use Ubuntu cloud image for OpenStack VM instead of CirrOS

Step 11 :

Launch VM

Step 12 :

Search for resolved.conf file in launched VM and edit DNS namesever to

Step 13:


You will get the ping response !

If stuck, please comment and we will get back to you asap.with hastag OpenStack cannot ping external gateway

Leave a Reply

Your email address will not be published. Required fields are marked *