易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 3795|回复: 3
收起左侧

底层创建subnet

[复制链接]
发表于 2019-11-27 10:52:38 | 显示全部楼层 |阅读模式
购买主题 本主题需向作者支付 2 金钱 才能浏览
 楼主| 发表于 2019-11-27 11:03:30 | 显示全部楼层
neutron subnet-create --name lrtestsub12 9f672bbf-38be-424c-9de6-45600aefc53d 172.20.118.0/23 --gateway_ip 172.20.118.254  --dns-nameserver 114.114.114.114 --dns-nameserver 8.8.8.8 1 n( L9 H; S, b1 b
Created a new subnet:  A: ^9 x. j! `& V2 Q
+---------------------+------------------------------------------------------+
5 W& [) Z$ m( y4 e! I| Field               | Value                                                |
. B% F+ P0 K  X+---------------------+------------------------------------------------------+
3 Z  _$ h# U% `5 p/ I# m2 c| allocation_pools    | {"start": "172.20.118.1", "end": "172.20.118.253"}   |% W" t: X4 Q9 E( ?5 J
|                     | {"start": "172.20.118.255", "end": "172.20.119.254"} |
4 A4 o+ `9 J. v9 j; k| available_ip_number | 0                                                    |* e, q* Y0 T* i6 P- Y0 h
| available_ips       |                                                      |
" z, A* ?% t, R. h; [| cidr                | 172.20.118.0/23                                      |
" {8 m3 D5 I: F& d6 s$ }' s| dns_nameservers     | 114.114.114.114                                      |
0 l* b9 n1 Y" b: }|                     | 8.8.8.8                                              |
7 q+ U6 }& y# L/ z, k| enable_dhcp         | True                                                 |
) h# Y' {) Z# N" d3 \8 D| gateway_ip          | 172.20.118.254                                       |
: I: l4 x& C9 Q1 X' }| host_routes         |                                                      |8 Y: R5 J' Q( [( Z6 T  d0 ~
| id                  | bdd7b786-33e1-4b39-97d6-295fec5e80cf                 |
9 }! o% Y. u5 B- v+ l* B6 _: T# l| ip_version          | 4                                                    |
9 }' ]3 y% D1 }6 p8 S| ipv6_address_mode   |                                                      |
! f2 J2 ?/ e) x% u4 t| ipv6_ra_mode        |                                                      |
0 k" f* D- ~7 A3 i| name                | lrtestsub12                                          |
% L  E1 M$ A- i3 g! H| network_id          | 9f672bbf-38be-424c-9de6-45600aefc53d                 |' V3 m: f: d2 Q" W
| path                |                                                      |, u% n% N& U+ S. ?( M
| subnetpool_id       |                                                      |( X+ ?; b( h, {
| tenant_id           | 7f0d7445833b466aab5becbe9908f31b                     |1 R: g- t9 k7 w5 |/ n
+---------------------+------------------------------------------------------+
 楼主| 发表于 2019-11-27 17:27:07 | 显示全部楼层
# neutron port-create 9f672bbf-38be-424c-9de6-45600aefc53d & D. Z3 f% M# W: Z
Created a new port:
$ f& N) s2 t9 U9 S  {+-----------------------+-------------------------------------------------------------------------------------+
7 A+ k9 h4 c. E8 X2 F1 a| Field                 | Value                                                                               |% ?9 m6 S& t4 T1 B
+-----------------------+-------------------------------------------------------------------------------------+$ h$ t+ W. Y5 U3 n. K/ O: w8 g, o
| admin_state_up        | True                                                                                |
2 h  E  c  I. V& Z$ o" E4 P& T| allowed_address_pairs |                                                                                     |
5 F* D* J5 m' C6 h; u| binding:profile       |                                                                                     |
) g# J& x9 k. `- V: f| device_id             |                                                                                     |
! ?) }1 S3 K, x+ g| device_owner          |                                                                                     |/ Y( M+ g4 i2 t( g" @' L8 l, O
| fixed_ips             | {"subnet_id": "09a28691-80f6-4945-be64-4f5c1c5ba40a", "ip_address": "172.20.114.2"} |
, k+ M* t! _9 J+ {2 b| id                    | 1aed0627-4d3a-48a3-9c20-6a387dac3b01                                                |
5 _! m  u+ H7 ?8 }) _# P: j| mac_address           | fa:16:3e:57:e2:88                                                                   |8 O' U1 |) V, g0 p. @' b% E  }
| name                  |                                                                                     |
4 F( l+ y- _9 X; t4 r2 u| network_id            | 9f672bbf-38be-424c-9de6-45600aefc53d                                                |/ z4 Q) @' y+ K- X
| security_groups       |                                                                                     |% O: `! t  d- H
| status                | ACTIVE                                                                              |
5 V  t8 a! }; K8 E9 P: q| tenant_id             | 7f0d7445833b466aab5becbe9908f31b                                                    |
& e: Z( x: J) o- X8 n+-----------------------+-------------------------------------------------------------------------------------+7 x) p( R  s, G7 ]1 g
neutron subnet-show 09a28691-80f6-4945-be64-4f5c1c5ba40a1 ^# d3 u0 v/ e6 |
+---------------------+----------------------------------------------------+' r  x2 Z8 E. [% a% T* B# N( p% N
| Field               | Value                                              |2 Q1 q, a, M( U3 P1 j
+---------------------+----------------------------------------------------+
5 L& s/ `$ v5 @) z! u2 k' h| allocation_pools    | {"start": "172.20.114.2", "end": "172.20.115.254"} |/ R" }' [. b$ C) K
| available_ip_number | 507                                                |
0 n% X6 \1 i: [7 D! A, ?/ }' U| available_ips       | {"start": "172.20.114.3", "end": "172.20.115.253"} |3 k# S0 h# P0 X% \% c. Q; g
| cidr                | 172.20.114.0/23                                    |/ f+ b* d6 w% Q9 T  D( J2 S' i
| dns_nameservers     | 114.114.114.114                                    |
' v- v8 u# F- Y7 n) o% o3 d9 R) I| enable_dhcp         | True                                               |
* A  P+ t$ L. B/ m| gateway_ip          | 172.20.114.1                                       |* Y# h  D3 ?. `8 r* x
| host_routes         |                                                    |, [; W. t( r0 k
| id                  | 09a28691-80f6-4945-be64-4f5c1c5ba40a               |" T' x7 Q9 m; C# B
| ip_version          | 4                                                  |
$ f  ?: P7 y) `8 K! B2 e| ipv6_address_mode   |                                                    |; X4 t$ u! z+ @9 N
| ipv6_ra_mode        |                                                    |  p( w7 q4 r2 W  t/ B8 B
| name                | lrtestsub1                                         |
* ]+ S8 g( y) H4 y| network_id          | 9f672bbf-38be-424c-9de6-45600aefc53d               |, g' H& i6 i' F
| path                |                                                    |
& Y. ^5 Y1 P7 W) Z1 Q| subnetpool_id       |                                                    |8 r2 `' Q* w" _5 Z: E
| tenant_id           | 7f0d7445833b466aab5becbe9908f31b                   |. i/ Y) }: R. s
+---------------------+----------------------------------------------------+
$ Y& @' I- w. N
8 r4 z" a5 D" X' P0 y! W) y8 |* R5 S2 G% h+ k$ o9 B# o0 [/ A

2 u, d  V1 H9 c# f. Z7 c/ F
 楼主| 发表于 2019-11-27 17:31:58 | 显示全部楼层
, L( Q/ m9 {' F
neutron port-create  9f672bbf-38be-424c-9de6-45600aefc53d   --fixed-ip subnet_id=bdd7b786-33e1-4b39-97d6-295fec5e80cf     创建port指定子网,不指定ip地址7 P5 t( U7 L* g  m# [- [
Created a new port:
- H2 Q/ ~! t* }  ~. x! h2 ?+-----------------------+---------------------------------------------------------------------------------------+
8 S5 x) P! N& P$ h| Field                 | Value                                                                                 |. A3 J- s( R6 B& _
+-----------------------+---------------------------------------------------------------------------------------+
% ]$ s) _! I( i. V| admin_state_up        | True                                                                                  |
! [- f' L. x( l( l% S| allowed_address_pairs |                                                                                       |
- B  s5 M; j. T$ C; ?' o" X| binding:profile       |                                                                                       |* F% }  N, u# \  w2 e0 I: P$ {
| device_id             |                                                                                       |
8 C/ Z& a5 ~$ x1 [% G7 Z| device_owner          |                                                                                       |
% {1 ~/ _+ T; ?. e3 n| fixed_ips             | {"subnet_id": "bdd7b786-33e1-4b39-97d6-295fec5e80cf", "ip_address": "172.20.118.255"} |  Q# g  y" m8 ?! M
| id                    | 05f87729-79f8-4206-9e7c-869f9b0cbe5f                                                  |
1 z7 [/ l( p! ]% j' |5 {| mac_address           | fa:16:3e:5b:6c:81                                                                     |) j! a- I! u6 f+ u! w6 ~4 w
| name                  |                                                                                       |+ ]1 c7 P% b% [) t: l+ o
| network_id            | 9f672bbf-38be-424c-9de6-45600aefc53d                                                  |* J; h' F6 i+ F8 [
| security_groups       |                                                                                       |
  X/ c6 N% V( ?: @' g| status                | ACTIVE                                                                                |
* ^1 o3 S; n$ F4 A+ K| tenant_id             | 7f0d7445833b466aab5becbe9908f31b                                                      |
* E) H# U! m7 V5 l% @) h+-----------------------+---------------------------------------------------------------------------------------+: e! g4 B% W" h! ~+ s6 o1 \9 c
% J0 u* \& b* }; [# B
neutron subnet-show bdd7b786-33e1-4b39-97d6-295fec5e80cf
) c4 e+ Y  j" J4 s+---------------------+------------------------------------------------------+9 S- W2 J; ]3 l9 @' f9 l
| Field               | Value                                                |7 B2 A1 _& k5 v7 x/ Z. s$ Q' @
+---------------------+------------------------------------------------------+0 F" _1 V, h$ A: w- @
| allocation_pools    | {"start": "172.20.118.255", "end": "172.20.119.254"} |
6 A/ P4 c" X! a2 ]1 o$ y|                     | {"start": "172.20.118.1", "end": "172.20.118.253"}   |
/ ]5 w; f! Y- q- F$ O4 }| available_ip_number | 507                                                  |) @2 W3 P; Y$ y) C' A
| available_ips       | {"start": "172.20.119.0", "end": "172.20.119.253"}   |2 a- A; ?1 f; E+ R
|                     | {"start": "172.20.118.1", "end": "172.20.118.253"}   |! A8 e6 H$ y+ K2 W% e, g! s
| cidr                | 172.20.118.0/23                                      |8 Z4 y7 d$ O! s  _' e- W0 `* S
| dns_nameservers     | 114.114.114.114                                      |
: K- r, B' J! O! ^) D/ Y|                     | 8.8.8.8                                              |
$ X0 Y6 R0 g/ Z8 D* J9 T8 S| enable_dhcp         | True                                                 |- ~9 |6 t7 A  N/ W( Z: c3 e
| gateway_ip          | 172.20.118.254                                       |
5 W+ m# Q% p% n: T0 S$ _| host_routes         |                                                      |  Y- @7 V4 l9 r% A; [" Z5 ~7 e
| id                  | bdd7b786-33e1-4b39-97d6-295fec5e80cf                 |
2 M/ G' ^! z. E# o| ip_version          | 4                                                    |
* _2 G9 i( I+ _3 V- V5 f| ipv6_address_mode   |                                                      |0 \  o4 [* I6 q0 H- G
| ipv6_ra_mode        |                                                      |& G% {' P4 b" y  q3 b  W0 }9 G
| name                | lrtestsub12                                          |/ B# S' H) r" e+ b
| network_id          | 9f672bbf-38be-424c-9de6-45600aefc53d                 |  d( l3 E( A6 H( e. h9 T
| path                |                                                      |) p; P8 f* N* g1 h" }
| subnetpool_id       |                                                      |2 G  v/ ?- d7 `/ c9 a9 S
| tenant_id           | 7f0d7445833b466aab5becbe9908f31b                     |1 T+ X; I+ w' }" l, i! y
+---------------------+------------------------------------------------------+
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 21:41 , Processed in 0.056856 second(s), 24 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表