az sphere device network

提供有关附加设备上的网络接口状态的信息。

操作 描述
az sphere device network enable 在连接的设备上启用网络接口。
az sphere device network disable 在连接的设备上禁用网络接口。
az sphere device network list-firewall-rules 列出附加设备的防火墙规则。
az sphere device network list-interfaces 列出附加设备的网络接口。
az sphere device network show-诊断 显示连接的设备上的一个或所有 Wi-Fi 网络的诊断。
az sphere device network show-status 显示附加设备的网络状态。
az sphere device network update-interface 更新附加设备的网络接口配置。

命令

az sphere device network enable

在连接的设备上启用网络接口。

必需参数

参数 描述
--接口 要启用的接口。 中的值: az sphere device network list
--catalog -c 要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 中的值: az sphere catalog list
--resource-group -r Azure 资源组的名称。 可以使用 配置默认组 az config set defaults.group=<name>。 中的值: az group list

可选参数

参数 描述
--device -d 附加多个设备时要运行命令的设备。 指定附加设备的 ID、IP 地址或本地连接 ID。 中的值: az sphere device list

例子

启用网络接口

az sphere device network enable --interface eth0

az sphere device network disable

在连接的设备上禁用网络接口。

必需参数

参数 描述
--接口 要启用的接口。 中的值: az sphere device network list
--catalog -c 要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 中的值: az sphere catalog list
--resource-group -r Azure 资源组的名称。 可以使用 配置默认组 az config set defaults.group=<name>。 中的值: az group list

可选参数

参数 描述
--device -d 附加多个设备时要运行命令的设备。 指定附加设备的 ID、IP 地址或本地连接 ID。 中的值: az sphere device list

例子

禁用网络接口

az sphere device network disable --interface eth0

az sphere device network list-firewall-rules

列出附加设备的防火墙规则。

必需参数

参数 描述
--catalog -c 要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 中的值: az sphere catalog list
--resource-group -r Azure 资源组的名称。 可以使用 配置默认组 az config set defaults.group=<name>。 中的值: az group list

可选参数

参数 描述
--device -d 附加多个设备时要运行命令的设备。 指定附加设备的 ID、IP 地址或本地连接 ID。 中的值: az sphere device list

例子

列出所有防火墙规则

az sphere device network list-firewall-rules

az sphere device network list-interfaces

列出附加设备的网络接口。

必需参数

参数 描述
--catalog -c 要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 中的值: az sphere catalog list
--resource-group -r Azure 资源组的名称。 可以使用 配置默认组 az config set defaults.group=<name>。 中的值: az group list

可选参数

参数 描述
--device -d 附加多个设备时要运行命令的设备。 指定附加设备的 ID、IP 地址或本地连接 ID。 中的值: az sphere device list

例子

列出附加设备上的接口

az sphere device network list-interfaces

az sphere device network show-诊断

显示连接的设备上的一个或所有 Wi-Fi 网络的诊断。

必需参数

参数 描述
--catalog -c 要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 中的值: az sphere catalog list
--resource-group -r Azure 资源组的名称。 可以使用 配置默认组 az config set defaults.group=<name>。 中的值: az group list

可选参数

参数 描述
--device -d 附加多个设备时要运行命令的设备。 指定附加设备的 ID、IP 地址或本地连接 ID。 中的值: az sphere device list
--network -n 要显示其诊断的网络。 中的值: az sphere device network list

例子

显示所有网络的诊断

az sphere device network show-diagnostics

az sphere device network show-status

显示附加设备的网络状态。

必需参数

参数 描述
--catalog -c 要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 中的值: az sphere catalog list
--resource-group -r Azure 资源组的名称。 可以使用 配置默认组 az config set defaults.group=<name>。 中的值: az group list

可选参数

参数 描述
--device -d 附加多个设备时要运行命令的设备。 指定附加设备的 ID、IP 地址或本地连接 ID。 中的值: az sphere device list

例子

显示设备上的网络状态

az sphere device network show-status

az sphere device network update-interface

更新附加设备的网络接口配置。

必需参数

参数 描述
--hardware-address 指定要设置的设备硬件地址。
--接口 要启用的接口。 中的值: az sphere device network list
--catalog -c 要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 中的值: az sphere catalog list
--resource-group -r Azure 资源组的名称。 可以使用 配置默认组 az config set defaults.group=<name>。 中的值: az group list

可选参数

参数 描述
--device -d 附加多个设备时要运行命令的设备。 指定附加设备的 ID、IP 地址或本地连接 ID。 中的值: az sphere device list

例子

更新特定网络接口的硬件地址值

az sphere device network update-interface --interface eth0 --hardware-address aa