连接路由到外部网络,设定外部网关,用什么命令?
1 回答
已采纳
XhstormR
TA贡献140条经验 获得超197个赞
查询路由 [root@station140 ~(keystone_admin)]# neutron router-list | grep -v router1 +--------------------------------------+------------+------------------------+ | id | name | external_gateway_info | +--------------------------------------+------------+------------------------+ | b83f43cd-bf8f-42f8-812a-708c2c372820 | ext-to-int | null | +--------------------------------------+------------+------------------------+ 查询网络 [root@station140 ~(keystone_admin)]# neutron net-list | grep pub1 +--------------------------------------+---------+------------------------------------------------------+ | id | name | subnets | +--------------------------------------+---------+------------------------------------------------------+ | aebe75f0-6013-4a5e-bbd9-cb81e1f017bc | pub1 | 59cc431b-498e-49a0-bc60-4a8ca1ca6f48 192.168.48.0/24 | +--------------------------------------+---------+------------------------------------------------------+ 设定网络 [root@station140 ~(keystone_admin)]# neutron router-gateway-set b83f43cd-bf8f-42f8-812a-708c2c372820 aebe75f0-6013-4a5e-bbd9-cb81e1f017bc 查看设置 [root@station140 ~(keystone_admin)]# neutron router-list | grep -v router1 +--------------------------------------+------------+-----------------------------------------------------------------------------+ | id | name | external_gateway_info | +--------------------------------------+------------+-----------------------------------------------------------------------------+ | b83f43cd-bf8f-42f8-812a-708c2c372820 | ext-to-int | {"network_id": "aebe75f0-6013-4a5e-bbd9-cb81e1f017bc", "enable_snat": true} | +--------------------------------------+------------+-----------------------------------------------------------------------------+
望采纳。
- 1 回答
- 0 关注
- 1952 浏览
添加回答
举报
0/150
提交
取消