A Beginners Guide to Building a RAG App Using Open Source Milvus
Copy and save a configuration file from a router or switch using a laptop
1. Copy and Save a Configuration File From a Router or Switch Using a Laptop
In the following section, we will show an example how to copy and save a
configuration file from a Cisco 7200 router and a Catalyst switch. Cisco Catalyst
switch family supports two OS versions: the Cat OS and Native IOS. The differences
between these two IOS versions are that
CatOS: is the image that runs on the Supervisor Switch Processor and handles
all of the Layer 2 (L2) switch functions. It is also known as the Hybrid image
(Hybrid OS) when used in conjunction with IOS software image on the
Multilayer Switch Feature Card (MSFC). We refer to the image running on the
Supervisor Switch Processor as CatOS. CatOS is supported on the Catalyst
4000 and 6000 product families
Native IOS: is the single Cisco IOS image that runs on the Supervisor Switch
Processor and the MSFC. In other words, the Supervisor and the MSFC both
run a single bundled Cisco IOS Image. The Native IOS is also supported on the
Catalyst 4000 and 6000 products.
Login credentials including user name, console password and enable password are
required to access router or switch's configuration. If the login credentials are known,
user can directly perform the copy and save device's configuration to a laptop as
described in the Section 2.3.2. If any of these credentials is not available, the
password recovery procedure must be performed prior to log in the device. Section
12 covers Cisco device password recovery procedure in detail. Please refer to Section
12 for password recovery procedure.
2.3.1 Start a HyperTerminal session and establish console connection to a Cisco
device (such as router and switch)
This example shows how to copy the configuration from a router and a switch using
the HyperTerminal tool on a Microsoft Windows laptop and save the configuration as
a text file.
Step1. Connect a RJ-45 to DB-9 adapter into the PC/Laptop (Serial port) and connect
the RJ-45 Roll-Over cable (black) into the RJ-45 to DB-9 adapter.
Note: Use a USB to Serial port adapter for console
port connection if the PC does not have built-in
serial port.
Step2. Connect the other end of the RJ-45 Roll-Over cable into the device Console
port. Figure 2-3a shows one example on how to "Connect a Laptop to Router console
port with a RJ-45 to DB-9 adapter" and Figure 2-3b show one example on how to
"Connect a Laptop to Router console port with a USB to Serial port adapter".
Figure 2-3a: Connecting Laptop to Router console port
Step 5 On the Connection Description screen, for Name type "Cisco" and select an
icon for the definition, and click OK as shown in Figure 2-3d. The Connect To dialog
appears as shown in Figure 2-3e.
2. Figure 2-3e: HyperTerminal Connect To dialog
Step6. On the Connect To dialog, select your primary COM port (COM2 in this
example) for the Connect using: field, and click OK. (The Country/region:, Area
code: and Phone number: fields are not used.) The COMn Properties dialog appears
as shown in Figure 2-3f.
Figure 2-3f: HyperTerminal COMn Properties dialog
Step7. On the COMn Properties dialog, make the following selections, then click OK:
Bits per sec: 9600
3. Data bits: 8
Parity: none
Stop bits: 1
Flow control: none
Step8. To prove you have a valid connection, hit the enter key and you should see
the device prompt that indicates the PC is now communicating with the device.
Figure 2-3g shows an example of a Cisco 7206 router console prompt that
requires user login.
Figure 2-3h shows an example of a Cisco Catalyst Native IOS switch console
prompt.
Figure 2-3i shows an example of a Cisco Catalyst CatOS (Hybrid OS) switch
console prompt.
Figure 2-3g: Cisco 7206 router console prompt
Figure 2-3h: Catalyst switch Native IOS console prompt
Figure 2-3i: Catalyst switch CATOS console prompt
4. 2.3.2 Capture Configuration from a Router or a Switch and Save the Configuration
to a Laptop
Step1. At the device console prompt, type enable, and provide the password when
prompted. Depending on the device being worked on, the enable mode prompt is
changed to one of the following:
For a router device: the prompt changes to Router#, indicating the router is
now in privileged mode.
For a Catalyst Native IOS switch: the prompt changes to Switch#, indicating
the switch is now in privileged mode.
For a Catalyst CatOS switch: the prompt changes to Console> (enable),
indicating the switch is now in privileged mode.
Step2. At the device enable mode prompt, set terminal length to 0 to force the
device to return the entire command output response at once, rather than one
screen at a time.
For a router or a Catalyst Native IOS switch: type terminal length 0 to set
terminal length to 0. Figure 2-3j shows an example for a 7200 router.
For a Catalyst CatOS switch: type set length 0 to set terminal length to
0. Figure 2-3k shows an example for a CatOS switch.
Note: This is crucial to capturing this file without
extraneous --more-- prompts generated when the
router responds a screen at a time.
Figure 2-3j: Set terminal length to 0 on router
5. Figure 2-3k: Set terminal length to 0 on a CatOS switch
Step3. On the HyperTerminal menu, select Transfer > Capture Text.... The Capture
Text window appears. See Figure 2-3l for an example.
Figure 2-3l: Capture Hyper Terminal Command output
6. Step4. Name this file "config.txt". Optionally browse to an alternate directory in
which to save the file (Figure 2-3m), or simply accept the default location.
Click Start to dismiss the Capture Text window and then begin the capture.
Figure 2-3m: Text Capture Window
Step5. At the device enable mode prompt, type one of the following command
options to start capturing the configuration, allow time for the device to response.
For a router or a Catalyst Native IOS switch: type show start to display the
configuration. Figure 2-3n shows an example for a 7206 router.
For a Catalyst CatOS switch: type show config to display the
configuration. Figure 2-3o shows an example for a CatOS switch.
Figure 2-3n: show start command
7. Figure 2-3o: show config command
Step6. After the device completes displaying the configuration, on the HyperTerminal
menu, select Transfer > Capture Text > Stop. See Figure 2-3p for an example.
Figure 2-3p: Stop Text Capture
8. Step7. Reset the device terminal display length to its default value (24 lines per
screen).
For a router or a Catalyst Native IOS switch: type terminal length 24 to set
terminal length to 24. Figure 2-3q shows an example for a 7206 router.
For a Catalyst CatOS switch: type set length 24 to set terminal length to
24. Figure 2-3r shows an example for a CatOS switch.
Figure 2-3q: Reset the Terminal Length to 24
Figure 2-3r: Reset the CatOS Terminal Length to 24
Step8. Verify the saved config.txt file with Windows' Notepad. Figure 2-3s shows a
7206 router config.txt file just captured.
Figure 2-3s: config.txt captured configuration file
10. Step3. On the Windows Start menu, select Run. The Run dialog appears as shown
in Figure 2-3c.
Figure 2-3c: The Windows Run Dialog
Step4. In the Open: field, type hypertrm.exe, and click OK.The HyperTerminal
appears and open to the Connection Description dialog as shown in Figure 2-3d.
Figure 2-3d: HyperTerminal Connection Description dialog
11. More Related Networking Tutorials:
Cisco Router with Cisco ASA for Internet Access
Site to Site VPN between ASA Firewall & Cisco Router
How to Use OSPF Point-to-Multi-Point on Ethernet?
DHCP Relay on the Nexus7000/NXOS Vs. IP Helper on the 6500/IoS
How to Configure site-to-site IPSEC VPN on Cisco ASA using IKEv2?