Cisco Switches archives - Network technologies and trends

Network technologies and trends:

Cisco Switches

Nov 21 2009   11:36AM GMT

How to configure the System prompt in a Cisco Router or a Cisco Switch?



Posted by: Yasir Irfan
Cisco Router, Cisco Router tips, Cisco Switches, Cisco Tips, How to configure the System prompt in a Cisco Router or a Cisco Switch, System prompt, no prompt, TTY, VTY, config t, hostname, Cisco Hostname, %h:%n%p, active telnet sessions, Telnet, Cisco Device, Network Tips, Network Technologies and Trends

 

There is a cool handy way to know TTY sessions established in any Cisco Router or a Cisco Switch. By using this feature you can know the number of active telnet sessions from the prompt itself.

Normally whenever you log to any Cisco Router or Switch you will find this menu

ITKE-AS01#

 

By using the “prompt” command you can see the difference

 

You might be wondering how come this is possible, ok now let me show you how to enable this feature in a Cisco Router or a Cisco Switch,

Log in to your Cisco Device and use the following command “prompt %h:%n%p”

 

ITKE-AS01#config t

ITKE-AS01 (config)# prompt %h:%n%p
ITKE-AS01 (config)# exit

 

In the example I have used three escape sequences to set the prompt name to the hostname (%h), followed by the command number (%n) and then followed by the appropriate prompt character for the current command mode (%p).

You can see the difference in the hostname after applying the “prompt %h:%n%p” command.

ITKE-AS01:1#sho users

    Line       User       Host(s)              Idle       Location

*  1 vty 0     yasir      idle                 00:00:00 10.0.0.5

 

  Interface      User        Mode                     Idle     Peer Address

ITKE-AS01:1#

 

As the number of TTY session increases you can see the incremental change in the hostname with the sequence number as displayed below.

Example with two TTY sessions

ITKE-AS01:2#sho users

    Line       User       Host(s)              Idle       Location

   1 vty 0     yasir      idle                 00:00:23 10.0.0.5

*  2 vty 1     itkeuser      idle                 00:00:00 10.0.0.5

 

  Interface      User        Mode                     Idle     Peer Address

 

ITKE-AS01:2#

 

Example with three TTY sessions

ITKE-AS01:3#sho users

    Line       User       Host(s)              Idle       Location

   1 vty 0     yasir      idle                 00:01:14 10.0.0.5

   2 vty 1     itkeuser      idle           00:00:50 10.0.0.6

*  3 vty 2     itkeadmin   idle         00:00:00 10.0.0.7

 

  Interface      User        Mode                     Idle     Peer Address

 

ITKE-AS01:3#

 

Example with four TTY sessions

ITKE-AS01:4#sho users

    Line       User       Host(s)              Idle       Location

   1 vty 0     yasir      idle                 00:01:43 10.0.0.5

   2 vty 1     itkeuser      idle            00:01:20 10.0.0.6

   3 vty 2     itkeadmin   idle            00:00:29 10.0.0.7

*  4 vty 3     yasir      idle                 00:00:00 10.0.0.5

 

  Interface      User        Mode                     Idle     Peer Address

 

ITKE-AS01:4#

 

I you want to disable the TTY display enter the “no prompt” command as shown below.
ITKE-AS01:4#config t
ITKE-AS01:4 (config)# no prompt

 

Following are the prompt Variables available for the “prompt” command.

Nov 18 2009   1:06PM GMT

How to archive your Cisco Router or Switch Configuration?



Posted by: Yasir Irfan
Cisco Router tips, Cisco Switches tips, Cisco Tips, Network Tips, Cisco IOS tips, archive command, archive config, configure replace flash, IOS version 12.3 (4) T, IOS Version, Cisco Systems, Cisco Routers, Cisco Switches, Cisco IOS configuration, Cisco Configuration, Router Configuration, Network Technologies and Trends, running config, FTP, HTTP, HTTPS, RCP, SCP, TFTP, protocols, How to archive your Cisco Router or Switch Configuration?

Do you all know there is a great way to archive the tasks you carry out in your Cisco Router or a Cisco Switch? Especially whenever you perform a “write memory or copy run start” in your Cisco Router or a Cisco Switch.

Most people do not realize starting an IOS version 12.3 (4) T and higher an “archive” and “archive config” commands were introduced by Cisco Systems.

The main advantage of advantage of an “archive” command is to have incremental backups of your Cisco Router or Switches configurations and for some reasons if you have blowup with the configuration then using the this feature you can retrieve the old configuration file into your Cisco router or switch.

The “archive config” command allows you to save Cisco IOS configurations in the configuration archive using a standard location and filename prefix that is automatically appended with an incremental version number (and optional timestamp) as each consecutive file is saved.
Once the maximum number of file saved in the archive, the oldest file will be automatically replaced by the next file.

The “show archive” command displays information for all configuration files saved in the Cisco IOS configuration archive.
In this example, we will save the archive configuration files on the flash memory; however, you can also store the configuration files remotely using such protocols as FTP, HTTP, HTTPS,RCP, SCP, and TFTP.
By using following set of commands we can enable archive feature in a Cisco Router or a Cisco Switch provided the IOS version is either 12.3 (4) T or higher . In this example, the location and filename prefix is specified as disk0: itkebackup

ITKE-AS0 (config)#archive

ITKE-AS01(config-archive)#path flash:itkebackup

To save the current running configuration in the configuration archive use the “archive config” command as shown below

ITKE-AS01# archive config

The “show archive” command displays information of the files saved in the configuration archive as shown in the following example:

ITKE-AS01#show archive

         There are currently 3 archive configurations saved.

         The next archive file will be named flash: itkebackup -3

         Archive # Name

         0

         1 flash: itkebackup -1

         2 flash: itkebackup -2 <- Most Recent

         3

         4

         5

         6

         7

         8

         9

         10

         11

         12

         13

         14

 

ITKE-AS01#

By using the “configure replace flash” command you can restore the configuration

ITKE-AS01#configure replace flash: itkebackup -2

         This will apply all necessary additions and deletions

         to replace the current running configuration with the

         contents of the specified configuration file, which is

         assumed to be a complete configuration, not a partial

         configuration. Enter Y if you are sure you want to proceed. ? [no]: y

         Total number of passes: 0

         Rollback Done

The “archive” command is quite handy to keep the he is great for keeping multiple copies of the running config in an archive.


Oct 11 2009   6:05AM GMT

“Show processes cpu sorted” good command to troubleshoot a Cisco Router CPU utilization



Posted by: Yasir Irfan
Cisco Routers, Cisco Switches, CPU Utilization, show processes cpu sorted, show processes cpu history, troubleshooting, Router Troubleshooting, switch troubleshooting, IOS 12.2 T, CPU utilization graph, Yasir, Network Technologies and Trends

During base lining or troubleshooting activity you may need to determine out the CPU Utilization of your Cisco router or Switch. While exploring to find out the top 10 ten CPU utilization process in a Cisco router, I discovered the sorted option of the “show processes cpu” command.

The sorted option is really a beneficial option in the “show processes cpu” command which can help you to find out the load of your Cisco router or a Switch over the last 5 seconds, 1 minute and 5 minutes. Starting in IOS 12.2 T, the “show processes cpu history” command gives a nice CPU utilization graph.

At times it is helpful to sort the processes by their percentage of CPU utilization. To do this you can use the show processes cpu sorted command as follows:

Some of the sample output is as follows

…. rest deleted……

 


Sep 27 2009   4:45AM GMT

How to configure Trunking between a Cisco Catalyst and a 3Com SuperStack?



Posted by: Yasir Irfan
Cisco Switches, Trunking between Cisco and 3 Com Switches, 3-Com 4200 Switch, 3-Com 3300 Switch, Trunking, 802.1q, VLANS, Cisco Catalyst Switch, 802.1 q trunking port, Trunking between a Cisco Catalyst and a 3Com SuperStack, ITKE, tagged, untagged, HP Procurve

 

I am writing this article to answer the question  for establishing the trunking between a Cisco Catalyst Switch and a 3Com Super Stack Switch in ITKE community.

 

The goal of the article is show the user how to configure an inter operable trunk port in both Cisco and 3 Com Switch. As far as trunking concepts are concerned I did posted an article in ITKE blog comparing the HP Procurve and a Cisco Catalyst Switches which help to understand the trunking methodologies applied in 3 Com and Cisco Switches.

In order understand the configuration process easily I present a scenario, based on this scenario we will configure the Cisco and 3 Com Switches to meet the objectives.

 

In this example 

·         A Cisco Catalyst Switch is connected to a 3-Com Super Stack 4200 Switch (3-Com Super stack 3300 configuration is also available as the configuration process defers in a 3300 Switch)) using a port fast /Giga Ethernet 1 in both the Switches.

·         Create two VLANS locally in both the Cisco Catalyst Switch and a 3-Com Super Stack 4200.

1.       VLAN 100 – For Workstations (named PCS).

2.       VLAN 200- For Servers and Management Devices (Named MANG).

·         Configure fast Ethernet 0/1 on both the Cisco Catalyst Switch and a 3-Com Super Stack 4200 as 802.1 q trunking port.

 

Cisco Catalyst Switch Configuration Example

 

Task 1 – Create VLANS

 

ITKE-Cisco#configure t

Enter configuration commands, one per line.  End with CNTL/Z.

ITKE-Cisco(config)#vlan 100

ITKE-Cisco(config-vlan)#name PCS   

ITKE-Cisco(config-vlan)#exit

ITKE-Cisco(config)#vlan 200

ITKE-Cisco(config-vlan)#name MANG

 

Task 2 - Configure the port fastethernet 0/1 as 802.1 q trunk port.

 

ITKE-Cisco(config)#interface fastEthernet 0/1

ITKE-Cisco(config-if)#description Connected to 3-COM Switch

ITKE-Cisco(config-if)#switchport trunk encapsulation dot1q

ITKE-Cisco(config-if)#switchport mode trunk

ITKE-Cisco(config-if)#no shutdown

ITKE-Cisco(config-if)#

 

Task 3 – Configure the ports fastethernet 0/5 for VLAN 100 and fastethernet 0/10 for VLAN 200.

ITKE-Cisco(config)#interface fastEthernet 0/5

ITKE-Cisco(config-if)#description Connected to PC

 

ITKE-Cisco(config-if)#switchport mode access

ITKE-Cisco(config-if)#switchport access vlan 100

 

ITKE-Cisco(config)#interface fastEthernet 0/10

ITKE-Cisco(config-if)#description Connected to SERVER

ITKE-Cisco(config-if)#switchport mode access

ITKE-Cisco(config-if)#switchport access vlan 200

 

3-Com Super Stack 4200 Switch Configuration Example (Configuration steps are as per the 3-Com Advance configuration manualnot tested).

Task 1 – Create VLANS and add ports Giga Ethernet 0/5 for VLAN 100 and Giga Ethernet 0/10 for VLAN 200

 

<SwitchB> system-view

[SwitchB] vlan 100

[SwitchB-vlan100] description PCS

[SwitchB-vlan100] port GigabitEthernet 1/0/5

[SwitchB-vlan100] quit

 

Create VLAN 200, and add GigabitEthernet1/0/10 to VLAN 200.

[SwitchB] vlan 200

[SwitchB-vlan200] description MANG

[SwitchB-vlan200] port GigabitEthernet 1/0/10

[SwitchB-vlan200] quit

 

 

Task 2 - Configure the port Gigaethernet 1/0/1 as a trunk port.

 

[SwitchB] interface GigabitEthernet 1/0/1

[SwitchB-GigabitEthernet1/0/1] port link-type trunk

 

3-Com Super Stack 3300 Switch Configuration Example.

Task 1 – Create VLANS

Select menu option (bridge/vlan): create

Select VLAN ID (2-4094)[3]: 100

Enter VLAN Name [VLAN 10]: PCS

 

Select menu option (bridge/vlan): create

Select VLAN ID (2-4094)[3]: 200

Enter VLAN Name [VLAN 11]: MANG

 

 

Task 2 - Configure the port fastethernet 0/1 as 802.1 q trunk port

Select VLAN ID (1-2,) [1]: 100 - 200

Select bridge ports (AL1-AL4,unit:port…,?): 1:1

Enter tag type (untagged,tagged): tagged

 

Task 3 – Configure the ports Giga Ethernet 0/5 for VLAN 100 and Giga Ethernet 0/10 for VLAN 200

 

Select menu option (bridge/vlan/modify): add

Select VLAN ID (1-2,)[1]: 100

Select bridge ports (AL1-AL4,unit:port…,?): 1:5

Enter tag type (untagged, tagged): untagged

 

Select menu option (bridge/vlan/modify): add

Select VLAN ID (1-2,)[1]: 200

Select bridge ports (AL1-AL4,unit:port…,?): 1:10

Enter tag type (untagged, tagged): untagged