Show Table of Contents
4.9. network
network 资源类型是所有逻辑网络资源在 Red Hat Virtualization 环境中的组合。
表 4.21. 逻辑网络参数
| 名称 | 类型 | 描述 | 必需的 | 用户可创建 | 用户可更新 |
|---|---|---|---|---|---|
--data_center-id|name
|
字符串
|
逻辑网络所在的数据中心的标识。
|
是
|
是
|
否
|
--name
|
字符串
|
逻辑网络的名称。
|
是
|
是
|
否
|
--description
|
字符串
|
逻辑网络的描述信息。
|
否
|
是
|
是
|
--vlan-id
|
字符串
|
VLAN 标签(tag)。
|
否
|
是
|
是
|
--ip-address
|
字符串
|
逻辑网络的网桥的 IP 地址。
|
否
|
是
|
是
|
--ip-gateway
|
字符串
|
逻辑网络的网桥的网关。
|
否
|
是
|
是
|
--ip-netmask
|
字符串
|
逻辑网络的网桥的网络掩码。
|
否
|
是
|
是
|
--display
|
布尔值
|
指定一个逻辑网络是否只作为显示使用。它的值包括
true 或 false。
|
否
|
是
|
是
|
--stp
|
布尔值
|
当把这个参数设为
true 时,Spanning Tree Protocol 将在这个网络中被启用。
|
否
|
是
|
是
|
--mtu
|
整数
|
指定逻辑网络中的、用户定义的 mtu(maximum transmission unit - 最大传输单元) 值。
|
否
|
是
|
是
|
--usages-usage
|
集合
|
为逻辑网络定义使用参数。
|
否
|
否
|
是
|
--usages-usage 参数是一个使用下表中的子参数的集合。
表 4.22. usages-usage 参数
| 名称 | 类型 | 描述 |
|---|---|---|
usage
|
字符串
|
网络的使用类型。可选的值是
VM 和 DISPLAY。
|
下表列出了基于资源的命令中的
网络选项。
表 4.23. 命令选项
| 选项 | 描述 |
|---|---|
--cluster-identifier | 把网络添加到一个集群作为一个子资源。 |
例 4.21. 创建一个新网络
[RHEVM shell (connected)]# add network --name WebNetwork --datacenter-name Default
例 4.22. 为集群附加一个存在的网络
[RHEVM shell (connected)]# add network --name WebNetwork --datacenter-name Default --cluster-identifier Default
例 4.23. 更新一个网络
[RHEVM shell (connected)]# update network WebNetwork --name DataNetwork
例 4.24. 删除一个网络
[RHEVM shell (connected)]# remove network WebNetwork

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.