We have just found out that it is not possible to communicate between the containers using either the
names or host names in default broker network.
And now let me show you how we able to lease the default networks that are created in Tokyo by default
and how you are able to create custom network.
Let's do that.
Let's go to this.
The last step probably.
And here let's clear terminal and here and circumvent Docker network.
There's less help and you'll see a small list of options you are able to use with Docker network command
network is basically management Docker command.
And here you're able to list networks using as you are able to inspect read the details about specific
network or you're able to create new network.
Also you're able to use connect and disconnect commands in order to connect and disconnect the run in
containers of top containers from specific networks.
Great.
Let's first use Docker network allows command in order to list existing network Docker network Alice.
And I see here three networks on the list.
And here in the thrust column you'll see it.
Network idea here here and here also you see here.
Network names breach host and none.
And also you'll see it dry Ross breach host and now great.
But I will explain you at the moment.
What host and not networks do.
I'll focus only on the bridge network.
Let me know inspect.
Read the dailies about this breach network.
For that let's type Docker network inspect and here type breach or you're able to use a d of that network.
And here you'll see the tales about default breach network.
Let me scroll up to the beginning of this output.
And most important part is here subnet it is set to 172 17 0 0 slash 16.
Sixteen is network mask.
It means that this part will be the same for all containers that are running in default breach network
and basically when containers are created Docker hosted a science IP addresses two containers from this
network range.
They're also address 172 17 0 1 is default gateway arduous it is assigned to Docker host itself and
containers get addresses next.
After this first one for example we saw here that the busy box a one container got this address and
the busy bookstore got address this one next after this one.
It means that the docker or simply assigns to new container next free a badass from this range.
This range also in those details about this breach network you might see which containers are currently
created in this network.
Here is container section and you'll see here now two containers Busy Box one here was its name.
Also you see here mac address of this container.
It is also created randomly.
And here is a was assigned to this container.
If you scroll down you'll see the tails about second container.
Here they are here.
It's a name busy bookstore.
And here was a B version of four address assigned to this second container.
And you may notice that MAC address also D for us.
And here you see basically two different MAC addresses because MAC addresses must be unique at least
across the same network those containers are in the same network.
That's why Mike addresses must be also different.
Great.
This current set up in default breach network.
Now let me show you how you're able to create new custom network using Docker network command.
But let's do that next by mail.