Ask Your Question
1

connect VM in devstack to external network

asked 2014-08-05 00:04:41 -0500

naggappan gravatar image

updated 2014-08-05 00:57:11 -0500

Hi,

I have installed devstack successfully in ubuntu 12.04 with ( Q_PLUGIN=ml2) in devstack. Now There is a default public and private network.

If am able to ping between the created instance in private network. Also i am able to ping to the host machine (eth0) where i have installed devstack However i am not able to ping to my host network hence it also do go connect to internet . What are the network settings i have to make.

Current settings: Public Network (public 172.24.4.224/28) Private Network (private 192.168.0.1/24)

Created a router with 2 interface one connecte to public and one connect to private. Has created the VM's in private network and they are able to ping each other.

Host Machine ifconfig Output: http://paste.openstack.org/show/90272/

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
1

answered 2014-08-05 02:05:09 -0500

thna gravatar image

Try to type below command on host machine. and edit interface name to your physical network interface name which is connected to public network.

#sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

edit flag offensive delete link more

Comments

@thana thanks this works. But i don't understan what is happening. Could me explain me more about what we do here. i guess we enable nat in iptables but not sure what happens exactly .

naggappan gravatar imagenaggappan ( 2014-08-05 04:00:21 -0500 )edit

yes, activate NAT to translate private to public.... if you want to know about this more, try to find "iptable nat configuration"

thna gravatar imagethna ( 2014-08-05 06:33:39 -0500 )edit

@thana. I got it. Now i want to try more with devstack. So currently i am able to communicate from all instances(VM'S) to outside network. But how can i communicate to VM from outside network. currently i am able to ping to VM's only from host machine. Not any other machine in same network

naggappan gravatar imagenaggappan ( 2014-08-06 01:45:55 -0500 )edit

please explain more your network. and I think that you want to communicate VM from outside network. then you should attach public IP address to VM. not default IP pool range (172.24.4.224/28).

thna gravatar imagethna ( 2014-08-10 21:13:59 -0500 )edit

@thana. Yes i want to access VM from outside network. I tried to give floating IP to the vm created ( public network 172.24.4.22/28). But it did not work. I don't understand what you mean by public IP here. I don't want to access from outside internet or from other place. Just in same network but from different machine. May be from the machine where devastack is not installed but it is in same network.

naggappan gravatar imagenaggappan ( 2014-08-10 23:52:51 -0500 )edit
0

answered 2018-02-28 04:20:58 -0500

rtriki gravatar image

hello,

I have installed devstack successfully in ubuntu 16.04 with in devstack in a virtualbox vm. enp0s3 :10.6.208.111 lo: 127.0.0.1 virbr0: 192.168.122.1

I have a default public and private network in my topology network with a router.

If am not able to ping between my host and the instance created (IP:192.168.101.3 and IP flottantes : 172.24.4.15). Host IP: 10.6.208.111

Current settings: Public Network (public 172.24.4.0/27) Private Network (private 192.168.101.0/24) i also created a floating IP with the IP address 172.24.4.15

Created a router with 2 interface one connecte to public and one connect to private. Has created the VM's in private network.

How can i ssh to the instance created and ping it from my host IP?

Thank you

edit flag offensive delete link more
0

answered 2018-03-12 11:43:31 -0500

send2vijaybe gravatar image
  1. Install the openstack with the devstack as per the instruction given in the openstack site. 2.Delete the default networks public and private. 3.Create the network private and public as per the step given below.(10.0.15.0 as private network i have taken this is going to eb the externalan network were the openstack host is present)

    project:admin project > network topology > create a network > network name : private-net enable admin state: yes shared :no create subnet:yes next >

    subnet name : private-net-subnet Network Address Source : enter network address manually Network Address : 192.168.11.0/24 IP Version : IPV4 Gateway IP : 192.168.11.1 Disable Gateway : No next >

    Enable DHCP : yes Allocation Pools : 192.168.11.120,192.168.11.140 DNS Name Servers : 8.8.8.8 Host Routes :

    admin > networks > Create Network > Name : public-net Project : demo Provider Network Type : Flat Physical Network : public Enable Admin State : yes Shared : yes External Network : yes

    public-net > Create subnet > Subnet Name : public-net-subnet Network Address Source : enter network address manually Network Address : 10.0.15.0/24 IP Version : IPV4 Gateway IP : 10.0.15.1 Disable Gateway : No next >

    Enable DHCP : yes Allocation Pools : 10.0.15.120,10.0.15.140 DNS Name Servers : 10.0.9.10 Host Routes :

    admin > networks > Routers > Create Router > Router Name : router 1 Enable Admin State : yes External Network : public-net create Router >

    project > networks > Routers > router 1 > interfaces > add interface > subnet : private-net ip address : submit >

4.Add the ICMP and TCP protocol in the security group. 5. Make the interface card promiscus mode Perform the configuration in cmd prompt

sudo ifconfig br-ex promisc up
sudo ovs-vsctl add-port br-ex enp0s8
sudo ifconfig br-ex 10.0.15.20 netmask 255.255.255.0
systemctl restart networking.service
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

Stats

Asked: 2014-08-05 00:04:41 -0500

Seen: 3,286 times

Last updated: Aug 05 '14