Cisco Commands List Part 1

Setting the router commands

Show version – shows router version

 Enable – enter privilege EXEC configuration mode.

Configure terminal – enter global configuration mode

Config t – enter config mode

Hostname – name the device

Enable secret – set password

Router – tells the router which protocol to use (e.g. router  RIP – router configuration command )

Network – tells the router which directly networks he connected to.

Line Vty 0 4 – configure/enable telnet session

Password – set password for telnet session

Login console 0 – configure/enable console session

Password –set password for console login

Copy run start – save router configuration

 

Setting router IP address

 

Interface Ethernet 0 – setting the Ethernet 0 port setting (if more them one port use 0/0, or 0/1)

IP address 192.168.0.1 255.255.255.0 – setting ip address

No shutdown – enable the connection / port

   ****available ports Interface Ethernet 0, Interface Ethernet 1, Interface serial 0

ip host NAME 192.168.100.1 – map host mane to ip address

 

Verify and save configuration

 

Show run – verify router configuration

Copy run start -Save router configuration

Copy running –config  startup-config – save config

copy running-config tftp – save config file to TFTP server.

 

Change settings

 

 

No-  To change information, go to the proper command mode and retype the command with the newinformation. To remove an old command, go to the proper command mode and retype thecommand exactly as it was entered with the word no in front of it. For

 

example:

Gadsden(config-if)#description Connection to the host

Gadsden(config-if)#no description Connection to the host

 

 

Configure ACL

 

Show access-list – show list

Access list number permit network subnet – create basic access control list (access list 1 permit 192.168.100.0 255.255.255.0)

No access-list <number> – remove access list

Access list deny any – deny access

Interface serial 1 – assign to connection

Ip access-group 5 in – ACL direction

End – end ACL process

 

Show Commands

 

show running-config command. This command will display the current configuration

Show ? – Show all Show commands

Showedit  ip route table

Show ip route – show ip table route

No network 192.168.0.1 – remove network from route list

 

CDP

 

show cdp neighbors – Show surround devices in the LAN.

# cdp run

# cdp enable

# clear cdp counters

# show cdp

# show cdp entry {*|device-name[*][protocol | version]}

# show cdp interface [type number]

# show cdp neighbors [type number] [detail]

 

 

Other command

 

service password-encryption – This command is used to encrypt passwords in configuration output:

Erase startup-config – Erasing and reloading the router

reload – restart roter

Router rip – router configuration mode

Sh run – show router configuration

Sh start – show NVRAM config

End – move one level up in the menu

Description – add description to interface

banner motd # message here #– display message of the day

ip host NAME 192.168.100.1 – map host mane to ip address

 

 

 Set Password example:

 

Router(config)#line console 0
Router(config-line)#password <password>
Router(config-line)#login

 

Router(config)#line vty 0 4
Router(config-line)#password <password>
Router(config-line)#login

 

Configure interface

Router(config)#interface serial 0/0
Router(config-if)#clock rate 56000
Router(config-if)#no shutdown

 

 

Show Commands

Router#show interfaces serial 0/1

show controllers serial – Displays information-specific to the interface hardware

show clock – Shows the time set in the router

show hosts – Displays a cached list of host names and addresses

show users – Displays all users who are connected to the router

show history – Displays a history of commands that have been entered

show flash – Displays information about flash memory and what IOS files are stored there

show version – Displays information about the router and the IOS that is running in RAM

show ARP – Displays the ARP table of the router

show protocol – Displays the global and interface specific status of any configured Layer 3 protocols

show startup-configuration – Displays the saved configuration located in NVRAM

show running-configuration – Displays the configuration currently running in RAM

 

Telnet Commands:

telnet host name – connect to others routers using telnet (E.g. telnet paris)

Denver>connect paris
Denver>paris
Denver>131.108.100.152
Denver>telnet paris

 

 

Static routes:

 

ip route 172.16.3.0 255.255.255.0 172.16.4.1 130 – set static route to other routers.

Ip route 192.168.20.10 255.255.255.255 192.168.20.1 – ip route to one host.

 

* ip route destination network sub mask gateway

 

Use the following steps to configure static routes:

Determine all desired destination networks, their subnet masks, and their gateways. A gateway can be either a local interface or a next hop address that leads to the desired destination.

Enter global configuration mode.

Type the ip route command with a destination address and subnet mask followed by their corresponding gateway from Step one. Including an administrative distance is optional.

Repeat Step three for as many destination networks as were defined in Step one.

Exit global configuration mode.

Save the active configuration to NVRAM by using the copy running-config startup-config command.

Use the following steps to configure default routes:

Enter global configuration mode.

Type the ip route command with 0.0.0.0 for the destination network address and 0.0.0.0 for the subnet mask. The gateway for the default route can be either the local router interface that connects to the outside networks or the IP address of the next-hop router. In most cases, it is preferred that the IP address of the next hop router is specified.

Exit global configuration mode.

Save the active configuration to NVRAM by using the copy running-config startup-config command.

 

To remove route type:

no ip route 192.168.0.10 255.255.255.0 192.168.0.11

 

 

How To restore Cisco Router Config File From A TFTP Server

After changing my Cisco IOS config file this week I received an email from a few people that they can’t access remote resources in our data centre.

Then I remembered that the reason is probably the changes I made to the Cisco router (I changes the access lists and some routes).

The first hot fix that came to my mind was to restore the Config file from the last backup I took using a TFTP server I installed two weeks ago.

(To read how to install and backup Cisco Config file to a TFTP server use this link http://www.ntweekly.com/NTw/news.asp?id=23)

To restore the Router’s config file follow the steps:

  1. Turn on the TFTP server (just double click on the TFTP server software)
  2. Login to the router
  3. Type the command copy tftp running config
  4. Type the TFTP server IP
  5. Type the backup file name that you want to restore to the router
  6. Press enter
  7. Save (copy run start)

How To Rename A File In VMware ESX Server

In order to rename VM file or a folder in ESX server we need to use a coomand as ESX server is builld on Linux core.

To do so:

Open an SSL connection to ESX server using Putty or a diffrent software.

Go to the file that you want to change.

Use cd foldername to navigate to the file

Use ls to view the files inside the folder

When reaching to the right folder use the command

mv oldfilename newfilename

How To Convert VMware GSX Server VM To ESX Server VM

As Vmware ESX Server become more popular and VMware GSX server in no longer supported by Vmware you might going to need to upgrade your virtual environment to much robust and advanced product.

Most organization today making the switch to VMware ESX server, however once making the move and installing VMware ESX server moving your virtual machines to the new server is not as simple as copy paste.

If your GSX virtual machines are configured with IDE hard drive you probably one of the lucky administrators out there and all you need to do is run a simple command.

To convert GSX virtual machine with SCSI Hard Drive to ESX server virtual machines follow the steps below:

  1. Open the ESX server using and FTP client (I used WinSCP)
  2. Log in as root
  3. Copy the GSX virtual machine to the ESX server, the path is usually /vmfs/volumes/Local01/vmname
  4. After copying log in to the ESX server using a SSL client (I used Putty)
  5. Go to the GSX Virtual machine location (the one copied in step 3)
  6. Issue the command vmkfstools -i <vmdk_file_name>.vmdk <vmdk_new_file_name>.vmdk

vmkfstools –i win2003gsx.vmdk win2003esx.vmdk

Please note that if the GSX virtual machine configured with IDE drive you will have to convert the HDD first to SCSI and then make the GSX to ESX conversion, the best option to do that is to use a 3 party tool like FlateSpin Power convert.

How To Disable WCCP On A cisco Router interface

In order to disable The Cisco Web Cache Communication Protocol (WCCP) on one of your Cisco interfaces you will need to type a command on your router.

To disable the WCCP protocol on your router follow the steps below :

Run sh run on your router to see how the WCCP configured (is redirect in or out)
Type config t to enter the global configuration mode
Type interface <and the interface wccp is running on ) e.g int f0
Type no ip wccp web-cache redirect in to disable the wccp
Type copy start run to save configuration
All done

About WCCP

The Web Cache Communication Protocol (WCCP) is a Cisco-developed content-routing technology which allows you to integrate cache engines (such as the Cisco Cache Engine 550) into your network infrastructure. Cisco IOS Release 12.1 allows the use of either Version 1 (WCCPv1) or Version 2 (WCCPv2) of the Web Cache Communication Protocol.

Microsoft MOM 2005 Web Console Doesn’t Work

After installing Microsoft Operation 2005 with service pack 1 on a Windows Server 20002003 the Web Console doesn’t work and error with “page was forbidden browsing http:\momserver:1272 ”

 

To fix this issue follow the steps below:

 

Start the Microsoft IIS console and go to the MOM web server website properties:
In Home Directory Tab, Configuration Button, Mapings Tab, make sure .asap, .aspx, .config, .cs exist.

For windows Server 2000 use the executable path of:
C:WINNTMicrosoft.NETFrameworkv1.1.4322aspnet_isapi.dll

For windows Server 2003 use the executable path of:

C:WINDOWSMicrosoft.NETFrameworkv1.1.4322aspnet_isapi.dll
In the verbs write:

GET,HEAD,POST,DEBUG.

In Documents tab add Default.aspx and move it to top if it doesn’t exist in the list.

All done

How to delete Redo Files In VMware Server and Gsx

When the Snapshot option is enabled on VMware Server/GSX the Redo files may take a lot of space and might cause the VMware server to become slow.

 

To remove the Redo files, disable the snapshot option and clear space on the server follow the steps below:
Stop Virtual machine

Right click on the VM in the Console screen and click on remove snapshoot

Right click on the VM and click on Virtual Machine properties go to Snapshot and tick disable snapshot

Copy all redo files to a different location.

Start Virtual machine, if the Virtual machine starts and data and services are in place delete the Redo files.

If the Virtual machine fails to load, copy the Redo files back to the Virtual machine folder and start the machine again.

 

This solution was tested in our testing and live environment.