分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 教程案例

create subnet

发布时间:2023-09-06 02:07责任编辑:沈小雨关键词:暂无标签

子网相关功能点:

模块功能描述备注
子网


创建子网创建一个子网 
设置子网网段范围 
设置子网网关IP/不开启网关 
给子网开启/关闭dhcp 
设置子网dns 
修改子网修改子网名称 
修改子网dhcp开启或者关闭 

修改子网dns地址

 
修改子网网关 
删除已经分配的子网IP 
删除子网同时删除一个或多个子网 

子网相关命令:

subnet-create ?????????????????????Create a subnet for a given tenant.subnet-delete ?????????????????????Delete a given subnet.subnet-list ???????????????????????List subnets that belong to a given tenant.subnet-show ???????????????????????Show information of a given subnet.subnet-update ?????????????????????Update subnet‘s information.subnetpool-create ?????????????????Create a subnetpool for a given tenant.subnetpool-delete ?????????????????Delete a given subnetpool.subnetpool-list ???????????????????List subnetpools that belong to a given tenant.subnetpool-show ???????????????????Show information of a given subnetpool.subnetpool-update ?????????????????Update subnetpool‘s information.
subnet-create子命令相关属性:
参数
描述
参数
描述
--name设置子网名称
--tenant-id创建子网的租户ID
--description描述信息
--gateway设置子网网关
--no-gateway不开启子网网关
--allocation-pool允许分配的子网IP地址池
--host-route设置子网主机路由
--dns-nameserver设置子网dns地址
--disable-dhcp关闭子网dhcp功能
--enable-dhcp开启子网dhcp功能
--ip-version {4,6}IP版本

示例:创建一个子网

命令语法:neutron subnet-create < 关联的NETWORK_NAME/ID > < 要创建的subnet_CIDR > --name < subnet_name > --tenant-id < 租户ID > --description ‘描述信息.‘ --gateway < subnet网关 > ?--enable-dhcp --ip-version < IP版本 >
--allocation-pool <子网池起始、结束IP> --dns-nameserver < 子网DNS>
[root@10-0-192-18 ~]# neutron subnet-create testltw 192.168.100.0/24 --name test0509 --tenant-id 73c538f5e43c4ac98ee01482f371539c --description ‘this is test create subnet.‘ --gateway 192.168.100.1 ?--enable-dhcp --ip-version 4 --allocation-pool start=192.168.100.2,end=192.168.100.254 --dns-nameserver 8.8.8.8Created a new subnet:+-------------------+------------------------------------------------------+| Field ????????????| Value ???????????????????????????????????????????????|+-------------------+------------------------------------------------------+| allocation_pools ?| {"start": "192.168.100.2", "end": "192.168.100.254"} || cidr ?????????????| 192.168.100.0/24 ????????????????????????????????????|| created_at ???????| 2017-05-10T01:47:00Z ????????????????????????????????|| description ??????| this is test create subnet. ?????????????????????????|| dns_nameservers ??| 8.8.8.8 ?????????????????????????????????????????????|| enable_dhcp ??????| True ????????????????????????????????????????????????|| gateway_ip ???????| 192.168.100.1 ???????????????????????????????????????|| host_routes ??????| ?????????????????????????????????????????????????????|| id ???????????????| 4e564b13-4336-4b8c-9217-797ef2f54380 ????????????????|| ip_version ???????| 4 ???????????????????????????????????????????????????|| ipv6_address_mode | ?????????????????????????????????????????????????????|| ipv6_ra_mode ?????| ?????????????????????????????????????????????????????|| name ?????????????| test0509 ????????????????????????????????????????????|| network_id ???????| fe054163-d056-4b8f-8c32-0b39c884fb8c ????????????????|| project_id ???????| 73c538f5e43c4ac98ee01482f371539c ????????????????????|| revision_number ??| 2 ???????????????????????????????????????????????????|| service_types ????| ?????????????????????????????????????????????????????|| subnetpool_id ????| ?????????????????????????????????????????????????????|| tenant_id ????????| 73c538f5e43c4ac98ee01482f371539c ????????????????????|| updated_at ???????| 2017-05-10T01:47:00Z ????????????????????????????????|+-------------------+------------------------------------------------------+

  

subnet-update子命令相关属性:
参数
描述
参数
描述
--name修改子网名称
--description描述信息
--gateway修改子网网关
--no-gateway关闭网关
--allocation-pool修改子网IP地址池
--dns-nameserver修改子网dns
--disable-dhcp关闭子网dhcp
--enable-dhcp开启dncp

示例:更新子网

命令语法:neutron subnet-update < 需要更新的subnet_NAME/ID > --name < 更新后subnet_NAME > --description ‘描述信息.‘ --gateway < 更新后的网关地址 > --allocation-pool < 更新后的子网池起始、终止IP >
--dns-nameserver < 更新后的DNS > --disable-dhcp < 更新后关闭dhcp >
[root@10-0-192-18 ~]# neutron subnet-update test0509 --name testltw --description ‘update.‘ --gateway 192.168.100.254 --allocation-pool start=192.168.100.1,end=192.168.100.253 --dns-nameserver 114.114.114.114 --disable-dhcpUpdated subnet: test0509
subnet-delete子命令相关属性:
参数
描述
SUBNET删除子网的ID(s)或NAME(s)

示例:同时删除一个或多个子网

命令语法:neutron subnet-delete < subnet_ID(s)/NAME(s)> 

[root@10-0-192-18 ~]# neutron subnet-delete jjjDeleted subnet(s):jjj

create subnet

原文地址:https://www.cnblogs.com/gushiren/p/9591890.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved