Thoughts while working with a Cisco switch

| 1 Comment | No TrackBacks

I've just racked and installed my newest toy at the datacenter: a Cisco Catalyst 4948 switch .

Prior to working here I have never had the experience of working with a Cisco switch other than to plug myself into it and run on the network it provides.

I'm keeping this log to document how I've set up my switch.

Let's start out with what I've done up to this point.

I have unpacked, racked, connected power to, connected to the serial port and booted/powered on my new switch.

In order to do this I've needed the following pre-requsites.

Pre Reqs

  • cisco switch
  • console cable
  • USB serial cable adapter
  • minicom

First Time Configuration

  1. You need to configure your terminal emulator of choice (I've chosen minicom) to listen with the following settings:

    # Machine-generated file - use "minicom -s" to change parameters.
    pu port             /dev/ttyUSB0
    pu baudrate         9600
    pu bits             8
    pu parity           N
    pu stopbits         1
    
  2. Make sure your switch's serial cable is plugged in to the console port on the switch, and into your laptop/desktop.

  3. Make sure you have your terminal emulator running.
  4. Power on your switch. You will see a great deal of text fly by on your terminal, you will have to wait for a few minutes as your switch does a power-on self test. Once the switch has finished booting and running its POST you should see some text like this:

    Press RETURN to get started!
    00:00:01: %C4K_IOSSYS-3-BLANKSTARTUPCONFIG: Blank or invalid startup-config, bos
    00:00:16: %SPANTREE-5-EXTENDED_SYSID: Extended SysId enabled for type vlan
    00:00:17: %C4K_IOSMODPORTMAN-6-MODULEONLINE: Module 1 (WS-C4948 S/N: FOX11440P2e
    00:00:37: %SYS-5-RESTART: System restarted --
    Cisco IOS Software, Catalyst 4000 L3 Switch Software (cat4000-I5S-M), Version 1)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2007 by Cisco Systems, Inc.
    Compiled Thu 25-Oct-07 16:46 by kellythw
    

    At this point your switch should be ready for your initial setup.

  5. Press ENTER to enable your switch's console. You should see a prompt like this:

    Would you like to terminate autoinstall? [yes]:
    

    Press ENTER again to terminate the autoinstall and bring up your command line interface (CLI)

  6. This is your CLI:

    Switch>
    

    Enter the command enable to put the CLI into privileged mode. Your prompt should change like this:

    Switch>enable
    Switch#
    

    You may have to enter a password, if so, the default password is: password

  7. The next step is to set the clock, which is done with the clock set command:

    Switch#clock set 20:27:00 5 Feb 2008
    

    you can check if your clock setting was successful by running the show clock command:

    Switch#show clock
    20:28:32.551 UTC Tue Feb 5 2008
    Switch#
    
  8. You will want to give your switch a hostname do this with the hostname command. The hostname command only works in the configuration system. Enter the configuration system by using the configure command:

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

    Set the hostname:

    Switch(config)#hostname gigswitch-02
    gigswitch-02(config)#
    
  9. Your switch has two passwords, one for secure administration and one for clear text. you need to set them by using the enable secret and enable password commands:

    gigswitch-02(config)#enable secret supersecretpasswd
    gigswitch-02(config)#enable password notsosecretpasswd
    
  10. Unless you want to always configure your switch using the serial cable, you'll want to create a management port on the switch. This port is usually the highest-numbered port on the switch. On my switch it is port 48. You change the network settings on a switch port using the interface command:

    gigswitch-02(config)#interface gigabitEthernet1/48
    gigswitch-02(config-if)#no switchport
    gigswitch-02(config-if)#no shutdown
    gigswitch-02(config-if)#ip address 10.0.0.42 255.255.255.0
    gigswitch-02(config-if)#exit
    
  11. You are now done with the basic configuration. You'll want to exit configuration mode, check your settings, then apply them.

    gigswitch-02(config)#exit
    gigswitch-02#
    01:07:06: %SYS-5-CONFIG_I: Configured from console by console
    gigswitch-02#
    

    Check your settings using show run:

    gigswitch-02#show run
    . . . <snip> . . .
    line vty 0 4
    !
    !
    end
    gigswitch-02#
    

    Apply your settings using the copy command

    gigswitch-02>copy system:running-config nvram:startup-config
    

Your switch is now ready to go.

Enabling ports 47 and 48

On my switch, the copper Ethernet ports 47 and 48 are shared with the fiber-optic Base-X ports, I purchased my switch without any fiber modules, therefore I want to enable the copper ports instead. I do this by changing the media type.

  1. Begin by making sure you are logged into your switch, and have enabled privileged mode:

    gigswitch-02>enable
    Password: <enter your secret password here>
    
  2. Enter configuration mode:

    gigswitch-02#configure terminal
    Enter configuration commands, one per line.  End with CNTL/Z.
    
  3. Enter the configuration mode for the interface you want to change:

    gigswitch-02(config)#interface gigabitEthernet1/47
    gigswitch-02(config-if)#
    
  4. Change the media type

    gigswitch-02(config-if)#media-type rj45
    01:46:59: %C4K_IOSINTF-5-RJ45ACTIVE: Slot= 1 Port= 47:  RJ45 connector has become active
    gigswitch-02(config-if)#exit
    
  5. Repeat the last step for port 48.

  6. Exit configure mode and save your changes.

    gigswitch-02(config)#exit
    01:49:17: %SYS-5-CONFIG_I: Configured from console by console
    gigswitch-02#copy system:running-config nvram:startup-config
    Destination filename [startup-config]?<enter>
    Building configuration...
    Compressed configuration from 2334 bytes to 1013 bytes[OK]
    

Congratulations your switch is now configured, and all 48 ports are active.

No TrackBacks

TrackBack URL: http://blog.friocorte.com/mt/mt-tb.cgi/18

1 Comment

commeting