1
00:00:04,040 --> 00:00:07,050
We have just explored the default bridge network.

2
00:00:07,070 --> 00:00:10,460
Its name is actually Bridge and we have explored that.

3
00:00:10,460 --> 00:00:17,150
Those two containers, BusyBox one and BusyBox two, are currently assigned to this network and that's

4
00:00:17,150 --> 00:00:19,340
why they have addresses from this range.

5
00:00:19,340 --> 00:00:26,630
172 17 zero zero slash 16 Here is IP address of BusyBox one container and here is IP address of BusyBox

6
00:00:26,630 --> 00:00:27,650
two container.

7
00:00:27,680 --> 00:00:34,120
Now let me demonstrate you how we are able to create new custom network with new network range.

8
00:00:34,130 --> 00:00:37,730
For that, we will use command, Docker, network, create.

9
00:00:37,760 --> 00:00:38,600
Let's do that.

10
00:00:38,600 --> 00:00:46,640
Let's clear terminal and here type Docker network create and here will be name of the new network and

11
00:00:46,640 --> 00:00:53,870
let's give it name simply custom like so let's press enter and here you will see ID of the network that

12
00:00:53,870 --> 00:00:55,430
was just created.

13
00:00:55,430 --> 00:01:04,099
Let's now list networks that currently exist in Docker, Docker Network LS and you will see additional

14
00:01:04,250 --> 00:01:09,200
custom network that was just created and its driver is bridge.

15
00:01:09,200 --> 00:01:12,050
Same as for Default bridge network.

16
00:01:12,050 --> 00:01:14,660
And here is ID of this custom network.

17
00:01:14,660 --> 00:01:15,260
Great.

18
00:01:15,260 --> 00:01:24,200
Let's now inspect this custom network using Docker network, inspect command, Docker network, inspect

19
00:01:24,560 --> 00:01:31,310
custom or you are able to use this ID, Let's press enter and here are details about this custom network.

20
00:01:31,310 --> 00:01:37,280
If I'll scroll up, you'll see details about this newly created custom network.

21
00:01:37,280 --> 00:01:40,940
Here is its ID, Here is time when it was created.

22
00:01:40,940 --> 00:01:45,470
Here is Driver Bridge and here are details about this network.

23
00:01:45,470 --> 00:01:51,050
Here is subnet 172 18 zero zero slash 16.

24
00:01:51,080 --> 00:01:57,800
It is also private network, but you see that this prefix differs from the prefix in default bridge

25
00:01:57,800 --> 00:01:58,430
network.

26
00:01:58,460 --> 00:02:05,550
There was prefix 172.17 and this one has prefix 172 18.

27
00:02:05,640 --> 00:02:12,240
That is actually completely different sub network and the containers in this network will be able to

28
00:02:12,240 --> 00:02:17,880
communicate between each other, but they will not be able to communicate with default bridge network.

29
00:02:18,030 --> 00:02:18,600
Great.

30
00:02:18,600 --> 00:02:23,640
Also you'll see here Gateway 172 18 0.1.

31
00:02:23,670 --> 00:02:31,650
This address is assigned to Docker host and now actually Docker host is connected to both bridge networks

32
00:02:31,650 --> 00:02:33,870
to default and to custom.

33
00:02:33,990 --> 00:02:40,350
And of course, any containers that will be assigned to this custom network will have access to internet

34
00:02:40,350 --> 00:02:46,380
and they will be able to download some additional packages if they need to or publish some changes and

35
00:02:46,380 --> 00:02:46,800
so on.

36
00:02:46,800 --> 00:02:51,090
Anyway, they will be able to communicate with internet without any problems.

37
00:02:51,270 --> 00:02:51,870
Great.

38
00:02:51,870 --> 00:02:59,460
That's how we were able to create new custom network and now it's a good time to assign to create containers

39
00:02:59,460 --> 00:03:01,380
in this custom network.

40
00:03:01,380 --> 00:03:03,090
But let's do that after the pause.

41
00:03:03,120 --> 00:03:03,840
By by.

