OpenStack command lines to create network and assign floating IP address

OpenStack command lines to create network and assign floating IP address
OpenStack command lines to create network and assign floating IP address
Below are the OpenStack command lines ( along with openstack client CLIs) to create network and assign floating IP to an instance.

# neutron net-create MyNetwork
(# openstack network create MyNetwork --external)

# neutron subnet-create MyNetwork-subnet 192.168.0.0/24; # This will out GUID for subnet - (1)
(# openstack subnet create --network MyNetwork --subnet-range 192.168.0.0/24 MyNetwork-subnet)

# neutron router-create MyRouter
(# openstack router create MyRouter)


# neutron router-gateway-set MyRouter Ex-Net; # where Ex-Net is external network
(# open stack router --external-gateway Ex-Net MyRouter)


# neutron router-interface-add MyRouter
(# neutron port-list; # Retrieve port id)
(# openstack port list; # Retrieve port id)
(# openstack router add port MyRouter )



# neutron floatingip-create MyNetwork

(# openstack floating ip create MyNetwork)



# neutron floatingip-list
(# openstack floating ip list)


# openstack server list; # helps retrieve server ids

# openstack server add floating ip 


# echo Hope it helps!

Hope it helps!

Note: We at TechSutram take our ethics very seriously. More information about it can be found here.
Mandar Pise Opinions expressed by techsutram contributors are their own. More details

Mandar is a seasoned software professional for more than a decade. He is Cloud, AI, IoT, Blockchain and Fintech enthusiast. He writes to benefit others from his experiences. His overall goal is to help people learn about the Cloud, AI, IoT, Blockchain and Fintech and the effects they will have economically and socially in the future.

No comments:

Post a Comment

    Your valuable comments are welcome. (Moderated)