There are also software running in routers, such as Microsoft's Windows, Apple's IOS, Mac OS and Google's Android, which can be regarded as the operating system of routers, just like the Windows operating system used on PCs. Router's operating system completes the generation and maintenance of routing table.
Similarly, as a router, there is also a part similar to BIOS in our PC system, called MiniIOS. MiniIOS enables us to boot up and enter recovery mode when there is no ISO in FLASH of router, and use TFTP or X-MODEM to import ISO files into FLASH. Therefore, the router start-up process should be as follows:
The router first performs POST after power-up. Power On Self Test.
After POST is completed, the BootStrap program in ROM is first read for preliminary boot.
After the preliminary boot is completed, try to locate and read the complete ISO image file. Here, the router will first find the ISO file in FLASH. If it finds the ISO file, it will read the ISO file and boot the router.
If the ISO file is not found in FLASH, the router will enter BOOT mode, in which the ISO file on TFTP can be used. Or use TFTP/X-MODEM to upload an ISO file to the FLASH of the router (generally we call this process ISO irrigation). When the router is restarted after transmission, the router can start to CLI mode normally.
When the router initializes the ISO file, it will start looking for the STARTUP-CONFIG file in NVRAM. STARTUP-CONFIG is called the boot configuration file. This file saves all the configurations and modifications we have made to the router. When the router finds the file, the router loads all the configurations in the file, learns, generates and maintains the routing table according to the configuration, loads all configurations into RAM (router memory), enters the user mode, and finally completes the start-up process.
If there is no STARTUP-CONFIG file in NVRAM, the router will enter the Question Configuration Mode, commonly known as Question and Answer Configuration Mode, in which all the configurations about routers can be configured in the form of Question and Answer. But generally we don't use this model. We usually get in.CLI  (Comman Line Interface)The router is configured after command line mode.
Working Principle Example
（1) Workstation A sends the address 22.214.171.124 of Workstation B together with data information to Router 1 in the form of data packets.
（2）After receiving the data package from workstation A, Router 1 first takes out the address 126.96.36.199 from the header of the packet, and calculates the best path to workstation B according to the path table: R1-> R2-> R5-> B; and sends the data packet to router 2.
(3) Router 2 repeats the work of Router 1 and forwards the packet to Router 5.
（4）Router 5 also takes out the destination address and finds that 188.8.131.52 is on the network segment connected by the router, so the packet is handed directly to workstation B.
(5) Workstation B receives the data package from Workstation A, and a communication process ends.