File: podman-network-inspect.1.md

package info (click to toggle)
podman 5.4.2%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 23,124 kB
  • sloc: sh: 6,119; perl: 2,710; python: 2,258; ansic: 1,556; makefile: 1,022; xml: 121; ruby: 42; awk: 12; csh: 8
file content (78 lines) | stat: -rw-r--r-- 2,787 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
% podman-network-inspect 1

## NAME
podman\-network\-inspect - Display the network configuration for one or more networks

## SYNOPSIS
**podman network inspect** [*options*] *network* [*network* ...]

## DESCRIPTION
Display the (JSON format) network configuration.

## OPTIONS
#### **--format**, **-f**=*format*

Pretty-print networks to JSON or using a Go template.

| **Placeholder**    | **Description**                           |
|--------------------|-------------------------------------------|
| .Containers ...    | Running containers on this network.       |
| .Created ...       | Timestamp when the network was created    |
| .DNSEnabled        | Network has dns enabled (boolean)         |
| .Driver            | Network driver                            |
| .ID                | Network ID                                |
| .Internal          | Network is internal (boolean)             |
| .IPAMOptions ...   | Network ipam options                      |
| .IPv6Enabled       | Network has ipv6 subnet (boolean)         |
| .Labels ...        | Network labels                            |
| .Name              | Network name                              |
| .Network ...       | Nested Network type                       |
| .NetworkDNSServers | Array of DNS servers used in this network |
| .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 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.1.md)**, **[podman-network(1)](podman-network.1.md)**, **[podman-network-ls(1)](podman-network-ls.1.md)**, **[podman-network-create(1)](podman-network-create.1.md)**

## HISTORY
August 2021, Updated with the new network format by Paul Holzinger <pholzing@redhat.com>

August 2019, Originally compiled by Brent Baude <bbaude@redhat.com>