github.com/flavio/docker@v0.1.3-0.20170117145210-f63d1a6eec47/man/src/network/inspect.md (about)

     1  Returns information about one or more networks. By default, this command renders all results in a JSON object. For example, if you connect two containers to the default `bridge` network:
     2  
     3  ```bash
     4  $ sudo docker run -itd --name=container1 busybox
     5  f2870c98fd504370fb86e59f32cd0753b1ac9b69b7d80566ffc7192a82b3ed27
     6  
     7  $ sudo docker run -itd --name=container2 busybox
     8  bda12f8922785d1f160be70736f26c1e331ab8aaf8ed8d56728508f2e2fd4727
     9  ```
    10  
    11  The `network inspect` command shows the containers, by id, in its
    12  results. You can specify an alternate format to execute a given
    13  template for each result. Go's
    14  [text/template](http://golang.org/pkg/text/template/) package
    15  describes all the details of the format.
    16  
    17  ```bash
    18  $ sudo docker network inspect bridge
    19  [
    20      {
    21          "Name": "bridge",
    22          "Id": "b2b1a2cba717161d984383fd68218cf70bbbd17d328496885f7c921333228b0f",
    23          "Scope": "local",
    24          "Driver": "bridge",
    25          "IPAM": {
    26              "Driver": "default",
    27              "Config": [
    28                  {
    29                      "Subnet": "172.17.42.1/16",
    30                      "Gateway": "172.17.42.1"
    31                  }
    32              ]
    33          },
    34          "Internal": false,
    35          "Containers": {
    36              "bda12f8922785d1f160be70736f26c1e331ab8aaf8ed8d56728508f2e2fd4727": {
    37                  "Name": "container2",
    38                  "EndpointID": "0aebb8fcd2b282abe1365979536f21ee4ceaf3ed56177c628eae9f706e00e019",
    39                  "MacAddress": "02:42:ac:11:00:02",
    40                  "IPv4Address": "172.17.0.2/16",
    41                  "IPv6Address": ""
    42              },
    43              "f2870c98fd504370fb86e59f32cd0753b1ac9b69b7d80566ffc7192a82b3ed27": {
    44                  "Name": "container1",
    45                  "EndpointID": "a00676d9c91a96bbe5bcfb34f705387a33d7cc365bac1a29e4e9728df92d10ad",
    46                  "MacAddress": "02:42:ac:11:00:01",
    47                  "IPv4Address": "172.17.0.1/16",
    48                  "IPv6Address": ""
    49              }
    50          },
    51          "Options": {
    52              "com.docker.network.bridge.default_bridge": "true",
    53              "com.docker.network.bridge.enable_icc": "true",
    54              "com.docker.network.bridge.enable_ip_masquerade": "true",
    55              "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
    56              "com.docker.network.bridge.name": "docker0",
    57              "com.docker.network.driver.mtu": "1500"
    58          }
    59      }
    60  ]
    61  ```
    62  
    63  Returns the information about the user-defined network:
    64  
    65  ```bash
    66  $ docker network create simple-network
    67  69568e6336d8c96bbf57869030919f7c69524f71183b44d80948bd3927c87f6a
    68  $ docker network inspect simple-network
    69  [
    70      {
    71          "Name": "simple-network",
    72          "Id": "69568e6336d8c96bbf57869030919f7c69524f71183b44d80948bd3927c87f6a",
    73          "Scope": "local",
    74          "Driver": "bridge",
    75          "IPAM": {
    76              "Driver": "default",
    77              "Config": [
    78                  {
    79                      "Subnet": "172.22.0.0/16",
    80                      "Gateway": "172.22.0.1"
    81                  }
    82              ]
    83          },
    84          "Containers": {},
    85          "Options": {}
    86      }
    87  ]
    88  ```