Our goal at the moment is to establish communication between two containers and we will stop.
Simple and I'll explain you how you are able to pin Guan container from a Nazar in default bridge network
and for that we will create the two busy box containers at the moment.
There was what WordPress container run in.
And it is completely safe to stop it and remove at the moment but no worries we will get back to work.
Press container a bit later.
All right let me stop this container Docker stop.
7 5
and let's broom all stop containers dogger container
yes and all containers where are removed.
Wonderful.
Let's not create the too busy box containers here.
This step will be first one and in another step will create.
Second one.
Great.
Let's use Docker on command or gap that the Busy Box in which is already in our local cache dock Iran.
I'll use two options I and team and here we'll be a busy box like so.
And in another tab.
Let's also start one more busy box container.
Run there's a busy box.
Great.
We have looked into H cell here in this container and this container.
And now let's verify which IP addresses where assigned to those containers for that you could use command
hostname Dash 8.
And here let's enter this command as well hostname this and you'll see that IP addresses that were assigned
to those containers are different.
Here you see that that this address.
Answer We do.
And here this address was three but you may notice that those IP addresses are from the same sub network.
It is basically private sub network gold 172 dot 17 0 0 with subnet mask 16 and those IP addresses from
this range are used for assignment to containers.
By default it is actually a default network and let's not verify wires or those containers are able
to communicate between each other or not.
And for that we will simply use Bing utility that will perform a connection Tester from one IP address
to another.
And from this busy box container we could be a NAS or IP address of another container using pin utility
of this utility is available in busy box container out of the box.
Let's use it being 172 17 0 3 and you'll see that we get response from Amal's a container.
And that means that there is a connection between two containers and that they are able to communicate
over any DCP or UDP ports because this big utility works on a third level of the same model.
And that means that all levels up will rock as well.
No worries we will get back to network concepts a bit late into growth and I'll explain you all of that
in details.
For now you need to understand that those containers are able to communicate over any DCP or UDP ports.
Wonderful.
Also you're able to verify connection from this container and here you able to use the same command
being 172 17 or two and you of course will get a response from these busy box container.
Great.
That's how IP addresses are assigned by default to containers and how you're able to communicate between
containers by default in default breach network.
Also you are able to verify which IP address was assigned to specific container by using the command
Docker inspect.
Let me open up a new tap here and thought let's enter Dr. Pierce and you'll see two containers or one
in here as first lady and here a second lady.
And now let's use Docker inspect comment Docker inspect and pass here.
Idea of annual containers.
Let's use this idea.
Let me copy paste here and you'll see IP address almost at the end of this output.
Here was a B I was assigned to this busy box container.
And if you'll verify the tales about and as a container let me do so.
Docker appears Docker to inspect and let's use a D.
This one copy paste here.
You'll see a NAS or IP address assigned to this container.
You may also notice that there was Gateway set and it is equal for both containers.
It is actually your IP address located at the docker host and it acts as a default gateway for all containers
that are running in default breach network.
Wonderful.
Are fundamentals of a beat networking by default.
In Docker again here is default network 170 to 17 0 0 and subnet mask is 16.
Here you see IP graphics slams as decline here in this output.
And that means that you may see IP addresses like 170 to 17 5 6 or 100 dot 7 or like in this case 170
to 17 0 2 5 10 and so on.
But this part will be the same for all IP addresses.
It is graphics.
All right.
Is the basics of IP networking between containers that are created in Docker by default.
Also let him demonstrate you that you are able to connect to any IP address or hostname in Internet
from container.
And for that you could use same comment.
And the for example type being Google dot com and you'll get a response from Google.
You'll get a response actually from IP address of one of the Google salvos.
Great.
That's all what they wanted to show you here in this logo and most important outcome is that container
was by default may communicate between Shazam using IP addresses.
Wonderful.
Let's not cross it.
And next.
Try to create my Skrill container and see whether it will be able to start it without any options or
not.
I'll see you next by my.