Cisco Programming Guide
[CENTER][B]MOST IMPORTANTLY… I AM NOT THE ORIGINAL AUTHOR OF THIS DOCUMENT, I HAVE ONLY ALTERED IT TO FIT MY NEEDS. UNFORTUNATELY I AM NOT SURE WHERE I ACQUIRED THIS DOCUMENT SO IF YOU FIND IT PLEASE LET ME KNOW SO I CAN GIVE PROPER CREDIT TO THIS GEM![/B][/CENTER]
[CENTER][B]I AM NOT A CISCO ENGINEER! I HAVE NO FORMAL CISCO TRAINING. I HAVE ONLY BEEN HANDED EQUIPMENT AND TOLD TO USE IT. THROUGH MY EXPLOITS I HAVE FOUND THIS METHOD WORKS FOR THE CISCO WS2960 SWITCHES IN MY ENVIRONMENT.[/B][/CENTER]
[CENTER][B]SOME COMMANDS MAY NOT BE VALID, THIS IS AN OLD DOCUMENT. AFTER COMPLETION OF SET UP, I RECOMMEND USING THE CISCO CNA TO MANAGE AND BACK UP YOUR SWITCH SETTINGS.[/B][/CENTER]
[CENTER]Do not badger, or otherwise slander the information provided, I have done so as a courtesy. [B]NO WHERE[/B] have I claimed to be an expert on these switches, and [B]NO WHERE[/B] have I twisted your arm to use these settings. I am not responsible for loss of motivation, equipment, job or wife; The information may/will change over time, I understand this document is not perfect. You are welcome to discuss settings or to let others know how you completed your process, If you disagree with the tutorial, DON’T USE IT. If you think your notes are better, make your own! These settings are known to work in [B]MY NOVELL ENVIRONMENT[/B], changes may need to be performed to better fit your environment.[/CENTER]
[B]Step one: Connect the computer and switch using programming cable.[/B]
Insert the RJ-45 end of the console cable into the switch and the DB-9 side into your computer’s serial port (or adapter).
[B]Step Two: Configure your terminal client.[/B]
Open your terminal program and, choose the COM port that the switch is plugged into and give it a name if you want to save these settings later on. Then configure it with the following settings (if using Hyper Terminal, just use default settings):
•Bits Per second:9600
Without these settings the switch will not recognize any keystrokes that you input.
[B]Step three: Connect the switch to the terminal.[/B]
Turn the switch on, depending on your switch you may need to enable it in an upload mode, please refer to documentation for the model of switch you are working with. At this point you will see a lot of text start scrolling through your terminal client, this is the switch booting up. If your switch does not have a configuration it will ask if you want to start the configuration wizard. Choose no. You will then be given a prompt like so:
You can now communicate with the switch!
[B]Step four: Configuring the switch.[/B]
Note: Cisco has “shortcut” commands. These are extremely common in Cisco network peripherals and allow network operators to move around a configuration quickly. The commands listed here are the “full” commands. For this part of the instruction, bolded lines are commands I will input to the switch and italicized comments with exclamation points are just notes. In a real Cisco config file all comments are preceded by exclamation points, so this is good practice.
Enable the router:
! Alternatively you can type “en”. You will then be given a prompt that looks like this.
! We want to go one step further and get inside the configuration. To do this we type:
! Or we could just type “conf t” for short. Our prompt is now:
! The first thing we want to do is give our switch a meaningful name, or else we’d call all of our switches “Switch”.
! To do so we type:
! This is a common name you can know the switch as.
! Next we want to password protect our switch with an encrypted key. Then we’re going to password protect the
! ports on our switch so we can telnet in over TCP/IP instead of consoling in. So first off, since once we’re done
! with our console session we won’t be consoling in again, let’s password protect the console.
[B]TestSwitch(config)# line console 0[/B]
! Now if we consoled in again we would be met with a password prompt. Let’s do the same with our ports. To go
! back to the global config, hit ctrl+Z. This brings us back to the enabled prompt, so first get back in config mode.
[B]TestSwitch(config)#line vty 0 15[/B]
! Now when we set up our IP address on our switch we’ll be able to get in via TCP/IP. Ctrl+Z.
! Now the most important password we can set. The enable password, which we will encrypt. Let’s get to the
! Global config then enter the command.
[B]TestSwitch(config)# enable secret keepout[/B]
! That has set our password to “keepout”. When we type “enable” at “Switch>” we’ll be prompted for this.
! If someone were to somehow steal our config file they would see a big mess of characters in place of that
! password. The last thing we need to do in order to remote in instead of console in is to set up the IP of our vlan.
! We need to get into the vlan interface to do this.
! Our prompt changes to:
! We could rename our vlan, but we only have one so we won’t bother. It’s similar to renaming the switch. First
! things first, let’s turn our vlan on. It’s weird, but this is the command to make it so:
! And that turns it on. Let’s set the IP address.
[B]TestSwitch(config-if)#ip address 192.168.0.1 255.255.255.248[/B]
! Our vlan now has an IP address. Any port that is enabled for vlan access can be used to remote in to the switch.
! So the last thing to do is actually set up one of our ports so it can be used for just that purpose.
! Ctrl+Z, then type the following command to get to the interface for the first Ethernet port on our switch
! after getting back to the global config.
! Your prompt will now look like this:
! I didn’t need to do this on my switch, please check the model.
! Just the same as it did in the vlan interface. To enable this port, it’s the same command
! Then we’ll enable it for vlan access with the following commands:
[B]TestSwitch(config-if)#switchport mode access[/B]
! I was also unable to use switchport commands.
[B]TestSwitch(config-if)#switchport access vlan1[/B]
! We should now be able to remote into our switch.
! We’ll set our computer’s IP, subnet, and gate manually to that they are 192.168.0.2, 255.255.255.248
! and 192.168.0.1 respectively. Once done we use hyperterminal only this time with the following settings.
Choose TCP/IP in “Connect using” prompt this time.
For “Host address” put in 192.168.0.1, or whatever you set your vlan IP to.
And leave Port number as the default, 23.
! As soon as you connect you will be prompted for the password we set earlier, enter it. If correct, you should be
! met with the switch’s main prompt. Type “enable” to enter.
! You will then be met with the prompt to get into the switch. Type in that password and you are now able to
! remotely access your switch on the network. Congratulations.
! From here we will save our configuration. And that’s it. You’re finished.
! Some handy commands to know (long command // short command):
[B]Show running-config // show run – shows the running configuration (not saved)[/B]
[B]Write memory // wr mem - Saves the current running configuration[/B]
[B]Write erase // wr er – erase the non-volatile ram, not the running config. Reboot to lose running.[/B]
[B]Reload – reboots the Cisco device[/B]
[B]Need to run a command but not at the right prompt? Put the word “do” in front of the command.[/B]
[B]Do sh run[/B]
[B]Do wr mem[/B]
[quote=“mark graham, post: 30784, member: 4117”]yeah, i’m pretty familiar with them :)
let me whip something up when i can! hopefully within the next week i’ll have something.[/quote]
Thank you SO MUCH!!!
mark graham last edited by
yeah, i’m pretty familiar with them :)
let me whip something up when i can! hopefully within the next week i’ll have something.
[quote=“mark graham, post: 30774, member: 4117”]just a bit of information as well
This is a MUST it encrypts the passwords for user accounts, enable, VTY, and privileged mode passwords. these passwords can be easily obtained if a person has physical access to the switch.[/quote]
You seem to know a bit about these Cisco switches, do you have a guide you would recommend for us?
Maybe some recommended settings to get them working with FOG a little better?
mark graham last edited by
just a bit of information as well
This is a MUST it encrypts the passwords for user accounts, enable, VTY, and privileged mode passwords. these passwords can be easily obtained if a person has physical access to the switch.