1
00:00:00,000 --> 00:00:09,720
In this video, you'll learn about network bridges.

2
00:00:09,720 --> 00:00:14,800
So a bridge is used to introduce a software-defined bridge, and that behaves as a virtualized

3
00:00:14,800 --> 00:00:16,440
switch.

4
00:00:16,440 --> 00:00:19,799
Bridges are very common in virtualization and containers.

5
00:00:19,799 --> 00:00:24,000
They allow you to define an internal network to which your virtual machines or your Docker

6
00:00:24,000 --> 00:00:26,600
containers can connect.

7
00:00:26,600 --> 00:00:31,280
And using a bridge allows for creation of an internal network, which is strictly separated

8
00:00:31,280 --> 00:00:35,799
from the outside using network address translation technology.

9
00:00:35,799 --> 00:00:42,779
And that means that all the devices that are connected to the bridge are not directly accessible.

10
00:00:42,779 --> 00:00:46,860
But nodes on the bridge can address external nodes if that is needed.

11
00:00:46,860 --> 00:00:52,200
But external nodes can only access nodes behind the bridge using port forwarding.

12
00:00:52,200 --> 00:00:56,060
That's also when why later you are going to learn about Docker containers.

13
00:00:56,060 --> 00:01:01,220
And when we talk about accessing these containers, you need to configure port forwarding.

14
00:01:01,220 --> 00:01:08,099
BRCTL command is a common command that can be used to control bridges.

15
00:01:08,099 --> 00:01:12,419
And bridges can be created through NetPlan or using network manager-related tools.

16
00:01:12,419 --> 00:01:17,820
But most cases where you will see bridges is in containerized environments.

17
00:01:17,820 --> 00:01:19,599
Let me show you.

18
00:01:19,599 --> 00:01:24,739
So here I'm on an Ubuntu virtual machine that I'm using for different purposes.

19
00:01:24,739 --> 00:01:29,339
And I'm going to show you IP link show.

20
00:01:29,339 --> 00:01:31,139
And what do we see in IP link show?

21
00:01:31,139 --> 00:01:32,540
We see Docker 0.

22
00:01:32,540 --> 00:01:34,059
Now what is this Docker 0?

23
00:01:34,059 --> 00:01:38,820
Docker 0 is my Docker bridge used by Docker containers.

24
00:01:38,820 --> 00:01:48,660
And IPA is showing that this Docker bridge has its internal network 172.17.0.1 behind

25
00:01:48,660 --> 00:01:51,760
all Docker containers are.

26
00:01:51,760 --> 00:01:53,660
And how about IP route show?

27
00:01:53,660 --> 00:01:57,660
Well, IP route show defines this internal network.

28
00:01:57,660 --> 00:02:05,900
And that means that if my host is receiving any incoming requests to 172.17.0.0, it will

29
00:02:05,900 --> 00:02:10,660
put it on 172.17.0.1.

30
00:02:10,660 --> 00:02:16,419
And if I would have any Docker containers running, well, this bridge is what is going

31
00:02:16,419 --> 00:02:20,259
to be used to allow me to access them.

32
00:02:20,259 --> 00:02:22,699
We'll learn more about that in lesson 21.

