Ask Your Question
1

How to set nova network gateway and dns

asked 2014-11-21 11:31:57 -0500

Steve gravatar image

updated 2014-11-21 11:42:33 -0500

In nova-network, I created a network

nova network-create demo-net --bridge br100 --multi-host T --fixed-range-v4 192.168.1.0/24 --gateway=192.168.1.254 --dns1=4.2.2.2 --dns2=4.2.2.1.

When I checked the network configuration:

nova network-show demo-net.

It showed gateway and DNS as what I set:

gateway=192.168.1.254
dns1=4.2.2.2
dns2=4.2.2.1

I also set the nova.conf on compute node:

dns_server = 4.2.2.2,
dns_server = 4.2.2.1,
gateway = 192.168.1.254

But when an instance is created, the gateway is 192.168.1.1, dns is also 192.168.1.1.

How to set the nova network using specific gateway and dns?

Thanks, Steve

edit retag flag offensive close merge delete

Comments

Could you provide the document to setup dnsmasq for instances using cloud init in nova network

rajcoumar gravatar imagerajcoumar ( 2015-02-11 06:40:10 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-01-13 00:16:24 -0500

Moe gravatar image

you have two different networks:

extenal an also internal network you have correctly fixed the internal network issue withe the command above but there would be some other requirements as well,

try this script instead :) do not forget to replace the names and the networks according to your needs

#!/bin/sh

export OS_AUTH_URL=http://controller:35357/v2.0
export OS_USERNAME=admin
export OS_PASSWORD=admin
export OS_TENANT_NAME=admin

neutron net-create demo-net
neutron subnet-create demo-net --name demo-subnet --gateway 192.168.1.1 192.168.1.0/24

neutron net-create ext-net --shared --router:external True --provider:physical_network external --provider:network_type flat 
neutron subnet-create ext-net --name ext-subnet --allocation-pool start=172.20.90.111,end=172.20.90.254 --disable-dhcp --gateway 172.20.90.1 172.20.90.0/24
neutron router-create router1
neutron router-interface-add router1 demo-subnet
neutron router-gateway-set router1 ext-net

:)

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

2 followers

Stats

Asked: 2014-11-21 11:31:57 -0500

Seen: 428 times

Last updated: Jan 13 '15