Ask Your Question
0

External network not reachable from subnet / ExternalGatewayForFloatingIPNotFound

asked 2019-03-31 15:29:52 -0500

shmitch gravatar image

To the best of my ability to determine, I've correctly set up my networks, router, security groups, floating IPs, instances, and assigned Floating IPs to instances (see below), but I keep getting an error that basically says, "External network . . . not reachable from subnet . . . . Therefore, cannot associate port . . . with a Floating IP . . . ExternalGatewayForFloatingIPNotFound . . ."

Please help me get past this issue as the OpenStack deployment isn't very useful without being able to assign Floating IPs to Instances/Servers. It's a Packstack all-in-one (w/o Compute) deployment with two Compute nodes (total three nodes.


- - - - - CREATE NETWORK & SUB-NETWORK

openstack subnet pool create sbo-private-subnet-pool --share --pool-prefix 10.4.128.0/20 --default-prefix-length 24 --default --project sbo-project

openstack subnet pool list

openstack network create sbo-public-network --provider-physical-network extnet --provider-network-type flat --external --share --project sbo-project

openstack subnet create sbo-public-subnet --subnet-range 10.28.70.0/24 --gateway 10.28.70.1 --allocation-pool start=10.28.70.130,end=10.28.70.254 --network sbo-public-network --dhcp --project sbo-project

openstack network create sbo-private-mgt-network --share --project sbo-project

openstack subnet create sbo-private-mgt-subnet --use-default-subnet-pool --network sbo-private-mgt-network --dhcp --gateway auto --project sbo-project

openstack network create sbo-private-mon-network --share --project sbo-project

openstack subnet create sbo-private-mon-subnet --use-default-subnet-pool --network sbo-private-mon-network --dhcp --gateway auto --project sbo-project

openstack network list

openstack subnet list

- - - - - CREATE ROUTER

openstack router create sbo-router --project sbo-project

openstack router add subnet sbo-router sbo-public-subnet

openstack router add subnet sbo-router sbo-private-mgt-subnet

openstack router add subnet sbo-router sbo-private-mon-subnet

- - - - - CREATE SECURITY GROUP

openstack security group create sbo-security-group --project sbo-project

openstack security group rule create sbo-security-group --ingress --ethertype IPv4 --protocol tcp

openstack security group rule create sbo-security-group --ingress --ethertype IPv4 --protocol udp

openstack security group rule create sbo-security-group --ingress --ethertype IPv6

openstack security group rule create sbo-security-group --protocol icmp

openstack security group rule list sbo-security-group

- - - - - CREATE FLOATING IPs

openstack floating ip create sbo-public-network --project sbo-project --floating-ip-address 10.28.70.241

openstack floating ip create sbo-public-network --project sbo-project --floating-ip-address 10.28.70.242

openstack floating ip create sbo-public-network --project sbo-project --floating-ip-address 10.28.70.243

openstack floating ip create sbo-public-network --project sbo-project --floating-ip-address 10.28.70.244

openstack floating ip create sbo-public-network --project sbo-project --floating-ip-address 10.28.70.245

openstack floating ip create sbo-public-network --project sbo-project --floating-ip-address 10.28.70.246

openstack floating ip create sbo-public-network --project sbo-project --floating-ip-address 10.28.70.247

openstack floating ip create sbo-public-network --project sbo-project --floating-ip-address 10.28.70.248

openstack floating ip create sbo-public-network --project sbo-project --floating-ip-address 10.28.70.249

- - - - - CREATE UBUNTU INSTANCES (SERVERS)

openstack server create cups-cache --image ubuntu_16-04_lts --flavor sbo-flavor-ubuntu_16-04_lts --key-name sbo-keypair --network sbo-private-mgt-network --security-group sbo-security-group

openstack server create cups --image ubuntu_16-04_lts --flavor sbo-flavor-ubuntu_16-04_lts --key-name sbo-keypair --network sbo-private-mgt-network --security-group sbo-security-group

openstack server create cups-db --image ubuntu_16-04_lts --flavor sbo-flavor-ubuntu_16-04_lts --key-name sbo-keypair --network sbo-private-mgt-network --security-group sbo-security-group

openstack server create cups-nginx --image ubuntu_16-04_lts --flavor sbo-flavor-ubuntu_16-04_lts --key-name sbo-keypair --network sbo-private-mgt-network --security-group sbo-security-group

- - - - - ASSIGN FLOATING IPs TO INSTANCEs (SERVERS)

openstack server list

openstack server add floating ip <server id=""> <floating ip="">

openstack server add floating ip 0429bc3b-f28b-48bc-84b0-148f9833bf1d 10.28.70.245

Error:  NotFoundException: 404: Client Error for url: http://10.28.70.11:9696/v2.0 ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2019-03-31 17:14:01 -0500

updated 2019-03-31 17:15:08 -0500

Your error is

openstack router add subnet sbo-router sbo-public-subnet

You must declare a gateway, not a subnet. Otherwise, Neutron doesn’t understand that this router port is connected to the network outside the cloud:

openstack router set --external-gateway sbo-public-subnet sbo-router
edit flag offensive delete link more

Comments

Bernd, Thanks.

I substituted the command “openstack router add subnet sbo-router sbo-public-subnet” with the command “openstack router set --external-gateway sbo-public-network sbo-router” and I am now able to associate Floating IPs with Instances/Servers.

shmitch gravatar imageshmitch ( 2019-04-01 10:04:35 -0500 )edit

(Note, this “router set” command needs to reference the “public” network, not the “public” subnet.)

shmitch gravatar imageshmitch ( 2019-04-01 10:04:42 -0500 )edit

I do have a follow-up question:

• Why isn’t “--provider-physical-network extnet” and “--external” in the “public” network definition and “--gateway 10.28.70.1” in the “public” subnet definition sufficient to let the router know what the “--external-gateway” is?

shmitch gravatar imageshmitch ( 2019-04-01 10:05:33 -0500 )edit

Thanks for correcting my command.

I can only guess why the gateway has to be set explicitly. In my opinion the only difference between a gateway and an ordinary subnet is the Floating IP capability, since you could use a provider network without Floating IPs. But I don’t know if this makes sense.

Bernd Bausch gravatar imageBernd Bausch ( 2019-04-01 10:43:51 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-03-31 15:29:52 -0500

Seen: 26 times

Last updated: Mar 31