易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 3799|回复: 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
" d% u: [6 c5 V; ?7 A# MCreated a new subnet:
2 O* Y, X% v4 q2 k9 @1 S+---------------------+------------------------------------------------------+1 D% P& ], n2 o7 p
| Field               | Value                                                |
6 V0 p; F) X7 Q# n+---------------------+------------------------------------------------------+
! q8 }; f! i  _; N2 V| allocation_pools    | {"start": "172.20.118.1", "end": "172.20.118.253"}   |
, s& r. m9 F" r" K" c|                     | {"start": "172.20.118.255", "end": "172.20.119.254"} |
' C  J" t+ q5 N3 D  B+ l3 u| available_ip_number | 0                                                    |
' B7 \+ r9 u# J& d: {| available_ips       |                                                      |
8 S) P+ ~' ^" n5 o& t| cidr                | 172.20.118.0/23                                      |
6 t' q" t  e/ M2 X8 z9 e| dns_nameservers     | 114.114.114.114                                      |% s: z, M' N# @$ }( {8 a7 t) d) y
|                     | 8.8.8.8                                              |
/ B( P7 c# B6 I& ?' Z) ~| enable_dhcp         | True                                                 |
2 W- q, c; N& P8 p# m/ a  V| gateway_ip          | 172.20.118.254                                       |
* d. C! m' H$ X$ g- |8 N1 X| host_routes         |                                                      |
8 @8 |/ z+ N% N: v| id                  | bdd7b786-33e1-4b39-97d6-295fec5e80cf                 |
+ E4 p+ Z1 a2 q" e  F; D! a; I0 D| ip_version          | 4                                                    |
; c- X5 o8 T% e* a' ?6 Q| ipv6_address_mode   |                                                      |
8 I4 J9 T9 l  o| ipv6_ra_mode        |                                                      |$ d) L1 I6 |3 V
| name                | lrtestsub12                                          |, B  t, }/ a% Y% Q
| network_id          | 9f672bbf-38be-424c-9de6-45600aefc53d                 |
( @% I: G) p' X3 ~/ A6 T) x/ X( z| path                |                                                      |
" T, f# i) q$ {- m) L6 I| subnetpool_id       |                                                      |
3 j- D9 l. z5 z+ W$ g7 || tenant_id           | 7f0d7445833b466aab5becbe9908f31b                     |
: [& b; t3 J9 a5 k2 G& V+---------------------+------------------------------------------------------+
 楼主| 发表于 2019-11-27 17:27:07 | 显示全部楼层
# neutron port-create 9f672bbf-38be-424c-9de6-45600aefc53d 8 J1 ~& N$ _7 L# s3 G& F
Created a new port:
4 r$ b1 C& D# a+-----------------------+-------------------------------------------------------------------------------------+: G+ U/ Y; x; P7 ?* y
| Field                 | Value                                                                               |7 \0 D" c( h( u5 w7 u8 W) ]5 x$ }  v
+-----------------------+-------------------------------------------------------------------------------------+; Q3 h. C# K1 m  `7 R
| admin_state_up        | True                                                                                |+ @  d2 o( V  J  s- b
| allowed_address_pairs |                                                                                     |
4 b! o; ?# V, p1 O( O1 J$ y9 o| binding:profile       |                                                                                     |
4 Y6 W% C7 H6 U5 I: S8 a( G| device_id             |                                                                                     |
+ ]" m2 u* u* x9 t, D) y| device_owner          |                                                                                     |9 B+ H" W. \& N
| fixed_ips             | {"subnet_id": "09a28691-80f6-4945-be64-4f5c1c5ba40a", "ip_address": "172.20.114.2"} |7 Q2 U- ~4 e8 V
| id                    | 1aed0627-4d3a-48a3-9c20-6a387dac3b01                                                |/ {& x. W6 E6 r: l7 t# L
| mac_address           | fa:16:3e:57:e2:88                                                                   |5 a$ o2 x, e9 y9 y. a
| name                  |                                                                                     |
: x2 `$ I& r7 m. U! z2 u) T| network_id            | 9f672bbf-38be-424c-9de6-45600aefc53d                                                |
! m0 P. p* [- U+ Y| security_groups       |                                                                                     |
& \' `9 a  {% D| status                | ACTIVE                                                                              |- [# v% `) J8 \- Q
| tenant_id             | 7f0d7445833b466aab5becbe9908f31b                                                    |* `0 g7 M- A5 a: _7 d$ N
+-----------------------+-------------------------------------------------------------------------------------+
5 K* j8 n; l; U$ Dneutron subnet-show 09a28691-80f6-4945-be64-4f5c1c5ba40a
# m" n8 G3 h" R, N+---------------------+----------------------------------------------------+
+ g8 u7 D% a5 X| Field               | Value                                              |
* ~) [( E+ I- @, h+---------------------+----------------------------------------------------+* M" \2 y" F6 N. H) K* \9 k+ a* _
| allocation_pools    | {"start": "172.20.114.2", "end": "172.20.115.254"} |$ |, G' z4 L! |& V' z* y
| available_ip_number | 507                                                |
# n1 o6 d1 {* r$ F1 ?" D| available_ips       | {"start": "172.20.114.3", "end": "172.20.115.253"} |! U6 j& C) f% s6 u; ^
| cidr                | 172.20.114.0/23                                    |- ^0 I4 S1 }/ W' Q' }& _
| dns_nameservers     | 114.114.114.114                                    |
4 U0 O/ p6 n$ ]7 n: ~9 b| enable_dhcp         | True                                               |
+ i( d& K9 t; E4 \5 N9 {| gateway_ip          | 172.20.114.1                                       |- _6 o2 o/ z; D# f* z) i
| host_routes         |                                                    |) B" h/ @* Q# e0 O. [: t
| id                  | 09a28691-80f6-4945-be64-4f5c1c5ba40a               |
, a9 d% f4 [2 f0 j| ip_version          | 4                                                  |) D- V+ ^1 r/ A( J7 U* @
| ipv6_address_mode   |                                                    |
+ G3 _) \' b; X0 H| ipv6_ra_mode        |                                                    |
/ z; r& D& N2 b# \| name                | lrtestsub1                                         |9 i' q6 `. d# {& w8 ]6 Q
| network_id          | 9f672bbf-38be-424c-9de6-45600aefc53d               |
# G, m2 v4 o* f& U6 Y" M| path                |                                                    |1 \* ^* |: [- R/ m" f$ c
| subnetpool_id       |                                                    |6 e  H5 e8 c. t' e
| tenant_id           | 7f0d7445833b466aab5becbe9908f31b                   |+ E% ~7 O+ z# o) C
+---------------------+----------------------------------------------------+
7 e+ a1 I1 a+ s3 I$ [6 Q8 l. K5 V  s2 h- W7 F3 f9 c
, [0 t- H3 ]% J  D! P
7 Z" l* Y# A4 }4 c' f# E
 楼主| 发表于 2019-11-27 17:31:58 | 显示全部楼层
5 ^7 L, M* s# J6 d- L
neutron port-create  9f672bbf-38be-424c-9de6-45600aefc53d   --fixed-ip subnet_id=bdd7b786-33e1-4b39-97d6-295fec5e80cf     创建port指定子网,不指定ip地址0 E& `5 B8 l, X+ s/ O
Created a new port:
2 q/ R7 f) N7 w# X, l4 T+-----------------------+---------------------------------------------------------------------------------------+
0 |- H# w7 I6 {) _| Field                 | Value                                                                                 |8 X6 Q5 C3 ?4 k" p2 M+ z6 P
+-----------------------+---------------------------------------------------------------------------------------+
7 a) Q& Q, U  p* G| admin_state_up        | True                                                                                  |
1 ?& q& r0 t( A4 s| allowed_address_pairs |                                                                                       |' t) K& G# x3 ~# P
| binding:profile       |                                                                                       |
+ F* O& B8 `% S! n) u0 ]| device_id             |                                                                                       |
9 y9 J) l, Z7 p1 p  B& A% ]| device_owner          |                                                                                       |
% _6 e6 Z0 X0 ^9 E. ?3 g- e) J: A; k: M| fixed_ips             | {"subnet_id": "bdd7b786-33e1-4b39-97d6-295fec5e80cf", "ip_address": "172.20.118.255"} |  P' [! J2 r) ]# z( O
| id                    | 05f87729-79f8-4206-9e7c-869f9b0cbe5f                                                  |
6 j" \3 n9 I& K& \- U8 {# q- |4 X| mac_address           | fa:16:3e:5b:6c:81                                                                     |
: V, Y# G% H$ ^1 t| name                  |                                                                                       |( o) M! K1 o" {* t
| network_id            | 9f672bbf-38be-424c-9de6-45600aefc53d                                                  |
( _$ G( w, u0 I7 o/ ^- s6 l| security_groups       |                                                                                       |. ~3 T8 _" B/ ?& _; {
| status                | ACTIVE                                                                                |
+ R( M" ?  ]3 M% W| tenant_id             | 7f0d7445833b466aab5becbe9908f31b                                                      |  a# T* b% p1 m+ I0 E5 w
+-----------------------+---------------------------------------------------------------------------------------+3 W% m: A1 _) [* \" W3 R1 g

0 E+ U4 j2 J1 y+ J7 s- mneutron subnet-show bdd7b786-33e1-4b39-97d6-295fec5e80cf+ `1 z5 x8 R. k
+---------------------+------------------------------------------------------+
# p! H! }% ~" s( D+ q3 c| Field               | Value                                                |
1 g6 L1 R1 M* k# y: E4 W% `+---------------------+------------------------------------------------------+
$ s. Z1 w" B- D| allocation_pools    | {"start": "172.20.118.255", "end": "172.20.119.254"} |
1 ^# A/ n% H2 x/ o|                     | {"start": "172.20.118.1", "end": "172.20.118.253"}   |" [0 Q4 p& S. m; l( S% U- |
| available_ip_number | 507                                                  |
& k6 e5 }; T8 A9 {2 {! J# h5 k| available_ips       | {"start": "172.20.119.0", "end": "172.20.119.253"}   |
! Y" r3 S0 ~' O# x|                     | {"start": "172.20.118.1", "end": "172.20.118.253"}   |7 q* I7 i/ {; n$ z' h
| cidr                | 172.20.118.0/23                                      |# _: V$ I  ]% `! ]9 T/ P8 F( c
| dns_nameservers     | 114.114.114.114                                      |4 K# S. E/ C! d1 P( L" r
|                     | 8.8.8.8                                              |: r" `6 f( e1 K
| enable_dhcp         | True                                                 |
8 F$ l& j6 ?! O9 `0 T1 o| gateway_ip          | 172.20.118.254                                       |
3 h1 e8 w2 D& Q7 q. s8 r% r| host_routes         |                                                      |
, S5 c. @. \6 V- w; @) B- E1 f| id                  | bdd7b786-33e1-4b39-97d6-295fec5e80cf                 |
# F2 O2 u  l/ t" Y5 U# [| ip_version          | 4                                                    |" l0 W' E+ Q/ o$ W9 Z' X
| ipv6_address_mode   |                                                      |/ k2 U9 a# n5 E" E, D- v$ }+ N3 M
| ipv6_ra_mode        |                                                      |
5 o, S5 g+ H4 t9 ?6 |  ~| name                | lrtestsub12                                          |6 {9 r1 i9 U+ G! q& @3 d2 t- A" l' V: a) D
| network_id          | 9f672bbf-38be-424c-9de6-45600aefc53d                 |
8 ]: D( n4 h3 e# z( q| path                |                                                      |" u! m! V6 M7 }( F9 V
| subnetpool_id       |                                                      |: D$ w/ a( ]5 w7 q: Y- r
| tenant_id           | 7f0d7445833b466aab5becbe9908f31b                     |
% c& B" T; V* h( D. k7 R) Q( v+---------------------+------------------------------------------------------+
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

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

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 点击这里给我发消息

GMT+8, 2026-4-8 10:39 , Processed in 0.124360 second(s), 24 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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