Switch Control: Difference between revisions

From JCWiki
Jump to navigation Jump to search
No edit summary
 
(24 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Manuals =
= Manuals =
3750 reference http://www.cisco.com/en/US/products/hw/switches/ps5023/products_command_reference_chapter09186a00801f5ffb.html#2789851
3750 reference http://www.cisco.com/en/US/products/hw/switches/ps5023/products_command_reference_chapter09186a00801f5ffb.html#2789851
Reset 2900 switch: http://www.cisco.com/en/US/products/hw/switches/ps628/products_password_recovery09186a0080094184.shtml
Reset 2900 switch: http://www.cisco.com/en/US/products/hw/switches/ps628/products_password_recovery09186a0080094184.shtml
Reset other switches: http://slaptijack.com/networking/blow-away-your-cisco-catalyst-configuration/
Reset other switches: http://slaptijack.com/networking/blow-away-your-cisco-catalyst-configuration/


= Finding which IPs are on a port =
= Finding which IPs are on a port =
Line 424: Line 425:
= Moving a port into a vlan =
= Moving a port into a vlan =


switch-p3>show vlan
<pre>switch-p3>show vlan
VLAN Name                            Status    Ports
VLAN Name                            Status    Ports
---- -------------------------------- --------- -------------------------------
---- -------------------------------- --------- -------------------------------
Line 463: Line 464:
switch-p3#write mem
switch-p3#write mem
Building configuration...
Building configuration...
switch-p3#exit
switch-p3#exit</pre>


= Creating vlan =
= Creating vlan =
Last updated: 2007-12-08


switch-p12#vlan database
<pre>switch-p12#vlan database
switch-p12(vlan)#vlan 2 name col01656
switch-p12(vlan)#vlan 2 name col01656
VLAN 2 added:
VLAN 2 added:
Line 489: Line 489:
1004 fddinet-default                  active
1004 fddinet-default                  active
1005 trnet-default                    active
1005 trnet-default                    active
switch-p12#write mem
switch-p12#write mem</pre>


= Turning on/off spanning tree =
= Turning on/off spanning tree =


switch-p6#conf t
A note about spanning tree. You want it on if there's any possibility the port will be connected to another switch. If you know this is not a concern, you may turn it off. Why turn it off? it speeds up convergence so when you plug in a new device it's almost immediately live. When spanning tree is on there's a delay of up to a minute which can be inconvenient if you're looking to quickly move cables without any disruptions.
 
Turnning spanning tree off:
<pre>switch-p6#conf t
switch-p6(config)#int fa0/1
switch-p6(config)#int fa0/1
switch-p6(config-if)#spanning-tree portfast
switch-p6(config-if)#spanning-tree portfast
Line 506: Line 509:
Building configuration...
Building configuration...
[OK]
[OK]
switch-p6#
switch-p6#</pre>


To turn on:
To turn on:
 
switch-p6(config-if)#no spanning-tree portfast
switch-p6(config-if)#no spanning-tree portfast


To confirm:
To confirm:
 
<pre>switch-p1#show conf
switch-p1#show conf
-SNIP-
Using 1798 out of 32768 bytes
!
version 12.0
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname switch-p1
!
enable secret 5 $1$cj8o$dNCgX0iUZMGGwhATxXXri.
!
!
!
!
!
!
ip subnet-zero
!
!
!
!
!
Line 561: Line 544:
!
!
interface FastEthernet0/9
interface FastEthernet0/9
</pre>


Quick Commands:
Quick Commands:
 
<pre>
en
en
conf t
conf t
Line 614: Line 598:
exit
exit
exit
exit
write mem
write mem</pre>
show conf
 
 
= Add/remove ARP entry to 3750 =


= Add/remove ARP entry to 3750
Note, you'd only ever want to add a static arp if you have an issue where some customer is trying to grab the wrong IP and the 3750 is allowing the arp to exist/map to the wrong IP. If you cannot stop the bad customer from grabbing the IP, you'd want to tell the 3750 to make the arp to the right mac. Once this issue is resolved with the bad customer, you'd want to remove the static arp entry so if the IP ever goes to another customer/nic, you won't have unexplained issues with the IP not working.
Last updated: 2010-11-14


E-mon-3750#conf t
Add an arp:
<pre>E-mon-3750#conf t
E-mon-3750(config)#arp 69.55.230.6 000d.5d03.5802 arpa
E-mon-3750(config)#arp 69.55.230.6 000d.5d03.5802 arpa
E-mon-3750(config)#exi
E-mon-3750(config)#exit
E-mon-3750#arp 69.55.230.6 000d.5d03.5802 arpa
E-mon-3750#arp 69.55.230.6 000d.5d03.5802 arpa
E-mon-3750#show arp | include 000d.5d03.5802
E-mon-3750#show arp | include 000d.5d03.5802
Internet  69.55.230.6            -  000d.5d03.5802  ARPA
Internet  69.55.230.6            -  000d.5d03.5802  ARPA</pre>


To clear:
To clear:
 
<pre>conf t
conf t
no 69.55.230.6 000d.5d03.5802 arpa
no 69.55.230.6 000d.5d03.5802 arpa
end
end</pre>


Clear all arp on 3750
= Clear all arp entries on 3750 =
Last updated: 2009-08-17


E-mon-3750#clear arp
You'd only really need to do this if you had a situation where a/many IPs have moved from one piece of hardware to another and the 3750 is still caching the old arp entries. Clearing out the entire arp table will fix this as it will then rebuild the arp table with the correct mac-arp entries. The downside to doing the clear is the entire network is disrupted/unreachable for about 5sec.


Setup MRTG monitoring (SNMP) on 2450
<pre>E-mon-3750>en
Last updated: 2010-04-07
E-mon-3750#clear arp</pre>
= Setup MRTG monitoring (SNMP) =


Cisco MIBs: ftp://ftp-sj.cisco.com/pub/mibs/supportlists/wsc2900xl/wsc2900xl-supportlist.html
Cisco MIBs: ftp://ftp-sj.cisco.com/pub/mibs/supportlists/wsc2900xl/wsc2900xl-supportlist.html<br>
http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml
http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml<br>
http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?local=en&translate=Translate&objectInput=lcpu
http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?local=en&translate=Translate&objectInput=lcpu<br>
CPU: 1.3.6.1.4.1.9.2.1.58
CPU: 1.3.6.1.4.1.9.2.1.58


Configure IP:
Configure IP on the switch:
conf t
<pre>conf t
int vlan 1
int vlan 1
ip address 69.55.230.245 255.255.255.0
ip address 69.55.230.245 255.255.255.0
ip default-gateway 69.55.230.1
ip default-gateway 69.55.230.1
en
en</pre>


Disable telnet:
Disable telnet:
conf t
<pre>conf t
line vty 5 15
line vty 5 15
transport input none
transport input none</pre>
 
Setup web user, and enable that user to login to web:


switch-p16(config)#username web privilege 15 password  k0zub!k
DEPRECATED Setup web user, and enable that user to login to web:
<pre>switch-p16(config)#username web privilege 15 password  PASS
switch-p16(config)#line vty 0 4
switch-p16(config)#line vty 0 4
switch-p16(config-line)#login local
switch-p16(config-line)#login local
switch-p16(config-line)#en
switch-p16(config-line)#en
 
switch-p16(config-line)#password PASS
switch-p16(config-line)#password k0zub!k
switch-p16(config-line)#login
switch-p16(config-line)#login
</pre>


Disable web:
Disable web:
conf t
<pre>conf t
line vty 0 4
line vty 0 4
transport input none
transport input none</pre>


Setup ACL:
Setup ACL:
conf t
<pre>conf t
access-list 1 permit 69.55.230.2
access-list 1 permit 69.55.230.2
access-list 1 permit 10.1.4.5
access-list 1 permit 10.1.4.5</pre>


Setup SNMP:
Setup SNMP:
conf t
<pre>conf t
no snmp-server community private RW
no snmp-server community private RW
no snmp-server community public RO
no snmp-server community public RO
snmp-server community jc292401 RO 1
snmp-server community jc292401 RO 1
en
en</pre>
 


On mail run:
On mrtg aggregator/host (i.e. mail server) run:
/usr/local/bin/cfgmaker --if-template=template.pl --show-op-down --global "options[_]: growright,bits" --global 'WorkDir: /usr/local/www/mgmt/mrtg/data' --global 'Interval: 1' --global 'LogFormat: rrdtool' --global 'PathAdd: /usr/local/bin' --global 'LibAdd: /usr/local/lib' --host-template=host.pl jc292401@69.55.230.246 --output=switch-p14.cfg
<pre>/usr/local/bin/cfgmaker --if-template=template.pl --show-op-down --global "options[_]: growright,bits" --global 'WorkDir: /usr/local/www/mgmt/mrtg/data' --global 'Interval: 1' --global 'LogFormat: rrdtool' --global 'PathAdd: /usr/local/bin' --global 'LibAdd: /usr/local/lib' --host-template=host.pl jc292401@69.55.230.246 --output=switch-p14.cfg</pre>


And add crontab entry
And add new switch to crontab script: <tt>/usr/local/www/mgmt/mrtg/mrtg.sh</tt>


Where, template.pl:
template.pl:
#if(not $problem_lines)
<pre>#if(not $problem_lines)
#{
#{
   $target_lines .= <<ECHO;
   $target_lines .= <<ECHO;
Line 758: Line 742:
   # $separator_lines =~ s/^\# //g;
   # $separator_lines =~ s/^\# //g;
#$target_lines .= "$head_lines $problem_lines$target_lines $separator_lines";
#$target_lines .= "$head_lines $problem_lines$target_lines $separator_lines";
#}
#}</pre>


And, host.pl:
host.pl:
$head_lines .= <<ECHO;
<pre>$head_lines .= <<ECHO;
#---------------------------------------------------------------------
#---------------------------------------------------------------------
ECHO
ECHO
Line 801: Line 785:
         </tr>
         </tr>
  </table>
  </table>
ECHO
ECHO</pre>
 
= Update IOS for 2950 =


Update IOS for 2950
Last updated 2010-11-01


Repo: http://www.cisco.com/cisco/software/navigator.html
Repo: http://www.cisco.com/cisco/software/navigator.html


Switch# archive download-sw /overwrite tftp://198.30.20.19/c2960-lanbase-tar.122-25.FX.tar
Switch# archive download-sw /overwrite tftp://198.30.20.19/c2960-lanbase-tar.122-25.FX.tar


Tar archive:
Tar archive:


switch-p21#delete flash:c2950-i6q4l2-mz.121-13.EA1c.bin
<pre>switch-p21#delete flash:c2950-i6q4l2-mz.121-13.EA1c.bin
switch-p21#delete flash:html/images/*
switch-p21#delete flash:html/images/*
switch-p21#delete flash:html/help/*
switch-p21#delete flash:html/help/*
Line 841: Line 825:
[OK]
[OK]
switch-p21#reload
switch-p21#reload
Proceed with reload? [confirm]
Proceed with reload? [confirm]</pre>
 


Upgrading Software in Catalyst 2900XL and 3500XL Switches Using the Command Line Interface  
= Upgrading Software in Catalyst 2900XL and 3500XL Switches =
Last Updated: 2010-10-27
== Via Command Line Interface ==


http://www.cisco.com/en/US/products/hw/switches/ps607/products_tech_note09186a00800946e5.shtml
http://www.cisco.com/en/US/products/hw/switches/ps607/products_tech_note09186a00800946e5.shtml


switch-p23#dir flash:
<pre>switch-p23#dir flash:
Directory of flash:/
Directory of flash:/


Line 886: Line 869:
Building configuration...
Building configuration...


Proceed with reload? [confirm]
Proceed with reload? [confirm]</pre>
 
== Via Common TFTP Procedure ==


Common TFTP Procedure
This section lists the steps for the TFTP upgrade procedure on the XL switches.
This section lists the steps for the TFTP upgrade procedure on the XL switches.
Note: All these commands are run from the privileged EXEC mode.
Note: All these commands are run from the privileged EXEC mode.
1. Type enable at the switch> prompt in order to enter the privileged EXEC mode.
 
2. switch>enable
switch>enable
switch#
switch#
3. If you upgrade a 2900XL switch, issue the show version command in order to confirm the amount of memory present on the switch.
 
See the How to Determine the Amount of Memory on the Switch Using Command Line Interface section of this document for the details on how to verify the amount of memory present on the 2900XL switch.
If you upgrade a 2900XL switch, issue the show version command in order to confirm the amount of memory present on the switch.
4. Display the name of the running image file.
See the [http://www.cisco.com/en/US/products/hw/switches/ps607/products_tech_note09186a00800946e5.shtml#amtmem How to Determine the Amount of Memory on the Switch Using Command Line Interface] section of this document for the details on how to verify the amount of memory present on the 2900XL switch.
5. switch#show boot
 
6. BOOT path-list:      flash:c2900XL-c3h2-mz-112.8.5-SA6.bin
Display the name of the running image file.
7. Config file:        flash:config.text
<pre>switch#show boot
8. Enable Break:        no
BOOT path-list:      flash:c2900XL-c3h2-mz-112.8.5-SA6.bin
9. Manual Boot:        no
Config file:        flash:config.text
10. HELPER path-list:     
Enable Break:        no
11. NVRAM/Config file
Manual Boot:        no
12.       buffer size:  32768
HELPER path-list:     
13.
NVRAM/Config file
14. !--- In this case, an upgrade from the Cisco IOS Software  
buffer size:  32768</pre>
15. !--- Release 11.2(8)SA6 image to a newer release takes place.
 
16.
!--- In this case, an upgrade from the Cisco IOS Software  
17. If there is no file defined in the BOOT path-list, enter the dir flash: command in order to display the contents of Flash memory.
!--- Release 11.2(8)SA6 image to a newer release takes place.
 
If there is no file defined in the BOOT path-list, enter the dir flash: command in order to display the contents of Flash memory.
The file with the .bin extension is your image file.
The file with the .bin extension is your image file.
switch#dir flash:
<pre>switch#dir flash:
Directory of flash:
Directory of flash:


Line 923: Line 909:
  18  -r--        108  Mar 01 1993 00:35:24  info.ver
  18  -r--        108  Mar 01 1993 00:35:24  info.ver


3612672 bytes total (1729024 bytes free)
3612672 bytes total (1729024 bytes free)</pre>


!--- The switch only has 1.7 MB Flash available. Since this is not enough   
!--- The switch only has 1.7 MB Flash available. Since this is not enough   
Line 929: Line 915:
!--- first free up some space.
!--- first free up some space.


18. If the size of the file to be loaded is larger than the available capacity, delete the image that exists in Flash in order to make space for a new image:
If the size of the file to be loaded is larger than the available capacity, delete the image that exists in Flash in order to make space for a new image:
a. Issue the delete flash: filename command.
Issue the delete flash: filename command.
b. Switch#delete flash:current_image.bin
<pre>Switch#delete flash:current_image.bin
c. Delete filename [current_image.bin]?
Delete filename [current_image.bin]?
Delete flash:current_image.bin? [confirm]
Delete flash:current_image.bin? [confirm]</pre>
d. Choose Enter in order to confirm the deletion of the file.
Choose Enter in order to confirm the deletion of the file.
Note: Once the image in Flash is deleted, do not reboot the switch for any reason until the new image is loaded. If you attempt to reload the switch now, it fails to boot up since there is no image in Flash.
Note: Once the image in Flash is deleted, do not reboot the switch for any reason until the new image is loaded. If you attempt to reload the switch now, it fails to boot up since there is no image in Flash.
19. If you upgrade a 4 MB DRAM Catalyst 2900XL Switch and a file that starts with the character string c2900XL-diag-mz appears in the Flash directory, you should remove it in order to make room for the new image.
 
This is a diagnostics file used at the factory in order to run certain tests on the switch and is never used by the customer. If you upgrade an 8 MB DRAM Catalyst 2900XL Switch or Catalyst 3500XL Switch you do not have to delete this file since you have sufficient Flash memory for the new image, but since this file is useless for you, it is advisable to delete it during the upgrade. The diagnostics file has a name in the format: c2900XL-diag-mz-version_name or c3500XL-diag-mz-version_name. The string version_name depends on the switch and software you run.
If you upgrade a [http://www.cisco.com/en/US/products/hw/switches/ps607/products_tech_note09186a00800946e5.shtml#xlmodels 4 MB DRAM Catalyst 2900XL Switch] and a file that starts with the character string c2900XL-diag-mz appears in the Flash directory, you should remove it in order to make room for the new image.
This is a diagnostics file used at the factory in order to run certain tests on the switch and is never used by the customer. If you upgrade an [http://www.cisco.com/en/US/products/hw/switches/ps607/products_tech_note09186a00800946e5.shtml#xlmodels 8 MB DRAM Catalyst 2900XL Switch] or [http://www.cisco.com/en/US/products/hw/switches/ps607/products_tech_note09186a00800946e5.shtml#xlmodels Catalyst 3500XL Switch] you do not have to delete this file since you have sufficient Flash memory for the new image, but since this file is useless for you, it is advisable to delete it during the upgrade. The diagnostics file has a name in the format: c2900XL-diag-mz-version_name or c3500XL-diag-mz-version_name. The string version_name depends on the switch and software you run.
Note: Sometimes this file, might or might not be displayed when you issue the dir flash: command. In this case, issue the dir flash:c2900XL-diag-mz* command.
Note: Sometimes this file, might or might not be displayed when you issue the dir flash: command. In this case, issue the dir flash:c2900XL-diag-mz* command.
For Example:
For Example:
On the 2900XL switch, issue this command in order to display the diagnostics filename:
On the 2900XL switch, issue this command in order to display the diagnostics filename:
switch# dir flash:c2900XL-diag-mz*
<pre>switch# dir flash:c2900XL-diag-mz*
Directory of flash:
Directory of flash:


-rwx 80971 Sep 14 1998 03:10:38 c2900XL-diag-mz-112.0.0.11-SA2  
-rwx 80971 Sep 14 1998 03:10:38 c2900XL-diag-mz-112.0.0.11-SA2</pre>
And delete it:
And delete it:
Switch#delete flash:c2900XL-diag-mz-112.0.0.11-SA2
<pre>Switch#delete flash:c2900XL-diag-mz-112.0.0.11-SA2


Delete filename [c2900XL-diag-mz-112.0.0.11-SA2]?
Delete filename [c2900XL-diag-mz-112.0.0.11-SA2]?
Delete flash:c2900XL-diag-mz-112.0.0.11-SA2? [confirm]
Delete flash:c2900XL-diag-mz-112.0.0.11-SA2? [confirm]
Switch#
Switch#</pre>
20. Enter global configuration mode:
 
21. switch#config terminal
Enter global configuration mode:
22. Enter configuration commands, one per line. End with CNTL/Z.
<pre>switch#config terminal
switch(config)#
Enter configuration commands, one per line. End with CNTL/Z.
23. Disable access to the switch HTML pages:
switch(config)#</pre>
24. switch(config)#no ip http server
 
25. Return to privileged EXEC mode:
Disable access to the switch HTML pages:
26. switch(config)#end
<pre>switch(config)#no ip http server
27. Remove the HTML files, if any:
Return to privileged EXEC mode:
28. switch#delete flash:html/*
switch(config)#end
Remove the HTML files, if any:
switch#delete flash:html/*</pre>
 
Choose Enter or y in order to confirm the deletion of each file.
Choose Enter or y in order to confirm the deletion of each file.
Note: You might or might not have an HTML directory in Flash. The HTML directory is only installed during an upgrade that uses a .tar file.
Note: You might or might not have an HTML directory in Flash. The HTML directory is only installed during an upgrade that uses a .tar file.
Since HTML is a directory that contains all the HTML and GIF files used for the web interface, you have to choose Enter or y many times before all the files in the HTML directory are deleted.
Since HTML is a directory that contains all the HTML and GIF files used for the web interface, you have to choose Enter or y many times before all the files in the HTML directory are deleted.
Note: Do not press any other keys during this process. If you press any other key, it aborts the deletion of that particular file and go to the next file. You have to issue the delete flash:html/* command again in order to delete the aborted file.
Note: Do not press any other keys during this process. If you press any other key, it aborts the deletion of that particular file and go to the next file. You have to issue the delete flash:html/* command again in order to delete the aborted file.
29. If you upgrade from Cisco IOS Software Release 11.2(8)SA5 or earlier, remove the files in the SNMP directory:
 
30. switch#delete flash:html/Snmp/*
If you upgrade from Cisco IOS Software Release 11.2(8)SA5 or earlier, remove the files in the SNMP directory:
switch#delete flash:html/Snmp/*
Make sure the S in Snmp is uppercase.
Make sure the S in Snmp is uppercase.
Choose Enter or y in order to confirm the deletion of each file.
Choose Enter or y in order to confirm the deletion of each file.
Note: Do not press any other keys during this process. If you press any other key, it aborts the deletion of that particular file and goes to the next file. You have to run the delete flash:html/* command again in order to delete the aborted file.
Note: Do not press any other keys during this process. If you press any other key, it aborts the deletion of that particular file and goes to the next file. You have to run the delete flash:html/* command again in order to delete the aborted file.
31. If you run Cisco IOS Software Release 11.2(8)SA2 or earlier releases on a 4 MB DRAM Catalyst 2900XL switch, create a directory on the switch Flash memory to be used for the HTML files:
 
Note: This step is only for 4 MB DRAM Catalyst 2900XL switches that run Cisco IOS Software Release 11.2(8)SA2 or earlier.
If you run Cisco IOS Software Release 11.2(8)SA2 or earlier releases on a [http://www.cisco.com/en/US/products/hw/switches/ps607/products_tech_note09186a00800946e5.shtml#xlmodels 4 MB DRAM Catalyst 2900XL switch], create a directory on the switch Flash memory to be used for the HTML files:
switch#mkdir flash:html/Snmp
Note: This step is only for [http://www.cisco.com/en/US/products/hw/switches/ps607/products_tech_note09186a00800946e5.shtml#xlmodels 4 MB DRAM Catalyst 2900XL] switches that run Cisco IOS Software Release 11.2(8)SA2 or earlier.
switch#mkdir flash:html/Snmp
 
Make sure the S in Snmp is uppercase.
Make sure the S in Snmp is uppercase.
32. Use the tar command in order to copy the combined .tar file to the switch.
Use the tar command in order to copy the combined .tar file to the switch.
Note: DO NOT copy the .tar file with the words html in the filename, available in Cisco IOS Software Release 11.2, that uses this procedure as the .tar file includes both the image and the HTML files into a single compressed file.
Note: DO NOT copy the .tar file with the words html in the filename, available in Cisco IOS Software Release 11.2, that uses this procedure as the .tar file includes both the image and the HTML files into a single compressed file.
This command copies and automatically extracts the image .bin file as well as the necessary HTML files.
This command copies and automatically extracts the image .bin file as well as the necessary HTML files.
Note: If the switch is unable to connect to the TFTP server, verify that you have IP connectivity to the server and check in order to make sure that the TFTP server software is setup correctly.
Note: If the switch is unable to connect to the TFTP server, verify that you have IP connectivity to the server and check in order to make sure that the TFTP server software is setup correctly.
switch#tar /x tftp://10.1.1.1/c2900xl-c3h2s-tar.120-5.WC8.tar flash:
 
<pre>switch#tar /x tftp://10.1.1.1/c2900xl-c3h2s-tar.120-5.WC8.tar flash:
Loading c2900xl-c3h2s-tar.120-5.WC8.tar from 10.1.1.1 (via VLAN1): !
Loading c2900xl-c3h2s-tar.120-5.WC8.tar from 10.1.1.1 (via VLAN1): !
extracting c2900xl-c3h2s-mz.120-5.WC8.bin (1803565  
extracting c2900xl-c3h2s-mz.120-5.WC8.bin (1803565  
Line 996: Line 990:


!--- The OK message means that the TFTP process passed successfully   
!--- The OK message means that the TFTP process passed successfully   
!--- and both .bin and html files were extracted successfully.
!--- and both .bin and html files were extracted successfully.</pre>


Note: Dependent on the TFTP Server used, you might need to enter only one slash (/) after the server_ip_address in the tar command.
Note: Dependent on the TFTP Server used, you might need to enter only one slash (/) after the server_ip_address in the tar command.
Note: Since Cisco IOS Software Release 12.0(5)WC5, the file with .tar extension also has tar in the filename itself. For example, c2900xl-c3h2s-tar.120-5.WC5.tar.
Note: Since Cisco IOS Software Release 12.0(5)WC5, the file with .tar extension also has tar in the filename itself. For example, c2900xl-c3h2s-tar.120-5.WC5.tar.
33. Enter the dir flash: command in order to determine the filename of the new image in Flash.
Enter the dir flash: command in order to determine the filename of the new image in Flash.
34. switch#dir flash:
<pre>switch#dir flash:
35. Directory of flash:
Directory of flash:
36.
 
37.   2  -rwx    1803565  Mar 01 1993 00:49:55  c2900xl-c3h2s-mz.120-5.
   2  -rwx    1803565  Mar 01 1993 00:49:55  c2900xl-c3h2s-mz.120-5.WC8.bin
38. WC8.bin
  17  -r--        108  Mar 01 1993 00:50:55  info
39. 17  -r--        108  Mar 01 1993 00:50:55  info
   4  dr--        832  Mar 01 1993 00:50:53  html
40.   4  dr--        832  Mar 01 1993 00:50:53  html
226  -r--        341  Jan 01 1970 00:03:16  env_vars
41. 226  -r--        341  Jan 01 1970 00:03:16  env_vars
227  -rwx        1203  Mar 01 1993 00:24:07  config.text
42. 227  -rwx        1203  Mar 01 1993 00:24:07  config.text
   6  -r--        8192  Mar 01 1993 00:49:56  e2rb.bin
43.   6  -r--        8192  Mar 01 1993 00:49:56  e2rb.bin
  18  -r--        108  Mar 01 1993 00:50:55  info.ver
44. 18  -r--        108  Mar 01 1993 00:50:55  info.ver
45.
3612672 bytes total (683520 bytes free)</pre>
3612672 bytes total (683520 bytes free)
Make note of the filename, it is used in the next few steps.
Make note of the filename, it is used in the next few steps.
46. Enter global configuration mode:
 
47. switch#configure terminal
Enter global configuration mode:
48. Enter configuration commands, one per line. End with CNTL/Z.
<pre>switch#configure terminal
49. Set the boot parameters so that when the switch is reloaded after the upgrade, it boots with the new_image.
Enter configuration commands, one per line. End with CNTL/Z.</pre>
Set the boot parameters so that when the switch is reloaded after the upgrade, it boots with the new_image.
Issue this command in order to set the boot parameter to the new image. This command overwrites any previous boot image settings.
Issue this command in order to set the boot parameter to the new image. This command overwrites any previous boot image settings.
switch(config)#boot system flash:
<pre>switch(config)#boot system flash:
c2900xl-c3h2s-mz.120-5.WC8.bin
c2900xl-c3h2s-mz.120-5.WC8.bin</pre>
50. Reenable access to the switch HTTP pages:
 
51. switch(config)#ip http server
Reenable access to the switch HTTP pages:
52. Return to privileged EXEC mode:
switch(config)#ip http server
53. switch(config)#end
Return to privileged EXEC mode:
54. Reload the new software with this command:
switch(config)#end
55. switch#reload
Reload the new software with this command:
56. System configuration has been modified. Save? [yes/no]:y
<pre>switch#reload
Proceed with reload? [confirm]
System configuration has been modified. Save? [yes/no]:y
57. Choose Return in order to confirm the reload.
Proceed with reload? [confirm]</pre>
58. After the switch reboots, use Telnet or Console login in order to access the switch and enter the privileged EXEC mode show version command in order to verify the upgrade procedure.
Choose Return in order to confirm the reload.
After the switch reboots, use Telnet or Console login in order to access the switch and enter the privileged EXEC mode show version command in order to verify the upgrade procedure.


Step-by-Step Procedure for the 2950/2955 with the CMS image (.tar file)  
== Upgrading Software for the 2950/2955 with the CMS image (.tar file) ==
In this example, the software on a 2950 is upgraded from version 12.1(12c)EA1 to version 121-13.EA1 with the CMS image (.tar file). The procedure is the same for a 2955.
In this example, the software on a 2950 is upgraded from version 12.1(12c)EA1 to version 121-13.EA1 with the CMS image (.tar file). The procedure is the same for a 2955.
1. Issue the show version command to view the current version of software that you run. Here is a sample command output:
Issue the show version command to view the current version of software that you run. Here is a sample command output:
2. 2950#sh ver
<pre>2950#sh ver
3. Cisco Internetwork Operating System Software
Cisco Internetwork Operating System Software
4. IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(12c)EA1,
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(12c)EA1,
5. RELEASE SOFTWARE (fc1)
RELEASE SOFTWARE (fc1)
6.
 
7. !--- The current software version is 12.1(12c)EA1.
!--- The current software version is 12.1(12c)EA1.</pre>
8.
 
9. Go to the LAN Switching Software section of the Downloads ( registered customers only) page.
Go to the LAN Switching Software section of the [http://tools.cisco.com/support/downloads/go/Redirect.x?mdfid=268438038 Downloads] ( registered customers only) page.
Select Catalyst 2950 software and locate the image you want to download. Note the size of the image in bytes. This example uses the c2950-i6q4l2-mz.121-13.EA1.tar file. The image size is 4877312 bytes, or approximately 5 MB. Download the image you want.
Select Catalyst 2950 software and locate the image you want to download. Note the size of the image in bytes. This example uses the c2950-i6q4l2-mz.121-13.EA1.tar file. The image size is 4877312 bytes, or approximately 5 MB. Download the image you want.
10. Issue the dir flash: command on the 2950/2955 to verify how much free memory you have for the upgrade. Here is a sample command output:
 
11. 2950#dir flash:
Issue the dir flash: command on the 2950/2955 to verify how much free memory you have for the upgrade. Here is a sample command output:
12. Directory of flash:/
<pre>2950#dir flash:
13.   2  -rwx  2774747  Mar 01 1993 17:52:14  c2950-i6q4l2-mz.121-12c.EA1.bin
Directory of flash:/
14. 21  -rwx  2665985  Mar 01 1993 18:02:04  c2950-i6q4l2-mz.121-11.EA1a.bin
   2  -rwx  2774747  Mar 01 1993 17:52:14  c2950-i6q4l2-mz.121-12c.EA1.bin
15.  
  21  -rwx  2665985  Mar 01 1993 18:02:04  c2950-i6q4l2-mz.121-11.EA1a.bin
16. !--- Two images are installed.
17.
18. 4  -rwx      916  Mar 01 1993 03:31:05  vlan.dat
19. 22  -rwx      312  Mar 01 1993 18:03:19  env_vars
20. 7  drwx      832  Mar 01 1993 17:53:20  html
21.    
22. !--- output suppressed ---
23.
24.
25. !--- Notice the d in the permissions, which indicates that html is a
26. !--- directory that contains the CMS files extracted from the .tar image
27. !--- during the upgrade.
28.
29. 7741440 bytes total (578048 bytes free)
30.    
31. !--- There is less than 1 MB of free memory in Flash, which is not enough
32. !--- for the upgrade. Delete one of the old IOS images (.bin files).
33.
2950#
34. Issue the delete command to remove one of the old IOS images in order to make room for the upgrade. Here is a sample command output:
35. 2950#delete flash:c2950-i6q4l2-mz.121-11.EA1a.bin
36. Delete filename [c2950-i6q4l2-mz.121-11.EA1a.bin]?
37. Delete flash:c2950-i6q4l2-mz.121-11.EA1a.bin? [confirm]
38. 2950#
39. 2950#dir flash:
40. Directory of flash:/
41.   2  -rwx  2774747  Mar 01 1993 17:52:14  c2950-i6q4l2-mz.121-12c.EA1.bin
42.    
43. !--- You can leave one old image as a backup if you prefer.
44.
45.   4  -rwx      916  Mar 01 1993 03:31:05  vlan.dat
46. 22  -rwx      312  Mar 01 1993 18:03:19  env_vars
47.   7  drwx      832  Mar 01 1993 17:53:20  html
48.    
49. !--- output suppressed ---
50.
51. 7741440 bytes total (3244544 bytes free)
52.  
53. !--- Even though you freed up additional memory there is still not
54. !--- enough free memory for the upgrade. Delete the files in the
55. !--- html directory.
56.
  2950#
The html directory is where the CMS files are extracted from the .tar image and installed during the upgrade. Issue the dir html command to view these files. Here is a sample command output:
2950#dir html
Directory of flash:/html/
    3  -rwx        4010  Mar 01 1993 17:52:14  homepage.htm
    5  -rwx        1392  Mar 01 1993 17:52:14  not_supported.html
    8  -rwx        9448  Mar 01 1993 17:52:15  common.js
    9  -rwx      22152  Mar 01 1993 17:52:15  cms_splash.gif
  10  -rwx        1211  Mar 01 1993 17:52:15  cms_13.html
  11  -rwx        2823  Mar 01 1993 17:52:15  cluster.html
    
    
!--- Two images are installed.
4  -rwx      916  Mar 01 1993 03:31:05  vlan.dat
22  -rwx      312  Mar 01 1993 18:03:19  env_vars
7  drwx      832  Mar 01 1993 17:53:20  html
   
!--- output suppressed ---
!--- output suppressed ---
!--- Notice the d in the permissions, which indicates that html is a
!--- directory that contains the CMS files extracted from the .tar image
!--- during the upgrade.


 
7741440 bytes total (578048 bytes free)
!--- These are the files used by the CMS software.
 
!--- There is less than 1 MB of free memory in Flash, which is not enough
!--- for the upgrade. Delete one of the old IOS images (.bin files).
2950#</pre>


Issue the delete flash:html/* command to delete all of these files before the upgrade. Here is a sample command output:
Issue the delete command to remove one of the old IOS images in order to make room for the upgrade. Here is a sample command output:
<pre>2950#delete flash:c2950-i6q4l2-mz.121-11.EA1a.bin
Delete filename [c2950-i6q4l2-mz.121-11.EA1a.bin]?
Delete flash:c2950-i6q4l2-mz.121-11.EA1a.bin? [confirm]
2950#
2950#dir flash:
Directory of flash:/
  2  -rwx  2774747  Mar 01 1993 17:52:14  c2950-i6q4l2-mz.121-12c.EA1.bin
   
!--- You can leave one old image as a backup if you prefer.
 
  4  -rwx      916  Mar 01 1993 03:31:05  vlan.dat
22  -rwx      312  Mar 01 1993 18:03:19  env_vars
  7  drwx      832  Mar 01 1993 17:53:20  html
   
!--- output suppressed ---
 
7741440 bytes total (3244544 bytes free)
 
!--- Even though you freed up additional memory there is still not
!--- enough free memory for the upgrade. Delete the files in the
!--- html directory.
 
2950#</pre>
 
 
The html directory is where the CMS files are extracted from the .tar image and installed during the upgrade. Issue the dir html command to view these files. Here is a sample command output:
<pre>2950#dir html
Directory of flash:/html/
    3  -rwx        4010  Mar 01 1993 17:52:14  homepage.htm
    5  -rwx        1392  Mar 01 1993 17:52:14  not_supported.html
    8  -rwx        9448  Mar 01 1993 17:52:15  common.js
    9  -rwx      22152  Mar 01 1993 17:52:15  cms_splash.gif
  10  -rwx        1211  Mar 01 1993 17:52:15  cms_13.html
  11  -rwx        2823  Mar 01 1993 17:52:15  cluster.html
 
!--- output suppressed ---
 
 
!--- These are the files used by the CMS software.</pre>
 
Issue the delete flash:html/* command to delete all of these files before the upgrade. Here is a sample command output:
Note: Deletion of these files disables access to the HTML pages during the upgrade. After the upgrade, access becomes available again.
Note: Deletion of these files disables access to the HTML pages during the upgrade. After the upgrade, access becomes available again.
2950#delete flash:html/*
<pre>2950#delete flash:html/*
Delete filename [html/*]?
Delete filename [html/*]?
   
   
Line 1,137: Line 1,136:
7741440 bytes total (4960256 bytes free)
7741440 bytes total (4960256 bytes free)
      
      
!--- There is now enough room to proceed with the upgrade.
!--- There is now enough room to proceed with the upgrade.</pre>


57. Issue the archive tar command to copy over the .tar file and extract all the files. The full command syntax is archive tar /xtract tftp://<tftp server ip>/<filename> flash:. Here is a sample command output:
Issue the archive tar command to copy over the .tar file and extract all the files. The full command syntax is archive tar /xtract tftp://<tftp server ip>/<filename> flash:. Here is a sample command output:
Note: If you want to upgrade from a release earlier than 12.1(6)EA2 on a 2950, issue the tar command instead of the archive tar command.
Note: If you want to upgrade from a release earlier than 12.1(6)EA2 on a 2950, issue the tar command instead of the archive tar command.
2950#archive tar /xtract tftp://20.20.20.2/c2950-i6q4l2-tar.121-13.EA1.tar flash:
<pre>2950#archive tar /xtract tftp://20.20.20.2/c2950-i6q4l2-tar.121-13.EA1.tar flash:
Loading c2950-i6q4l2-tar.121-13.EA1.tar from 20.20.20.2 (via Vlan1): !
Loading c2950-i6q4l2-tar.121-13.EA1.tar from 20.20.20.2 (via Vlan1): !


Line 1,208: Line 1,207:
      
      
!--- output suppressed ---
!--- output suppressed ---
!--- The new CMS files have been extracted and installed.
!--- The new CMS files have been extracted and installed.</pre>


58. Set a boot system statement so the new image boots on the next reload. Here is a sample command output:
Set a boot system statement so the new image boots on the next reload. Here is a sample command output:
59. 2950#conf t
<pre>2950#conf t
60. 2950(config)#boot system flash:c2950-i6q4l2-mz.121-13.EA1.bin
2950(config)#boot system flash:c2950-i6q4l2-mz.121-13.EA1.bin
61. 2950(config)#end
2950(config)#end
62. 2950#
2950#
63. 2950#sh boot
2950#sh boot
64. BOOT path-list:  flash:c2950-i6q4l2-mz.121-13.EA1.bin
BOOT path-list:  flash:c2950-i6q4l2-mz.121-13.EA1.bin
65.
 
66. !--- output suppressed ---
!--- output suppressed ---
67. !--- The boot system statement does not show up in the config.
!--- The boot system statement does not show up in the config.
68. !--- Issue the show boot command to verify whether the  
!--- Issue the show boot command to verify whether the  
69. !--- new image boots on the next reload of the switch.
!--- new image boots on the next reload of the switch.</pre>
70.
 
You can set a boot system statement to boot a specific backup image if the new image fails for some reason. Otherwise, the 2950/2955 automatically attempts to boot the next valid image in the event of a failure.
You can set a boot system statement to boot a specific backup image if the new image fails for some reason. Otherwise, the 2950/2955 automatically attempts to boot the next valid image in the event of a failure.
Here is a sample command output to configure a boot system statement for multiple images:
Here is a sample command output to configure a boot system statement for multiple images:
2950#conf t
<pre>2950#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Enter configuration commands, one per line.  End with CNTL/Z.
2950(config)#boot system flash:
2950(config)#boot system flash:
Line 1,242: Line 1,241:
!--- The boot system statement does not show up in the config.
!--- The boot system statement does not show up in the config.
!--- Issue the show boot command to verify whether the new image
!--- Issue the show boot command to verify whether the new image
!--- boots on the next reload of the switch.
!--- boots on the next reload of the switch.</pre>
 
Issue the wr mem command to save your changes and reload the switch. Here is a sample command output:
<pre>2950#wr mem
Building configuration...
[OK]
2950#reload
Proceed with reload? [confirm]


71. Issue the wr mem command to save your changes and reload the switch. Here is a sample command output:
!--- Press RETURN or ENTER.
72. 2950#wr mem
73. Building configuration...
74. [OK]
75. 2950#reload
76. Proceed with reload? [confirm]
77.
78. !--- Press RETURN or ENTER.
79.
80. 02:53:37: Bootstrap Emulator called with code 45
81. 02:53:37: %SYS-5-RELOAD: Reload requested
82.
83. !--- Press RETURN or ENTER.
84.
85. Verify you run the new image with the show version command. Here is a sample command output:
86. 2950#sh ver
87. Cisco Internetwork Operating System Software
88. IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(13)EA1,
89. RELEASE SOFTWARE
90.
91. !--- You now run the new software.
92.
93. (fc1)
94. Copyright (c) 1986-2003 by cisco Systems, Inc.
95.
96. !--- output suppressed ---
97.
98. System image file is "flash:c2950-i6q4l2-mz.121-13.EA1.bin"
99. cisco WS-C2950-24 (RC32300) processor (revision G0)
100. with 20839K bytes of memory.
101. Processor board ID FHK0650X0QY
102. Last reset from system-reset
103. Running Standard Image
104.
105. !--- output suppressed ---
106. !--- You run the SI feature set. If this model of switch
107. !--- can run the EI, you see Running Enhanced Image.
108.
This completes the upgrade procedure for a 2950 through the CMS image (.tar file).  


Step-by-Step Procedure for the 2950/2955 with only the IOS image (.bin file)
02:53:37: Bootstrap Emulator called with code 45
For this example, the software on a 2950 is upgraded from version 12.1(12c)EA1 to version 121-13.EA1 with only the IOS image (.bin file). The procedure is the same no matter which version of software you use, including the 2955.
02:53:37: %SYS-5-RELOAD: Reload requested
1. Issue the show version command to view the current version of software that you run. Here is a sample command output:
2. 2950#sh ver
3. Cisco Internetwork Operating System Software
4. IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(12c)EA1,
5. RELEASE SOFTWARE
6. (fc1)
7.
8. !--- The current software version is 12.1(12c)EA1.
9.
10. Go to the LAN Switching Software section of the Downloads ( registered customers only) page.
Select Catalyst 2950 or 2955 software and locate the image you want to download. Note the size of the image in bytes. This example uses the c2950-i6q4l2-mz.121-13.EA1.bin file. The image size is 2888547 bytes or approximately 3 MB. Download the image you want.
11. Issue the dir flash: command on the 2950/2955 to verify how much free memory you have for the upgrade. Here is a sample command output:
12. 2950#dir flash:
13. Directory of flash:/
14.   2  -rwx  2774747  Mar 02 1993 00:11:42  c2950-i6q4l2-mz.121-12c.EA1.bin
15.   3  -rwx        5  Mar 01 1993 00:16:08  private-config.text
16.   4  -rwx      916  Mar 01 1993 03:31:05  vlan.dat
17.   22  -rwx  2665985  Mar 02 1993 00:20:15  c2950-i6q4l2-mz.121-11.EA1a.bin
18.      
19. !--- Notice that two images are installed already.
20.
21.   6  -rwx    1459  Mar 01 1993 00:16:08  config.text
22.   7  drwx      832  Mar 02 1993 00:14:18  html
23.      
24. !--- output suppressed ---
25.
26. 7741440 bytes total (578048 bytes free)
27.      
28. !--- There is less than 1 MB of memory free out of the total of
29. !--- 8 MB, which is not enough. Delete the old image
30. !--- in order to upgrade.
31.
2950#
Note: If you already have enough room in Flash for the upgrade, you can proceed directly to Step 5.
32. Issue the delete command to remove the old image in order to make room for the upgrade. Here is a sample command output:
33. 2950#delete flash:c2950-i6q4l2-mz.121-11.EA1a.bin
34. Delete filename [c2950-i6q4l2-mz.121-11.EA1a.bin]?
35.
36. !--- Press RETURN or ENTER.
37.
38. Delete flash:c2950-i6q4l2-mz.121-11.EA1a.bin? [confirm]
39.
40. !--- Press RETURN or ENTER.
41.
42. 2950#
43. 2950#dir flash:
44. Directory of flash:/
45.     2  -rwx    2774747  Mar 02 1993 00:11:42  c2950-i6q4l2-mz.121-12c.EA1.bin
46.    
47. !--- You can leave one old image as a backup if you prefer.
48.
49.     3  -rwx          5  Mar 01 1993 00:16:08  private-config.text
50.     4  -rwx        916  Mar 01 1993 03:31:05  vlan.dat
51.     6  -rwx        1459  Mar 01 1993 00:16:08  config.text
52.     7  drwx        832  Mar 02 1993 00:14:18  html
53.    
54. !--- output suppressed ---
55.
56. 7741440 bytes total (3244544 bytes free)
57.    
58. !--- There is now over 3 MB of free Flash memory,
59. !--- which is enough for the upgrade.
60.
2950#
61. Perform the upgrade through the copy tftp flash: command. Here is a sample command output:
62. 2950#copy tftp flash:
63. Address or name of remote host []? 20.20.20.2
64.
65. !--- Type your TFTP server IP address.
66. !--- Press RETURN or ENTER.
67.
68. Source filename []? c2950-i6q4l2-mz.121-13.EA1.bin
69.
70. !--- Press RETURN or ENTER.
71.
72. Destination filename [c2950-i6q4l2-mz.121-13.EA1.bin]?
73.
74. !--- Press RETURN or ENTER.
75.
76. Accessing tftp://20.20.20.2/c2950-i6q4l2-mz.121-13.EA1.bin...
77. Loading c2950-i6q4l2-mz.121-13.EA1.bin from 20.20.20.2 (via Vlan1): !!!!!!!!!!
78. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
79. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
80. [OK - 2888547 bytes]
81. 2888547 bytes copied in 96.188 secs (30030 bytes/sec)
82. 2950#dir flash:
83. Directory of flash:/
84.     2  -rwx    2774747  Mar 02 1993 00:11:42  c2950-i6q4l2-mz.121-12c.EA1.bin
85.     3  -rwx          5  Mar 01 1993 00:16:08  private-config.text
86.     4  -rwx        916  Mar 01 1993 03:31:05  vlan.dat
87.   22  -rwx    2888547  Mar 01 1993 00:42:03  c2950-i6q4l2-mz.121-13.EA1.bin
88.    
89. !--- The new image is installed in the flash: directory.
90.
91.     6  -rwx        1459  Mar 01 1993 00:16:08  config.text
92.     7  drwx        832  Mar 02 1993 00:14:18  html
93.    
94. !--- output suppressed ---
95.
96. 7741440 bytes total (355840 bytes free)
97. 2950#verify flash:c2950-i6q4l2-mz.121-13.EA1.bin
98. Verified flash:c2950-i6q4l2-mz.121-13.EA1.bin
99.
100. !--- Issue the verify command to verify
101. !--- whether the image checksum is correct.
102.
103. Set a boot system statement so the new image boots on the next reload. Here is a sample command output:
104. 2950#conf t
105. 2950(config)#boot system flash:c2950-i6q4l2-mz.121-13.EA1.bin
106. 2950(config)#end
107. 2950#
108. 2950#sh boot
109. BOOT path-list:  flash:c2950-i6q4l2-mz.121-13.EA1.bin
110.
111. !--- output suppressed ---
112. !--- The boot system statement does not show up in the configuration.
113. !--- Issue the show boot command to verify whether the new image
114. !--- boots on the next reload of the switch.
115.
116. Issue the wr mem command to save your changes and reload the switch. Here is a sample command output:
117. 2950#wr mem
118. Building configuration...
119. [OK]
120. 2950#reload
121. Proceed with reload? [confirm]
122.
123. !--- Press RETURN or ENTER.
124.
125. 00:05:05: %SYS-5-RELOAD: Reload requested
126.
127. !--- output suppressed ---
128.
129. Press RETURN to get started!
130.
131. !--- Press RETURN or ENTER.
132.
133.
134. !--- output suppressed ---
135.
136. Verify whether you run the new image through the show version command. Here is a sample command output:
137. 2950#sh ver
138. Cisco Internetwork Operating System Software
139. IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(13)EA1,
RELEASE SOFTWARE (fc1)
This completes the upgrade procedure for a 2950/2955 using only the IOS image (.bin file).


Configure 2960
!--- Press RETURN or ENTER.</pre>
Last updated 2010-05-11


Verify you run the new image with the show version command. Here is a sample command output:
<pre>2950#sh ver
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(13)EA1,
RELEASE SOFTWARE


# reload the config (dont paste)
!--- You now run the new software.
write erase
delete flash:vlan.dat
reload
# enter basic setup


# setup pub vlan
(fc1)
conf t
Copyright (c) 1986-2003 by cisco Systems, Inc.
int vlan1
no ip address
int vlan50
ip address 69.55.230.249 255.255.255.0
ip default-gateway 69.55.230.1
end


#69.55.230.251
!--- output suppressed ---
#69.55.230.253
#69.55.230.254
#69.55.230.250
#69.55.230.252


# 69.55.230.249
System image file is "flash:c2950-i6q4l2-mz.121-13.EA1.bin"
cisco WS-C2950-24 (RC32300) processor (revision G0)
with 20839K bytes of memory.
Processor board ID FHK0650X0QY
Last reset from system-reset
Running Standard Image


# setup priv/mgmt vlan
!--- output suppressed ---
conf t
!--- You run the SI feature set. If this model of switch
int vlan300
!--- can run the EI, you see Running Enhanced Image.</pre>
no ip address
This completes the upgrade procedure for a 2950 through the CMS image (.tar file).  
#ip address 10.1.4.160 255.255.255.0
ip address 10.1.4.161 255.255.255.0 #(p1b)
end


# setup ports. into vlan, spanning-tree portfast, trunk
= Upgrading Software for the 2950/2955 with the IOS image (.bin file) =
conf t
For this example, the software on a 2950 is upgraded from version 12.1(12c)EA1 to version 121-13.EA1 with only the IOS image (.bin file). The procedure is the same no matter which version of software you use, including the 2955.
int range GigabitEthernet0/2 - 10
Issue the show version command to view the current version of software that you run. Here is a sample command output:
switchport access vlan 50
switchport mode access
duplex full
spanning-tree portfast
int GigabitEthernet0/24
description Trunk to switch-p1a (vlan 300,50)
switchport trunk allowed vlan 300,50
switchport mode trunk
int GigabitEthernet0/1
description Trunk to ASA (vlan 50)
switchport trunk allowed vlan 50
switchport mode trunk
int GigabitEthernet0/23
description Private net (vlan 300)
switchport access vlan 300
switchport mode access
spanning-tree portfast


int range GigabitEthernet0/11 - 20
<pre>2950#sh ver
  switchport trunk allowed vlan 50,300
Cisco Internetwork Operating System Software
  switchport mode trunk
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(12c)EA1,
  duplex full
RELEASE SOFTWARE
end
(fc1)
!--- The current software version is 12.1(12c)EA1.</pre>
Go to the LAN Switching Software section of the Downloads ( registered customers only) page.
Select Catalyst 2950 or 2955 software and locate the image you want to download. Note the size of the image in bytes. This example uses the c2950-i6q4l2-mz.121-13.EA1.bin file. The image size is 2888547 bytes or approximately 3 MB. Download the image you want.
Issue the dir flash: command on the 2950/2955 to verify how much free memory you have for the upgrade. Here is a sample command output:
<pre>2950#dir flash:
Directory of flash:/
  2  -rwx  2774747  Mar 02 1993 00:11:42  c2950-i6q4l2-mz.121-12c.EA1.bin
  3  -rwx        5  Mar 01 1993 00:16:08  private-config.text
  4  -rwx      916  Mar 01 1993 03:31:05 vlan.dat
  22  -rwx  2665985  Mar 02 1993 00:20:15  c2950-i6q4l2-mz.121-11.EA1a.bin</pre>
 
!--- Notice that two images are installed already.
  6  -rwx    1459  Mar 01 1993 00:16:08 config.text
  7  drwx      832 Mar 02 1993 00:14:18  html
     
!--- output suppressed ---


7741440 bytes total (578048 bytes free)
     
!--- There is less than 1 MB of memory free out of the total of
!--- 8 MB, which is not enough. Delete the old image
!--- in order to upgrade.


# REFERENCE. to setup a port for trunk or access
2950#
conf t
</pre>
interface FastEthernet0/32
Note: If you already have enough room in Flash for the upgrade, you can proceed directly to Step 5.
switchport access vlan 210
switchport mode dynamic desirable
duplex full
end


# setup rapid spanning tree
Issue the delete command to remove the old image in order to make room for the upgrade. Here is a sample command output:
conf t
<pre>2950#delete flash:c2950-i6q4l2-mz.121-11.EA1a.bin
spanning-tree mode rapid-pvst
Delete filename [c2950-i6q4l2-mz.121-11.EA1a.bin]?
end
!--- Press RETURN or ENTER.


# setup root, on p1a:
Delete flash:c2950-i6q4l2-mz.121-11.EA1a.bin? [confirm]
conf t
spanning-tree vlan 50 root primary
end


# and on p1b:
!--- Press RETURN or ENTER.
conf t
spanning-tree vlan 50 root secondary
end


# config terminal. setup timeout, priv level
2950#
conf t
2950#dir flash:
line con 0
Directory of flash:/
exec-timeout 10
    2  -rwx    2774747  Mar 02 1993 00:11:42  c2950-i6q4l2-mz.121-12c.EA1.bin
line vty 0 15
   
exec-timeout 10
!--- You can leave one old image as a backup if you prefer.
privilege level 0
 
end
    3  -rwx          5  Mar 01 1993 00:16:08  private-config.text
    4  -rwx        916  Mar 01 1993 03:31:05  vlan.dat
    6  -rwx        1459  Mar 01 1993 00:16:08  config.text
    7  drwx        832  Mar 02 1993 00:14:18  html
   
!--- output suppressed ---
 
7741440 bytes total (3244544 bytes free)
   
!--- There is now over 3 MB of free Flash memory,
!--- which is enough for the upgrade.
 
2950#</pre>
 
Perform the upgrade through the copy tftp flash: command. Here is a sample command output:
<pre>2950#copy tftp flash:
Address or name of remote host []? 20.20.20.2


# setup web user
!--- Type your TFTP server IP address.
conf t
!--- Press RETURN or ENTER.
service password-encryption
username web privilege 15 password xxxxxxxx
end


# enable http passwd checking, disable http,
Source filename []? c2950-i6q4l2-mz.121-13.EA1.bin
conf t
ip http authentication local
no ip http server
end


# enable ssh (disable telnet)
!--- Press RETURN or ENTER.
conf t
line vty 0 15
transport input ssh
login local
logging synchronous
transport preferred ssh
transport input ssh
transport output ssh
end


# setup acls to restrict access to ssh on priv net
Destination filename [c2950-i6q4l2-mz.121-13.EA1.bin]?
conf t
access-list 101 remark Permit SSH access from administrators
access-list 101 permit tcp host 10.1.4.1 any eq 22 log
access-list 101 deny ip any any log
line vty 0 15
access-class 101 in
end


# setup acls to restrict access to https on pub net
!--- Press RETURN or ENTER.
conf t
access-list 10 remark Permit HTTPS access from administrators
access-list 10 permit 64.163.14.54
access-list 10 permit 69.55.233.195
access-list 10 permit 99.150.247.226
access-list 10 deny  any log
ip http access-class 10
end


# setup SNMP
Accessing tftp://20.20.20.2/c2950-i6q4l2-mz.121-13.EA1.bin...
conf t
Loading c2950-i6q4l2-mz.121-13.EA1.bin from 20.20.20.2 (via Vlan1): !!!!!!!!!!
access-list 20 remark Permit SNMP
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
access-list 20 permit 10.1.4.5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
access-list 20 deny   any log
[OK - 2888547 bytes]
no snmp-server community private RW
2888547 bytes copied in 96.188 secs (30030 bytes/sec)
no snmp-server community public RO
2950#dir flash:
snmp-server community jc292401 RO 20
Directory of flash:/
end
    2  -rwx    2774747   Mar 02 1993 00:11:42  c2950-i6q4l2-mz.121-12c.EA1.bin
    3  -rwx          5  Mar 01 1993 00:16:08  private-config.text
    4  -rwx        916  Mar 01 1993 03:31:05  vlan.dat
  22  -rwx    2888547  Mar 01 1993 00:42:03  c2950-i6q4l2-mz.121-13.EA1.bin
   
!--- The new image is installed in the flash: directory.


wr mem
    6  -rwx        1459  Mar 01 1993 00:16:08  config.text
Configure 2950
    7  drwx        832  Mar 02 1993 00:14:18  html
Last updated 2010-10-06
   
!--- output suppressed ---


# reset
7741440 bytes total (355840 bytes free)
write erase
2950#verify flash:c2950-i6q4l2-mz.121-13.EA1.bin
reload
Verified flash:c2950-i6q4l2-mz.121-13.EA1.bin
# enter basic setup


conf t
!--- Issue the verify command to verify
int vlan300
!--- whether the image checksum is correct.</pre>
ip address 10.1.2.52 255.255.255.0
ip default-gateway 10.1.2.1
int vlan300
no shutdown
end


## ONLY for p20 ##
Set a boot system statement so the new image boots on the next reload. Here is a sample command output:
int GigabitEthernet0/1
<pre>2950#conf t
description Connection from i2b
2950(config)#boot system flash:c2950-i6q4l2-mz.121-13.EA1.bin
int GigabitEthernet0/2
2950(config)#end
description BW mirror port
2950#
monitor session 1 source interface gi0/1
2950#sh boot
monitor session 1 destination interface gi0/2 encapsulation dot1q
BOOT path-list:  flash:c2950-i6q4l2-mz.121-13.EA1.bin
end
!--- output suppressed ---
!--- The boot system statement does not show up in the configuration.
!--- Issue the show boot command to verify whether the new image
!--- boots on the next reload of the switch.</pre>


# setup mgmt ports
Issue the wr mem command to save your changes and reload the switch. Here is a sample command output:
conf t
<pre>2950#wr mem
int range fa0/1 - 10
Building configuration...
switchport access vlan 300
[OK]
spanning-tree portfast
2950#reload
Proceed with reload? [confirm]


int fa0/24
!--- Press RETURN or ENTER.
description Firewall ext
spanning-tree portfast
end


# i2b link vlan
00:05:05: %SYS-5-RELOAD: Reload requested
conf t
int range fa0/23 - 24
switchport access vlan 200
int gi0/1
switchport access vlan 200
end


!--- output suppressed ---


# setup trunk ports
Press RETURN to get started!
conf t
int range fa0/19 - 20
switchport trunk allowed vlan 1,300
switchport mode trunk
no spanning-tree portfast
end


!--- Press RETURN or ENTER.


## END p20 ##
!--- output suppressed ---</pre>


Verify whether you run the new image through the show version command. Here is a sample command output:
<pre>2950#sh ver
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(13)EA1,
RELEASE SOFTWARE (fc1)</pre>


## normal switches ##
This completes the upgrade procedure for a 2950/2955 using only the IOS image (.bin file).


# setup ports
= Configure 2960=
conf t
int range fa0/1 - 24
spanning-tree portfast
end


# setup mgmt port
* reload the config (dont paste)
conf t
<pre>write erase
interface fa0/24
delete flash:vlan.dat
switchport access vlan 300
reload</pre>
description ats-2 - priv
end


# setup trunk ports
* enter basic setup
conf t
* setup pub vlan
int gi0/1
<pre>conf t
description Uplink to p20
int vlan1
switchport trunk allowed vlan 1,300
no ip address
switchport mode trunk
int vlan50
no spanning-tree portfast
ip address 69.55.230.249 255.255.255.0
end
ip default-gateway 69.55.230.1
end</pre>


## END normal switches ##
* setup priv/mgmt vlan
<pre>conf t
int vlan300
no ip address
#ip address 10.1.4.160 255.255.255.0
ip address 10.1.4.161 255.255.255.0 #(p1b)
end</pre>


# config terminal. setup timeout, priv level
* setup ports. into vlan, spanning-tree portfast, trunk
conf t
<pre>conf t
line con 0
int range GigabitEthernet0/2 - 10
exec-timeout 10
switchport access vlan 50
line vty 0 15
switchport mode access
exec-timeout 10
duplex full
privilege level 0
spanning-tree portfast
end
int GigabitEthernet0/24
description Trunk to switch-p1a (vlan 300,50)
switchport trunk allowed vlan 300,50
switchport mode trunk
int GigabitEthernet0/1
description Trunk to ASA (vlan 50)
switchport trunk allowed vlan 50
switchport mode trunk
int GigabitEthernet0/23
description Private net (vlan 300)
switchport access vlan 300
switchport mode access
spanning-tree portfast


# enable ssh (disable telnet)
int range GigabitEthernet0/11 - 20
conf t
  switchport trunk allowed vlan 50,300
line vty 0 4
  switchport mode trunk
privilege level 0
  duplex full
  logging synchronous
end</pre>
  transport preferred ssh
  login local
transport input ssh
transport output ssh


line vty 5 15
privilege level 0
logging synchronous
login local
transport preferred none
end


# setup web user
* REFERENCE. to setup a port for trunk or access
conf t
<pre>conf t
service password-encryption
interface FastEthernet0/32
username web privilege 15 password xxxxxxxx
switchport access vlan 210
end
switchport mode dynamic desirable
duplex full
end</pre>


# pass enc
* setup rapid spanning tree
conf t
<pre>conf t
service password-encryption
spanning-tree mode rapid-pvst
end
end</pre>


# enable http passwd checking, disable http,  
* setup root, on p1a:
conf t
<pre>conf t
ip http authentication local
spanning-tree vlan 50 root primary
#no ip http server (only http avail on 2950)
end</pre>
end


# lock down ssh/web/telnet access
* and on p1b:
conf t
<pre>conf t
no access-list 100
spanning-tree vlan 50 root secondary
access-list 100 permit ip host 69.55.233.196 any
end</pre>
access-list 100 permit ip host 99.150.247.226 any
access-list 100 permit ip host 10.1.2.1 any
access-list 100 permit ip host 64.163.14.54 any
access-list 100 deny  tcp any any eq www
access-list 100 deny  tcp any any eq telnet
int vlan 300
ip access-group 100 in
ip access-group 100 out


end
* config terminal. setup timeout, priv level
<pre>conf t
line con 0
exec-timeout 10
line vty 0 15
exec-timeout 10
privilege level 0
end</pre>


* setup web user
<pre>conf t
service password-encryption
username web privilege 15 password xxxxxxxx
end</pre>


# enable ssh
* enable http passwd checking, disable http,
conf t
<pre>conf t
ip domain-name johncompanies.com
ip http authentication local
crypto key generate rsa
no ip http server
1024
end</pre>
end


# time
* enable ssh (disable telnet)
conf t
<pre>conf t
clock timezone PDT -7
line vty 0 15
clock summer-time PDT recurring 2 Sunday March 2:00 1 Sunday November 2:00
transport input ssh
ntp server 10.1.2.1
login local
service timestamps log datetime localtime show-timezone
logging synchronous
end
transport preferred ssh
transport input ssh
transport output ssh
end</pre>
 
* setup acls to restrict access to ssh on priv net
<pre>conf t
access-list 101 remark Permit SSH access from administrators
access-list 101 permit tcp host 10.1.4.1 any eq 22 log
access-list 101 deny ip any any log
line vty 0 15
access-class 101 in
end</pre>
 
* setup acls to restrict access to https on pub net
<pre>conf t
access-list 10 remark Permit HTTPS access from administrators
access-list 10 permit 64.163.14.54
access-list 10 permit 69.55.233.195
access-list 10 permit 99.150.247.226
access-list 10 deny  any log
ip http access-class 10
end</pre>


# setup SNMP
* setup SNMP
conf t
<pre>conf t
access-list 20 remark Permit SNMP  
access-list 20 remark Permit SNMP  
access-list 20 permit 10.1.2.1
access-list 20 permit 10.1.4.5
access-list 20 deny  any log
access-list 20 deny  any log
no snmp-server community private RW
no snmp-server community private RW
no snmp-server community public RO
no snmp-server community public RO
snmp-server community jc292401 RO 20
snmp-server community jc292401 RO 20
end
end</pre>


wr mem
wr mem


Configure 2924 (i2b)
= Configure 2950 =
Last updated 2010-11-05


# reset
* reset
write erase
<pre>write erase
reload
reload</pre>
# enter basic setup


# setup vlans
* enter basic setup
conf t
interface VLAN1
no ip address
no ip directed-broadcast
no ip route-cache
shutdown


<pre>conf t
int vlan300
int vlan300
ip address 10.1.2.58 255.255.255.0
ip address 10.1.2.52 255.255.255.0
ip default-gateway 10.1.2.1
ip default-gateway 10.1.2.1
int vlan300
int vlan300
no shutdown
no shutdown
end
end</pre>
 
* ## ONLY for p20 ##
<pre>int GigabitEthernet0/1
description Connection from i2b
int GigabitEthernet0/2
description BW mirror port
monitor session 1 source interface gi0/1
monitor session 1 destination interface gi0/2 encapsulation dot1q
end</pre>


# setup mgmt ports
* setup mgmt ports
conf t
<pre>conf t
int fa0/24
int range fa0/1 - 10
  switchport access vlan 300
  switchport access vlan 300
description ats-8 - priv
  spanning-tree portfast
  spanning-tree portfast
end


# setup trunk port
int fa0/24
conf t
description Firewall ext
interface FastEthernet0/1
spanning-tree portfast
  description Uplink to p20
end</pre>
duplex full
 
  switchport trunk encapsulation dot1q
* i2b link vlan
  switchport trunk allowed vlan 1,300,1002-1005
<pre>conf t
  switchport mode trunk
int range fa0/23 - 24
  switchport access vlan 200
int gi0/1
  switchport access vlan 200
end</pre>
 
* setup trunk ports
<pre>conf t
int range fa0/19 - 20
  switchport trunk allowed vlan 1,300
  switchport mode trunk  
  no spanning-tree portfast
  no spanning-tree portfast
end
end</pre>
 
* ## END p20 ##
 
 
* ## normal switches ##
 
* setup ports
<pre>conf t
int range fa0/1 - 24
spanning-tree portfast
end</pre>


# setup ports
* setup mgmt port
conf t
<pre>conf t
interface FastEthernet0/2
interface fa0/24
  spanning-tree portfast
  switchport access vlan 300
  no desc
  description ats-2 - priv
!
end</pre>
interface FastEthernet0/3
 
spanning-tree portfast
* setup trunk ports
no desc
<pre>conf t
!
int gi0/1
interface FastEthernet0/4
  description Uplink to p20
  spanning-tree portfast
  switchport trunk allowed vlan 1,300
  no desc
switchport mode trunk
!
  no spanning-tree portfast
interface FastEthernet0/5
end</pre>
  spanning-tree portfast
 
no desc
* ## END normal switches ##
!
 
interface FastEthernet0/6
* config terminal. setup timeout, priv level
spanning-tree portfast
<pre>conf t
no desc
line con 0
!
exec-timeout 10
interface FastEthernet0/7
line vty 0 15
spanning-tree portfast
exec-timeout 10
no desc
privilege level 0
!
end</pre>
interface FastEthernet0/8
 
spanning-tree portfast
* enable ssh (disable telnet)
no desc
<pre>conf t
!
line vty 0 4
interface FastEthernet0/9
  privilege level 0
  spanning-tree portfast
  logging synchronous
  no desc
transport preferred ssh
!
login local
interface FastEthernet0/10
  transport input ssh
  spanning-tree portfast
  transport output ssh
  no desc
 
!
line vty 5 15
interface FastEthernet0/11
privilege level 0
  spanning-tree portfast
  logging synchronous
  no desc
  login local
!
transport preferred none
interface FastEthernet0/12
end</pre>
spanning-tree portfast
 
no desc
* setup web user
!
<pre>conf t
interface FastEthernet0/13
service password-encryption
spanning-tree portfast
username web privilege 15 password xxxxxxxx
no desc
end</pre>
!
 
interface FastEthernet0/14
* pass enc
spanning-tree portfast
<pre>conf t
no desc
service password-encryption
!
end</pre>
interface FastEthernet0/15
 
spanning-tree portfast
* enable http passwd checking, disable http,
no desc
<pre>conf t
!
ip http authentication local
interface FastEthernet0/16
#no ip http server (only http avail on 2950)
spanning-tree portfast
end</pre>
no desc
 
!
* lock down ssh/web/telnet access
interface FastEthernet0/17
<pre>conf t
spanning-tree portfast
no access-list 100
no desc
access-list 100 permit ip host 69.55.233.196 any
!
access-list 100 permit ip host 99.150.247.226 any
interface FastEthernet0/18
access-list 100 permit ip host 10.1.2.1 any
spanning-tree portfast
access-list 100 permit ip host 64.163.14.54 any
no desc
access-list 100 deny  tcp any any eq www
!
access-list 100 deny  tcp any any eq telnet
interface FastEthernet0/19
int vlan 300
spanning-tree portfast
ip access-group 100 in
no desc
ip access-group 100 out
!
 
interface FastEthernet0/20
end</pre>
spanning-tree portfast
 
no desc
* enable ssh
!
<pre>conf t
interface FastEthernet0/21
ip domain-name johncompanies.com
spanning-tree portfast
crypto key generate rsa
no desc
1024
!
end</pre>
interface FastEthernet0/22
 
spanning-tree portfast
* time
no desc
<pre>conf t
!
clock timezone PDT -7
interface FastEthernet0/23
clock summer-time PDT recurring 2 Sunday March 2:00 1 Sunday November 2:00
spanning-tree portfast
ntp server 10.1.2.1
no desc
service timestamps log datetime localtime show-timezone
end
end</pre>


# config terminal. setup timeout, priv level
* setup SNMP
conf t
<pre>conf t
line con 0
access-list 20 remark Permit SNMP
exec-timeout 10
access-list 20 permit 10.1.2.1
line vty 0 15
access-list 20 deny  any log
exec-timeout 10
no snmp-server community private RW
privilege level 0
no snmp-server community public RO
end
snmp-server community jc292401 RO 20
end</pre>
 
wr mem


# setup web user
= Configure 2924 (i2b) =
conf t
Last updated 2010-11-05
service password-encryption
username web privilege 15 password xxxxxxxx
end


# enable http passwd checking, disable http,
* reset
conf t
<pre>write erase
ip http authentication local
reload</pre>
#no ip http server (only http avail on 2950)
end


# lock down ssh/web/telnet access
* enter basic setup
conf t
* setup vlans
access-list 100 permit ip host 69.55.233.196 any
<pre>conf t
access-list 100 permit ip host 99.150.247.226 any
interface VLAN1
access-list 100 permit ip host 10.1.2.1 any
no ip address
access-list 100 permit ip host 64.163.14.54 any
no ip directed-broadcast
access-list 100 deny  tcp any any eq www
no ip route-cache
access-list 100 deny  tcp any any eq telnet
shutdown
int vlan 300
ip access-group 100 in
ip access-group 100 out


end
int vlan300
ip address 10.1.2.58 255.255.255.0
ip default-gateway 10.1.2.1
int vlan300
no shutdown
end</pre>


* setup mgmt ports
<pre>conf t
int fa0/24
switchport access vlan 300
description ats-8 - priv
spanning-tree portfast
end</pre>


# time
* setup trunk port
conf t
<pre>conf t
clock summer-time PDT recurring 2 Sunday March 2:00 1 Sunday November 2:00
interface FastEthernet0/1
clock timezone PST -8
description Uplink to p20
ntp server 10.1.2.1
duplex full
service timestamps log datetime localtime show-timezone
switchport trunk encapsulation dot1q
end
switchport trunk allowed vlan 1,300,1002-1005
switchport mode trunk
no spanning-tree portfast
end</pre>


conf t
* setup ports
access-list 20 remark Permit SNMP
<pre>conf t
access-list 20 permit 10.1.2.1
interface FastEthernet0/2
access-list 20 deny  any log
spanning-tree portfast
no snmp-server community private RW
no desc
no snmp-server community public RO
!
snmp-server community jc292401 RO 20
interface FastEthernet0/3
end
  spanning-tree portfast
 
  no desc
wr mem
!
 
interface FastEthernet0/4
Configure 2924 (castle)
spanning-tree portfast
Last updated 2011-01-26
no desc
 
!
# reset
interface FastEthernet0/5
write erase
  spanning-tree portfast
reload
  no desc
# enter basic setup "setup"
!
 
interface FastEthernet0/6
# setup vlans
  spanning-tree portfast
conf t
no desc
interface VLAN1
!
  no ip address
interface FastEthernet0/7
no ip directed-broadcast
  spanning-tree portfast
  no ip route-cache
no desc
shutdown
!
 
interface FastEthernet0/8
int vlan300
  spanning-tree portfast
ip address 10.1.4.164 255.255.255.0
ip default-gateway 10.1.4.1
int vlan300
no shutdown
end
 
# setup trunk port
conf t
interface FastEthernet0/1
  description Uplink to p1a
  duplex full
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,50,300,1002-1005
  switchport mode trunk
no spanning-tree portfast
end
 
conf t
interface FastEthernet0/2
description Uplink to p1b
duplex full
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,50,300,1002-1005
switchport mode trunk
  no spanning-tree portfast
end
 
# setup ports
conf t
interface FastEthernet0/3
switchport access vlan 50
  spanning-tree portfast
  no desc
  no desc
!
!
interface FastEthernet0/4
interface FastEthernet0/9
switchport access vlan 50
  spanning-tree portfast
  spanning-tree portfast
  no desc
  no desc
!
!
interface FastEthernet0/5
interface FastEthernet0/10
switchport access vlan 50
  spanning-tree portfast
  spanning-tree portfast
  no desc
  no desc
!
!
interface FastEthernet0/6
interface FastEthernet0/11
switchport access vlan 50
  spanning-tree portfast
  spanning-tree portfast
  no desc
  no desc
!
!
interface FastEthernet0/7
interface FastEthernet0/12
switchport access vlan 50
  spanning-tree portfast
  spanning-tree portfast
  no desc
  no desc
!
!
interface FastEthernet0/8
interface FastEthernet0/13
switchport access vlan 50
  spanning-tree portfast
  spanning-tree portfast
  no desc
  no desc
!
!
interface FastEthernet0/9
interface FastEthernet0/14
switchport access vlan 50
  spanning-tree portfast
  spanning-tree portfast
  no desc
  no desc
!
!
interface FastEthernet0/10
interface FastEthernet0/15
switchport access vlan 50
  spanning-tree portfast
  spanning-tree portfast
  no desc
  no desc
!
!
interface FastEthernet0/11
interface FastEthernet0/16
switchport access vlan 50
  spanning-tree portfast
  spanning-tree portfast
  no desc
  no desc
!
!
interface FastEthernet0/12
interface FastEthernet0/17
switchport access vlan 50
  spanning-tree portfast
  spanning-tree portfast
  no desc
  no desc
!
!
interface FastEthernet0/13
interface FastEthernet0/18
switchport access vlan 50
  spanning-tree portfast
  spanning-tree portfast
  no desc
  no desc
!
!
interface FastEthernet0/14
interface FastEthernet0/19
switchport access vlan 50
  spanning-tree portfast
  spanning-tree portfast
  no desc
  no desc
!
!
interface FastEthernet0/15
interface FastEthernet0/20
switchport access vlan 50
  spanning-tree portfast
  spanning-tree portfast
  no desc
  no desc
!
!
interface FastEthernet0/16
interface FastEthernet0/21
switchport access vlan 50
  spanning-tree portfast
  spanning-tree portfast
  no desc
  no desc
!
!
interface FastEthernet0/17
interface FastEthernet0/22
switchport access vlan 50
  spanning-tree portfast
  spanning-tree portfast
  no desc
  no desc
!
!
interface FastEthernet0/18
interface FastEthernet0/23
switchport access vlan 50
  spanning-tree portfast
  spanning-tree portfast
  no desc
  no desc
!
end</pre>
interface FastEthernet0/19
 
switchport access vlan 50
* config terminal. setup timeout, priv level
spanning-tree portfast
<pre>conf t
no desc
line con 0
!
exec-timeout 10
interface FastEthernet0/20
line vty 0 15
switchport access vlan 50
exec-timeout 10
spanning-tree portfast
privilege level 0
no desc
end</pre>
!
 
interface FastEthernet0/21
* setup web user
switchport access vlan 50
<pre>conf t
spanning-tree portfast
service password-encryption
no desc
username web privilege 15 password xxxxxxxx
!
end</pre>
interface FastEthernet0/22
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/23
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/24
switchport access vlan 50
spanning-tree portfast
no desc
end


# config terminal. setup timeout, priv level
* enable http passwd checking, disable http,  
conf t
<pre>conf t
line con 0
ip http authentication local
exec-timeout 10
#no ip http server (only http avail on 2950)
line vty 0 15
end</pre>
exec-timeout 10
privilege level 0
end


# setup web user
* lock down ssh/web/telnet access
conf t
<pre>conf t
service password-encryption
access-list 100 permit ip host 69.55.233.196 any
username web privilege 15 password xxxxxxxx
access-list 100 permit ip host 99.150.247.226 any
end
access-list 100 permit ip host 10.1.2.1 any
 
access-list 100 permit ip host 64.163.14.54 any
# enable http passwd checking, disable http,
access-list 100 deny  tcp any any eq www
conf t
access-list 100 deny  tcp any any eq telnet
ip http authentication local
int vlan 300
#no ip http server (only http avail on 2950)
ip access-group 100 in
end
ip access-group 100 out


# lock down ssh/web/telnet access
end</pre>
conf t
access-list 1 permit 10.1.4.5
end




# time
* time
conf t
<pre>conf t
clock summer-time PDT recurring 2 Sunday March 2:00 1 Sunday November 2:00
clock summer-time PDT recurring 2 Sunday March 2:00 1 Sunday November 2:00
clock timezone PST -8
clock timezone PST -8
ntp server 10.1.4.1
ntp server 10.1.2.1
service timestamps log datetime localtime show-timezone
service timestamps log datetime localtime show-timezone
end
end
 
 
conf t
conf t
no snmp-server community private RW
access-list 20 remark Permit SNMP
no snmp-server community public RO
access-list 20 permit 10.1.2.1
snmp-server community jc292401 RO 1
access-list 20 deny  any log
end
no snmp-server community private RW
 
no snmp-server community public RO
wr mem
snmp-server community jc292401 RO 20
 
end</pre>
Configure a 2924 trunk
 
Last updated 2010-08-05
wr mem
 
 
conf t
= Configure 2924 (castle) =
interface FastEthernet0/1
 
  description Uplink to p1a
* reset
  duplex full
<pre>write erase
reload</pre>
 
* enter basic setup "setup"
* setup vlans
<pre>conf t
interface VLAN1
no ip address
no ip directed-broadcast
no ip route-cache
shutdown
 
int vlan300
ip address 10.1.4.164 255.255.255.0
ip default-gateway 10.1.4.1
int vlan300
no shutdown
end</pre>
 
* setup trunk port
<pre>conf t
interface FastEthernet0/1
description Uplink to p1a
duplex full
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,50,300,1002-1005
switchport mode trunk
no spanning-tree portfast
end
 
conf t
interface FastEthernet0/2
description Uplink to p1b
duplex full
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,50,300,1002-1005
switchport mode trunk
no spanning-tree portfast
end</pre>
 
* setup ports
<pre>conf t
interface FastEthernet0/3
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/4
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/5
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/6
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/7
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/8
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/9
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/10
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/11
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/12
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/13
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/14
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/15
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/16
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/17
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/18
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/19
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/20
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/21
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/22
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/23
switchport access vlan 50
spanning-tree portfast
no desc
!
interface FastEthernet0/24
switchport access vlan 50
spanning-tree portfast
no desc
end</pre>
 
* config terminal. setup timeout, priv level
<pre>conf t
line con 0
exec-timeout 10
line vty 0 15
exec-timeout 10
privilege level 0
end</pre>
 
* setup web user
<pre>conf t
service password-encryption
username web privilege 15 password xxxxxxxx
end</pre>
 
* enable http passwd checking, disable http,
<pre>conf t
ip http authentication local
#no ip http server (only http avail on 2950)
end</pre>
 
* lock down ssh/web/telnet access
<pre>conf t
access-list 1 permit 10.1.4.5
end</pre>
 
* time
<pre>conf t
clock summer-time PDT recurring 2 Sunday March 2:00 1 Sunday November 2:00
clock timezone PST -8
ntp server 10.1.4.1
service timestamps log datetime localtime show-timezone
end
 
conf t
no snmp-server community private RW
no snmp-server community public RO
snmp-server community jc292401 RO 1
end</pre>
 
wr mem
 
= Configure a 2924 trunk =
 
<pre>conf t
interface FastEthernet0/1
  description Uplink to p1a
  duplex full
switchport mode trunk
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,50,300,1002-1005
no spanning-tree portfast
 
interface FastEthernet0/2
description Uplink to p1b
duplex full
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,50,300,1002-1005
  switchport mode trunk
  switchport mode trunk
switchport trunk encapsulation dot1q
  no spanning-tree portfast</pre>
switchport trunk allowed vlan 1,50,300,1002-1005
  no spanning-tree portfast


interface FastEthernet0/2
= Writing commands for IOS missing "int range" =
description Uplink to p1b
duplex full
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,50,300,1002-1005
switchport mode trunk
no spanning-tree portfast


Writing commands for IOS missing "int range"
(get to sh shell)
Last updated: 2010-06-04


# f=1; while [ $f -le 24 ]; do echo "int fa0/$f"; echo "switchport access vlan 300"; f=`expr $f + 1`; done
<pre># f=1; while [ $f -le 24 ]; do echo "int fa0/$f"; echo "switchport access vlan 300"; f=`expr $f + 1`; done
int fa0/1
int fa0/1
switchport access vlan 300
switchport access vlan 300
Line 2,213: Line 2,201:
switchport access vlan 300
switchport access vlan 300
int gi0/2
int gi0/2
switchport access vlan 300
switchport access vlan 300</pre>


Reset secret pass
= Reset secret pass =
Last updated: 2010-08-05


conf t
<pre>conf t
service password-encryption
service password-encryption
enable secret PASS
enable secret PASS</pre>
 
# f=1; while [ $f -le 24 ]; do echo "int fa0/$f"; echo "switchport access vlan 300"; f=`expr $f + 1`; done
int fa0/1

Latest revision as of 15:12, 11 January 2013

Manuals[edit]

3750 reference http://www.cisco.com/en/US/products/hw/switches/ps5023/products_command_reference_chapter09186a00801f5ffb.html#2789851

Reset 2900 switch: http://www.cisco.com/en/US/products/hw/switches/ps628/products_password_recovery09186a0080094184.shtml

Reset other switches: http://slaptijack.com/networking/blow-away-your-cisco-catalyst-configuration/

Finding which IPs are on a port[edit]

If you need to find out which IPs are on a particular port, start by finding out what mac addresses are on which port:

switch-p1> en
switch-p1#show mac-address-table
Dynamic Address Count:                 53
Secure Address (User-defined) Count:   0
Static Address (User-defined) Count:   0
System Self Address Count:             48
Total MAC addresses:                   101
Maximum MAC addresses:                 2048
Non-static Address Table:
Destination Address  Address Type  VLAN  Destination Port
-------------------  ------------  ----  --------------------
0002.b315.3201       Dynamic          1  FastEthernet0/8
0002.b3a6.f354       Dynamic          1  FastEthernet0/1
0002.b3bb.45fe       Dynamic          1  FastEthernet0/7
0002.b3e9.226b       Dynamic          1  FastEthernet0/4
0002.b3e9.868c       Dynamic          1  FastEthernet0/13
0002.b9b1.4c01       Dynamic          1  FastEthernet0/24
0004.75a1.91f1       Dynamic          1  FastEthernet0/24
0006.5b3d.80fb       Dynamic          1  FastEthernet0/1
0006.d78a.c798       Dynamic          1  FastEthernet0/1
0007.e90d.e4c9       Dynamic          1  FastEthernet0/24
0007.e95b.c645       Dynamic          1  FastEthernet0/1
000c.f1d3.a7f9       Dynamic          1  FastEthernet0/1
000c.f1dc.f1ce       Dynamic          1  FastEthernet0/3
000c.f1fa.71d7       Dynamic          1  FastEthernet0/24
000d.56fe.ad72       Dynamic          1  FastEthernet0/24
000e.0c59.c1a6       Dynamic          3  FastEthernet0/22
000f.1f64.43bc       Dynamic          1  FastEthernet0/24
0010.e002.473b       Dynamic          1  FastEthernet0/24
0011.0924.1d91       Dynamic          1  FastEthernet0/15
0011.1108.58a6       Dynamic          1  FastEthernet0/24
0011.1119.791e       Dynamic          1  FastEthernet0/24
0020.ed91.f85d       Dynamic          1  FastEthernet0/1
0030.4828.9d50       Dynamic          1  FastEthernet0/1
0030.4841.5246       Dynamic          1  FastEthernet0/5
0030.4870.8332       Dynamic          1  FastEthernet0/1
0030.4870.8898       Dynamic          1  FastEthernet0/1
0030.4871.b911       Dynamic          1  FastEthernet0/23
0050.455b.b27e       Dynamic          1  FastEthernet0/14
0050.50be.f9c8       Dynamic          3  FastEthernet0/22
0060.089a.8f70       Dynamic          1  FastEthernet0/24
0090.27f9.0abf       Dynamic          1  FastEthernet0/2
0090.27f9.1b53       Dynamic          1  FastEthernet0/24
00b0.d020.b557       Dynamic          1  FastEthernet0/9
00b0.d020.df60       Dynamic          1  FastEthernet0/1
00b0.d020.fc4a       Dynamic          1  FastEthernet0/1
00b0.d049.125b       Dynamic          1  FastEthernet0/1
00b0.d049.16a4       Dynamic          1  FastEthernet0/1
00b0.d049.98e4       Dynamic          1  FastEthernet0/24
00b0.d049.a43e       Dynamic          1  FastEthernet0/24
00b0.d049.d03c       Dynamic          1  FastEthernet0/1
00b0.d049.d61f       Dynamic          1  FastEthernet0/1
00b0.d049.e643       Dynamic          1  FastEthernet0/1
00b0.d068.1911       Dynamic          1  FastEthernet0/10
00b0.d068.490b       Dynamic          1  FastEthernet0/24
001e.c95a.d225       Dynamic          1  FastEthernet0/12
00b0.d068.7599       Dynamic          1  FastEthernet0/24
00b0.d068.8451       Dynamic          1  FastEthernet0/6
00b0.d0b0.306b       Dynamic          1  FastEthernet0/1
00b0.d0b0.4020       Dynamic          1  FastEthernet0/11
00b0.d0b0.70bd       Dynamic          1  FastEthernet0/1
00b0.d0b0.c5a4       Dynamic          1  FastEthernet0/1
00b0.d0b0.f533       Dynamic          1  FastEthernet0/24
0800.20c2.1de3       Dynamic          3  FastEthernet0/22

Let's say you want to know what IP's are on port 12. We see the mac address is 001e.c95a.d225 If we look that up in the router we can find the arp'd IP on that mac address:

Castle (3750):

E-mon-3750>en
E-mon-3750#show arp | include 001e.c95a.d225
Internet  69.55.228.149          39   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.228.137          39   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.238.164          39   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.228.172          38   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.228.212          40   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.238.212          39   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.228.196          25   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.234.24           38   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.234.25           40   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.234.27           39   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.234.30           34   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.234.31           26   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.234.16           40   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.234.19           39   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.236.18           38   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.236.14           23   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.234.14           40   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.234.15           42   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.234.3            53   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.234.5            40   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.234.6            26   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.234.57           38   001e.c95a.d225  ARPA   Vlan50
Internet  69.55.230.53           38   001e.c95a.d225  ARPA   Vlan50

And we can look at some of these IPs and we quickly realize that they all belong to jail2 and if we look at jail2 we also see the correlation with the mac (ether 00:1e:c9:5a:d2:25):

jail2 /root# ifconfig
bce0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=1bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4>
        ether 00:1e:c9:5a:d2:27
        inet 10.1.4.102 netmask 0xffffff00 broadcast 10.1.4.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
bce1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=1bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4>
        ether 00:1e:c9:5a:d2:25
        inet 69.55.228.53 netmask 0xffffff00 broadcast 69.55.228.255
        inet 69.55.227.56 netmask 0xffffff00 broadcast 69.55.227.255
        inet 69.55.227.57 netmask 0xffffffff broadcast 69.55.227.57
        inet 69.55.227.58 netmask 0xffffffff broadcast 69.55.227.58
        inet 69.55.227.59 netmask 0xffffffff broadcast 69.55.227.59
        inet 69.55.227.60 netmask 0xffffffff broadcast 69.55.227.60
-SNIP-

If we are doing the lookup at i2b:

firewall2 /usr/home/user# arp -a | grep 00:0c:29:be:0f:e3
? (69.55.229.150) at 00:0c:29:be:0f:e3 on bge1 [ethernet]
firewall2 /usr/home/user#

Note how we have to format the mac address differently than we do on a cisco switch.


The same search works in reverse. Let's say you have an IP and you want to know which port it's on. First lookup the IP:

Castle:

E-mon-3750#show arp | include 69.55.227.4
Internet  69.55.227.4            78   0030.4828.9d50  ARPA   Vlan50
Internet  69.55.227.49            0   Incomplete      ARPA
Internet  69.55.227.48            0   Incomplete      ARPA
Internet  69.55.227.41            0   Incomplete      ARPA
Internet  69.55.227.40            0   Incomplete      ARPA
Internet  69.55.227.43            0   Incomplete      ARPA
Internet  69.55.227.42            0   Incomplete      ARPA
Internet  69.55.227.45            0   Incomplete      ARPA
Internet  69.55.227.44            0   Incomplete      ARPA
Internet  69.55.227.47          179   001e.c95a.d54f  ARPA   Vlan50
Internet  69.55.227.46            0   Incomplete      ARPA
E-mon-3750#

i2b:

firewall2 /usr/home/user# arp -a | grep 69.55.229.156
? (69.55.229.156) at 00:15:17:da:2e:fb on bge1 [ethernet]

So we take that mac (e.x. 0030.4828.9d50) and on each of our switches we run:

switch-p1> en
switch-p1#show mac-address-table | include 0030.4828.9d50

until we find the port. Note, some ios's may not let you run the include command, if so just run show mac-address-table without the include

Controlling port speed[edit]

Quick commands, speed 10Mbps:

enable
configure terminal
interface fastEthernet 0/17
speed 10
exit
exit

Set to 100Mbps:

enable
configure terminal
interface fastEthernet 0/12
speed 100
exit
exit

Set to Auto (default):

enable
configure terminal
interface fastEthernet 0/12
speed auto
exit
exit

Sample output:

switch-p1>enable
switch-p1#show interfaces fastEthernet 0/12
switch-p1#sh int FastEthernet0/12
FastEthernet0/12 is down, line protocol is down
  Hardware is Fast Ethernet, address is 0002.b9b1.4c0c (bia 0002.b9b1.4c0c)
  MTU 1500 bytes, BW 0 Kbit, DLY 0 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive not set
  Auto-duplex , 100Mb/s, 100BaseTX/FX
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input never, output 5w6d, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     1126 packets input, 1574484 bytes
     Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog, 0 multicast
     0 input packets with dribble condition detected
     779 packets output, 54919 bytes, 0 underruns
     0 output errors, 0 collisions, 2 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
switch-p1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
switch-p1(config)#interface fastEthernet 0/12
switch-p1(config-if)#speed 10
switch-p1(config-if)#exit
switch-p1(config)#exit
switch-p1#sh int FastEthernet0/12
FastEthernet0/12 is down, line protocol is down
  Hardware is Fast Ethernet, address is 0002.b9b1.4c0c (bia 0002.b9b1.4c0c)
  MTU 1500 bytes, BW 0 Kbit, DLY 0 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive not set
  Auto-duplex , 10Mb/s, 100BaseTX/FX
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input never, output 5w6d, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     1126 packets input, 1574484 bytes
     Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog, 0 multicast
     0 input packets with dribble condition detected
     779 packets output, 54919 bytes, 0 underruns
     0 output errors, 0 collisions, 2 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier

switch-p1#

Shutting down a port[edit]

Quick commands:

enable
configure terminal
interface fastEthernet 0/17
shutdown
exit
exit

Turn back on:

enable
configure terminal
interface fastEthernet 0/17
no shutdown
exit
exit

Sample output:

switch-p1>enable
switch-p1#show interfaces fastEthernet 0/17
FastEthernet0/17 is down, line protocol is down
  Hardware is Fast Ethernet, address is 0050.d1d8.94d1 (bia 0050.d1d8.94d1)
  MTU 1500 bytes, BW 0 Kbit, DLY 100 usec, rely 255/255, load 1/255
  Encapsulation ARPA, loopback not set, keepalive not set
  Duplex setting unknown, Unknown Speed, 100BaseTX/FX
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input never, output never, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     1 packets input, 64 bytes, 0 no buffer
     Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     0 watchdog, 0 multicast
     0 input packets with dribble condition detected
     1 packets output, 64 bytes, 0 underruns
     0 output errors, 0 collisions, 1 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out
switch-p1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
switch-p1(config)#interface fastEthernet 0/17
switch-p1(config-if)#shutdown
%LINK-5-CHANGED: Interface FastEthernet0/17, changed state to administratively down
switch-p1(config-if)#no shutdown
%LINK-3-UPDOWN: Interface FastEthernet0/17, changed state to up
%LINK-3-UPDOWN: Interface FastEthernet0/17, changed state to down
switch-p1(config-if)#exit
switch-p1(config)#exit
switch-p1#

Show port stats[edit]

For one port:

switch-p1> en
switch-p1#show int FastEthernet0/7
FastEthernet0/7 is up, line protocol is up
  Hardware is Fast Ethernet, address is 0050.d1d8.94c7 (bia 0050.d1d8.94c7)
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 1/255
  Encapsulation ARPA, loopback not set, keepalive not set
  Full-duplex, 100Mb/s, 100BaseTX/FX
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input never, output 00:00:02, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 9000 bits/sec, 20 packets/sec
     137101258 packets input, 2869037621 bytes, 0 no buffer
     Received 326 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 26 ignored, 0 abort
     0 watchdog, 0 multicast
     0 input packets with dribble condition detected
     330219386 packets output, 3304714878 bytes, 0 underruns
     0 output errors, 0 collisions, 1 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out

For all ports:

switch-p1> en
switch-p1#show interfaces
VLAN1 is up, line protocol is down
  Hardware is CPU Interface, address is 0050.d1d8.94c0 (bia 0050.d1d8.94c0)
  MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255
  Encapsulation ARPA, loopback not set, keepalive not set
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:10, output 00:00:10, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     137465 packets input, 10297233 bytes, 0 no buffer
     Received 89751 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 302 ignored, 0 abort
     0 input packets with dribble condition detected
     52396 packets output, 6878747 bytes, 0 underruns
     0 output errors, 0 collisions, 1 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out
VLAN3 is up, line protocol is up
  Hardware is CPU Interface, address is 0050.d1d8.94c0 (bia 0050.d1d8.94c0)
  Internet address is 10.1.4.5/24
  MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255
  Encapsulation ARPA
  ARP type: ARPA, ARP Timeout 04:00:00
FastEthernet0/1 is up, line protocol is up
  Hardware is Fast Ethernet, address is 0050.d1d8.94c1 (bia 0050.d1d8.94c1)
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 3/255
  Encapsulation ARPA, loopback not set, keepalive not set
  Full-duplex, 100Mb/s, 100BaseTX/FX
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:37, output 00:00:53, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 4593000 bits/sec, 762 packets/sec
  5 minute output rate 1240000 bits/sec, 689 packets/sec
     260548696 packets input, 2531757155 bytes, 0 no buffer
     Received 22173 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 333 ignored, 0 abort
     0 watchdog, 2942 multicast
     0 input packets with dribble condition detected
     241281983 packets output, 3622221090 bytes, 0 underruns
     0 output errors, 0 collisions, 15 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out
FastEthernet0/2 is up, line protocol is up
  Hardware is Fast Ethernet, address is 0050.d1d8.94c2 (bia 0050.d1d8.94c2)
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 1/255
  Encapsulation ARPA, loopback not set, keepalive not set
  Full-duplex, 100Mb/s, 100BaseTX/FX
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input never, output 00:00:54, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 146000 bits/sec, 108 packets/sec
  5 minute output rate 98000 bits/sec, 114 packets/sec
     22830604 packets input, 905395220 bytes, 0 no buffer
     Received 9845 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 10 ignored, 0 abort
     0 watchdog, 3 multicast
     0 input packets with dribble condition detected
     23910838 packets output, 3702256298 bytes, 0 underruns
     0 output errors, 0 collisions, 1 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out
 --More--

Moving a port into a vlan[edit]

switch-p3>show vlan
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4,
                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8,
                                                Fa0/9, Fa0/10, Fa0/11, Fa0/12,
                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16,
                                                Fa0/17, Fa0/18, Fa0/19, Fa0/21
2    col00906                         active    Fa0/22, Fa0/23, Fa0/24
3    VLAN0003                         active    Fa0/20
4    VLAN0004                         active
5    VLAN0005                         active
6    VLAN0006                         active
7    VLAN0007                         active
...
switch-p3>en
switch-p3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
switch-p3(config)#int fa0/21
switch-p3(config-if)#switchport access vlan 2
switch-p3(config-if)#exit
switch-p3(config)#exit
switch-p3#show vlan
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4,
                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8,
                                                Fa0/9, Fa0/10, Fa0/11, Fa0/12,
                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16,
                                                Fa0/17, Fa0/18, Fa0/19
2    col00906                         active    Fa0/21, Fa0/22, Fa0/23, Fa0/24
3    VLAN0003                         active    Fa0/20
4    VLAN0004                         active
5    VLAN0005                         active
6    VLAN0006                         active
7    VLAN0007                         active
...
switch-p3#write mem
Building configuration...
switch-p3#exit

Creating vlan[edit]

switch-p12#vlan database
switch-p12(vlan)#vlan 2 name col01656
VLAN 2 added:
    Name: col01656
switch-p12(vlan)#exit
APPLY completed.
Exiting....
switch-p12#show vlan
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4,
                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8,
                                                Fa0/9, Fa0/10, Fa0/11, Fa0/12,
                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16,
                                                Fa0/17, Fa0/18, Fa0/19, Fa0/20,
                                                Fa0/21, Fa0/22, Fa0/23, Fa0/24
2    col01656                         active
1002 fddi-default                     active
1003 token-ring-default               active
1004 fddinet-default                  active
1005 trnet-default                    active
switch-p12#write mem

Turning on/off spanning tree[edit]

A note about spanning tree. You want it on if there's any possibility the port will be connected to another switch. If you know this is not a concern, you may turn it off. Why turn it off? it speeds up convergence so when you plug in a new device it's almost immediately live. When spanning tree is on there's a delay of up to a minute which can be inconvenient if you're looking to quickly move cables without any disruptions.

Turnning spanning tree off:

switch-p6#conf t
switch-p6(config)#int fa0/1
switch-p6(config-if)#spanning-tree portfast
%Warning: portfast enabled on FastEthernet0/1.
 Usually portfast should be enabled on ports connected to a single host.
 When portfast is enabled, connecting hubs, concentrators, switches, bridges,
 etc. to this interface may cause temporary spanning tree loops.
 Use with CAUTION.
switch-p6(config-if)#exit
switch-p6(config)#exit
switch-p6#write mem
Building configuration...
[OK]
switch-p6#

To turn on:

switch-p6(config-if)#no spanning-tree portfast

To confirm:

switch-p1#show conf
-SNIP-
!
!
interface FastEthernet0/1
 spanning-tree portfast
!         
interface FastEthernet0/2
 spanning-tree portfast
!
interface FastEthernet0/3
 spanning-tree portfast
!
interface FastEthernet0/4
 spanning-tree portfast
!
interface FastEthernet0/5
 spanning-tree portfast
!
interface FastEthernet0/6
 spanning-tree portfast
!
interface FastEthernet0/7
 spanning-tree portfast
!
interface FastEthernet0/8
 spanning-tree portfast
!
interface FastEthernet0/9

Quick Commands:

en
conf t
int fa0/1
spanning-tree portfast
int fa0/2
spanning-tree portfast
int fa0/3
spanning-tree portfast
int fa0/4
spanning-tree portfast
int fa0/5
spanning-tree portfast
int fa0/6
spanning-tree portfast
int fa0/7
spanning-tree portfast
int fa0/8
spanning-tree portfast
int fa0/9
spanning-tree portfast
int fa0/10
spanning-tree portfast
int fa0/11
spanning-tree portfast
int fa0/12
spanning-tree portfast
int fa0/13
spanning-tree portfast
int fa0/14
spanning-tree portfast
int fa0/15
spanning-tree portfast
int fa0/16
spanning-tree portfast
int fa0/17
spanning-tree portfast
int fa0/18
spanning-tree portfast
int fa0/19
spanning-tree portfast
int fa0/20
spanning-tree portfast
int fa0/21
spanning-tree portfast
int fa0/22
spanning-tree portfast
int fa0/23
spanning-tree portfast
exit
exit
write mem


Add/remove ARP entry to 3750[edit]

Note, you'd only ever want to add a static arp if you have an issue where some customer is trying to grab the wrong IP and the 3750 is allowing the arp to exist/map to the wrong IP. If you cannot stop the bad customer from grabbing the IP, you'd want to tell the 3750 to make the arp to the right mac. Once this issue is resolved with the bad customer, you'd want to remove the static arp entry so if the IP ever goes to another customer/nic, you won't have unexplained issues with the IP not working.

Add an arp:

E-mon-3750#conf t
E-mon-3750(config)#arp 69.55.230.6 000d.5d03.5802 arpa
E-mon-3750(config)#exit
E-mon-3750#arp 69.55.230.6 000d.5d03.5802 arpa
E-mon-3750#show arp | include 000d.5d03.5802
Internet  69.55.230.6             -   000d.5d03.5802  ARPA

To clear:

conf t
no 69.55.230.6 000d.5d03.5802 arpa
end

Clear all arp entries on 3750[edit]

You'd only really need to do this if you had a situation where a/many IPs have moved from one piece of hardware to another and the 3750 is still caching the old arp entries. Clearing out the entire arp table will fix this as it will then rebuild the arp table with the correct mac-arp entries. The downside to doing the clear is the entire network is disrupted/unreachable for about 5sec.

E-mon-3750>en
E-mon-3750#clear arp

Setup MRTG monitoring (SNMP)[edit]

Cisco MIBs: ftp://ftp-sj.cisco.com/pub/mibs/supportlists/wsc2900xl/wsc2900xl-supportlist.html
http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml
http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?local=en&translate=Translate&objectInput=lcpu
CPU: 1.3.6.1.4.1.9.2.1.58

Configure IP on the switch:

conf t
int vlan 1
ip address 69.55.230.245 255.255.255.0
ip default-gateway 69.55.230.1
en

Disable telnet:

conf t
line vty 5 15
transport input none

DEPRECATED Setup web user, and enable that user to login to web:

switch-p16(config)#username web privilege 15 password  PASS
switch-p16(config)#line vty 0 4
switch-p16(config-line)#login local
switch-p16(config-line)#en
switch-p16(config-line)#password PASS
switch-p16(config-line)#login

Disable web:

conf t
line vty 0 4
transport input none

Setup ACL:

conf t
access-list 1 permit 69.55.230.2
access-list 1 permit 10.1.4.5

Setup SNMP:

conf t
no snmp-server community private RW
no snmp-server community public RO
snmp-server community jc292401 RO 1
en

On mrtg aggregator/host (i.e. mail server) run:

/usr/local/bin/cfgmaker --if-template=template.pl --show-op-down --global "options[_]: growright,bits" --global 'WorkDir: /usr/local/www/mgmt/mrtg/data' --global 'Interval: 1' --global 'LogFormat: rrdtool' --global 'PathAdd: /usr/local/bin' --global 'LibAdd: /usr/local/lib' --host-template=host.pl jc292401@69.55.230.246 --output=switch-p14.cfg

And add new switch to crontab script: /usr/local/www/mgmt/mrtg/mrtg.sh

template.pl:

#if(not $problem_lines)
#{
   $target_lines .= <<ECHO;

Target[$target_name]: $if_ref:$router_connect
SetEnv[$target_name]: MRTG_INT_IP="$if_ip" MRTG_INT_DESCR="$if_snmp_descr"
ECHO

   if ($directory_name) {
       $target_lines .= "Directory[$target_name]: $directory_name\n";
   }
   $target_lines .= <<ECHO;
MaxBytes[$target_name]: $if_speed
Title[$target_name]: $if_snmp_alias  -- $if_snmp_name -- $sysname
PageTop[$target_name]: <h1>$html_desc_prefix$html_if_title_desc -- $sysname</h1>
 <table>
        <tr>
                <td>System:</td>
                <td>$sysname in $html_syslocation</td>
        </tr>
        <tr>
                <td>Description:</td>
                <td>$if_snmp_alias</td>
        </tr>
        <tr>
                <td>Interface:</td>
                <td>$if_snmp_descr</td>
        </tr>
        <tr>
                <td>ifType:</td>
                <td>$html_if_type_desc ($if_type_num)</td>
        </tr>
        <tr>
                <td>ifName:</td>
                <td>$html_if_snmp_name</td>
        </tr>
ECHO


   $target_lines .= <<ECHO;
        <tr>
                <td>Max Speed:</td>
                <td>$if_speed_str</td>
        </tr>
ECHO

   $target_lines .= <<ECHO if $if_ip;
        <tr>
                <td>Ip:</td>
                <td>$if_ip ($if_dns_name)</td>
        </tr>
ECHO

   $target_lines .= <<ECHO;
 </table>
ECHO
#} else {
   #$head_lines="";
 #  $head_lines =~ s/^\# //g;
   #$problem_lines="";
  # $problem_lines =~ s/^\# //g;
   #$target_lines="";
  # $target_lines =~ s/^\# //g;
   #$separator_lines="";
  # $separator_lines =~ s/^\# //g;
#$target_lines .= "$head_lines $problem_lines$target_lines $separator_lines";
#}

host.pl:

$head_lines .= <<ECHO;
#---------------------------------------------------------------------
ECHO

my $target_name = $router_name . ".cpu";

$target_lines .= <<ECHO;

YLegend[$target_name]: Percentage CPU load
ShortLegend[$target_name]: %
Legend1[$target_name]: CPU load in %
Legend2[$target_name]:
Legend3[$target_name]: Max Observed CPU load
Legend4[$target_name]:
LegendI[$target_name]:  CPU Load:
LegendO[$target_name]:
WithPeak[$target_name]: ywm
MaxBytes[$target_name]: 100
Options[$target_name]: growright, gauge, nopercent
Title[$target_name]: $router_name CPU load
Target[$target_name]: 1.3.6.1.4.1.9.2.1.58.0&1.3.6.1.4.1.9.2.1.58.0:$router_connect
PageTop[$target_name]: <h1>$router_name CPU load</h1>
 <table>
        <tr>
                <td>System:</td>
                <td>$router_name in $html_syslocation</td>
        </tr>
        <tr>
                <td>Maintainer:</td>
                <td>$html_syscontact</td>
        </tr>
        <tr>
                <td>Description:</td>
                <td>$html_sysdescr</td>
        </tr>
        <tr>
                <td>Resource:</td>
                <td>CPU.</td>
        </tr>
 </table>
ECHO

Update IOS for 2950[edit]

Repo: http://www.cisco.com/cisco/software/navigator.html

Switch# archive download-sw /overwrite tftp://198.30.20.19/c2960-lanbase-tar.122-25.FX.tar

Tar archive:

switch-p21#delete flash:c2950-i6q4l2-mz.121-13.EA1c.bin
switch-p21#delete flash:html/images/*
switch-p21#delete flash:html/help/*

switch-p21# archive tar /xtract tftp://10.1.2.1/c2950-i6k2l2q4-tar.121-22.EA13.tar flash:
!!!!!!!!!!!!!!!!!!
...
[OK - 5744640 bytes]

switch-p21#dir flash:
switch-p21#verify flash:c2950-i6k2l2q4-mz.121-22.EA13.bin
Verified flash:c2950-i6k2l2q4-mz.121-22.EA13.bin 
switch-p21#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
switch-p21(config)#boot system flash:c2950-i6k2l2q4-mz.121-22.EA13.bin
switch-p21(config)#end
switch-p21#sh boot
BOOT path-list:       flash:c2950-i6k2l2q4-mz.121-22.EA13.bin
Config file:          flash:/config.text
Private Config file:  flash:/private-config.text
Enable Break:         no
Manual Boot:          no
HELPER path-list:
NVRAM/Config file
      buffer size:    32768
switch-p21#wr mem
Building configuration...
[OK]
switch-p21#reload
Proceed with reload? [confirm]

Upgrading Software in Catalyst 2900XL and 3500XL Switches[edit]

Via Command Line Interface[edit]

http://www.cisco.com/en/US/products/hw/switches/ps607/products_tech_note09186a00800946e5.shtml

switch-p23#dir flash:
Directory of flash:/

  2  -rwx     1645824   Jan 01 1970 00:40:12  c2900XL-c3h2s-mz-120.5.2-XU.bin
  3  -rwx        1877   May 06 1997 23:54:44  config.text
  4  -rwx         780   Mar 01 1993 00:17:49  vlan.dat

3612672 bytes total (1962496 bytes free)

switch-p23#delete flash:c2900XL-c3h2s-mz-120.5.2-XU.bin
Delete filename [c2900XL-c3h2s-mz-120.5.2-XU.bin]?
Delete flash:c2900XL-c3h2s-mz-120.5.2-XU.bin? [confirm]
switch-p23#tar /x tftp://10.1.2.1/c2900xl-c3h2s-tar.120-5.WC17.tar flash:
Loading c2900xl-c3h2s-tar.120-5.WC17.tar from 10.1.2.1 (via VLAN300): !
extracting c2900xl-c3h2s-mz.120-5.WC17.bin (1929757 bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
switch-p23#dir flash:
Directory of flash:/

  2  -rwx     1929757   Mar 01 1993 05:19:09  c2900xl-c3h2s-mz.120-5.WC17.bin
  3  -rwx        1877   May 06 1997 23:54:44  config.text
  4  -rwx         780   Mar 01 1993 00:17:49  vlan.dat
  5  -rwx        8192   Mar 01 1993 05:19:10  e2rb.bin
  6  drwx         704   Mar 01 1993 05:20:02  html
 18  -rwx         135   Mar 01 1993 05:20:04  info
 19  -rwx         135   Mar 01 1993 05:20:04  info.ver
 20  drwx         320   Mar 01 1993 05:20:06  lre-bin

3612672 bytes total (499712 bytes free)
spare#verify flash:c2900xl-c3h2s-mz.120-5.WC17.bin
switch-p23#conf t
switch-p23(config)#boot system flash:c2900xl-c3h2s-mz.120-5.WC17.bin 
switch-p23(config)#end
switch-p23#reload

System configuration has been modified. Save? [yes/no]: y
Building configuration...

Proceed with reload? [confirm]

Via Common TFTP Procedure[edit]

This section lists the steps for the TFTP upgrade procedure on the XL switches. Note: All these commands are run from the privileged EXEC mode.

switch>enable
switch#

If you upgrade a 2900XL switch, issue the show version command in order to confirm the amount of memory present on the switch. See the How to Determine the Amount of Memory on the Switch Using Command Line Interface section of this document for the details on how to verify the amount of memory present on the 2900XL switch.

Display the name of the running image file.

switch#show boot
BOOT path-list:      flash:c2900XL-c3h2-mz-112.8.5-SA6.bin
Config file:         flash:config.text
Enable Break:        no
Manual Boot:         no
HELPER path-list:    
NVRAM/Config file
buffer size:   32768

!--- In this case, an upgrade from the Cisco IOS Software !--- Release 11.2(8)SA6 image to a newer release takes place.

If there is no file defined in the BOOT path-list, enter the dir flash: command in order to display the contents of Flash memory. The file with the .bin extension is your image file.

switch#dir flash:
Directory of flash:

  2  -rwx     1162890   Mar 01 1993 00:33:22  c2900XL-c3h2-mz-112.8.5-
 SA6.bin
 17  -r--         108   Mar 01 1993 00:32:28  info
  4  dr--       13888   Mar 01 1993 00:35:23  html
226  -r--         341   Jan 01 1970 00:03:16  env_vars
227  -rwx        1203   Mar 01 1993 00:24:07  config.text
  6  -r--        8192   Mar 08 1993 00:00:23  e2rb.bin
 18  -r--         108   Mar 01 1993 00:35:24  info.ver

3612672 bytes total (1729024 bytes free)

!--- The switch only has 1.7 MB Flash available. Since this is not enough !--- to load a new image, delete files in Flash in order to !--- first free up some space.

If the size of the file to be loaded is larger than the available capacity, delete the image that exists in Flash in order to make space for a new image: Issue the delete flash: filename command.

Switch#delete flash:current_image.bin
Delete filename [current_image.bin]?
Delete flash:current_image.bin? [confirm]

Choose Enter in order to confirm the deletion of the file. Note: Once the image in Flash is deleted, do not reboot the switch for any reason until the new image is loaded. If you attempt to reload the switch now, it fails to boot up since there is no image in Flash.

If you upgrade a 4 MB DRAM Catalyst 2900XL Switch and a file that starts with the character string c2900XL-diag-mz appears in the Flash directory, you should remove it in order to make room for the new image. This is a diagnostics file used at the factory in order to run certain tests on the switch and is never used by the customer. If you upgrade an 8 MB DRAM Catalyst 2900XL Switch or Catalyst 3500XL Switch you do not have to delete this file since you have sufficient Flash memory for the new image, but since this file is useless for you, it is advisable to delete it during the upgrade. The diagnostics file has a name in the format: c2900XL-diag-mz-version_name or c3500XL-diag-mz-version_name. The string version_name depends on the switch and software you run. Note: Sometimes this file, might or might not be displayed when you issue the dir flash: command. In this case, issue the dir flash:c2900XL-diag-mz* command. For Example: On the 2900XL switch, issue this command in order to display the diagnostics filename:

switch# dir flash:c2900XL-diag-mz*
Directory of flash:

-rwx 80971 Sep 14 1998 03:10:38 c2900XL-diag-mz-112.0.0.11-SA2

And delete it:

Switch#delete flash:c2900XL-diag-mz-112.0.0.11-SA2

Delete filename [c2900XL-diag-mz-112.0.0.11-SA2]?
Delete flash:c2900XL-diag-mz-112.0.0.11-SA2? [confirm]
Switch#

Enter global configuration mode:

switch#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#

Disable access to the switch HTML pages:

switch(config)#no ip http server
Return to privileged EXEC mode:
switch(config)#end
Remove the HTML files, if any:
switch#delete flash:html/*

Choose Enter or y in order to confirm the deletion of each file. Note: You might or might not have an HTML directory in Flash. The HTML directory is only installed during an upgrade that uses a .tar file. Since HTML is a directory that contains all the HTML and GIF files used for the web interface, you have to choose Enter or y many times before all the files in the HTML directory are deleted. Note: Do not press any other keys during this process. If you press any other key, it aborts the deletion of that particular file and go to the next file. You have to issue the delete flash:html/* command again in order to delete the aborted file.

If you upgrade from Cisco IOS Software Release 11.2(8)SA5 or earlier, remove the files in the SNMP directory:

switch#delete flash:html/Snmp/*

Make sure the S in Snmp is uppercase. Choose Enter or y in order to confirm the deletion of each file. Note: Do not press any other keys during this process. If you press any other key, it aborts the deletion of that particular file and goes to the next file. You have to run the delete flash:html/* command again in order to delete the aborted file.

If you run Cisco IOS Software Release 11.2(8)SA2 or earlier releases on a 4 MB DRAM Catalyst 2900XL switch, create a directory on the switch Flash memory to be used for the HTML files: Note: This step is only for 4 MB DRAM Catalyst 2900XL switches that run Cisco IOS Software Release 11.2(8)SA2 or earlier.

switch#mkdir flash:html/Snmp

Make sure the S in Snmp is uppercase. Use the tar command in order to copy the combined .tar file to the switch. Note: DO NOT copy the .tar file with the words html in the filename, available in Cisco IOS Software Release 11.2, that uses this procedure as the .tar file includes both the image and the HTML files into a single compressed file. This command copies and automatically extracts the image .bin file as well as the necessary HTML files. Note: If the switch is unable to connect to the TFTP server, verify that you have IP connectivity to the server and check in order to make sure that the TFTP server software is setup correctly.

switch#tar /x tftp://10.1.1.1/c2900xl-c3h2s-tar.120-5.WC8.tar flash:
Loading c2900xl-c3h2s-tar.120-5.WC8.tar from 10.1.1.1 (via VLAN1): !
extracting c2900xl-c3h2s-mz.120-5.WC8.bin (1803565 
bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
extracting e2rb.bin (8192 bytes)!!
html/ (directory)
extracting html/homepage.htm (3988 bytes)!
extracting html/not_supported.html (1392 bytes)
. . .

!--- Output suppressed.

[OK - 2723840 bytes]

!--- The OK message means that the TFTP process passed successfully  
!--- and both .bin and html files were extracted successfully.

Note: Dependent on the TFTP Server used, you might need to enter only one slash (/) after the server_ip_address in the tar command. Note: Since Cisco IOS Software Release 12.0(5)WC5, the file with .tar extension also has tar in the filename itself. For example, c2900xl-c3h2s-tar.120-5.WC5.tar. Enter the dir flash: command in order to determine the filename of the new image in Flash.

switch#dir flash:
Directory of flash:

  2  -rwx     1803565   Mar 01 1993 00:49:55  c2900xl-c3h2s-mz.120-5.WC8.bin
 17  -r--         108   Mar 01 1993 00:50:55  info
  4  dr--         832   Mar 01 1993 00:50:53  html
226  -r--         341   Jan 01 1970 00:03:16  env_vars
227  -rwx        1203   Mar 01 1993 00:24:07  config.text
  6  -r--        8192   Mar 01 1993 00:49:56  e2rb.bin
 18  -r--         108   Mar 01 1993 00:50:55  info.ver
	
3612672 bytes total (683520 bytes free)

Make note of the filename, it is used in the next few steps.

Enter global configuration mode:

switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.

Set the boot parameters so that when the switch is reloaded after the upgrade, it boots with the new_image. Issue this command in order to set the boot parameter to the new image. This command overwrites any previous boot image settings.

switch(config)#boot system flash:
c2900xl-c3h2s-mz.120-5.WC8.bin

Reenable access to the switch HTTP pages:

switch(config)#ip http server

Return to privileged EXEC mode:

switch(config)#end

Reload the new software with this command:

switch#reload
System configuration has been modified. Save? [yes/no]:y
Proceed with reload? [confirm]

Choose Return in order to confirm the reload. After the switch reboots, use Telnet or Console login in order to access the switch and enter the privileged EXEC mode show version command in order to verify the upgrade procedure.

Upgrading Software for the 2950/2955 with the CMS image (.tar file)[edit]

In this example, the software on a 2950 is upgraded from version 12.1(12c)EA1 to version 121-13.EA1 with the CMS image (.tar file). The procedure is the same for a 2955. Issue the show version command to view the current version of software that you run. Here is a sample command output:

2950#sh ver
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(12c)EA1,
RELEASE SOFTWARE (fc1)

!--- The current software version is 12.1(12c)EA1.

Go to the LAN Switching Software section of the Downloads ( registered customers only) page. Select Catalyst 2950 software and locate the image you want to download. Note the size of the image in bytes. This example uses the c2950-i6q4l2-mz.121-13.EA1.tar file. The image size is 4877312 bytes, or approximately 5 MB. Download the image you want.

Issue the dir flash: command on the 2950/2955 to verify how much free memory you have for the upgrade. Here is a sample command output:

2950#dir flash:
Directory of flash:/
  2  -rwx   2774747  Mar 01 1993 17:52:14  c2950-i6q4l2-mz.121-12c.EA1.bin
 21  -rwx   2665985  Mar 01 1993 18:02:04  c2950-i6q4l2-mz.121-11.EA1a.bin
   
!--- Two images are installed.
	
 4  -rwx       916   Mar 01 1993 03:31:05  vlan.dat
 22  -rwx      312   Mar 01 1993 18:03:19  env_vars
 7  drwx       832   Mar 01 1993 17:53:20  html
	    
!--- output suppressed ---
	
	 
!--- Notice the d in the permissions, which indicates that html is a
!--- directory that contains the CMS files extracted from the .tar image 
!--- during the upgrade.

7741440 bytes total (578048 bytes free)

!--- There is less than 1 MB of free memory in Flash, which is not enough
!--- for the upgrade. Delete one of the old IOS images (.bin files).
	
2950#

Issue the delete command to remove one of the old IOS images in order to make room for the upgrade. Here is a sample command output:

2950#delete flash:c2950-i6q4l2-mz.121-11.EA1a.bin
Delete filename [c2950-i6q4l2-mz.121-11.EA1a.bin]?
Delete flash:c2950-i6q4l2-mz.121-11.EA1a.bin? [confirm]
2950#
2950#dir flash:
Directory of flash:/
  2  -rwx   2774747  Mar 01 1993 17:52:14  c2950-i6q4l2-mz.121-12c.EA1.bin
    
!--- You can leave one old image as a backup if you prefer.

  4  -rwx       916  Mar 01 1993 03:31:05  vlan.dat
 22  -rwx       312  Mar 01 1993 18:03:19  env_vars
  7  drwx       832  Mar 01 1993 17:53:20  html
    
!--- output suppressed ---

7741440 bytes total (3244544 bytes free)
  
!--- Even though you freed up additional memory there is still not
!--- enough free memory for the upgrade. Delete the files in the
!--- html directory.

2950#


The html directory is where the CMS files are extracted from the .tar image and installed during the upgrade. Issue the dir html command to view these files. Here is a sample command output:

2950#dir html
Directory of flash:/html/
    3  -rwx        4010   Mar 01 1993 17:52:14  homepage.htm
    5  -rwx        1392   Mar 01 1993 17:52:14  not_supported.html
    8  -rwx        9448   Mar 01 1993 17:52:15  common.js
    9  -rwx       22152   Mar 01 1993 17:52:15  cms_splash.gif
   10  -rwx        1211   Mar 01 1993 17:52:15  cms_13.html
   11  -rwx        2823   Mar 01 1993 17:52:15  cluster.html
   
!--- output suppressed ---

   
!--- These are the files used by the CMS software.

Issue the delete flash:html/* command to delete all of these files before the upgrade. Here is a sample command output: Note: Deletion of these files disables access to the HTML pages during the upgrade. After the upgrade, access becomes available again.

2950#delete flash:html/*
Delete filename [html/*]?
 
!--- Press ENTER or RETURN for each file.

Delete flash:html/homepage.htm? [confirm] 
Delete flash:html/not_supported.html? [confirm]
Delete flash:html/common.js? [confirm]
Delete flash:html/cms_splash.gif? [confirm]
Delete flash:html/cms_13.html? [confirm]
Delete flash:html/cluster.html? [confirm]

!--- output suppressed ---


2950#dir flash:
Directory of flash:/
    2  -rwx     2774747   Mar 01 1993 17:52:14  c2950-i6q4l2-mz.121-12c.EA1.bin
    4  -rwx         916   Mar 01 1993 03:31:05  vlan.dat
   22  -rwx         312   Mar 01 1993 18:03:19  env_vars
    7  drwx           0   Mar 01 1993 01:13:31  html
    
!--- output suppressed ---

7741440 bytes total (4960256 bytes free)
    
!--- There is now enough room to proceed with the upgrade.

Issue the archive tar command to copy over the .tar file and extract all the files. The full command syntax is archive tar /xtract tftp://<tftp server ip>/<filename> flash:. Here is a sample command output: Note: If you want to upgrade from a release earlier than 12.1(6)EA2 on a 2950, issue the tar command instead of the archive tar command.

2950#archive tar /xtract tftp://20.20.20.2/c2950-i6q4l2-tar.121-13.EA1.tar flash:
Loading c2950-i6q4l2-tar.121-13.EA1.tar from 20.20.20.2 (via Vlan1): !

!--- The IOS image(.bin file) is being extracted into the flash: directory.

extracting c2950-i6q4l2-mz.121-13.EA1.bin (2888547 bytes)!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
html/ (directory)

!--- The CMS files are extracted into the html directory.

extracting html/homepage.htm (3994 bytes)!
extracting html/not_supported.html (1392 bytes)
extracting html/common.js (9529 bytes)!!
extracting html/cms_splash.gif (22152 bytes)!!!!!
extracting html/cms_13.html (1211 bytes)
extracting html/cluster.html (2823 bytes)!
extracting html/Redirect.jar (4195 bytes)!
extracting html/mono_disc.sgz (15899 bytes)!!!
extracting html/CMS.sgz (1344455 bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
extracting html/images.sgz (86918 bytes)!!!!!!!!!!!!!!!!!
extracting html/help.sgz (287994 bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!
extracting html/CiscoChartPanel.sgz (135599 bytes)!!!!!!!!!!!!!!!!!!!!!!
extracting html/cms_boot.jar (58864 bytes)!!!!!!!!!!!!
extracting info (109 bytes)
extracting info.ver (109 bytes)
[OK - 4877312 bytes]

!--- The archive tar operation completed successfully.

2950#
2950#verify flash:c2950-i6q4l2-mz.121-13.EA1.bin
Verified flash:c2950-i6q4l2-tar.121-13.EA1.bin

!--- Issue the verify command to verify the IOS image checksum.

2950#

2950#dir flash:
Directory of flash:/
  2  -rwx  2774747  Mar 01 1993 17:52:14  c2950-i6q4l2-mz.121-12c.EA1.bin
  3  -rwx  2888547  Mar 01 1993 02:00:32  c2950-i6q4l2-mz.121-13.EA1.bin
    
!--- The new IOS image has been extracted and installed in flash:.

  4  -rwx      916  Mar 01 1993 03:31:05  vlan.dat
 22  -rwx      312  Mar 01 1993 18:03:19  env_vars
  7  drwx      832  Mar 01 1993 02:03:41  html
    
!--- output suppressed ---

7741440 bytes total (93184 bytes free)
2950#
2950#dir html
Directory of flash:/html/
    5  -rwx        3994   Mar 01 1993 02:00:32  homepage.htm
    6  -rwx        1392   Mar 01 1993 02:00:32  not_supported.html
    8  -rwx        9529   Mar 01 1993 02:00:32  common.js
    9  -rwx       22152   Mar 01 1993 02:00:33  cms_splash.gif
   10  -rwx        1211   Mar 01 1993 02:00:33  cms_13.html
    
!--- output suppressed ---
!--- The new CMS files have been extracted and installed.

Set a boot system statement so the new image boots on the next reload. Here is a sample command output:

2950#conf t
2950(config)#boot system flash:c2950-i6q4l2-mz.121-13.EA1.bin
2950(config)#end
2950#
2950#sh boot
BOOT path-list:   flash:c2950-i6q4l2-mz.121-13.EA1.bin

!--- output suppressed ---
!--- The boot system statement does not show up in the config.
!--- Issue the show boot command to verify whether the 
!--- new image boots on the next reload of the switch.

You can set a boot system statement to boot a specific backup image if the new image fails for some reason. Otherwise, the 2950/2955 automatically attempts to boot the next valid image in the event of a failure. Here is a sample command output to configure a boot system statement for multiple images:

2950#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
2950(config)#boot system flash:
   c2950-i6q4l2-mz.121-13.EA1.bin;c2950-i6q4l2-mz.121-12c.EA1.bin

!--- A semi-colon separates the two images - primary and backup.

2950(config)#end
2950#

2950#sh boot
BOOT path-list: flash:
   c2950-i6q4l2-mz.121-13.EA1.bin;c2950-i6q4l2-mz.121-12c.EA1.bin

!--- output suppressed ---
!--- The boot system statement does not show up in the config.
!--- Issue the show boot command to verify whether the new image
!--- boots on the next reload of the switch.

Issue the wr mem command to save your changes and reload the switch. Here is a sample command output:

2950#wr mem
Building configuration...
[OK]
2950#reload
Proceed with reload? [confirm]

!--- Press RETURN or ENTER.

02:53:37: Bootstrap Emulator called with code 45
02:53:37: %SYS-5-RELOAD: Reload requested

!--- Press RETURN or ENTER.

Verify you run the new image with the show version command. Here is a sample command output:

2950#sh ver
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(13)EA1,
RELEASE SOFTWARE

!--- You now run the new software.

(fc1)
Copyright (c) 1986-2003 by cisco Systems, Inc.

!--- output suppressed ---

System image file is "flash:c2950-i6q4l2-mz.121-13.EA1.bin"
cisco WS-C2950-24 (RC32300) processor (revision G0)
with 20839K bytes of memory.
Processor board ID FHK0650X0QY
Last reset from system-reset
Running Standard Image

!--- output suppressed ---
!--- You run the SI feature set. If this model of switch
!--- can run the EI, you see Running Enhanced Image.

This completes the upgrade procedure for a 2950 through the CMS image (.tar file).

Upgrading Software for the 2950/2955 with the IOS image (.bin file)[edit]

For this example, the software on a 2950 is upgraded from version 12.1(12c)EA1 to version 121-13.EA1 with only the IOS image (.bin file). The procedure is the same no matter which version of software you use, including the 2955. Issue the show version command to view the current version of software that you run. Here is a sample command output:

2950#sh ver
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(12c)EA1,
RELEASE SOFTWARE
(fc1)
	
!--- The current software version is 12.1(12c)EA1.

Go to the LAN Switching Software section of the Downloads ( registered customers only) page. Select Catalyst 2950 or 2955 software and locate the image you want to download. Note the size of the image in bytes. This example uses the c2950-i6q4l2-mz.121-13.EA1.bin file. The image size is 2888547 bytes or approximately 3 MB. Download the image you want. Issue the dir flash: command on the 2950/2955 to verify how much free memory you have for the upgrade. Here is a sample command output:

2950#dir flash:
Directory of flash:/
   2  -rwx  2774747  Mar 02 1993 00:11:42  c2950-i6q4l2-mz.121-12c.EA1.bin
   3  -rwx        5  Mar 01 1993 00:16:08  private-config.text
   4  -rwx      916  Mar 01 1993 03:31:05  vlan.dat
  22  -rwx  2665985  Mar 02 1993 00:20:15  c2950-i6q4l2-mz.121-11.EA1a.bin

!--- Notice that two images are installed already.

  6  -rwx     1459  Mar 01 1993 00:16:08  config.text
  7  drwx      832  Mar 02 1993 00:14:18  html
      

!--- output suppressed ---

7741440 bytes total (578048 bytes free)

!--- There is less than 1 MB of memory free out of the total of !--- 8 MB, which is not enough. Delete the old image !--- in order to upgrade.

2950#

Note: If you already have enough room in Flash for the upgrade, you can proceed directly to Step 5.

Issue the delete command to remove the old image in order to make room for the upgrade. Here is a sample command output:

2950#delete flash:c2950-i6q4l2-mz.121-11.EA1a.bin
Delete filename [c2950-i6q4l2-mz.121-11.EA1a.bin]?
	
!--- Press RETURN or ENTER.

Delete flash:c2950-i6q4l2-mz.121-11.EA1a.bin? [confirm]

!--- Press RETURN or ENTER.

2950#
2950#dir flash:
Directory of flash:/
    2  -rwx     2774747   Mar 02 1993 00:11:42  c2950-i6q4l2-mz.121-12c.EA1.bin
    
!--- You can leave one old image as a backup if you prefer.

    3  -rwx           5   Mar 01 1993 00:16:08  private-config.text
    4  -rwx         916   Mar 01 1993 03:31:05  vlan.dat
    6  -rwx        1459   Mar 01 1993 00:16:08  config.text
    7  drwx         832   Mar 02 1993 00:14:18  html
    
!--- output suppressed ---

7741440 bytes total (3244544 bytes free)
     
!--- There is now over 3 MB of free Flash memory, 
!--- which is enough for the upgrade.

2950#

Perform the upgrade through the copy tftp flash: command. Here is a sample command output:

2950#copy tftp flash:
Address or name of remote host []? 20.20.20.2

!--- Type your TFTP server IP address.
!--- Press RETURN or ENTER.

Source filename []? c2950-i6q4l2-mz.121-13.EA1.bin 

!--- Press RETURN or ENTER.

Destination filename [c2950-i6q4l2-mz.121-13.EA1.bin]? 

!--- Press RETURN or ENTER.

Accessing tftp://20.20.20.2/c2950-i6q4l2-mz.121-13.EA1.bin...
Loading c2950-i6q4l2-mz.121-13.EA1.bin from 20.20.20.2 (via Vlan1): !!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 2888547 bytes]
2888547 bytes copied in 96.188 secs (30030 bytes/sec)
2950#dir flash:
Directory of flash:/
    2  -rwx     2774747   Mar 02 1993 00:11:42  c2950-i6q4l2-mz.121-12c.EA1.bin
    3  -rwx           5   Mar 01 1993 00:16:08  private-config.text
    4  -rwx         916   Mar 01 1993 03:31:05  vlan.dat
   22  -rwx     2888547   Mar 01 1993 00:42:03  c2950-i6q4l2-mz.121-13.EA1.bin
    
!--- The new image is installed in the flash: directory.

    6  -rwx        1459   Mar 01 1993 00:16:08  config.text
    7  drwx         832   Mar 02 1993 00:14:18  html
    
!--- output suppressed ---

7741440 bytes total (355840 bytes free)
2950#verify flash:c2950-i6q4l2-mz.121-13.EA1.bin
Verified flash:c2950-i6q4l2-mz.121-13.EA1.bin

!--- Issue the verify command to verify 
!--- whether the image checksum is correct.

Set a boot system statement so the new image boots on the next reload. Here is a sample command output:

2950#conf t
2950(config)#boot system flash:c2950-i6q4l2-mz.121-13.EA1.bin
2950(config)#end
2950#
2950#sh boot
BOOT path-list:   flash:c2950-i6q4l2-mz.121-13.EA1.bin
	
!--- output suppressed ---
!--- The boot system statement does not show up in the configuration.
!--- Issue the show boot command to verify whether the new image
!--- boots on the next reload of the switch.

Issue the wr mem command to save your changes and reload the switch. Here is a sample command output:

2950#wr mem
Building configuration...
[OK]
2950#reload
Proceed with reload? [confirm]

!--- Press RETURN or ENTER.

00:05:05: %SYS-5-RELOAD: Reload requested

!--- output suppressed ---

Press RETURN to get started!

!--- Press RETURN or ENTER.

!--- output suppressed ---

Verify whether you run the new image through the show version command. Here is a sample command output:

2950#sh ver
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(13)EA1,
RELEASE SOFTWARE (fc1)

This completes the upgrade procedure for a 2950/2955 using only the IOS image (.bin file).

Configure 2960[edit]

  • reload the config (dont paste)
write erase
delete flash:vlan.dat
reload
  • enter basic setup
  • setup pub vlan
conf t
int vlan1
no ip address
int vlan50
ip address 69.55.230.249 255.255.255.0
ip default-gateway 69.55.230.1
end
  • setup priv/mgmt vlan
conf t
int vlan300
no ip address
#ip address 10.1.4.160 255.255.255.0
ip address 10.1.4.161 255.255.255.0 #(p1b)
end
  • setup ports. into vlan, spanning-tree portfast, trunk
conf t
int range GigabitEthernet0/2 - 10
 switchport access vlan 50
 switchport mode access
 duplex full
 spanning-tree portfast
 
int GigabitEthernet0/24
 description Trunk to switch-p1a (vlan 300,50)
 switchport trunk allowed vlan 300,50
 switchport mode trunk
int GigabitEthernet0/1
 description Trunk to ASA (vlan 50)
 switchport trunk allowed vlan 50
 switchport mode trunk
int GigabitEthernet0/23
 description Private net (vlan 300)
 switchport access vlan 300
 switchport mode access
 spanning-tree portfast

int range GigabitEthernet0/11 - 20
 switchport trunk allowed vlan 50,300
 switchport mode trunk
 duplex full
end


  • REFERENCE. to setup a port for trunk or access
conf t
interface FastEthernet0/32
 switchport access vlan 210
 switchport mode dynamic desirable
 duplex full
end
  • setup rapid spanning tree
conf t
spanning-tree mode rapid-pvst
end
  • setup root, on p1a:
conf t
spanning-tree vlan 50 root primary
end
  • and on p1b:
conf t
spanning-tree vlan 50 root secondary
end
  • config terminal. setup timeout, priv level
conf t
line con 0
exec-timeout 10
line vty 0 15
exec-timeout 10
privilege level 0
end
  • setup web user
conf t
service password-encryption
username web privilege 15 password xxxxxxxx
end
  • enable http passwd checking, disable http,
conf t
ip http authentication local
no ip http server
end
  • enable ssh (disable telnet)
conf t
line vty 0 15
transport input ssh
login local
logging synchronous
transport preferred ssh
transport input ssh
transport output ssh
end
  • setup acls to restrict access to ssh on priv net
conf t
access-list 101 remark Permit SSH access from administrators
access-list 101 permit tcp host 10.1.4.1 any eq 22 log
access-list 101 deny ip any any log
line vty 0 15
access-class 101 in
end
  • setup acls to restrict access to https on pub net
conf t
access-list 10 remark Permit HTTPS access from administrators
access-list 10 permit 64.163.14.54
access-list 10 permit 69.55.233.195
access-list 10 permit 99.150.247.226
access-list 10 deny   any log
ip http access-class 10
end
  • setup SNMP
conf t
access-list 20 remark Permit SNMP 
access-list 20 permit 10.1.4.5
access-list 20 deny   any log
no snmp-server community private RW
no snmp-server community public RO
snmp-server community jc292401 RO 20
end
wr mem

Configure 2950[edit]

  • reset
write erase
reload
  • enter basic setup
conf t
int vlan300
ip address 10.1.2.52 255.255.255.0
ip default-gateway 10.1.2.1
int vlan300
no shutdown
end
  • ## ONLY for p20 ##
int GigabitEthernet0/1
 description Connection from i2b
int GigabitEthernet0/2
 description BW mirror port
 monitor session 1 source interface gi0/1
 monitor session 1 destination interface gi0/2 encapsulation dot1q
end
  • setup mgmt ports
conf t
int range fa0/1 - 10
 switchport access vlan 300
 spanning-tree portfast

int fa0/24
 description Firewall ext
 spanning-tree portfast
end
  • i2b link vlan
conf t
int range fa0/23 - 24
 switchport access vlan 200
int gi0/1
 switchport access vlan 200
end
  • setup trunk ports
conf t
 int range fa0/19 - 20
 switchport trunk allowed vlan 1,300
 switchport mode trunk 
 no spanning-tree portfast
end
  • ## END p20 ##


  • ## normal switches ##
  • setup ports
conf t
int range fa0/1 - 24
spanning-tree portfast
end
  • setup mgmt port
conf t
 interface fa0/24
 switchport access vlan 300
 description ats-2 - priv
end
  • setup trunk ports
conf t
 int gi0/1
 description Uplink to p20
 switchport trunk allowed vlan 1,300
 switchport mode trunk 
 no spanning-tree portfast
end
  • ## END normal switches ##
  • config terminal. setup timeout, priv level
conf t
line con 0
exec-timeout 10
line vty 0 15
exec-timeout 10
privilege level 0
end
  • enable ssh (disable telnet)
conf t
line vty 0 4
 privilege level 0
 logging synchronous
 transport preferred ssh
 login local
 transport input ssh
 transport output ssh

line vty 5 15
 privilege level 0
 logging synchronous
 login local
 transport preferred none
end
  • setup web user
conf t
service password-encryption
username web privilege 15 password xxxxxxxx
end
  • pass enc
conf t
service password-encryption
end
  • enable http passwd checking, disable http,
conf t
ip http authentication local
#no ip http server (only http avail on 2950)
end
  • lock down ssh/web/telnet access
conf t
no access-list 100
access-list 100 permit ip host 69.55.233.196 any
access-list 100 permit ip host 99.150.247.226 any
access-list 100 permit ip host 10.1.2.1 any
access-list 100 permit ip host 64.163.14.54 any
access-list 100 deny   tcp any any eq www
access-list 100 deny   tcp any any eq telnet
int vlan 300
ip access-group 100 in
ip access-group 100 out

end
  • enable ssh
conf t
ip domain-name johncompanies.com
crypto key generate rsa
1024
end
  • time
conf t
clock timezone PDT -7
clock summer-time PDT recurring 2 Sunday March 2:00 1 Sunday November 2:00
ntp server 10.1.2.1
service timestamps log datetime localtime show-timezone
end
  • setup SNMP
conf t
access-list 20 remark Permit SNMP 
access-list 20 permit 10.1.2.1
access-list 20 deny   any log
no snmp-server community private RW
no snmp-server community public RO
snmp-server community jc292401 RO 20
end
wr mem

Configure 2924 (i2b)[edit]

Last updated 2010-11-05

  • reset
write erase
reload
  • enter basic setup
  • setup vlans
conf t
 interface VLAN1
 no ip address
 no ip directed-broadcast
 no ip route-cache
 shutdown

int vlan300
ip address 10.1.2.58 255.255.255.0
ip default-gateway 10.1.2.1
int vlan300
no shutdown
end
  • setup mgmt ports
conf t
 int fa0/24
 switchport access vlan 300
 description ats-8 - priv
 spanning-tree portfast
end
  • setup trunk port
conf t
interface FastEthernet0/1
 description Uplink to p20
 duplex full
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1,300,1002-1005
 switchport mode trunk
 no spanning-tree portfast
end
  • setup ports
conf t
interface FastEthernet0/2
 spanning-tree portfast
 no desc
!
interface FastEthernet0/3
 spanning-tree portfast
 no desc
!
interface FastEthernet0/4
 spanning-tree portfast
 no desc
!
interface FastEthernet0/5
 spanning-tree portfast
 no desc
!
interface FastEthernet0/6
 spanning-tree portfast
 no desc
!
interface FastEthernet0/7
 spanning-tree portfast
 no desc
!
interface FastEthernet0/8
 spanning-tree portfast
 no desc
!
interface FastEthernet0/9
 spanning-tree portfast
 no desc
!
interface FastEthernet0/10
 spanning-tree portfast
 no desc
!
interface FastEthernet0/11
 spanning-tree portfast
 no desc
!
interface FastEthernet0/12
 spanning-tree portfast
 no desc
!
interface FastEthernet0/13
 spanning-tree portfast
 no desc
!
interface FastEthernet0/14
 spanning-tree portfast
 no desc
!
interface FastEthernet0/15
 spanning-tree portfast
 no desc
!
interface FastEthernet0/16
 spanning-tree portfast
 no desc
!
interface FastEthernet0/17
 spanning-tree portfast
 no desc
!
interface FastEthernet0/18
 spanning-tree portfast
 no desc
!
interface FastEthernet0/19
 spanning-tree portfast
 no desc
!
interface FastEthernet0/20
 spanning-tree portfast
 no desc
!
interface FastEthernet0/21
 spanning-tree portfast
 no desc
!
interface FastEthernet0/22
 spanning-tree portfast
 no desc
!
interface FastEthernet0/23
 spanning-tree portfast
 no desc
end
  • config terminal. setup timeout, priv level
conf t
line con 0
exec-timeout 10
line vty 0 15
exec-timeout 10
privilege level 0
end
  • setup web user
conf t
service password-encryption
username web privilege 15 password xxxxxxxx
end
  • enable http passwd checking, disable http,
conf t
ip http authentication local
#no ip http server (only http avail on 2950)
end
  • lock down ssh/web/telnet access
conf t
access-list 100 permit ip host 69.55.233.196 any
access-list 100 permit ip host 99.150.247.226 any
access-list 100 permit ip host 10.1.2.1 any
access-list 100 permit ip host 64.163.14.54 any
access-list 100 deny   tcp any any eq www
access-list 100 deny   tcp any any eq telnet
int vlan 300
ip access-group 100 in
ip access-group 100 out

end


  • time
conf t
clock summer-time PDT recurring 2 Sunday March 2:00 1 Sunday November 2:00
clock timezone PST -8
ntp server 10.1.2.1
service timestamps log datetime localtime show-timezone
end

conf t
access-list 20 remark Permit SNMP 
access-list 20 permit 10.1.2.1
access-list 20 deny   any log
no snmp-server community private RW
no snmp-server community public RO
snmp-server community jc292401 RO 20
end
wr mem

Configure 2924 (castle)[edit]

  • reset
write erase
reload
  • enter basic setup "setup"
  • setup vlans
conf t
 interface VLAN1
 no ip address
 no ip directed-broadcast
 no ip route-cache
 shutdown

int vlan300
ip address 10.1.4.164 255.255.255.0
ip default-gateway 10.1.4.1
int vlan300
no shutdown
end
  • setup trunk port
conf t
interface FastEthernet0/1
 description Uplink to p1a
 duplex full
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1,50,300,1002-1005
 switchport mode trunk
 no spanning-tree portfast
end

conf t
interface FastEthernet0/2
 description Uplink to p1b
 duplex full
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1,50,300,1002-1005
 switchport mode trunk
 no spanning-tree portfast
end
  • setup ports
conf t
interface FastEthernet0/3
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/4
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/5
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/6
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/7
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/8
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/9
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/10
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/11
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/12
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/13
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/14
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/15
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/16
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/17
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/18
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/19
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/20
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/21
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/22
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/23
 switchport access vlan 50
 spanning-tree portfast
 no desc
!
interface FastEthernet0/24
 switchport access vlan 50
 spanning-tree portfast
 no desc
end
  • config terminal. setup timeout, priv level
conf t
line con 0
exec-timeout 10
line vty 0 15
exec-timeout 10
privilege level 0
end
  • setup web user
conf t
service password-encryption
username web privilege 15 password xxxxxxxx
end
  • enable http passwd checking, disable http,
conf t
ip http authentication local
#no ip http server (only http avail on 2950)
end
  • lock down ssh/web/telnet access
conf t
access-list 1 permit 10.1.4.5
end
  • time
conf t
clock summer-time PDT recurring 2 Sunday March 2:00 1 Sunday November 2:00
clock timezone PST -8
ntp server 10.1.4.1
service timestamps log datetime localtime show-timezone
end

conf t
no snmp-server community private RW
no snmp-server community public RO
snmp-server community jc292401 RO 1
end
wr mem

Configure a 2924 trunk[edit]

conf t
interface FastEthernet0/1
 description Uplink to p1a
 duplex full
 switchport mode trunk
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1,50,300,1002-1005
 no spanning-tree portfast

interface FastEthernet0/2
 description Uplink to p1b
 duplex full
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1,50,300,1002-1005
 switchport mode trunk
 no spanning-tree portfast

Writing commands for IOS missing "int range"[edit]

(get to sh shell)

# f=1; while [ $f -le 24 ]; do echo "int fa0/$f"; echo "switchport access vlan 300"; f=`expr $f + 1`; done
int fa0/1
switchport access vlan 300
int fa0/2
switchport access vlan 300
int fa0/3
switchport access vlan 300
int fa0/4
switchport access vlan 300
int fa0/5
switchport access vlan 300
int fa0/6
switchport access vlan 300
int fa0/7
switchport access vlan 300
int fa0/8
switchport access vlan 300
int fa0/9
switchport access vlan 300
int fa0/10
switchport access vlan 300
int fa0/11
switchport access vlan 300
int fa0/12
switchport access vlan 300
int fa0/13
switchport access vlan 300
int fa0/14
switchport access vlan 300
int fa0/15
switchport access vlan 300
int fa0/16
switchport access vlan 300
int fa0/17
switchport access vlan 300
int fa0/18
switchport access vlan 300
int fa0/19
switchport access vlan 300
int fa0/20
switchport access vlan 300
int fa0/21
switchport access vlan 300
int fa0/22
switchport access vlan 300
int fa0/23
switchport access vlan 300
int fa0/24
switchport access vlan 300
int gi0/1
switchport access vlan 300
int gi0/2
switchport access vlan 300

Reset secret pass[edit]

conf t
service password-encryption
enable secret PASS