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,879 --> 00:00:31,559 Using a bridge allows for creation of an internal network which is strictly separated from the 8 00:00:31,559 --> 00:00:35,799 outside using network address translation technology. 9 00:00:35,799 --> 00:00:42,759 And that means that all the devices that are connected to the bridge are not directly accessible. 10 00:00:42,759 --> 00:00:46,840 But nodes on the bridge can address external nodes if that is needed. 11 00:00:46,840 --> 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,279 That's also when why later you are going to learn about Docker containers, and when we 13 00:00:56,279 --> 00:01:01,279 talk about accessing these containers, you need to configure port forwarding. 14 00:01:01,279 --> 00:01:08,080 BRCTL command is a common command that can be used to control bridges. 15 00:01:08,080 --> 00:01:12,839 And bridges can be created through NetPlan or using network manager-related tools, but 16 00:01:12,839 --> 00:01:17,800 most cases where you will see bridges is in containerized environments. 17 00:01:17,800 --> 00:01:19,599 Let me show you. 18 00:01:19,599 --> 00:01:24,959 So here I'm on an Ubuntu virtual machine that I'm using for different purposes, and I'm 19 00:01:25,080 --> 00:01:29,239 going to show you IP link show. 20 00:01:29,239 --> 00:01:31,080 And what do we see in IP link show? 21 00:01:31,080 --> 00:01:32,480 We see Docker 0. 22 00:01:32,480 --> 00:01:34,720 Now, what is this Docker 0? 23 00:01:34,720 --> 00:01:38,720 Docker 0 is my Docker bridge used by Docker containers. 24 00:01:38,720 --> 00:01:47,959 And IPA is showing that this Docker bridge has its internal network 172.17.0.1 25 00:01:47,959 --> 00:01:51,680 behind all Docker containers are. 26 00:01:51,680 --> 00:01:53,800 And how about IP route show? 27 00:01:53,800 --> 00:01:59,160 Well, IP route show defines this internal network, and that means that if my host is 28 00:01:59,160 --> 00:02:10,679 receiving any incoming requests to 172.17.0.0, it will put it on 172.17.0.1. 29 00:02:10,679 --> 00:02:16,399 And if I would have any Docker containers running, well, this bridge is what is going 30 00:02:16,399 --> 00:02:20,240 to be used to allow me to access them. 31 00:02:20,240 --> 00:02:22,720 You'll learn more about it in lesson 21.