Ask Your Question
0

Gateway addresses for subnets are one off.

asked 2012-12-09 23:58:31 -0500

dsmith4546 gravatar image

Here are the two private subnets I have created thus far for a tenant.

192.168.4.0/24 GW: 192.168.4.1 10.6.6.0/24 GW: 10.6.6.1

I am using the ovs agent. I configured the gateways for each of the subnets to be .1 addresses. But when I do an ifconfig on the same box my quantum-dhcp-agent, ovs-agent, l3-agent are running on, I see all .2 addresses for those subnets…. Refer to the output below.

tap882a8e75-ee Link encap:Ethernet HWaddr 3e:11:25:db:30:ed
inet addr:10.6.6.2 Bcast:10.6.6.255 Mask:255.255.255.0 inet6 addr: fe80::3c11:25ff:fedb:30ed/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:74550 errors:0 dropped:0 overruns:0 frame:0 TX packets:35835 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:13741301 (13.7 MB) TX bytes:6537014 (6.5 MB)

tap3680cb06-ab Link encap:Ethernet HWaddr fa:16:3e:2e:eb:6b
inet addr:192.168.4.2 Bcast:192.168.4.255 Mask:255.255.255.0 inet6 addr: fe80::f816:3eff:fe2e:eb6b/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:4943 errors:0 dropped:0 overruns:0 frame:0 TX packets:3132 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1004139 (1.0 MB) TX bytes:550835 (550.8 KB)

VMs are getting IP addresses fine, but they are being assigned a gateway address that don't exist anywhere. My VMs that are spun up are getting .3 addresses. Any input would be appreciated.

edit retag flag offensive close merge delete

16 answers

Sort by » oldest newest most voted
0

answered 2012-12-13 09:24:13 -0500

rrolim gravatar image

Sorry, I didn't see you're using the docs.openstack.org/folsom/basic-install/content/basic-install_intro.html guide where namespaces are disabled. That's why you don't see anything with 'ip netns'. So if you don't see the router's gateway interface IP in the network (.1), did you add an interface in the router for that network (quantum router-interface-add)?

edit flag offensive delete link more
0

answered 2012-12-11 12:04:00 -0500

dsmith4546 gravatar image

Ok, so the .2 address is handing out IPs. Ok. Thats fine. So why does the dashboard prompt me for a gateway address? Do I have to create a gateway address myself?

edit flag offensive delete link more
0

answered 2012-12-11 17:47:32 -0500

danwent gravatar image

the gateway IP address of a subnet will default to being the first IP in the subnet (e.g., the .1 address for a subnet that has a range from .0-.255)

however, you can override this default if you choose, as for example, some people prefer the gateway IP to be another address (e.g., .the last IP in a range, such as .254)

edit flag offensive delete link more
0

answered 2012-12-10 00:24:48 -0500

gongysh gravatar image

The gateway ips generally taken by L3 routers. You can create a router in quantum or use a physical router which takes that IP.

edit flag offensive delete link more
0

answered 2012-12-10 00:36:01 -0500

dsmith4546 gravatar image

Ya, I understand that, but why is an ip address being created as .2 and not .1?

edit flag offensive delete link more
0

answered 2012-12-14 20:41:37 -0500

dsmith4546 gravatar image

Alright I have some more information, below is a piece of the /etc/quantum/l3_agent.ini file.

Allow overlapping IP (Must have kernel build with CONFIG_NET_NS=y and

iproute2 package that supports namespaces).

use_namespaces = False

If use_namespaces is set as False then the agent can only configure one router.

This is done by setting the specific router_id.

router_id = 296ccc78-1766-41c9-9ead-713a0843070f

I checked the internal ports on router_id "296ccc78-1766-41c9-9ead-713a0843070f" with

quantum port-list -- --device_id=296ccc78-1766-41c9-9ead-713a0843070f

And I saw both the internal port with ip of 10.6.6.1 and the external port with ip 192.168.2.130

Any idea why I'm still not seeing any 10.6.6.1 ip address with ifconfig -a? And yes, you are right I am not using namespaces.

edit flag offensive delete link more
0

answered 2012-12-10 12:33:08 -0500

rrolim gravatar image

Hi, Doug. The second IP address (.2 in this case) is used by the DHCP agent. If you list your running processes and look for dnsmasq you'll see a command line option --interface=tap882a8e75-ee for one agent and --interface=tap3680cb06-ab for the other. If you use namespaces, the DHCP agent will also have its own namespace qdhcp-*.

edit flag offensive delete link more
0

answered 2012-12-11 21:41:28 -0500

dsmith4546 gravatar image

Alright. I understand. The problem is, when my vm wants to leave the subnet, it will send an arp out for the gateway address of .1. The arp will go over the gre tunnel to the l3 agent. But the gateway ip address of .1 does not exist on the layer 3 agent, so there will be no response to the arp. If I issue the command "ifconfig -a" on the box that is running the layer 3 agent I don't see a .1 address anywhere. So my question is this, if I create a gateway address for a tenant subnet via the dashboard. Will it actually get created anywhere...

edit flag offensive delete link more
0

answered 2012-12-09 23:59:35 -0500

dsmith4546 gravatar image

I am running folsom on ubuntu 12.04. I used this guide. http://docs.openstack.org/folsom/basic-install/content/basic-install_intro.html (http://docs.openstack.org/folsom/basi...)

edit flag offensive delete link more
0

answered 2012-12-12 14:25:50 -0500

rrolim gravatar image

It surely will. By default Quantum uses namespaces, so that each tenant runs in a separated namespace with their own network interfaces, IP addresses, routing tables, iptables rules, etc. You're not seeing your gateway interface because your looking for it in the initial namespace, where commands run if not explictly specified:

Run 'ip netns' and will see a list of your namespaces, for example qdhcp-5ceadbb9-33d0-4080-83fd-066f9e672d8e qrouter-9839d33c-cda7-4509-b93d-52cc55a3a174

The qrouter-* namespace corresponds to each router that you have, where the hexadecimal string corresponds to the id of the router (quantum router-list). There you'll find the router's external network IP address if any configured and the router's interface in that network (acting as the gateway). Example:

ip netns exec qrouter-9839d33c-cda7-4509-b93d-52cc55a3a174 ifconfig

(...) qg-01f0ca8d-a7 Link encap:Ethernet HWaddr fa:16:3e:bf:a7:b8
inet addr:192.168.100.225 Bcast:192.168.100.255 Mask:255.255.255.0 (...) qr-56c3fa8b-63 Link encap:Ethernet HWaddr fa:16:3e:85:0c:85
inet addr:10.5.5.1 Bcast:10.5.5.255 Mask:255.255.255.0 (...)

qr-* is the gateway you're looking for and qg-* is my router's external network interface. The string is port id of the router.

The same command 'ip netns exec <namespace>' can be used with all other ordinary network tools like 'iptables, route, netstat, tcpdump, ping, ifup/down, ip *, etc. That's how Linux makes it possible for overlapping IPs, since each network namespace is an isolated environment (virtualization at the OS level).

Hope that helps.

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: 2012-12-09 23:58:31 -0500

Seen: 97 times

Last updated: Dec 18 '12