1
00:00:04,470 --> 00:00:10,480
Our goal at the moment is to establish communication between two containers and we will stop.

2
00:00:10,490 --> 00:00:16,650
Simple and I'll explain you how you are able to pin Guan container from a Nazar in default bridge network

3
00:00:17,040 --> 00:00:21,480
and for that we will create the two busy box containers at the moment.

4
00:00:21,480 --> 00:00:23,390
There was what WordPress container run in.

5
00:00:23,730 --> 00:00:29,790
And it is completely safe to stop it and remove at the moment but no worries we will get back to work.

6
00:00:29,800 --> 00:00:31,470
Press container a bit later.

7
00:00:31,610 --> 00:00:36,320
All right let me stop this container Docker stop.

8
00:00:36,430 --> 00:00:37,200
7 5

9
00:00:41,000 --> 00:00:44,950
and let's broom all stop containers dogger container

10
00:00:48,250 --> 00:00:52,310
yes and all containers where are removed.

11
00:00:52,330 --> 00:00:52,880
Wonderful.

12
00:00:53,140 --> 00:00:55,890
Let's not create the too busy box containers here.

13
00:00:55,900 --> 00:00:59,310
This step will be first one and in another step will create.

14
00:00:59,320 --> 00:01:00,430
Second one.

15
00:01:00,430 --> 00:01:00,880
Great.

16
00:01:00,940 --> 00:01:06,860
Let's use Docker on command or gap that the Busy Box in which is already in our local cache dock Iran.

17
00:01:06,880 --> 00:01:13,590
I'll use two options I and team and here we'll be a busy box like so.

18
00:01:14,000 --> 00:01:15,620
And in another tab.

19
00:01:15,620 --> 00:01:19,740
Let's also start one more busy box container.

20
00:01:21,520 --> 00:01:24,690
Run there's a busy box.

21
00:01:25,030 --> 00:01:25,560
Great.

22
00:01:25,600 --> 00:01:30,700
We have looked into H cell here in this container and this container.

23
00:01:30,700 --> 00:01:37,270
And now let's verify which IP addresses where assigned to those containers for that you could use command

24
00:01:37,300 --> 00:01:38,910
hostname Dash 8.

25
00:01:39,730 --> 00:01:47,350
And here let's enter this command as well hostname this and you'll see that IP addresses that were assigned

26
00:01:47,350 --> 00:01:49,430
to those containers are different.

27
00:01:49,450 --> 00:01:51,040
Here you see that that this address.

28
00:01:51,050 --> 00:01:52,150
Answer We do.

29
00:01:52,240 --> 00:02:00,270
And here this address was three but you may notice that those IP addresses are from the same sub network.

30
00:02:00,310 --> 00:02:12,250
It is basically private sub network gold 172 dot 17 0 0 with subnet mask 16 and those IP addresses from

31
00:02:12,250 --> 00:02:15,460
this range are used for assignment to containers.

32
00:02:15,490 --> 00:02:22,600
By default it is actually a default network and let's not verify wires or those containers are able

33
00:02:22,600 --> 00:02:24,890
to communicate between each other or not.

34
00:02:24,910 --> 00:02:31,360
And for that we will simply use Bing utility that will perform a connection Tester from one IP address

35
00:02:31,360 --> 00:02:32,050
to another.

36
00:02:32,320 --> 00:02:39,050
And from this busy box container we could be a NAS or IP address of another container using pin utility

37
00:02:39,050 --> 00:02:42,670
of this utility is available in busy box container out of the box.

38
00:02:43,000 --> 00:02:51,980
Let's use it being 172 17 0 3 and you'll see that we get response from Amal's a container.

39
00:02:52,150 --> 00:02:58,090
And that means that there is a connection between two containers and that they are able to communicate

40
00:02:58,270 --> 00:03:06,100
over any DCP or UDP ports because this big utility works on a third level of the same model.

41
00:03:06,100 --> 00:03:10,390
And that means that all levels up will rock as well.

42
00:03:10,390 --> 00:03:15,480
No worries we will get back to network concepts a bit late into growth and I'll explain you all of that

43
00:03:15,480 --> 00:03:16,440
in details.

44
00:03:16,450 --> 00:03:24,400
For now you need to understand that those containers are able to communicate over any DCP or UDP ports.

45
00:03:24,430 --> 00:03:25,240
Wonderful.

46
00:03:25,240 --> 00:03:31,030
Also you're able to verify connection from this container and here you able to use the same command

47
00:03:31,060 --> 00:03:40,200
being 172 17 or two and you of course will get a response from these busy box container.

48
00:03:40,210 --> 00:03:40,830
Great.

49
00:03:40,900 --> 00:03:47,620
That's how IP addresses are assigned by default to containers and how you're able to communicate between

50
00:03:47,620 --> 00:03:51,130
containers by default in default breach network.

51
00:03:51,160 --> 00:03:57,170
Also you are able to verify which IP address was assigned to specific container by using the command

52
00:03:57,250 --> 00:03:58,660
Docker inspect.

53
00:03:58,660 --> 00:04:05,470
Let me open up a new tap here and thought let's enter Dr. Pierce and you'll see two containers or one

54
00:04:05,470 --> 00:04:08,220
in here as first lady and here a second lady.

55
00:04:08,380 --> 00:04:13,970
And now let's use Docker inspect comment Docker inspect and pass here.

56
00:04:13,990 --> 00:04:15,700
Idea of annual containers.

57
00:04:15,910 --> 00:04:16,810
Let's use this idea.

58
00:04:16,870 --> 00:04:23,280
Let me copy paste here and you'll see IP address almost at the end of this output.

59
00:04:23,290 --> 00:04:27,070
Here was a B I was assigned to this busy box container.

60
00:04:27,520 --> 00:04:31,880
And if you'll verify the tales about and as a container let me do so.

61
00:04:31,900 --> 00:04:36,890
Docker appears Docker to inspect and let's use a D.

62
00:04:36,910 --> 00:04:39,160
This one copy paste here.

63
00:04:39,310 --> 00:04:43,100
You'll see a NAS or IP address assigned to this container.

64
00:04:43,120 --> 00:04:48,860
You may also notice that there was Gateway set and it is equal for both containers.

65
00:04:48,940 --> 00:04:57,100
It is actually your IP address located at the docker host and it acts as a default gateway for all containers

66
00:04:57,250 --> 00:04:59,910
that are running in default breach network.

67
00:05:00,130 --> 00:05:00,820
Wonderful.

68
00:05:01,020 --> 00:05:05,410
Are fundamentals of a beat networking by default.

69
00:05:05,410 --> 00:05:13,210
In Docker again here is default network 170 to 17 0 0 and subnet mask is 16.

70
00:05:13,210 --> 00:05:17,470
Here you see IP graphics slams as decline here in this output.

71
00:05:17,890 --> 00:05:29,130
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

72
00:05:29,130 --> 00:05:32,440
to 17 0 2 5 10 and so on.

73
00:05:32,440 --> 00:05:36,150
But this part will be the same for all IP addresses.

74
00:05:36,140 --> 00:05:37,350
It is graphics.

75
00:05:37,670 --> 00:05:38,350
All right.

76
00:05:38,400 --> 00:05:43,870
Is the basics of IP networking between containers that are created in Docker by default.

77
00:05:43,900 --> 00:05:51,700
Also let him demonstrate you that you are able to connect to any IP address or hostname in Internet

78
00:05:51,760 --> 00:05:52,740
from container.

79
00:05:53,020 --> 00:05:55,210
And for that you could use same comment.

80
00:05:55,300 --> 00:06:01,280
And the for example type being Google dot com and you'll get a response from Google.

81
00:06:01,340 --> 00:06:06,700
You'll get a response actually from IP address of one of the Google salvos.

82
00:06:06,820 --> 00:06:07,480
Great.

83
00:06:07,480 --> 00:06:13,410
That's all what they wanted to show you here in this logo and most important outcome is that container

84
00:06:13,430 --> 00:06:18,160
was by default may communicate between Shazam using IP addresses.

85
00:06:18,310 --> 00:06:19,050
Wonderful.

86
00:06:19,050 --> 00:06:19,860
Let's not cross it.

87
00:06:19,900 --> 00:06:20,690
And next.

88
00:06:21,040 --> 00:06:27,590
Try to create my Skrill container and see whether it will be able to start it without any options or

89
00:06:27,590 --> 00:06:28,200
not.

90
00:06:28,270 --> 00:06:29,710
I'll see you next by my.

