cns-lab-4

Upload: hemin-essa

Post on 14-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 CNs-Lab-4

    1/4

    05 January 2011 Page 1

    LAB SHEET (04)

    Before turn on how to manage your configuration, we should know three show Commands thatgives you a good scope of what really is happening.

    1. Show IP interface brief. If someone is complaining about his port is not access or he has no internet connection,

    then you type this command and find out what is the problem?

    Second thing you find out in the Show IP interface brief, is the Status and the Protocol, if theStatus is Down then the Cable is unplugged or it s a Bad Cable need to be changed, also for theProtocol if it s down means that the Protocol type communicating with the Switch is changed,like someone had changed the Encapsulation Type.

    2. Show Interface.Suppose that you found in the first Command that everything is fine and UP on the

    Status and the protocol, then we will show the details on that interface.

    3. Show Run.This command shows you what actually the configuration of your Switches is, so if

    there is something wrong in the configuration so you mistyped it so it s better to be fixed, asshow run is the easiest way to figure out the problem were it is.

    Management and Security: File Management

    It s good to take a backup of your configuration and your IOS File, in this LAB Sheet we willsee how we may make a Backup files, Copying to and from your Router.

    Understanding the copy command

    Before starting with the copy command, let s see the memory components of the Router, andthe TFTP Server.

    - The first one is RAM, the RAM existing in the Cisco Switch or Cisco Router, it s justas the RAM on your PC.

    In addition, the benefit of these RAMs is that it stores the Running Config and thePackets coming into the Router and stores it permanently until it look at the Table anddecide which interface to get it out.

    - The Second Memory is NVRAM (Non Volatile RAM) and that is which store in it theRunning Config, where when you type it stores the configured steps in the NVRAM, NVRAM is very small because it onlystoring the Startup Config file, you can notice your memory size using in privileged mode

  • 7/27/2019 CNs-Lab-4

    2/4

    05 January 2011 Page 2

    - The last one is the TFTP (Trivial File Transfer Protocol), which is a Server that storesfiles, the protocol that is used to transfer the file to the TFTP is UDP port 69, that incase you have a firewall and need to pass it.So TFTP is used to copy from and to the IOS image file in the Router.

    TFTP is Free if you go to Google and type in the Search bar TFTP32.

    After installation of TFTP and have TFTP server, so If you want to make a backup for your Configuration to the TFTP server, write the following command:

    R1#copy running-config tftpAddress or name of remote host []?

    It asks you the IP of TFTP server interface, you can find that IP address from the program yousetup which it has server interface IP. Then you can save the config file in the TFTP server as.txt or .doc, thus you can view the file in the windows system.

    Youcould

    backup from memory to TFTP server, but you should know the name of the file before.

    For example:By using the following command it shows the IOS name:

    R1#show versionSystem Image file is flash:c2801-adventerprisek9-mz.124-4.XC.bin

    So by taking this File name Copy the IOS Name and Paste it in the following lets see

  • 7/27/2019 CNs-Lab-4

    3/4

    05 January 2011 Page 3

    how:

    R1#copy flash:c2801-adventerprisek9-mz.124-4.XC.bin tftp://10.238.212.13/ c2801-adventerprisek9-mz.124-4.XC.bin

    This command above is described as follow, first copy the IOS File that is named(flash:c2801-adventerprisek9-mz.124-4.XC.bin) into TFTP its address is 10.238.212.13, andthe file name to be saved in the TFTP is the same file name with the same extension on theflash which is (c2801-adventerprisek9-mz.124-4.XC.bin).

    Note:When you copy anything to RAM, the IOS MERGE them, meaning if you have a backupConfig file on the TFTP server, and you copied the Config file from TFTP to the RAM, whathappens is that the Config file from the TFTP will not replace the Config fileon RAM but it will merge them mean the two of them will be in one Config file with both

    features and configuration.As example if you have setup your FE0/0 in RAM by IP address 192.168.2.1, and in theConfig File in TFTP its configured as 192.168.3.1, in here the one that is in the TFTP willreplace that in the RAM by 192.168.3.1, because when there is a conflict between theConfiguration in RAM and TFTP Config file, the Config which comes from the TFTP fileReplace the one in RAM if they both exist.

    The Disadvantage thing is if you configured a NAT on the Router and you don t need itanymore and the NAT Config is not present in the Configuration file at TFTP, and you copiedthe Config TFTP file to RAM, the NAT Configuration will still exist in RAM, cause there is noconflict or nothing overwrite it or replace it from the TFTP File Config to RAM file Config.

    So what you do if you want the TFTP config file only works on RAM and no previousConfig exist in RAM, just the New Config needed, well this Is done by copying the TFTPRunning Config to the NVRAM (Startup Config.), cause in this Case the Configuration file isreplaced in NVRAM by the one comes from the TFTP rather than Merging it.

    Ok now we need to copy the Configuration file from NVRAM to RAM, what we will do, is toREBOOT the Router, because copying the Config file from NVRAM to RAM will merge itand it will not be replaced.So we will copy the Config file from TFTP to NVRAM as following:

    R1#copy tftp startup-configAddress or name of remote host []?10.238.212.13Source filename []? r2-config.txtDestination filename [startup-config]?

    Accessing tftp://192.168.0.1/r2-config.txt.......

    As you might see in the fourth line it asks for the Destination Filename what should be itsname, so by Default you should leave the name Startup-Config cause that the file name therouter is looking at it when it reboots, so don t rename it.

  • 7/27/2019 CNs-Lab-4

    4/4

    05 January 2011 Page 4

    If you want to upgrade your IOS, where a lot of times people delete their IOS from the FlashMemory and download a new IOS from Cisco sites and place it in the Flash memory.But the safe way to do this is actually to allow your router to boot-up from the TFTP server rather than boot-up from Flash Memory, and keep the old IOS in the flash memory as it is.So we download the New version of IOS in to the TFTP server, and make the router to boot upand take the IOS file from TFTP server rather than Flash, so to do that , do the following:

    Router(config)#boot system ?WORD TFTP filename or URLflash Boot from flash memory

    As you might see it says where you want to boot from, so we will boot from the TFTP server with the IOS Filename as following:

    Router(config)#boot system tftp://10.238.212.13/ c2801-adventerprisek9-mz.124-4.XC.bin

    At this point the next time the router boot it will boot from the TFTP server, with thementioned IOS File name, but if it didn t find that file on TFTP server it will revert by defaultto the Flash memory and load the IOS from the Flash Memory.Understanding the Cisco Discovery Protocol (CDP):