Ask Your Question
0

Multiple Subnets Per Network

asked 2012-12-20 03:00:05 -0600

kobilaredo gravatar image

I have configured a flat provider network and subnets that map to our colo network: quantum net-create net1 \ --shared \ --provider:network_type flat \ --provider:physical_network physnet1 \ --router:external=True quantum subnet-create --name subnet10 net1 192.168.10.1/24 \ --gateway_ip 192.169.10.1 \ --enable_dhcp=True \ --host_routes type=dict list=true destination=192.168.0.0/16,nexthop=192.168.10.1 \ --dns_nameservers list=true 192.168.10.2 \ --allocation_pools type=dict list=true start=192.168.10.100,end=192.168.10.199 quantum subnet-create --name subnet11 net1 192.168.11.1/24 \ --gateway_ip 192.169.11.1 \ --enable_dhcp=True \ --host_routes type=dict list=true destination=192.168.0.0/16,nexthop=192.168.11.1 \ --dns_nameservers list=true 192.168.11.2 \ --allocation_pools type=dict list=true start=192.168.11.100,end=192.168.11.199

My controller node is on the 192.168.10.1/24 subnet --> 192.168.10.3 I have 2 compute nodes: ComputeNode10 on the 192.168.10.1/24 subnet --> 192.168.10.4 ComputeNode11 on the 192.168.11.1/24 subnet --> 192.168.11.4

The Problem: when I launch a new VM on ComputeNode10 the VM is able to get network configuration during boot and is accessible on the network(ping, ssh, etc...). However, when I launch a VM on ComputeNode11, nova is able to schedule and launch the VM on ComputeNode11 but the VM cannot get network configuration during boot and it is not accessible on the network. I can see in horizon that Quantum assigned an IP address from the wrong subnet (192.168.10.1/24 --> 192.168.10.101)

Is it possible to tell quantum/nova to launch a VM on a specific subnet and only assign an IP address from that subnet?

P.S I did try to create a port with a fixed IP on the 192.168.11.1/24 subnet but got the following error: quantum --debug port-create --fixed-ip subnet_id=subnet11,ip_address=192.168.11.102 net1 QuantumClientException: Invalid input for operation: IP address 192.168.11.102 is not a valid IP for the defined subnet. * I tried to create a port on the 192.168.10.1/24 subnet and got the same error

edit retag flag offensive close merge delete

6 answers

Sort by ยป oldest newest most voted
0

answered 2012-12-26 00:23:26 -0600

gongysh gravatar image

DHCP request is in a broadcast source IP address. So it is not related to subnets. I think there must be some thing block the broadcast. The switch?

edit flag offensive delete link more
0

answered 2013-01-09 17:12:12 -0600

kobilaredo gravatar image

Thanks yong sheng gong, that solved my question.

edit flag offensive delete link more
0

answered 2012-12-22 01:37:25 -0600

kobilaredo gravatar image

Thanks for pointing out the CIDR error - it solved my port creation problem - THANK YOU However, quantum is still unable to inject network configurations into VM's in the 192.168.11.0/24 subnet. Could this be a dhcp-agent issue where the new VM is not able to reach the DHCP agent to get an IP? what could cause this?

edit flag offensive delete link more
0

answered 2012-12-21 00:34:54 -0600

gongysh gravatar image

nova help boot: --nic <net-id=net-uuid,v4-fixed-ip=ip-addr,port-id=port-uuid> Create a NIC on the server. Specify option multiple times to create multiple NICs. net-id: attach NIC to network with this UUID (optional) v4-fixed-ip: IPv4 fixed address for NIC (optional). port-id: attach NIC to port with this UUID (optional)

nova boot --image tty --flavor 1 myserver --nic net-id=xxx,v4-fixed-ip=ip

I don't think dashboard implemented this feature. About the quantum port-create command, it seems you find a bug.

edit flag offensive delete link more
0

answered 2012-12-21 01:02:37 -0600

gongysh gravatar image

Sorry, I made a mistake: your command to create a subnet is problematic: quantum subnet-create --name subnet11 net1 192.168.11.1/24

it should be: quantum subnet-create --name subnet11 net1 192.168.11.0/24

maybe you can file a bug so that system auto calculates a right CIDR for u from your way 192.168.11.1/24

edit flag offensive delete link more
0

answered 2012-12-22 02:15:04 -0600

kobilaredo gravatar image

Alright, I'm convinced it's a dhcp-agent issue, and here's why: 1) in the VM's syslog I can clearly see that it is unable to discover a DHCP server 2) When I log into the VM (using Horizon's VNC) I'm able to manually add an IP address and a route and after that the machine becomes accessible online. I wonder if this is a borader "provider network" issue where vm's on compute nodes that are located in a different subnet than the controller who runs dnsmasq are unable to discover the DHCP server using DHCPDISCOVER broadcast. In the physical network we have IP helpers that direct all DHCPDISCOVER requests into the right subnet and then to the DHCP server. In this case DHCPDISCOVER broadcasts from subnet 192.168.11.0/24 can't reach the DHCP server on subnet 192.168.11.1/24

I'm not a network expert (far from it), but does it sound right?

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-20 03:00:05 -0600

Seen: 1,175 times

Last updated: Jan 09 '13