github.com/endocode/docker@v1.4.2-0.20160113120958-46eb4700391e/docs/reference/commandline/network_inspect.md (about) 1 <!--[metadata]> 2 +++ 3 title = "network inspect" 4 description = "The network inspect command description and usage" 5 keywords = ["network, inspect, user-defined"] 6 [menu.main] 7 parent = "smn_cli" 8 +++ 9 <![end-metadata]--> 10 11 # network inspect 12 13 Usage: docker network inspect [OPTIONS] NETWORK [NETWORK..] 14 15 Displays detailed information on a network 16 17 -f, --format= Format the output using the given go template. 18 --help Print usage 19 20 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 a network: 21 22 ```bash 23 $ sudo docker run -itd --name=container1 busybox 24 f2870c98fd504370fb86e59f32cd0753b1ac9b69b7d80566ffc7192a82b3ed27 25 26 $ sudo docker run -itd --name=container2 busybox 27 bda12f8922785d1f160be70736f26c1e331ab8aaf8ed8d56728508f2e2fd4727 28 ``` 29 30 The `network inspect` command shows the containers, by id, in its 31 results. You can specify an alternate format to execute a given 32 template for each result. Go's 33 [text/template](http://golang.org/pkg/text/template/) package describes all the 34 details of the format. 35 36 ```bash 37 $ sudo docker network inspect bridge 38 [ 39 { 40 "Name": "bridge", 41 "Id": "b2b1a2cba717161d984383fd68218cf70bbbd17d328496885f7c921333228b0f", 42 "Scope": "local", 43 "Driver": "bridge", 44 "IPAM": { 45 "Driver": "default", 46 "Config": [ 47 { 48 "Subnet": "172.17.42.1/16", 49 "Gateway": "172.17.42.1" 50 } 51 ] 52 }, 53 "Containers": { 54 "bda12f8922785d1f160be70736f26c1e331ab8aaf8ed8d56728508f2e2fd4727": { 55 "Name": "container2", 56 "EndpointID": "0aebb8fcd2b282abe1365979536f21ee4ceaf3ed56177c628eae9f706e00e019", 57 "MacAddress": "02:42:ac:11:00:02", 58 "IPv4Address": "172.17.0.2/16", 59 "IPv6Address": "" 60 }, 61 "f2870c98fd504370fb86e59f32cd0753b1ac9b69b7d80566ffc7192a82b3ed27": { 62 "Name": "container1", 63 "EndpointID": "a00676d9c91a96bbe5bcfb34f705387a33d7cc365bac1a29e4e9728df92d10ad", 64 "MacAddress": "02:42:ac:11:00:01", 65 "IPv4Address": "172.17.0.1/16", 66 "IPv6Address": "" 67 } 68 }, 69 "Options": { 70 "com.docker.network.bridge.default_bridge": "true", 71 "com.docker.network.bridge.enable_icc": "true", 72 "com.docker.network.bridge.enable_ip_masquerade": "true", 73 "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0", 74 "com.docker.network.bridge.name": "docker0", 75 "com.docker.network.driver.mtu": "1500" 76 } 77 } 78 ] 79 ``` 80 81 82 ## Related information 83 84 * [network disconnect ](network_disconnect.md) 85 * [network connect](network_connect.md) 86 * [network create](network_create.md) 87 * [network ls](network_ls.md) 88 * [network rm](network_rm.md) 89 * [Understand Docker container networks](../../userguide/networking/dockernetworks.md)