Monday, January 19, 2009

Cisco Discovery Protocol

Cisco Discovery Protocol

Router#show cdp

Displays global CDP information (such as timers)

Router#show cdp neighbors

Displays information about neighbors

Router#show cdp neighbors detail

Displays more detail about neighbor device

Router#show cdp entry word

Displays information about device named word

Router#show cdp entry *

Displays information about all devices

Router#show cdp interface

Displays info about interfaces that have CDP running

Router#show cdp interface x

Displays info about specific interface x running CDP

Router#show cdp traffic

Displays traffic infopackets in/out/version

Router(config)#cdp holdtime x

Changes length of time to keep CDP packets

Router(config)#cdp timer x

Changes how often CDP updates are sent

Router(config)#cdp run

Enables CDP globally (on by default)

Router(config)#no cdp run

Turns off CDP globally

Router(config-if)#cdp enable

Enables CDP on a specific interface

Router(config-if)#no cdp enable

Turns off CDP on a specific interface

Router#clear cdp counters

Resets traffic counters to 0

Router#clear cdp table

Deletes the CDP table

Router#debug cdp adjacency

Monitors CDP neighbor information

Router#debug cdp events

Monitors all CDP events

Router#debug cdp ip

Monitors CDP events specifically for IP

Router#debug cdp packets

Monitors CDP packet-related information


Caution:

Although CDP is an excellent source of information to you the network administrator, is it a potential security risk if a hacker gains access to one of your systems. The information that you gain through CDP is also gained by the hacker.

After you have used CDP to gather your information in a production environment, turn it off to thwart any bad people from using it for no good.


Tuesday, January 13, 2009

Copying IOS to TFTP Server

Copying IOS to TFTP Server

2900 Series Switch

2900Switch#copy flash:c2900XL-hs-mz-112.8.10-SA6.bin tftp

Same procedure as with router

Source filename [c2900XL-hs-mz-112.8.10-SA6.bin]?

Just press ENTER

Destination IP address or hostname [ ]192.168.1.3

Address of TFTP server

Destination filename [c2900XL-hs-mz-112.8.10-SA6.bin]?

Just press ENTER

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

Each bang symbol (!) = 1 datagram sent

1119104 bytes copied in 21.43 secs

2900Switch#


2950 Series Switch

2950Switch#copy flash tftp

Same procedure as with router

Source filename [ ]? c2950-c3h2s-mz.120-5.3.WC.1.bin

Destination IP address or hostname [ ]192.168.1.3

Address of TFTP server

Destination filename [c2950-c3h2s-mz.120-5.3.WC.1.bin]?

Just press ENTER

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

Each bang symbol (!) = 1 datagram sent

1674921 bytes copied in 31.542 secs

2950Switch#


Tuesday, January 6, 2009

Restoring IOS from ROMmon Mode Using Xmodem

Restoring IOS from ROMmon Mode Using Xmodem

The output that follows was taken from a 1720 router. Some of this output might vary from yours, depending on the router model that you are using.

rommon 1 >confreg

Shows configuration summary. Step through the questions, answering defaults until you can change the console baud rate. Change it to 115200; makes transfer go faster

     Configuration Summary
enabled are:

load rom after netboot fails

console baud: 9600


boot: image specified by the boot
system commands

or default to: cisco2-c1700


do you wish to change the
configuration? y/n [n]: y

enable "diagnostic mode"? y/n [n]: n

enable "use net in IP bcast address"? y/n [n]: n

disable "load rom after netboot
fails"? y/n [n]: n

enable "use all zero broadcast"? y/n [n]: n

enable "break/abort has effect"? y/n [n]: n

enable "ignore system config info"? y/n [n]: n

change console baud rate? y/n [n]: y

enter rate: 0=9600, 1=4800, 2=1200, 3=2400

4=19200, 5=38400,
6=57600, 7=115200 [0]: 7

change the boot characteristics? y/n [n]: n

Prompts will begin to ask a series of questions that will allow you to change the config-register. Answer n to all questions except the one that asks you to change the console baud rate. For the enter rate, choose 7 because that is the number that represents a baud rate of 115200

     Configuration Summary

enabled are:


load rom after netboot fails

console baud: 115200

boot: image specified by the boot system commands

or default to: cisco2-c1700

do you wish to change the configuration? y/n [n]: n

rommon2>

After the summary is shown again, choose n to not change the configuration and go to the rommon> prompt again



rommon 2>reset

Reloads router at new com speed. Change HyperTerminal setting to 115200 to match the router's new console setting





Rommon 1>xmodem c1700-js-l_121-3.bin

Asking to transfer this image using Xmodem

......


Do you wish to continue? y/n [n ]:y

Choose y to continue






In HyperTerminal, go to Transfer, then Send File (See Figure A). Locate the IOS file on the hard drive and click Send (See Figure B)

Router will reload when transfer is completed




Reset baud rate on router




Router(config)#line con 0


Router(config-line)#speed 9600


Router(config-line)#exit

HyperTerminal will stop responding. Reconnect to the router using 9600 baud, 8-N-1


Figure A. Finding the IOS Image File










Figure B. Sending the IOS Image File to the Router