Cisco IOS Cookbook, 2nd Edition (2024)

Table of Contents
Problem Solution FAQs

Problem

You want to create a shareable RSA key for authentication or encryption.

Solution

First, you must create the keys on both devices. We recommend using at least 1024-bit keys in production networks:

Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router1(config)#crypto key generate rsa The name for the keys will be: Router1.oreilly.comChoose the size of the key modulus in the range of 360 to 2048 for your General Purpose Keys. Choosing a key modulus greater than 512 may take a few minutes.How many bits in the modulus [512]: 1024Generating RSA keys ...[OK]Router1(config)#endRouter1#show crypto key mypubkey rsa  % Key pair was generated at: 01:19:45 EST Mar 1 2003 Key name: Router1.oreilly.com Usage: General Purpose Key Key Data: 30819F30 0D06092A 864886F7 0D010101 05000381 8D003081 89028181 00E68338 D561B2D1 7B8B75D6 7B34F6AF 1710B00B 5B6E9E8D D7183BE6 F08A6342 054EADFC B764DF9C 4592B891 522727F2 14233B47 8F757134 24F03DB3 833C5988 312B11E9 FB6E0E20 4579C0A4 F2062353 4F1C8CE4 410EE57B 9FCEE784 DA7E3852 408E9742 2584DF56 67293F3F F76B6A96 C4D518FB 1A0114BF E2449838 BE5794E2 37020301 0001 % Key pair was generated at: 01:19:52 EST Mar 1 2003 Key name: Router1.oreilly.com.server Usage: Encryption Key Key Data: 307C300D 06092A86 4886F70D 01010105 00036B00 30680261 00BD928A BD5637E6 2265621C 3AC57138 911CA27D 11F40AA1 E657EA26 6EBF654C 952A3319 D421A33C E2ECA87E CD7E050C 8A8FE64D B73954EA BF2ED639 BC6A8F74 5B9550EA 4119E796 ...

Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.

Cisco IOS Cookbook, 2nd Edition (2024)

FAQs

How to copy IOS from Cisco switch to TFTP server? ›

How to backup Cisco IOS image to TFTP server
  1. Open Kiwi CatTools.
  2. In the Activities panel, click Add.
  3. Click the Activity tab. ...
  4. Click Options tab. ...
  5. Select Enter commands in enable mode .
  6. Select Save device output to file . ...
  7. Select Overwrite existing capture file .
  8. Select Answer yes to any confirmation prompts .

What are two 2 methods to access Cisco IOS devices? ›

IOS modes
  • user EXEC mode – the default mode for the IOS CLI. ...
  • privileged EXEC Mode – this mode is accessed by typing the enable command from the user EXEC mode. ...
  • global configuration mode – this mode can be accessed by typing the configure terminal command from the privileged EXEC mode.

How many lines of code does Cisco IOS have? ›

But it's more appropriately described as an enterprise networking software stack. At 190 million lines of code from Cisco—and more than 300 million lines of code when you include vendor software development kits (SDKs) and open-source libraries—IOS XE is comparable to stacks from Microsoft or Apple.

What does Ctrl C do in Cisco IOS? ›

Cisco IOS CLI Shortcuts
ShortcutDescription
Ctrl+LReprint the line
Ctrl+RRefresh
TabCommand autocomplete
Ctrl+CExit. Exit from config mode
2 more rows
Feb 6, 2011

How to copy a configuration file to or from a TFTP server? ›

To initiate transfers of configuration files to or from a TFTP server using the CLI, enter one of the following commands: copy startup-config tftp tftp-ip-addr filename - Use this command to upload a copy of the startup configuration file from the Layer 2 Switch or Layer 3 Switch to a TFTP server.

What 3 ways can you copy files and what Cisco IOS commands are used for each? ›

copy
CommandDescription
cdChanges the default directory or file system.
copy xmodem: flash:Copies any file from a source to a destination, use the copy EXEC command.
copy ymodem: flash:Copies any file from a source to a destination, use the copy EXEC command.
deleteDeletes a file on a Flash memory device.
10 more rows

What are the 3 modes in Cisco? ›

- [Instructor] The Cisco Inner Operating System, the IOS has three command line modes, User EXEC mode, or user mode, Privileged EXEC mode, or privileged mode, and then the Global Configuration mode.

What are the 5 command line modes in Cisco IOS? ›

There are five command modes: global configuration mode, interface configuration mode, subinterface configuration mode, router configuration mode, and line configuration mode.

Which of the following are the 3 access methods in IOS? ›

The Cisco IOS defines an interface called the Command Line Interface (CLI), which enables administrators to enter commands into a terminal emulation program. The CLI can be accessed through three methods: the console, Telnet and Secure Shell (SSH).

What is the maximum number of VLAN in cisco? ›

VLANs have the following configuration guidelines and limitations: The maximum number of VLANs per VDC is 4094.

What is the default password for Cisco IOS device? ›

When the login page opens, enter the username and password. The default username is cisco. The default password is cisco.

What is line vty 0 15? ›

Lines 0 15 is vty lines 0, 1, 2 ,3 ,4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 and 15. for example if you were type in global configuration mode, line vty 0 15 you will enter configuration for lines 0-15. I hope this answers your question.

What is Ctrl Z on Cisco? ›

Ctrl-e To the end of the line. Ctrl-l or Ctrl-r Redraw the screen at the prompt. Ctrl-z Return to the EXEC mode from any configuration mode exit command Return to the previous mode or exit from the CLI from Exec mode. Ctrl-t Transpose a character at the cursor with a character to the left of the cursor.

What is Ctrl-Shift-6 in Cisco IOS? ›

It is not that Ctrl-Shift-6 has been decided on by Cisco, rather the particular terminal emulator you are using has that as the shortcut for sending the 'break' terminal escape character. For instance minicom under linux uses Ctrl-X F for the same function. cheers, Seb.

What is Vty in Cisco IOS? ›

The virtual terminal or “VTY” lines are virtual lines that allow connecting to the device using telnet or Secure Shell (SSH).

What port is TFTP? ›

The TFTP server uses well-known port 69. The TFTP server has no user authentication. Any client that can connect to port 69 on the server has access to TFTP.

What is the default path for TFTP? ›

The config files are retrieved and are stored in the file system under the TFTP Root directory, the default location being <OpUtils_Home>/webapps/tftp directory.

How to transfer firmware using TFTP? ›

Configure Tftpd64 to connect to your router:
  1. Launch Tftpd64.
  2. In the Server interfaces field, select your computer's LAN adapter.
  3. In the Host field, enter 192.168. ...
  4. In the Port field, enter 69 (the default port number for TFTP).
  5. Click the … ...
  6. Browse to the firmware file that you downloaded and select it.
Mar 3, 2023

What is the difference between show flash and dir flash? ›

This is used to show the files in your flash. The command show flash is similar to dir flash: but it provides a little more information on the size and type of flash memory in your router. It can be a bit confusing why you would erase one type of filesystem, but format another.

Can you FTP from a Cisco switch? ›

IOS includes a built-in File Transfer Protocol (FTP) client that can be used to transfer images to and from the Cisco device. Unlike TFTP, FTP supports authentication, and you will need to provide a valid FTP server username and password.

What are the two types of configuration files in Cisco devices? ›

Cisco devices store commands in two configuration files:
  • startup configuration.
  • running configuration.

What are the 3 levels of a Cisco switch? ›

By default, Cisco routers have three levels of privilege—zero, user, and privileged. Zero-level access allows only five commands—logout, enable, disable, help, and exit. User level (level 1) provides very limited read-only access to the router, and privileged level (level 15) provides complete control over the router.

What is the syntax for a Cisco IOS command? ›

The general syntax for a command is the command followed by any appropriate keywords and arguments. Some commands include a subset of keywords and arguments that provide additional functionality. The figure shows these parts of a command.

What is AAA on Cisco? ›

The AAA server is a network server that is used for access control. Authentication identifies the user. Authorization implements policies that determine which resources and services an authenticated user may access. Accounting keeps track of time and data resources that are used for billing and analysis.

What are CLI modes? ›

The CLI has two modes: Operational mode—Use this mode to display the current status of the device. In operational mode, you enter commands to monitor and to troubleshoot the network operating system, devices, and network connectivity. Configuration mode—Use this mode to configure the device.

What does Rommon mode mean? ›

The ROM Monitor (ROMMON) is a bootstrap program that initializes the hardware and boots the Cisco IOS XE software when you power on or reload a router. If your router does not find a valid system image to load when it is booting, the system enters the ROMMON mode.

What are the two main types of access? ›

There are two types of access control: physical and logical. Physical access control limits access to campuses, buildings, rooms and physical IT assets. Logical access control limits connections to computer networks, system files and data.

What are the 3 names of control access protocol? ›

Three common controlled access protocol methods are reservation, token passing, and polling.

How many IP addresses can be in a VLAN? ›

For a given VLAN you can assign up to 32 IP addresses. This allows you to combine two or more subnets on the same VLAN, which enables devices in the combined subnets to communicate normally through the network without needing to reconfigure the IP addressing in any of the combined subnets. Default gateway operation.

Why is VLAN limit 4096? ›

Because there are 12 bits in the VLAN ID field of the IEEE 802.1Q header, 4096 is the upper boundary for the number of VLANs available on Catalyst switches.

Can a VLAN have multiple IP ranges? ›

Multiple IP addresses allow multiple subnets within the same VLAN. You can configure IP addresses on all protocol VLANs. However, IP addressing is used only on IPv4 and IPv6 VLANs.

What is Type 9 password in Cisco IOS? ›

Type 9 is designed to make it difficult to crack the password since it requires a significant amount of hardware resources to do so, raising the cost for an adversary to brute force. The passwords are stored as hashes within the configuration file. Cisco and industry recommend Type 9 hashes.

What is Cisco IOS password type 7? ›

Cisco type 7 password

This password type uses Vigenère cipher which is essentially a simple alphabetical substitution encryption. The algorithm is reversible and thus it can be deciphered instantly into a plain text without any need for cracking.

How do I reset my Cisco IOS? ›

Resetting the Cisco IP switch to factory defaults
  1. Reset the switch to factory defaults: Erase the existing configuration: write erase. Reload the switch software: reload. ...
  2. Save the configuration: IP_switch-A-1# copy running-config startup-config.
  3. Reboot the switch and wait for the switch to reload: IP_switch-A-1# reload.

What is TTY vs VTY? ›

TTY is a physically connected one, via the serial/console port. VTY is a virtually connected one, via telnet or SSH. Both will get you to a command line interface.

What line is Vty 0 4? ›

VTY is solely used for inbound connections to the device. These connections are all virtual with no hardware associated with them. The abstract “0 – 4” means that the device can allow 5 simultaneous virtual connections which may be Telnet or SSH.

What is line Vty 5 15 used for? ›

VTY lines are usually used for creating out-of-band management sessions to devices. If a password is not supplied on a vty line, that line cannot be used for managing the device. In some cases administrators may decide to let junior staff to use lines 0 - 4 and senior staff to use lines 5 - 15.

What is the Cisco break key? ›

Press Ctrl + 6 or Ctrl + 6, X. You first need to change or disable the 'Ctrl + [1… 9]' shortcut (see below). Once you do that, use Ctrl + 6 or Ctrl + 6, X to send break sequences.

What is Ctrl Shift 6? ›

Ctrl-Shift-6

All-purpose break sequence. Use to abort DNS lookups, traceroutes, pings.

What is command V used for? ›

Command-V: Paste the contents of the Clipboard into the current document or app. This also works for files in the Finder.

What does Ctrl Shift +H do? ›

The Ctrl+Shift+H keyboard shortcut is used to open the Library window in Firefox.

What does Ctrl E work for? ›

What is Ctrl+E? Ctrl+E is a keyboard shortcut that centers the contents of a selected cell. This shortcut is particularly useful when you're working with large amounts of data and need to quickly format cells to make them more readable.

What does Ctrl Shift +T do? ›

Ctrl+Shift+T

Opens the tab in a new window. Opens the tab in the existing window. Returns the tab to its original position. Switches to the tab at the specified position number on the tab strip.

How to disable VTP in Cisco IOS? ›

To disable VTP, enter the set vtp domain domain name mode transparent command. This disables VTP from the domain, but does not remove the domain from the switch. Use the clear config all command to remove the domain from the switch. Be careful when you use the clear config all command.

How to break Telnet in Cisco IOS? ›

Usage Guidelines
TaskEscape Sequence*
BreakCtrl-^ b
Interrupt Process (IP)Ctrl-^ c
Erase Character (EC)Ctrl-^ h
Abort Output (AO)Ctrl-^ o
2 more rows

How to remove VLAN interface in Cisco IOS? ›

Removing VLANs from a physical port
  1. From global configuration mode, enter interface Ethernet configuration mode. device(config)# interface ethernet 1/1/1.
  2. Enter the vlan-config remove all command to remove all VLANs from the Ethernet port.
Aug 17, 2021

What is the command to copy the IOS image to a TFTP server? ›

Above we can see the new IOS image. The copy command also allows you to enter parameters like the IP address of the TFTP server and filenames. Here is an example: R1#copy tftp://192.168.1.200/c2800nm-adventerprisek9-mz.151-4.M12a.bin flash: Destination filename [c2800nm-adventerprisek9-mz.

Which command is used to backup IOS file to a TFTP server? ›

IOS configurations are usually copied to a TFTP server using the copy command. You can backup both the startup configuration and the running configuration of your device. The copy command accepts two parameters: the first parameter is the from location, and the second it the to location.

How to update Cisco IOS via TFTP? ›

Steps to upgrade firmware in Cisco IOS devices
  1. Transfer the file from the TFTP server to the flash memory of the switch. ...
  2. Check if the file has been transferred successfully to the router by executing the commands given below:
  3. Configure the switch to load the new IOS version. ...
  4. Instruct the switch to load the new file.

How to copy IOS from USB to flash Cisco? ›

How to: Upgrade Cisco IOS with a USB Drive
  1. Step 1: Make sure the IOS is on the Cisco USB Drive. ...
  2. Step 2: Insert drive in the USB port on the back of the switch. ...
  3. Step 3: Copy the IOS into Flash: on the switch. ...
  4. Step 4: Tell switch to boot to the new IOS - and reboot. ...
  5. Step 5: Switch boots to new IOS - Remove Old IOS from Flash.

How do I get files from TFTP server? ›

Procedure
  1. Access a root prompt on the UNIX host.
  2. Make sure that you are not in the /tftpboot directory.
  3. Enter this command: tftp ipaddress. where ipaddress is the IP address of the UNIX host. ...
  4. Enter this command at the TFTP prompt: tftp > get tftp_file_name. ...
  5. Enter this command at the TFTP prompt to exit TFTP: tftp> quit.

How to copy IOS from FTP? ›

In order to use FTP transfers the following steps are required:
  1. As we mentioned before you have to provide the username and password that were already created on the FTP server. ...
  2. Use the copy ftp flash command and follow the wizard.
  3. Configure the switch to load the new IOS version.

What ports does TFTP transfer use? ›

The TFTP server uses well-known port 69. The TFTP server has no user authentication. Any client that can connect to port 69 on the server has access to TFTP.

How do I copy a TFTP config to a Cisco switch? ›

To initiate transfers of configuration files to or from a TFTP server using the CLI, enter one of the following commands: copy startup-config tftp tftp-ip-addr filename - Use this command to upload a copy of the startup configuration file from the Layer 2 Switch or Layer 3 Switch to a TFTP server.

Is TFTP used in Cisco routing? ›

A TFTP server is a necessary tool that every administrator should use to periodically back up their Cisco router and switch configuration files and IOS files.

Does TFTP use TCP to transfer files? ›

As mentioned, TFTP uses UDP as a transport, as opposed to TCP which FTP uses, and works on port 69, you can clearly see that in the cool 3D diagram on the left. Port 69 is the default port for TFTP, but if you like, you can modify the settings on your TFTP server so it runs on a different port.

How do I extract IOS backup files? ›

Here's how to restore an iPhone backup from your computer...
  1. Open iTunes (or Finder on macOS Catalina or higher) on the PC or Mac that you backed up your iPhone to.
  2. Connect your iPhone with your USB cable.
  3. Select your device.
  4. Click 'Restore Backup...'
  5. Pick the backup you'd like to restore, and click 'Restore'.
Feb 6, 2023

What is the default path for TFTP server? ›

The config files are retrieved and are stored in the file system under the TFTP Root directory, the default location being <OpUtils_Home>/webapps/tftp directory. TFTP Server tool can be used to view the contents of the TFTP Root directory.

How to upgrade Cisco IOS from serial port? ›

Step-By-Step
  1. Connect PC to the Switch using the console cable;
  2. Connect the switch to the power and boot it up;
  3. Create a new connection in HyperTerminal and set the transfer rate to 9600;
  4. Issue the following commands in order to get the 2960X in rommon mode:
  5. When the switch reloads, it will be in rommon mode;
Jan 17, 2019

Can I upgrade Cisco IOS remotely? ›

You will use the copy command to do the remote upgrade. You will telnet to the router, get into enable mode, and issue the copy command which will do the upgrade.

Top Articles
Latest Posts
Article information

Author: Kelle Weber

Last Updated:

Views: 6448

Rating: 4.2 / 5 (73 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Kelle Weber

Birthday: 2000-08-05

Address: 6796 Juan Square, Markfort, MN 58988

Phone: +8215934114615

Job: Hospitality Director

Hobby: tabletop games, Foreign language learning, Leather crafting, Horseback riding, Swimming, Knapping, Handball

Introduction: My name is Kelle Weber, I am a magnificent, enchanting, fair, joyous, light, determined, joyous person who loves writing and wants to share my knowledge and understanding with you.