1 00:00:00,870 --> 00:00:07,590 When a router boots up, it searches for a Cisco iOS image in a specific sequence, it will search for 2 00:00:07,590 --> 00:00:14,610 the Cisco iOS based on what's configured in the configuration register, whether there's an iOS in flash, 3 00:00:14,970 --> 00:00:18,870 if a TFTP server is available or it will use ROM monitor. 4 00:00:19,290 --> 00:00:24,000 So when the router boots up, the first thing it checks is the configuration register 5 00:00:24,000 --> 00:00:31,360 boot field, if the boot field is set to 0 in hexadecimal, it will load ROM monitor. 6 00:00:31,950 --> 00:00:40,110 Remember, the configuration registers 16 binary bits by default it would be 0x2102 the 7 00:00:40,110 --> 00:00:40,530 last 8 00:00:40,530 --> 00:00:47,220 hexadecimal value specifies the boot field, so if that's set to 0, it'll go into ROM monitor mode. 9 00:00:47,790 --> 00:00:49,380 If it's set to 2 or greater 10 00:00:49,410 --> 00:00:53,490 in other words, 2.3.4.5.6.7.8 and so forth up to F 11 00:00:53,940 --> 00:00:59,970 it will check for boot commands and load the Cisco iOS image as specified in the boot command. 12 00:01:00,510 --> 00:01:07,350 If no boot command has been configured, it will boot an image in flash and typically it will boot the 13 00:01:07,350 --> 00:01:15,570 first iOS image found in Flash unless you specify a boot command telling it to boot off a different operating 14 00:01:15,570 --> 00:01:16,050 system. 15 00:01:16,530 --> 00:01:21,780 If no files are available in flash, it will look for an iOS image on a TFTP server. 16 00:01:22,080 --> 00:01:25,920 So it'll try and load a Cisco iOS image from a TFTP server 17 00:01:26,190 --> 00:01:29,910 but if none is available, then it will load ROM monitor. 18 00:01:31,700 --> 00:01:32,420 Now on this router 19 00:01:35,130 --> 00:01:43,210 it has multiple files in flash, so it has this operating system and this operating system in flash. 20 00:01:43,230 --> 00:01:51,480 Notice the difference in the name, the one that was loaded is the one with _2 in the name 21 00:01:51,960 --> 00:01:53,500 that was loaded from Flash. 22 00:01:54,150 --> 00:01:59,520 The reason why that operating system was loaded is the configuration register is set to the default. 23 00:02:00,240 --> 00:02:02,340 So the boot field is set to 2 24 00:02:03,060 --> 00:02:11,070 but in the running configuration, there is a boot command telling the router to boot from that second 25 00:02:11,070 --> 00:02:11,980 operating system. 26 00:02:13,230 --> 00:02:17,610 So there are two files in flash, this one and this one 27 00:02:19,410 --> 00:02:27,780 but the router was configured to boot off the second image here's the full show run command notice here's 28 00:02:27,780 --> 00:02:32,240 the command in the running-config telling the router which image to boot from. 29 00:02:33,240 --> 00:02:39,160 So show version shows that image was loaded by the router. On this router 30 00:02:39,180 --> 00:02:47,610 however, there are no boot commands, so show-run pipe include boot doesn't show any boot commands 31 00:02:47,610 --> 00:02:51,990 specifying that the router should boot from some other operating system. 32 00:02:54,260 --> 00:02:57,830 Show version shows which operating system was loaded 33 00:03:00,340 --> 00:03:08,710 and we can see that the configuration registers using the default value, so the router loaded the first 34 00:03:08,710 --> 00:03:10,700 operating system that it found in Flash, 35 00:03:11,080 --> 00:03:12,780 in other words, this operating system. 36 00:03:13,450 --> 00:03:18,280 So you can specify with boot commands 37 00:03:20,180 --> 00:03:26,420 which operating system should be loaded by the router, but by default, it will simply use the first 38 00:03:26,420 --> 00:03:34,370 operating system found in Flash unless you override that with the boot system command. You could 39 00:03:34,370 --> 00:03:42,650 as an example, specify that it boot from a TFTP server or FTP server as an example. 40 00:03:44,020 --> 00:03:50,350 So how does Cisco routers load iiOS configuration files? When the operating system is loaded and started, 41 00:03:50,800 --> 00:03:56,130 the router needs to be configured with IP addresses and other values to make it of any use. 42 00:03:56,470 --> 00:04:00,310 So it will typically look for the startup-config in NVRAM 43 00:04:00,850 --> 00:04:07,150 if there's no startup-config in NVRAM, it will either begin an auto-install or enter the setup 44 00:04:07,150 --> 00:04:07,860 utility. 45 00:04:08,290 --> 00:04:12,610 So when the router boots up, it looks for a startup-config in NVRAM. 46 00:04:13,000 --> 00:04:16,209 If it exists, it will load that startup-config. 47 00:04:16,600 --> 00:04:22,690 If there's no startup-config it looks for an active link to another router and then tries to load 48 00:04:22,900 --> 00:04:27,490 a configuration from a TFTP server using a protocol called slop. 49 00:04:28,090 --> 00:04:32,320 If that doesn't work, it will prompt for the initial configuration dialog.