NAME 名称

podman-network-inspect - Display the network configuration for one or more networks
podman-network-inspect - 显示一个或多个网络的网络配置

SYNOPSIS 概要

podman network inspect [options] network [network …]
podman network inspect [选项] 网络 [网络 …]

DESCRIPTION 描述

Display the (JSON format) network configuration.
显示(JSON 格式)的网络配置。

OPTIONS 选项

--format, -f=format

Pretty-print networks to JSON or using a Go template.
将网络漂亮地打印成 JSON 或使用 Go 模板。

Placeholder

Description

.Containers … .容器...

Running containers on this network.
在此网络上运行容器。

.Created … .创建…

Timestamp when the network was created
网络创建时的时间戳

.DNSEnabled

Network has dns enabled (boolean)
网络是否启用 DNS(布尔值)

.Driver

Network driver 网络驱动程序

.ID

Network ID 网络标识

.Internal

Network is internal (boolean)
网络是内部的(布尔值)

.IPAMOptions …

Network ipam options 网络 IPAM 选项

.IPv6Enabled

Network has ipv6 subnet (boolean)
网络具有 IPv6 子网(布尔值)

.Labels … .标签 …

Network labels 网络标签

.Name

Network name 网络名称

.Network … .网络 …

Nested Network type 嵌套网络类型

.NetworkDNSServers

Array of DNS servers used in this network
用于此网络中的 DNS 服务器数组

.NetworkInterface

Name of the network interface on the host
主机上网络接口的名称

.Options … .选项...

Network options 网络选项

.Routes

List of static routes for this network
此网络的静态路由列表

.Subnets

List of subnets on this network
此网络上的子网列表

EXAMPLE 例子 ¶

Inspect the default podman network.
检查默认的 podman 网络。

$ podman network inspect podman
[
    {
        "name": "podman",
        "id": "2f259bab93aaaaa2542ba43ef33eb990d0999ee1b9924b557b7be53c0b7a1bb9",
        "driver": "bridge",
        "network_interface": "podman0",
        "created": "2021-06-03T12:04:33.088567413+02:00",
        "subnets": [
            {
                "subnet": "10.88.0.0/16",
                "gateway": "10.88.0.1"
            }
        ],
        "ipv6_enabled": false,
        "internal": false,
        "dns_enabled": false,
        "ipam_options": {
            "driver": "host-local"
        }
    }
]

Show the subnet and gateway for a network.
显示网络的子网和网关。

$ podman network inspect podman --format "{{range .Subnets}}Subnet: {{.Subnet}} Gateway: {{.Gateway}}{{end}}"
Subnet: 10.88.0.0/16 Gateway: 10.88.0.1

SEE ALSO 参见 ¶

podman(1), podman-network(1), podman-network-ls(1), podman-network-create(1)

HISTORY 历史 ¶

August 2021, Updated with the new network format by Paul Holzinger pholzing@redhat.com
2021 年 8 月,由 Paul Holzinger pholzing@redhat.com 更新了新的网络格式

August 2019, Originally compiled by Brent Baude bbaude@redhat.com
2019 年 8 月,最初由 Brent Baude bbaude@redhat.com 编译