Cisco Catalyst Switches – Set a Management IP and Allow Telnet and Web Management

KB ID 0000614 

Problem

If you want to manage your Cisco Catalyst switch it’s not always practical to plug a console cable in to change its settings or monitor what it is doing. Putting an IP address on it and enabling remote management via Telnet or from your web browser is a better alternative, particularly if you have a lot of switches.

Solution

Enable Telnet Management on Cisco Catalyst Switch

1. Connect to the Switch using a terminal emulation program like HyperTerminal or Putty,

2. Issue the following commands;

[box]

enable
{enter enable password if prompted}
conf t
line vty 0 15
password {password required}
login
exit 

[/box]

Add a Management IP to a Cisco Catalyst Switch

3. Whilst still in configure terminal mode issue the following commands;

[box]

int vlan1
ip address {IP address required} {Subnet required}
no shutdown
exit

[/box]

Cisco Catalyst Set an Enable Password

4. If you telnet in you cant change any system settings without an enable password being set.

[box]enable password {Password required}[/box]

Optional : Set the Cisco Catalyst Switches Default Gateway

5. Just in case you need to manage the switch from another subnet, you will need to set a default gateway.

[box]ip default-gateway {IP address required}[/box]

Enable Web Management on Cisco Catalyst Switch

6. To connect to and manage the switch from a web browser execute the following command, and then exit configure terminal mode.

[box]

ip http server
exit 

[/box]

7. Finally save the changes with a “write mem” command.

[box]write mem[/box]

Testing the Configuration

8. From a machine on the same network segment make sure you can ping the switch on its new IP address.

9. Then make sure you can “telnet” into it.

10. Open a web browser and navigate the the switches IP > Select ‘Web Console’.

Note: You will require Java for this to work.

11. After entering the enable password you should see the following.

Related Articles, References, Credits, or External Links

Cisco Catalyst Password Recovery / Reset

Configuring Multiple Cisco Switch Ports at the Same Time

KB ID 0001009 

Problem

If you have the same configuration that needs to be placed on multiple ports, then doing each one individually can be time consuming. To save time use the ‘interface range‘ command. Be aware this command is only available on devices running IOS versions newer than 12.0(7)XE, Release 12.1 E, and Release 12.1(5)T.

Solution

1. From configure terminal mode, I want to apply the same configuration to Gigabit Ethernet ports 3 and 4. Note: There is a space each side of the hyphen.

[box]

Petes-Switch(config)#interface range GigabitEthernet 0/3 - 4
Petes-Switch(config-if-range)#switchport mode access
Petes-Switch(config-if-range)#switchport access vlan 123
Petes-Switch(config-if-range)#exit
Petes-Switch(config)#

[/box]

2. Let’s see if that worked;

[box]

Petes-Switch#show run
Building configuration...

Current configuration : 1888 bytes
!
<------------config removed for the sake of brevity------------>
!
interface GigabitEthernet0/3
switchport access vlan 123
switchport mode access
!
interface GigabitEthernet0/4
switchport access vlan 123
switchport mode access
!
<------------config removed for the sake of brevity------------>
!

end

[/box]

How To Configure Multiple Cisco ‘Non Contiguous’ Switch Ports

1. The process is the same as above, but you separate ranges, (or individual ports) with a comma. Note: There is a space each side of the comma.

[box]

Petes-Switch(config)#interface range GigabitEthernet 0/3 - 4 , GigabitEthernet 0/9 - 10
Petes-Switch(config-if-range)#switchport mode access
Petes-Switch(config-if-range)#switchport access vlan 123
Petes-Switch(config-if-range)#exit
Petes-Switch(config)#

[/box]

2. Let’s see if that worked;

[box]

Petes-Switch#show run
Building configuration...

Current configuration : 1888 bytes
!
<------------config removed for the sake of brevity------------>
!
interface GigabitEthernet0/3
switchport access vlan 123
switchport mode access
!
interface GigabitEthernet0/4
switchport access vlan 123
switchport mode access
!
interface GigabitEthernet0/5
!

<------------config removed for the sake of brevity------------>
!
interface GigabitEthernet0/9
switchport access vlan 123
switchport mode access
!
interface GigabitEthernet0/10
switchport access vlan 123
switchport mode access
!
<------------config removed for the sake of brevity------------>
!
end

[/box]

You can use the interface range command with the following interfaces;

  • FastEthernet
  • GigabitEthernet
  • TenGigabitEthernet
  • Port-Channel
  • VLAN

Related Articles, References, Credits, or External Links

NA

Cisco Catalyst – %Error Deleting flash:/{name} (Is a directory)

KB ID 0001070 

Problem

Today I was upgrading a Cisco 3750 switch, and needed to free up some space in the flash memory to upload the new system image to. But when I tried to delete the current system file I got this error.

[box]

Petes-3750# dir
Directory of flash:/

2 -rwx 796 Mar 7 1993 01:15:49 +00:00 vlan.dat
3 drwx 192 Mar 1 1993 00:17:13 +00:00 c3750-ipservicesk9-mz.122-55.SE5
4 -rwx 5504 May 27 2015 10:23:47 +00:00 private-config.text
85 -rwx 3096 May 27 2015 10:23:47 +00:00 multiple-fs
86 -rwx 2544 Mar 1 1993 00:01:40 +00:00 config.backup
88 -rwx 4020 May 27 2015 10:23:47 +00:00 config.text

15998976 bytes total (2421248 bytes free)
Petes-3750(config-if)#exit

Petes-3750#delete flash:/c3750-ipservicesk9-mz.122-55.SE5
Delete filename [c3750-ipservicesk9-mz.122-55.SE5]?
Delete flash:/c3750-ipservicesk9-mz.122-55.SE5? [confirm]
%Error deleting flash:/c3750-ipservicesk9-mz.122-55.SE5 (Is a directory)

[/box]

Solution

Well the fact that the file name didn’t have ‘.bin’ on the end of it should have been a clue. Anyway to delete the folder you need to use the force and recursive switches in your delete command, (or you can use rmdir).</p?

[box]

Petes-3750#delete /force /recursive flash:/c3750-ipservicesk9-mz.122-55.SE5
Petes-3750#dir
Directory of flash:/

2 -rwx 796 Mar 7 1993 01:15:49 +00:00 vlan.dat
4 -rwx 5504 May 27 2015 10:23:47 +00:00 private-config.text
85 -rwx 3096 May 27 2015 10:23:47 +00:00 multiple-fs
86 -rwx 2544 Mar 1 1993 00:01:40 +00:00 config.backup
88 -rwx 4020 May 27 2015 10:23:47 +00:00 config.text

15998976 bytes total (15981056 bytes free)
Petes-3750#

[/box]

Related Articles, References, Credits, or External Links

NA