Router Basics (1)

Embed Size (px)

DESCRIPTION

rter

Citation preview

  • 1OVERVIEW - Router Config Tasks :

    To configure your router or access server, you

    must perform several tasks. Initially, you must

    determine the following:-

    Which network protocols you are supporting

    The addressing plan for each network protocol

    Which WAN protocols you will run on each

    interface

    External Configuration Sources

    ROUTER

    TFTP SERVER

    VIRTUALTERMINAL

    NETWORKMANAGEMENT

    STATION

    INTERFACES

    CONSOLEPORT

    AUXILARYPORT

    Configuration Information can from many Sources

  • 2Internal Configuration Components

    ROMFLASHNVRAM

    INTERFACEConsoleAuxiliary

    DRAM

    Cisco routers can initialize the system (boot) in four

    ways:

    Netboot :Routers can boot from a server using the

    TFTP.

    Flash memory: Routers can boot from Flash

    memory, a nonvolatile storage medium that can be

    electrically erased and reprogrammed.

    ROM : Routers can boot a system from built-in ROM.

    PC Flash memory card: Routers can boot from a

    removable Flash memory card.

  • 3FLASH MEMORY :

    Depending on the platform, Flash memory is available

    in the following forms:

    1. Internal Flash memory : often contains the system

    image. Some platforms have two or more banks of

    Flash memory on one single in-line memory modules

    (SIMM). If the SIMM has two banks, it is sometimes

    referred to as dual-bank Flash memory. The banks

    can be partitioned into separate logical devices.

    FLASH MEMORY (Cont..)

    2. Bootflash

    Bootflash often contains the boot image.

    Bootflash sometimes contains the ROM Monitor.

    3. Flash memory PC cards or PCMCIA cardsA Flash memory card that is inserted in to a PCMCIA slot. This card is used to store system images, boot images, and configuration files.The following platforms contains PCMCIA slots:1600 - one PCMCIA slot 3600 - two PCMCIA slots7200 - NPE contains 2 slots

  • 4FLASH MEMORY (Cont..)Write ProtectionFlash memory provides write protection against

    accidental erasing or reprogramming.

    Some platforms have a write-protect jumper which

    can be removed to prevent reprogramming of Flash

    memory. You must install the jumper when

    programming is required. Some platforms have write

    protect switched on Flash memory cards that you

    can use to protect data. You must set the switch to

    unprotected to write data to the Flash memory card.

    NVRAM

    Nonvolatile random-access memory (NVRAM) stores

    the following information:

    1. Startup configuration file for every platform.

    2. The software configuration register, which is used

    to determine which image to use when booting

    the router.

  • 5EPROM / ROM

    It sometimes contains the following :

    ROM Monitor, which provides a user interface when

    the router cannot find a valid image.

    The boot loader/helper software (also called the

    boot image), which helps the router boot when it

    cannot find a valid Cisco IOS image in Flash

    memory.

    DRAM :Dynamic random-access memory contains two types

    of memory:

    1. Primary, main, or processor memory, which is

    reserved for the CPU to execute Cisco IOS

    software and to hold the running configuration

    and routing tables.

    2. Shared, packet, or I/O memory, which buffers

    data transmitted or received by the router's

    network interfaces.

  • 6Router Modes

    User EXEC ModeLimited Examination of router and remote access

    Router>

    Privileged EXEC ModeDetailed examination of Router, Debugging and testing.

    File manipulation, Remote access.Router#

    ROM Monitor ModeUsed if the operating system dos not exist in Flash or

    the boot sequence was interrupted during startup> or romon>

    Router Modes (Cont..)

    Setup Modeprompted dialog used to establish an initial configuration

    RXBoot modeBoot helper Software which helps the router boot whenit cannot find a valid cisco IOS image in flash memory.

    Router

    Global Configuration ModeRouter(config)#

    Other Configuration ModeRouter(config - mode) #

  • 7Initialising a Router

    POST

    Check conf reg

    ReadNVRAM

    Load from flash

    Load IOS

    Run RXBootimage

    Load IOSsubset

    Load from TFTP Server

    Enter ROMMonitor Mode

    Load FromROM

    Load IOSSubset

    ROUTER STATUS COMMANDS :

    IOS version in DRAM Router# show version

    Programs loaded in DRAM Router# sh processes CPUsh protocols

    Dynamic Configurationinformation Router# sh running-config

    Routing table in DRAM Router# sh ip route

    Processor and I/O memory usage Router# sh mem

    back-up configurationfile in NVRAM Router# sh startup-config

  • 8ROUTER STATUS COMMANDS (Cont..)

    Operating Systems Router# sh flash

    interfaces Router# sh interfaces

    Stack usage ofprocesses Router# sh stacks

    Password recovery procedure :

    Attach a terminal or PC with terminal emulation to the console port of the router. Use the following terminal settings:

    9600 baud rate No parity 8 data bits 1 stop bit No flow control

    Type show version and record the setting of the configuration register; it is usually 0x2102 or 0x102.

    Using the power switch, turn off the router and then turn it back on.

  • 9Password recovery (cont..)Press Break sequence on the terminal keyboard within 60

    seconds of the power-up to put the router into ROMMON.

    Type confreg 0x2142 at the rommon 1> prompt to boot from

    Flash without loading the configuration. Type reset at the

    rommon 2> prompt. The router reboots but ignores its saved

    configuration. Type no after each setup question or press

    Ctrl-C to skip the initial setup procedure

    Type enable at the Router> prompt.

    You'll be in enable mode and see the Router# prompt.

    Type enable secret to change the enable

    secret password.

    Type config-register 0x2102, or the value you recorded in

    show version .

    Press Ctrl-z or end to leave the configuration mode.

    Type write memory or copy running-config startup-config

    to commit the changes.

    Break Sequence

    Hyperterm Win 2000 Ctrl-Break

    Hyperterm Win98/95 Ctrl-F6-Break

    Hyperterm Win NT Break-F5

    Shift-F5

  • 10

    Break Sequence(Cont..)

    VT100 Emulation F16

    Minicom Linux Ctrl-a f

    PCPLUS DOS Alt-b

    Enabling TFTP server on Linux:Step 1 Log in as root.

    Step 2 If are running Linux with " inetd," add or

    uncomment the following line in your /etc/inetd.conf file:tftp dgram udp wait root /usr/sbin/tcpd in.tftpd

    If you are running Linux with "xinetd," Edit the /etc/xinetd.d/tftpfile as follows:

    a. Change the line "disable = yes" to "disable = no."

    b. Change the line "user = nobody" to "user = root.

    c. If you want to specify a different TFTP directory, replace

    "/tftpboot" in the line "server_args = -s /tftpboot" with the name

    of your directory.

  • 11

    Step 3 Enter the following command:/etc/init.d/xinetd restart

    Installing TFTP Server for Windows

    Download the TFTP server for any version of Windows from

    http://ftp.ren.nic.in/pub/intel/Windows98/tftp or search tftp

    at http://ftp.ren.nic.in

    The file TFTPServer1-1-980730.exe is a self-extracting

    archive. Once the file is stored on your Windows system,

    double-click it to start the setup program. Then follow the

    prompts that appear to install the server on your system.

    FLASH File System:

    The Flash file system consists of two Flash devices

    on which you can store files:

    bootflash: onboard Flash memory

    slot0: Flash PC card in the PCMCIA slot (or flash: Flash memory)1. Router#show flash

    System flash directory: File Length Name/status

    1 8407884 c2600-io3s56i-mz.121-6

    [8407948 bytes used, 8369268 available, 16777216 total]

    16384K bytes of processor board System flash (Read/Write)

  • 12

    2. Display a list of deleted files on a Flash device.

    Console> (enable) dir deleted

    -#- ED --type-- --crc--- -seek-- nlen -length- ---date/time- name

    1 .D ffffffff 81a027ca 41bdc 22 7004 Apr 01 1998 15:27:45

    5002.config. 4.1.98.cfg

    3. Deleting file in flash

    Console>(enable) del C7200-js-mz.120-4.bin

    4. Formatting flash

    Console>(enable) format flash

    format slot0

    IOS Installation and Upgrade procedure :Install a TFTP Server

    Download the Cisco IOS Software image into your

    workstation or PC where TFTP server is running.Store the

    IOS image in appropriate directory. C:\tftp incase windows

    and /tftpboot in case of Linux.

    (You need to satisfy both the DRAM and the Flash

    requirements to be able to use the software you choose.

    If you do not meet the requirements, you can either add more

    Flash or more DRAM in the router, or choose another Cisco

    IOS Software release).

  • 13

    Back up the existing IOS image stored in Flash.

    Router#copy flash tftp

    Source filename []? C7200-js-mz.120-4.bin

    Address or name of remote host []?164.100.9.31

    Destination filename [C7200-js-mz.120-4.bin]?

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    !!!!!!!!!!!!!!!!!!!!!!!!

    3802992 bytes copied in 27.276 secs (140851 bytes/sec)

    Copy the new software image from the TFTP server to the

    router server using the procedure below:

    Router# copy tftp flash

    When prompted, enter the IP address of the TFTP server as

    Address or name of remote

    host [255.255.255.255]? 164.100.21.131

    Source file name? c2600-io3s56i-mz.121-6Destination file name? c2600-io3s56i-mz.121-6

    Erase flash device before writing? [confirm] yes/noRouter#reload*Mar 1 00:30:49.972: %SYS-5-CONFIG_I: Configured from console by consoleSystem configuration has been modified. Save? [yes/no]: no Proceed with reload? [confirm] yes

  • 14

    Common Interface types supported on CISCO routers

    Asynchronous serial

    Dialer

    Ethernet

    High-Speed Serial Interface (HSSI)

    ISDN Basic Rate Interface (BRI)

    ISDN Primary Rate Interface (PRI)

    Serial interface (Low Speed)

    Synchronous serial

    ETHERNET INTERFACE CONFIGURATION :For example, to configure Ethernet interface 1 with the IP

    address 192.168.52.46 using a subnet mask of

    255.255.255.0, enter the following commands:

    C400# conf t

    C4000(config)#interface e1

    description "MGMT LAN via Cat5k"C4000(config-if)#ip address 192.168.52.46 255.255.255.0

    C4000(config-if)# no shutdown

    C4000(config-if)# cntl Z

    C400# wr memory / wr ter

    wr memory - changes both startup and running config

    wr ter - changes only running config

  • 15

    SERIAL INTERFACE CONFIGURATION :

    The wan link will be connected to the serial interface.Configure the serial interface as below

    Router#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface serial 0Router(config-if)#ip address 10.1.1.5

    255.255.255.252description VSAT WAN LINKRouter(config-if)#no shutdownRouter(config-if)#cntl ZEouter# wr m

    SSerial interface configuration (cont..)

    encapsulationRouter# conf t

    Router(Config)# int serial0

    Router(Config-if)# encapsulation ppp / hdlc /sdlc

    hdlc - serial hdlc synchronous(cisco)

    ppp - point-to-point protocol

    sdlc - SDLC

    Router(Config-if)# bandwidth

  • 16

    Other Vital configurations :

    hostname NICnet>!no logging console (logging console 3)no logging monitor (logging monitor 3)enable secret rgb123enable password cisco98!no ip fingerno ip http serverno ip bootp serverip domain-name nic.inip name-server 164.100.3.1ip name-server 164.100.10.18

    line vty 0 4password zigma2klogin!banner login ^C*******************************************

    This is NIC - HQ New Delhi*******************************************^Cbanner motd ^C==========================================Un-authorised access is prohibited==========================================^C

  • 17

    Static IP Routing :If dynamic default information is not being passed to the

    router, candidates for the default route may be specified with

    the ip default-network subcommand. In this usage, ip

    default-network takes a nonconnected network as an

    argument. If this network appears in the routing table from any

    source (dynamic or static), then it is flagged as a candidate

    default route and is subject to being chosen as the default

    route for the router. Multiple ip default-network commands

    may be given. All candidate default routes, both static

    (that is, flagged by ip default-network) and dynamic,

    appear in the routing table preceded by an asterisk.

    In the following example, a static route to network 10.0.0.0 is

    defined as the static default route.

    ip route 10.0.0.0 131.108.3.4ip default-network 10.0.0.0

    If the following global configuration command was issued on a

    router not connected to network 129.140.0.0, then the router

    might choose the path to that network as a default route when

    the network appeared in the routing table.

    ip default-network 129.140.0.0

  • 18

    Ip default-gateway 164.100.191.166

    This specifies default gateway if not routing IP

    ip route 10.0.0.0 131.108.3.4 110ip route 10.0.0.0 131.108.3.8 120This implies that packets for network 10.0.0.0 will

    be routed to the router at 131.108.3.4. if dynamic

    information about network 10.0.0.0 is not available.

    If you specify an administrative distance, you are

    flagging a static route that may be overridden by

    dynamic information