Copy and save a configuration file from a router or switch using a laptop
Copy and Save a Configuration File From a Router or Switch Using a LaptopIn the following section, we will show an example how to copy and save aconfiguration file from a Cisco 7200 router and a Catalyst switch. Cisco Catalystswitch family supports two OS versions: the Cat OS and Native IOS. The differencesbetween these two IOS versions are thatCatOS: is the image that runs on the Supervisor Switch Processor and handlesall 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 theMultilayer Switch Feature Card (MSFC). We refer to the image running on theSupervisor Switch Processor as CatOS. CatOS is supported on the Catalyst4000 and 6000 product familiesNative IOS: is the single Cisco IOS image that runs on the Supervisor SwitchProcessor and the MSFC. In other words, the Supervisor and the MSFC bothrun a single bundled Cisco IOS Image. The Native IOS is also supported on theCatalyst 4000 and 6000 products.Login credentials including user name, console password and enable password arerequired to access router or switchs configuration. If the login credentials are known,user can directly perform the copy and save devices configuration to a laptop asdescribed in the Section 2.3.2. If any of these credentials is not available, thepassword recovery procedure must be performed prior to log in the device. Section12 covers Cisco device password recovery procedure in detail. Please refer to Section12 for password recovery procedure.2.3.1 Start a HyperTerminal session and establish console connection to a Ciscodevice (such as router and switch)This example shows how to copy the configuration from a router and a switch usingthe HyperTerminal tool on a Microsoft Windows laptop and save the configuration asa text file.Step1. Connect a RJ-45 to DB-9 adapter into the PC/Laptop (Serial port) and connectthe RJ-45 Roll-Over cable (black) into the RJ-45 to DB-9 adapter.Note: Use a USB to Serial port adapter for consoleport connection if the PC does not have built-inserial port.Step2. Connect the other end of the RJ-45 Roll-Over cable into the device Consoleport. Figure 2-3a shows one example on how to "Connect a Laptop to Router consoleport 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 portStep 5 On the Connection Description screen, for Name type "Cisco" and select anicon for the definition, and click OK as shown in Figure 2-3d. The Connect To dialogappears as shown in Figure 2-3e.
Figure 2-3e: HyperTerminal Connect To dialogStep6. On the Connect To dialog, select your primary COM port (COM2 in thisexample) for the Connect using: field, and click OK. (The Country/region:, Areacode: and Phone number: fields are not used.) The COMn Properties dialog appearsas shown in Figure 2-3f.Figure 2-3f: HyperTerminal COMn Properties dialogStep7. On the COMn Properties dialog, make the following selections, then click OK:Bits per sec: 9600
Data bits: 8Parity: noneStop bits: 1Flow control: noneStep8. To prove you have a valid connection, hit the enter key and you should seethe 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 thatrequires user login.Figure 2-3h shows an example of a Cisco Catalyst Native IOS switch consoleprompt.Figure 2-3i shows an example of a Cisco Catalyst CatOS (Hybrid OS) switchconsole prompt.Figure 2-3g: Cisco 7206 router console promptFigure 2-3h: Catalyst switch Native IOS console promptFigure 2-3i: Catalyst switch CATOS console prompt
2.3.2 Capture Configuration from a Router or a Switch and Save the Configurationto a LaptopStep1. At the device console prompt, type enable, and provide the password whenprompted. Depending on the device being worked on, the enable mode prompt ischanged to one of the following:For a router device: the prompt changes to Router#, indicating the router isnow in privileged mode.For a Catalyst Native IOS switch: the prompt changes to Switch#, indicatingthe 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 thedevice to return the entire command output response at once, rather than onescreen at a time.For a router or a Catalyst Native IOS switch: type terminal length 0 to setterminal 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 to0. Figure 2-3k shows an example for a CatOS switch.Note: This is crucial to capturing this file withoutextraneous --more-- prompts generated when therouter responds a screen at a time.Figure 2-3j: Set terminal length to 0 on router
Figure 2-3k: Set terminal length to 0 on a CatOS switchStep3. On the HyperTerminal menu, select Transfer > Capture Text.... The CaptureText window appears. See Figure 2-3l for an example.Figure 2-3l: Capture Hyper Terminal Command output
Step4. Name this file "config.txt". Optionally browse to an alternate directory inwhich 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 WindowStep5. At the device enable mode prompt, type one of the following commandoptions 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 theconfiguration. Figure 2-3n shows an example for a 7206 router.For a Catalyst CatOS switch: type show config to display theconfiguration. Figure 2-3o shows an example for a CatOS switch.Figure 2-3n: show start command
Figure 2-3o: show config commandStep6. After the device completes displaying the configuration, on the HyperTerminalmenu, select Transfer > Capture Text > Stop. See Figure 2-3p for an example.Figure 2-3p: Stop Text Capture
Step7. Reset the device terminal display length to its default value (24 lines perscreen).For a router or a Catalyst Native IOS switch: type terminal length 24 to setterminal 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 to24. Figure 2-3r shows an example for a CatOS switch.Figure 2-3q: Reset the Terminal Length to 24Figure 2-3r: Reset the CatOS Terminal Length to 24Step8. Verify the saved config.txt file with Windows Notepad. Figure 2-3s shows a7206 router config.txt file just captured.Figure 2-3s: config.txt captured configuration file
Figure 2-3b: Connecting Laptop to Router console port with USB to Serial adapter
Step3. On the Windows Start menu, select Run. The Run dialog appears as shownin Figure 2-3c.Figure 2-3c: The Windows Run DialogStep4. In the Open: field, type hypertrm.exe, and click OK.The HyperTerminalappears and open to the Connection Description dialog as shown in Figure 2-3d.Figure 2-3d: HyperTerminal Connection Description dialog
More Related Networking Tutorials:Cisco Router with Cisco ASA for Internet AccessSite to Site VPN between ASA Firewall & Cisco RouterHow to Use OSPF Point-to-Multi-Point on Ethernet?DHCP Relay on the Nexus7000/NXOS Vs. IP Helper on the 6500/IoSHow to Configure site-to-site IPSEC VPN on Cisco ASA using IKEv2?