1, Login User: TDY (precondition created TDY user)
Write the login user tdy user script file user-operc.sh
User-operc.sh:
Login User tdy:
$ source User-operc.sh
Enter the command: Nova list appears below, said the login user success! Otherwise there is an error in the login script file!
2. Help for OpenStack Route command operation: Neutron | grep route
3. Create a user network
Create Network User-network:neutron net-create user-network (Network name)
To view the network that was created: Neutron net-list
Create subnets to User-network:neutron subnet-create 10.0.0.0/24--name user-subnet
4. Create a route
View the tenant's Id:keystone tenant-list
Create route: Router
Neutron router-create Router--tenant-id=afb753d74b114f5aa26bfde395dfb0c0 (tenant's ID)
To view the routes created: Neutron router-list
Query external network: Neutron net-list
Connect the route to the external network and set the external network gateway: Neutron Router-gateway-set 99cb5c45-a59c-4ec8-988a-bc91a0e0dfe4 (the ID of the route) 8101927B-F8E5-458D-A914-850CF6AC86AF (ID of the external network)
View subnets: Neutron subnet-list
Create a routing interface and connect to the created network: Neutron router-interface-add 99cb5c45-a59c-4ec8-988a-bc91a0e0dfe4 (route ID) 9A31A3CB-C254-462D-B84D-14FD1B7EDEFD (subnet ID)
If no error occurs, create a network interface and connect the route successfully!
Transferred from: TDY Bainianshuren's blog: http://tdybnsr.blog.163.com/blog/static/2450350112015132503750/
OpenStack command to create network and route management