1 00:00:11,350 --> 00:00:17,190 In the previous vlog, I explained why you would use a loopback interface and I gave you one reason. 2 00:00:17,560 --> 00:00:20,630 Let's look at another reason. 3 00:00:26,120 --> 00:00:31,910 Another reason why you wanna use a loopback is because routing protocols such as OSPF use the loopback 4 00:00:32,509 --> 00:00:36,890 to determine the router IDs of the routers in the OSPF network. 5 00:00:37,270 --> 00:00:38,300 So on these routers 6 00:00:40,930 --> 00:00:42,940 show IP interface brief. 7 00:00:44,080 --> 00:00:50,260 I've configured loopback 0 with this IP address and I've also configured the loopbacks on each 8 00:00:50,260 --> 00:00:58,130 router, so router 1 is 192 168 1.1, router 2 is .2, router 3 is .3 9 00:00:58,150 --> 00:00:59,680 Now why is that important? 10 00:00:59,680 --> 00:01:01,510 It's important for routing protocols. 11 00:01:01,570 --> 00:01:09,860 So when we enable a routing protocol such as OSPF it selects a router ID for itself. 12 00:01:10,330 --> 00:01:18,970 So I'm gonna enable OSPF on all interfaces on this router and just simply put them in area 0. 13 00:01:19,540 --> 00:01:33,190 So show IP OSPF interface brief, OSPF is enabled on all interfaces on the router show IP OSPF interface. 14 00:01:33,540 --> 00:01:35,510 Notice here show loopback is 0 15 00:01:35,650 --> 00:01:44,280 has this IP address configured in area 0 but the router ID is 192 168 1.2. 16 00:01:44,290 --> 00:01:49,670 In other words, the router ID selected is the highest IP address of any interface 17 00:01:49,750 --> 00:01:54,230 and if they are loopbacks the loopback override the physical interfaces. 18 00:01:54,310 --> 00:01:58,420 So the router ID is selected on the highest loopback address. 19 00:01:58,420 --> 00:02:01,250 In this case 192 168 1.2. 20 00:02:01,270 --> 00:02:08,620 Now that's important because in OSPF a router is identified by its router ID it's kinda like your name. 21 00:02:08,620 --> 00:02:09,820 So my name is David. 22 00:02:10,120 --> 00:02:14,050 It would be terrible if my name changed every day, whenever there was a problem. 23 00:02:14,260 --> 00:02:15,800 And that's the issue with OSPF. 24 00:02:16,000 --> 00:02:21,820 If you don't use a loopback interface and the router ID was selected off a physical interface and that 25 00:02:21,820 --> 00:02:26,590 interface went down the router ID would change but here it's consistent. 26 00:02:26,680 --> 00:02:35,110 Notice on gigabit 01 the router ID is still 192 168 1.2 27 00:02:35,160 --> 00:02:36,590 So let's have a look at the problem. 28 00:02:36,880 --> 00:02:38,750 On router 1 29 00:02:39,150 --> 00:02:45,110 we've got two IP addresses configured on physical interfaces and then we've got these loopback interfaces. 30 00:02:45,150 --> 00:02:50,350 But what I'm gonna do now is remove the loopback interfaces of router 1. 31 00:02:50,730 --> 00:02:56,850 So show IP interface brief, do that again. 32 00:02:56,850 --> 00:03:00,670 We only have IP addresses on the physical interfaces. 33 00:03:01,080 --> 00:03:13,110 So now router, OSPF, 1 network and I'll just enable OSPF on all interfaces once again, notice a neighbor relationship 34 00:03:13,110 --> 00:03:14,080 has established. 35 00:03:14,130 --> 00:03:15,170 We've actually got two. 36 00:03:15,510 --> 00:03:24,480 But notice the neighbor ID is 192 168 1.2 whereas on this side the neighbor I.D. is 10.1. 37 00:03:24,580 --> 00:03:29,100 2.1 the highest IP address of a physical interface. 38 00:03:29,310 --> 00:03:39,670 This loopback doesn't exist on router 1, so on router 2 show IP OSPF neighbor, neighbor relationship 39 00:03:39,670 --> 00:03:47,030 is full and established to 10.1.2.1, on router 1 show IP OSPF neighbor notice the difference. 40 00:03:47,170 --> 00:03:54,890 Neighbor ID is 192 168 1.2 IP address on the interface that the neighbor is using is 10.1 41 00:03:54,900 --> 00:03:56,130 .2.2 42 00:03:56,410 --> 00:04:01,110 and on this interface gigabit 00, it's 10.1.1.2. 43 00:04:01,510 --> 00:04:04,290 So the same neighbor ID the loopback 44 00:04:04,470 --> 00:04:12,620 and just to make sure that it's not confusing I'll add that here as well, we've got this loopback configured on 45 00:04:12,620 --> 00:04:13,340 router 2 46 00:04:13,340 --> 00:04:20,579 in addition to 2.2.2.2. On router 2 now, when we look at the neighbor relationship 47 00:04:20,579 --> 00:04:26,070 with router 1, neighbor ID is 10.1.2.1 that's this interface 48 00:04:26,080 --> 00:04:33,010 gigabit 01 the IP addresses and the physical interfaces are those on router 1. 49 00:04:33,120 --> 00:04:36,330 So why is the router ID important? 50 00:04:36,330 --> 00:04:43,140 Well when an interface goes down and the routers rebooted the router ID will change and in certain cases 51 00:04:43,140 --> 00:04:49,950 in OSPF we specify the router ID in commands. One of those cases which you don't need to know 52 00:04:49,950 --> 00:04:54,260 for CCNA is a virtual links. In this command 53 00:04:54,410 --> 00:05:03,340 we're specifying the router ID of a remote router. A virtual link allows us to create a virtual transit 54 00:05:03,700 --> 00:05:05,290 across an area. 55 00:05:05,590 --> 00:05:11,650 In this example a backbone area is on the left, area 1 is in the middle and area 2 is on the right. 56 00:05:12,310 --> 00:05:12,630 Area 2 57 00:05:12,640 --> 00:05:20,740 is separated from the backbone area by area 1 but a virtual link allows us to tunnel area 0 58 00:05:20,950 --> 00:05:27,460 across area 1 and fulfill one of the requirements of OSPF which states that all areas have to 59 00:05:27,460 --> 00:05:29,630 be adjacent to area 0. 60 00:05:29,950 --> 00:05:40,230 Now the problem is in our topology at the moment on router 1, show IP OSPF interface 61 00:05:40,440 --> 00:05:44,720 notice the router ID is 10.1.2.1. 62 00:05:44,800 --> 00:05:51,200 So that's the router ID of the router and you can see that on both interfaces. What I'm gonna do however 63 00:05:51,230 --> 00:05:52,450 is shut gigabit 64 00:05:52,810 --> 00:06:04,460 01 down so currently show IP OSPF interface shows that this is the router ID. If the router 65 00:06:04,910 --> 00:06:09,610 rebooted the router ID would change and instead of rebooting the router. 66 00:06:09,680 --> 00:06:16,250 I'm gonna type clear IP OSPF, process and I'm gonna clear all OSPF processes 67 00:06:18,960 --> 00:06:22,460 so show IP OSPF interface. 68 00:06:22,710 --> 00:06:25,350 In this case the router ID didn't change 69 00:06:25,650 --> 00:06:31,650 so what I'll do is save the configuration and reboot the router. 70 00:06:31,670 --> 00:06:33,090 So why is that a problem. 71 00:06:33,290 --> 00:06:39,710 If the interface that you're using was selected by the router at the router ID and you configured that 72 00:06:39,710 --> 00:06:45,710 router ID in this command and the interface went down and the router rebooted this command would no 73 00:06:45,710 --> 00:06:49,040 longer work because the router ID had changed. 74 00:06:49,180 --> 00:06:55,010 Notice Cisco tell you the router ID is usually the highest IP address on the box or the highest loopback 75 00:06:55,010 --> 00:06:56,370 address if one exists. 76 00:06:57,230 --> 00:07:03,300 The router ID is only calculated at boot time or at any time when the OSPF process is restarted. 77 00:07:03,710 --> 00:07:05,010 So what's the recommendation. 78 00:07:06,160 --> 00:07:11,790 For OSPF specify a loopback address and then manually configure the router ID. 79 00:07:12,140 --> 00:07:17,710 So the routers rebooted, show IP OSPF interface. 80 00:07:17,760 --> 00:07:19,790 Notice the router ID has changed. 81 00:07:19,860 --> 00:07:26,700 It's now 10.1.1.1 that means if you're using a virtual link as an example the virtual 82 00:07:26,700 --> 00:07:29,860 link would break and your network would break. 83 00:07:30,340 --> 00:07:32,710 OK that concludes this vlog entry. 84 00:07:33,000 --> 00:07:34,920 Thanks Pedro for the question. 85 00:07:34,920 --> 00:07:38,310 Please feel free to send me questions and I'll do my best to answer all of them. 86 00:07:38,630 --> 00:07:39,680 I'll see you tomorrow. 87 00:07:40,020 --> 00:07:40,740 All the very best.