Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here are the list of all commands I've used to make the instances on 2 different networks ping each other:

  1. Create networks, subnets,router,ports

neutron net-create net1 neutron subnet-create net1 10.0.0.0/24 neutron net-create net2 neutron subnet-create net2 10.0.1.0/24 neutron router-create router1

neutron router-interface-add router1 SUBNET1_UUID neutron router-interface-add router1 SUBNET2_UUID

neutron port-create net1 --binding:profile type=dict vnic_type=hostdev neutron port-create net2 --binding:profile type=dict vnic_type=hostdev

  1. Create br-ex and bind a port to it.

ovs-vsctl add-br br-ex ovs-vsctl add-port br-ex em2

  1. As soon as em2 is added as port to br-ex, em2 loses it's IP. So, run below commands to move IP to br-ex

ifconfig em2 0.0.0.0 ifconfig br-ex 192.168.10.4

  1. Create external network and subnet

neutron net-create ext-net --shared --router:external=True neutron subnet-create ext-net --name ext-subnet --allocation-pool start=192.168.10.101,end=192.168.10.200 --disable-dhcp --gateway 192.168.10.1 192.168.10.0/24

  1. Launch 2 instances

nova boot --flavor 5 --image centos6.4 centos6.4_1 --nic port-id=<port id="" 1=""> nova boot --flavor 5 --image centos6.4 centos6.4_2 --nic port-id=<port id="" 2="">