owned this note
owned this note
Published
Linked with GitHub
---
title: Device Initialization
tags: Cisco IOS, networking, manual, reference, router, switch, technical
---
<header>
<h6>Device Initialization</h6>
> [toc]
</header>
---
# Onboard LED Indicators
<div class="inline">
<div class="container">
<img style="min-width:380px;" src="https://i.imgur.com/RQagApq.png" title="Switch LED Diagram" alt="Switch LED Diagram"/>
<img style="max-height:250px;" src="https://i.imgur.com/bZ2hPUq.png" title="Switch LED Photo" alt="Switch LED Photo"/>
</div>
<div>Status LEDs and the Mode button for a Cisco Catalyst 2960 Switch.</div>
</div>
<dl class='ref-list'>
<dt> – System (SYST)</dt>
<dd>Shows whether the system is receiving power and is functioning properly.
<ul>
<li>If the LED is <span class='off'>off</span>, it means the system is not powered on.</li>
<li>If the LED is <span class='green'>green</span>, the system is operating normally.</li>
<li>If the LED is <span class='amber'>amber</span>, the system is receiving power but is not functioning properly.</li>
</ul>
</dd>
<dt> – Redundant Power System (RPS)</dt>
<dd>Shows the RPS status.
<ul>
<li>If the LED is <span class='off'>off</span>, the RPS is off, or it is not properly connected.</li>
<li>If the LED is <span class='green'>green</span>, the RPS is connected and ready to provide backup power.</li>
<li>If the LED is <span class='green blink'>blinking green</span>, the RPS is connected but is unavailable because it is providing power to another device.</li>
<li>If the LED is <span class='amber'>amber</span>, the RPS is in standby mode, or in a fault condition.</li>
<li>If the LED is <span class='amber blink'>blinking amber</span>, the internal power supply in the switch has failed, and the RPS is providing power.</li>
</ul>
</dd>
<dt> – Port Status (STAT)</dt>
<dd>Indicates that the port status mode is selected when the LED is <span class='green'>green</span>. This is the default mode. When selected, the port LEDs will display colors with different meanings:
<ul>
<li>If the LED is <span class='off'>off</span>, there is no link, or the port was administratively shut down.</li>
<li>If the LED is <span class='green'>green</span>, a link is present. If the LED is <span class='green blink'>blinking green</span>, there is activity and the port is sending or receiving data.</li>
<li>If the LED is alternating <span class='green-amber'>green-amber</span>, there is a link fault.</li>
<li>If the LED is <span class='amber'>amber</span>, the port is blocked to ensure that a loop does not exist in the forwarding domain and is not forwarding data (typically, ports will remain in this state for the first 30 seconds after being activated). </li>
<li>If the LED is <span class='amber blink'>blinking amber</span>, the port is blocked to prevent a possible loop in the forwarding domain.</li>
</ul>
</dd>
<dt> – Port Duplex (DUPLX)</dt>
<dd>Indicates that the port duplex mode is selected when the LED is <span class='green'>green</span>. When selected, the port LEDs will display colors with different meanings:
<ul>
<li>If the LED is <span class='off'>off</span>, the port is in half-duplex mode.</li>
<li>If the LED is <span class='green'>green</span>, the port is in full-duplex mode.</li>
</ul>
</dd>
<dt> – Port Speed (SPEED)</dt>
<dd>Indicates that the port speed mode is selected. When selected, the port LEDs will display colors with different meanings.
<ul>
<li>If the LED is <span class='off'>off</span>, the port is operating at 10 Mbps.</li>
<li>If the LED is <span class='green'>green</span>, the port is operating at 100 Mbps.</li>
<li>If the LED is <span class='green blink'>blinking green</span>, the port is operating at 1000 Mbps.</li>
</ul>
</dd>
<dt> – Power over Ethernet Mode (PoE)</dt>
<dd>If PoE is supported, a PoE mode LED will be present.
<ul>
<li>If the LED is <span class='off'>off</span>, it indicates the PoE mode is not selected and that none of the ports have been denied power or placed in a fault condition.</li>
<li>If the LED is <span class='amber blink'>blinking amber</span>, the PoE mode is not selected but at least one of the ports has been denied power or has a PoE fault.</li>
</ul>
</dd>
<dd>When the LED is <span class='green'>green</span>, it indicates the PoE mode is selected and the port LEDs will display colors with different meanings.
<ul>
<li>If the port LED is <span class='off'>off</span>, the PoE is off.</li>
<li>If the port LED is <span class='green'>green</span>, the PoE is on.</li>
<li>If the port LED is alternating <span class='green-amber'>green-amber</span>, PoE is denied because providing power to the powered device will exceed the switch power capacity.</li>
<li>If the port LED is <span class='amber blink'>blinking amber</span>, PoE is off because of a fault.</li>
<li>If the port LED is solid <span class='amber'>amber</span>, PoE for the port has been disabled.</li>
</ul>
</dd>
</dl>
:::info
The <span class='emphasis'>mode</span> button (**7**) is used to toggle through port status, port duplex, port speed, and if supported, the Power over Ethernet (PoE) status of the port LEDs (**8**).
:::
# Boot Sequence
After a Cisco switch is powered on, it goes through the following five-step boot sequence:
<dl class='step-list'>
<dt>Power-On Self-Test program (POST)</dt>
<dd>POST tests the CPU, DRAM, and the portion of the flash device that makes up the flash file system.</dd>
<dt>Boot-loader software initializes</dt>
<dd>The boot-loader is a small program stored in ROM that is run immediately after POST successfully completes.</dd>
<dt>Boot-loader performs low-level CPU initialization</dt>
<dd>The boot-loader initializes the switch's CPU registers, which control where physical memory is mapped, the quantity of memory, and its speed.</dd>
<dt>Boot-loader initializes the flash file system on the system board</dt>
<dt>Boot-loader starts IOS</dt>
<dd>The default IOS operating system software image is located and loaded into memory, after which control of the switch is handed over to the IOS.</dd>
</dl>
The switch attempts to automatically boot by using information in the BOOT environment variable. If this variable is not set, the switch attempts to load and execute the first executable file it can find.
The IOS operating system then initializes the interfaces using the Cisco IOS commands found in the startup-config file. The startup-config file is called config.text and is located in flash.
## Boot System Command
the BOOT environment variable is set using the **`boot system`** global configuration mode command.
```pug
S1(config)# boot system flash:/c2960-lanbasek9-mz.150-2.SE/c2960-lanbasek9-mz.150-2.SE.bin
```
The following table defines each part of the **`boot system`** command:
| Command | Definition |
| ------- | ---------- |
| <div class='mono'>**boot system**</div> | The main command |
| <div class='mono'>**flash:**</div> | The storage device |
| <div class='mono'>**c2960-lanbasek9-mz.150-2.SE/**</div> | The path to the file system |
| <div class='mono'>**c2960-lanbasek9-mz.150-2.SE.bin**</div> | The IOS file name |
:::success
Use the command **`show boot`** to see what the current IOS boot file is set to.
:::
# Recovering from a System Crash
The boot loader provides access into the switch if the operating system cannot be used because of missing or damaged system files. The boot loader has a command-line interface that provides access to the files stored in flash memory.
The boot loader can be accessed through a console connection following these steps:
<ol class='step-list'>
<li>Connect a PC by console cable to the switch console port. Configure terminal emulation software to connect to the switch.</li>
<li>Unplug the switch power cord.</li>
<li>Reconnect the power cord and, within 15 seconds, press and hold down the Mode button while the System LED is still flashing green.</li>
<li>Continue holding the <span class='emphasis'>mode</span> button until the System LED turns briefly amber and then solid green; then release the <span class='emphasis'>mode</span> button.</li>
<li>The boot loader <code><b>switch:</b></code> prompt appears in the terminal emulation software on the PC.</li>
</ol>
<br>
Type the **`help`** or **`?`** at the boot loader prompt to view a list of available commands.
By default, the switch attempts to automatically boot up by using information in the BOOT environment variable. To view the path of the switch BOOT environment variable type the **`set`** command. Then, initialize the flash file system using the **`flash_init`** command to view the current files in flash, as shown in the output.
```cmake
switch: set
# BOOT=flash:/c2960-lanbasek9-mz.122-55.SE7/c2960-lanbasek9-mz.122-55.SE7.bin
# <...output omitted...>
switch: flash_init
# Initializing Flash...
# flashfs[0]: 2 files, 1 directories
# flashfs[0]: 0 orphaned files, 0 orphaned directories
# flashfs[0]: Total bytes: 32514048
# flashfs[0]: Bytes used: 11838464
# flashfs[0]: Bytes available: 20675584
# flashfs[0]: flashfs fsck took 10 seconds.
# ...done Initializing Flash.
```
After flash has finished initializing you can enter the dir flash: command to view the directories and files in flash, as shown in the output.
```cmake
switch: dir flash:
# Directory of flash:/
# 2 -rwx 11834846 c2960-lanbasek9-mz.150-2.SE8.bin
# 3 -rwx 2072 multiple-fs
```
Enter the **`BOOT=flash`** command to change the BOOT environment variable path the switch uses to load the new IOS in flash. To verify the new BOOT environment variable path, issue the set command again. Finally, to load the new IOS type the **`boot`** command without any arguments, as shown in the output.
```cmake
switch: BOOT=flash:c2960-lanbasek9-mz.150-2.SE8.bin
switch: set
# BOOT=flash:c2960-lanbasek9-mz.150-2.SE8.bin
# <...output omitted...>
switch: boot
```
:::info
The boot loader commands support initializing flash, formatting flash, installing a new IOS, changing the BOOT environment variable and recovery of lost or forgotten passwords.
:::
---
---
{%hackmd 7PGmjAHeTXak2VUM3iw5Wg %}
<head>
<style>
/*/
* ANIMATIONS / COLOR EFFECTS
/*/
.off {
color: DimGrey;
font-weight: bold;
}
.green {
color: Green;
font-weight: 700;
}
.amber {
color: Orange;
font-weight: 600;
}
.green-amber {
color: Green;
font-weight: 600;
}
.blink {
animation-name: blink;
animation-duration: 200ms;
animation-timing-function: cubic-bezier(.8,0,.8,1);
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes blink {
from {
opacity: 1;
}
to {
opacity: 0.7;
}
}
.green-amber {
animation-name: fade;
animation-duration: 750ms;
animation-timing-function: cubic-bezier(1,0,0,1);
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes fade {
from {
color: Green;
}
to {
color: Orange;
}
}
</style>
</head>