1 00:00:00,000 --> 00:00:05,000 In this video were going to continue looking at how data flows 2 00:00:05,000 --> 00:00:10,000 in various network devices but specifically in this video we're gonna look at routers. 3 00:00:10,000 --> 00:00:15,000 Routers are layer 3 devices, in other words they operate at the network layer 4 00:00:15,000 --> 00:00:17,000 of the OSI model 5 00:00:17,000 --> 00:00:20,000 Routers do not make routing decisions based on MAC addresses 6 00:00:20,000 --> 00:00:24,000 but rather use IP addresses when determining 7 00:00:24,000 --> 00:00:27,000 out of which interface is traffic should be sent. 8 00:00:27,000 --> 00:00:30,000 Routers still use MAC addresses on Ethernet interfaces 9 00:00:30,000 --> 00:00:35,000 but the decision making process of which interface traffic 10 00:00:35,000 --> 00:00:41,000 should be transmitted out of, is made based on IP addresses rather than MAC addresses. 11 00:00:41,000 --> 00:00:46,000 A router may have serial interfaces as well as Ethernet interfaces. 12 00:00:46,000 --> 00:00:51,000 An Ethernet interface uses a MAC address for forwarding of traffic at layer 2. 13 00:00:51,000 --> 00:00:57,000 but a serial interface using PPP doesn’t use MAC addresses. 14 00:00:57,000 --> 00:01:01,000 So when traffic arrives on 1 interface and the routers need to determine out of which 15 00:01:01,000 --> 00:01:06,000 interface to forward the traffic that decision is made based on IP addresses 16 00:01:06,000 --> 00:01:08,000 rather than MAC addresses. 17 00:01:08,000 --> 00:01:15,000 So in this topology once again rather than using full 48 bits MAC addresses. 18 00:01:15,000 --> 00:01:20,000 I’m going to represent a MAC address as a single character for readability 19 00:01:20,000 --> 00:01:25,000 and ease of use, so A is the MAC address of the first PC 20 00:01:25,000 --> 00:01:30,000 and it has an IP address of 10.1.1.1 we have a router with 2 interfaces. 21 00:01:30,000 --> 00:01:38,000 F0/0 has an IP address of 10.1.1.100 and MAC addresses G. 22 00:01:38,000 --> 00:01:45,000 F0/1 has an IP address of 10.1.2.100 and MAC addresses of H. 23 00:01:45,000 --> 00:01:49,000 There are also some other PCs shown in the topology 24 00:01:49,000 --> 00:01:52,000 with the relevant MAC addresses and IP addresses. 25 00:01:52,000 --> 00:01:56,000 In this topology we're using a subnet mask of /24 26 00:01:56,000 --> 00:02:02,000 which can also be written as 255.255.255.0 27 00:02:02,000 --> 00:02:06,000 for simplicity in this topology both PC A and PC C 28 00:02:06,000 --> 00:02:11,000 are connected to a hub which is connected to a router on F0/0. 29 00:02:11,000 --> 00:02:18,000 PC B and PC D are also connected to a hub which in turn is connected to the router 30 00:02:18,000 --> 00:02:23,000 on F0/1 the router has therefore been configured 31 00:02:23,000 --> 00:02:26,000 with an IP address in the same subnet as host A and host C 32 00:02:26,000 --> 00:02:35,000 it's F0/1 interface is configured in the same subnet as B and D. 33 00:02:35,000 --> 00:02:39,000 when you configured an IP address on a router or layer 3 switch 34 00:02:39,000 --> 00:02:42,000 you configure the IP address with the mask. 35 00:02:42,000 --> 00:02:47,000 So the router knows that a /24 mask has been used here 36 00:02:47,000 --> 00:02:51,000 because it was configured as part of the IP address command 37 00:02:51,000 --> 00:02:54,000 when the IP address was configured on an interface. 38 00:02:54,000 --> 00:02:56,000 The router will therefore update it's routing table 39 00:02:56,000 --> 00:03:01,000 to indicate that network 10.1.1.0/24 40 00:03:01,000 --> 00:03:03,000 is directly connected to F0/0 41 00:03:03,000 --> 00:03:10,000 and network 10.1.2.0/24 is directly connected to F0/1. 42 00:03:10,000 --> 00:03:15,000 Routers don’t populate their routing tables using IP addresses 43 00:03:15,000 --> 00:03:20,000 but rather populate the routing tables with network addresses. 44 00:03:20,000 --> 00:03:23,000 And they make their routing decision based on the network address 45 00:03:23,000 --> 00:03:26,000 rather than individual IP addresses. 46 00:03:26,000 --> 00:03:32,000 So the routers in this example are configured with IP addresses and the /24 mask. 47 00:03:32,000 --> 00:03:37,000 So IP address 10.1.1.100 with the /24 mask 48 00:03:37,000 --> 00:03:42,000 equates to a network of 10.1.1.0/24 49 00:03:42,000 --> 00:03:45,000 and that network is added to the routing table of the router. 50 00:03:45,000 --> 00:03:52,000 in this example the routers knows that to get to network 10.1.1.0 51 00:03:52,000 --> 00:03:55,000 traffic should be sent out of F0/0 52 00:03:55,000 --> 00:03:59,000 and to get to network 10.1.2.0 53 00:03:59,000 --> 00:04:04,000 traffic should be sent out of interface F0/1.