路由相关功能点:
| 模块 | 功能 | 描述 | 备注 |
|---|---|---|---|
| 路由 | 创建路由 | 创建指定名称、指定外部网络的路由, | |
| 修改路由 |
修改路由名称 | ||
| 删除外部网络(清除网关) | |||
| 停用路由 | |||
| 添加/删除路由接口 | |||
| 添加静态路由 | |||
| 删除路由 | 删除路由 |
路由相关命令:
router-create Create a router for a given tenant. router-delete Delete a given router. router-gateway-clear Remove an external network gateway from a router. router-gateway-set Set the external network gateway for a router. router-interface-add Add an internal network interface to a router. router-interface-delete Remove an internal network interface from a router. router-list List routers that belong to a given tenant. router-list-on-l3-agent List the routers on a L3 agent. router-port-list List ports that belong to a given tenant, with specified router. router-show Show information of a given router. router-update Update router's information.
router-create子命令属性
|
参数
|
描述
|
|---|---|
| NAME | 创建路由的名称 |
| --tenant-id | 指定路由的租户ID |
| --admin-state-down | 设置路由管理接口状态 |
| --description | 描述信息 |
| --flavor | Neutron service flavor |
| --distributed | 创建分布式路由 |
| --ha | 创建高可用路由 |
| --availability-zone-hint | 指定可用域 |
示例:创建一个路由
命令语法:neutron router-create < ROUTER_NAME > --tenant-id < 租户ID > --admin-state-up --description '描述信息.' --distributed < TRUE/FALSE是否创建分布式路由>
--ha < TRUE/FALSE是否创建高可用路由 > --availability-zone-hint < 选择可用域 >
[root@10-0-192-18 ~]# neutron router-create ltwtest --tenant-id 73c538f5e43c4ac98ee01482f371539c --admin-state-up --description 'test create.' --distributed True --ha False --availability-zone-hint nova Created a new router: +-------------------------+--------------------------------------+ | Field | Value | +-------------------------+--------------------------------------+ | admin_state_up | True | | availability_zone_hints | nova | | availability_zones | | | created_at | 2017-05-11T05:58:16Z | | description | test create. | | distributed | True | | external_gateway_info | | | flavor_id | | | ha | False | | id | ebabff61-010d-43fa-839d-13ae31afe0e1 | | name | ltwtest | | project_id | 73c538f5e43c4ac98ee01482f371539c | | revision_number | 3 | | routes | | | status | ACTIVE | | tenant_id | 73c538f5e43c4ac98ee01482f371539c | | updated_at | 2017-05-11T05:58:16Z | +-------------------------+--------------------------------------+