Ask Your Question
0

External network default gateway different with subnet CIDR

asked 2014-06-20 08:20:02 -0600

HoangDo gravatar image

updated 2014-06-20 08:26:16 -0600

Hi guys,

I'm a novice in networking, I hope guys can help me.

I'm setting neutron external network. I followed guideline: create external net, external subnet, set router gateway, set router interface to local net. All is ok.

But my problem is that due to my (stupid) service providers:

  • I bought a block of public IP 46.105.252.216/30 (to use as floating IP in neutron).

  • Those IPs have different CIDR than the Network node: 176.31.105.0/24.

Due to their guideline, if I want to create a VM on the host, give VM one IP from the block, but set default gateway = default gateway of host machine. So basically, inside VM, default gateway has different CIDR than the IP.

I know they can do that by skipping ARP protocol by hard set IP-MAC address on the router. The VM's (virtual) interface must have the MAC address corresponding to the IP.

In case of OpenStack, thing is complicated, because it use a SNAT at router. I tried to create external net with the range =46.105.252.216/30 , and set default gateway is the same as network node:176.31.105.254 , but it didn't work:

sudo ip netns exec qrouter-d1ceaf19-4cf0-4334-9f96-7601c70cbf4a route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
46.105.252.0    0.0.0.0         255.255.255.0   U     0      0        0 qg-8b79f67e-cb
192.168.100.0   0.0.0.0         255.255.255.0   U     0      0        0 qr-d4f642e6-22

You can see they missed default entry for gateway. I tried to add it manually, but I got error message. Seems like linux doesn't allows configure routing like that. I stuck now. Do you have any idea to deploy in this case?

edit retag flag offensive close merge delete

Comments

Have you managed to solve your problem?

daghemo gravatar imagedaghemo ( 2015-07-03 07:24:39 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-06-20 12:37:05 -0600

atze.devries gravatar image

For the 40.105.252.216/30 you have to have some form routing. It should be a subnet containing your CIDR. It could be your provider supplies you with this. Otherwise you should set up one yourself. This subnet should have a gateway.

In openstack you can create a exteranl subnet. The CIDR of the subnet should contain your gateway. You can configure a allocation pool. This pool should match 40.105.252.216/30 (don't forget to disable dhcp in this subnet).

edit flag offensive delete link more

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: 2014-06-20 08:20:02 -0600

Seen: 2,621 times

Last updated: Jun 20 '14