Cisco Switch Config v2 0

  • Upload
    chituoi

  • View
    35

  • Download
    0

Embed Size (px)

DESCRIPTION

Cisco Switch Config v2 0

Citation preview

  • 5/21/2018 Cisco Switch Config v2 0

    1/24

    1 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    Cisco SwitchConfiguration

    AppNote

    Version 2.0

    September 2007

  • 5/21/2018 Cisco Switch Config v2 0

    2/24

    2 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    Table of Con tents

    1.0 REVISION HISTORY ..................................................................................................................................... 3

    2.0 OVERVIEW AND GETTING STARTED...................................................................................................... 4

    2.1 PURPOSE ....................................................................................................................................................... 42.2 BEFORE YOU BEGIN ....................................................................................................................................... 42.3 DEFINITIONS .................................................................................................................................................. 42.4 GETTING STARTED ........................................................................................................................................ 52.5 BASIC COMMANDS ......................................................................................................................................... 52.6 BASIC CONFIGURATION OVERVIEW .............................................................................................................. 62.7 FUTURE ..................................................................................................ERROR!BOOKMARK NOT DEFINED.

    3.0 GENERAL CONFIGURATION ..................................................................................................................... 6

    3.1 VLANCONFIGURATION ................................................................................................................................. 73.2 INTERFACE CONFIGURATION ......................................................................................................................... 73.3 INTERFACE CONFIGURATION FOR TRUNKING................................................................................................ 8

    3.4 IGMPSNOOPING ........................................................................................................................................ 113.5 PLACEHOLDER FOR TEXT ......................................................................ERROR!BOOKMARK NOT DEFINED.3.6 PLACEHOLDER FOR TEXT ......................................................................ERROR!BOOKMARK NOT DEFINED.3.7 PLACEHOLDER FOR TEXT ......................................................................ERROR!BOOKMARK NOT DEFINED.3.8 PLACEHOLDER FOR TEXT ......................................................................ERROR!BOOKMARK NOT DEFINED.3.9 PLACEHOLDER FOR TEXT ......................................................................ERROR!BOOKMARK NOT DEFINED.3.10 PLACEHOLDER FOR TEXT ......................................................................ERROR!BOOKMARK NOT DEFINED.3.11 PLACEHOLDER FOR TEXT ......................................................................ERROR!BOOKMARK NOT DEFINED.

    4.0 OPTIONAL CONFIGURATION .................................................................................................................. 16

    4.1 CONFIGURING A SWITCH IPADDRESS ........................................................................................................ 164.2 CONFIGURING A SWITCH DEFAULT GATEWAY............................................................................................. 174.3 SETTING AN ENABLE PASSWORD ................................................................................................................ 17

    4.4 SETTING A TELNET PASSWORD ................................................................................................................... 174.5 SAVING A RUNNING CONFIGURATION .......................................................................................................... 184.6 SAVING A RUNNING CONFIG TO A STARTUP CONFIG................................................................................... 184.7 COPYING A STARTUP CONFIG TO A RUNNING CONFIG ................................................................................ 184.8 SAVING A CONFIGURATION TO A TFTP SERVER........................................................................................... 184.9 RESTORING A CONFIGURATION FROM A TFTP SERVER............................................................................... 184.10 PLACEHOLDER FOR TEXT ............................................................................................................................ 184.11 PLACEHOLDER FOR TEXT ............................................................................................................................ 194.12 PASSWORD RECOVERY PROCEDURE ......................................................................................................... 19

  • 5/21/2018 Cisco Switch Config v2 0

    3/24

    3 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    1.0 Revision History

    Version Date Author Comments

    1.0 18 April 2006 Pete Brown Initial Draft

    2.0 10 October 2007 Mike Zhang Added: 1. General Switch configuration guidelines2. Stacking configuration3. CE500 configuration4. InterVLAN routing5. Troubeshooting Tips

  • 5/21/2018 Cisco Switch Config v2 0

    4/24

    4 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    2.0 Overview and getting started

    2.1 Purpose

    The purpose of this document is to describe the basic setup of a Cisco switch for operation in a DToIPenvironment, as well as some optional features that can be used. It is assumed that the switch isoperating as new (out of the box) with no configuration.

    2.2 Before you begin

    Ensure you have the following available before you begin:Cisco console cableComputer or laptop with an RS-232 connection availableEthereal or some other network sniffer program installed for basic troubleshootingSystem Diagram with port assignments already determinedIP Plan available

    Have a basic understand of TCP/IP and the OSI Model and subnetting

    2.3 Definitions

    OSI Model Open System Interconnection (OSI) reference model was created to help definehow network processes function in general, including the various components ofthe network and transmission of the date. Understanding the structure andpurpose of the OSI model is central to understanding how networks operate.

    Protocols provide the rules and standards by which data is transmitted over a network

    TCP TCP is a connection oriented protocol that provides data reliability between hosts.

    UDP UDP is a connectionless protocol in which a one way datagram is sent to thedestination without advance notice to the destination device

    MAC Address 48 bit address assigned to the NIC

    IP Address 32 bit logical addressNetwork Address A reserved address assigned to the network itself.

    Broadcast Address A reserved address used to broadcasting packets to all of the devices on anetwork.

    IGMP Snooping IGMP snooping allows a switch to snoopor capture information from IGMP packets beingsent back and forth between hosts and a router. Based on this information, a switch willadd/delete multicast addresses from its address table, thereby enabling/disabling multicasttraffic from flowing to the individual host ports.

    IGMP SnoopingQuerier

    IGMP snooping querier should be used to support IGMP snooping in a VLAN where PIMand IGMP are not configured because the multicast traffic does not need to be routed.

    In a network with IP multicast routing, the IP multicast router acts as the IGMP querier. Ifthe IP-multicast traffic in a VLAN needs to be Layer 2 switched only, an IP-multicast router

    is not required, but without an IP-multicast router on a VLAN, you must configure anotherswitch as the IGMP querier so that it can send queries.

    When IGMP snooping querier is enabled, the IGMP snooping querier sends out periodicIGMP queries that trigger IGMP report messages from the switch that wants to receive IPmulticast traffic. IGMP snooping listens to these IGMP reports to establish appropriateforwarding.

  • 5/21/2018 Cisco Switch Config v2 0

    5/24

    5 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    2.4 Getting started

    Hook up your Cisco console cable to the console port of the Cisco switch and to your RS-232 port on your computer.

    Note: The console port may be located on the front or back of the Cisco swi tchdepending on the mod el . Refer to the inc luded documentat ion for quest ions

    regard ing your speci f ic swi tch m odel .

    Open a HyperTerminal session and use the following settings: 9600-8-1-none. Ensure thatthe scroll lock key is not depressed.

    Press the enter key. The switch should respond with a Switch> prompt.Note: If the switc h has been mo dif ied the promp t may display a different name (i .e.

    Cisco> or somethin g else).

    Type enable (or en) to put the switch into privileged user mode. The switch will respond bychanging the prompt to Switch#.

    Note: i f the swi tch has been pre-conf igured then there may be a password requi red

    here. Contact the person responsib le for programming the swi tch for that

    in format ion.

    You are now ready to start your configuration.

    2.5 Basic Commands

    Some basic commands that you will need to be familiar with in order to successfully program yourCisco switch. The abbreviation in ( ) below is the shortened version of the command that can beused. There are many other commands available. Refer to the Cisco documentation for a listing ofall available commands.

    enable(en)puts the switch into privileged user mode. This is the basic configuration mode

    show(sh)command used to show specific configuration information.

    clock manage the system clock

    configure enter configuration mode

    disable turns off privileged mode

    exit

    exit from the current user modehelp displays help

    ?displays help. Using the ? after any command will give you the options available for that particularcommand.

    write (wr) write running configuration to memory, network, or terminal

    Some examples of show:

    Switch# sh running-configdisplays the running configuration of the switch

    Switch# sh startup-config displays the switchs startup configuration. This can differ from therunning config if changes have been made to the switch after startup.

    Switch# sh vlandisplays vlan informationSwitch# sh int vlan 100displays vlan information for vlan 100 onlySwitch# sh interfacesdisplays interface status and configurationSwitch# sh int Fa 0/1displays interface information for Fast Ethernet 0/1 onlySwitch# sh versiondisplays system hardware and software statusSwitch# sh ipdisplays ip informationSwitch# sh historydisplays the session command historySwitch# sh arpdisplays the arp tableSwitch# sh hostsdisplays the IP domain name, name servers and host table

  • 5/21/2018 Cisco Switch Config v2 0

    6/24

    6 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    2.6 Basic Configuration Overview

    Several key things must be done at the switch level to ensure a successful DToIP installation.These include:

    Configuring VLANS

    Configuring interfaces to be a part of the these vlans as well as setting these interfaces toaccess mode.

    Configuring interfaces that will connect to other Cisco switches

    IGMP snooping and IGMP query

    Backing up and restoring configurations

    Resetting your switch to default should you lose your password.

    Optional configurations (More on these commands will be addressed later on in this document).

    Configuring passwords for the enable and telnet sessions

    Configuring an IP address for the switch

    Configuring an IP address for a vlan

    Routing commands

    Recovery from a lost password.

    3.0 General Configuration

    3.1 Configuration Guidelines

    Before you start to configure Cisco switches for your system, consider the following general guidelines:

    1. Consider to use Cisco Assistant when you have more than 5 switches in your systems including

    management switches, video switches, CAS switches, etc. Cisco Assistant provides a single point of

    management for all the switches.

    2. In general, set all non-trunking ports including encoder, mux, NMX, ASI switches, SL10, modulator ports

    as access ports and set spanning-tree portfast, no cdp runon those ports.

    3. Set NMX ports to server type and all other ports except trunking ports to desktop when using CiscoHTTP or Cisco Assistant to configure management switches such as Cisco CE 500.

    4. Always enable IGMP snooping on the layer two video switches because this will avoid multicast traffic toflood all ports within the VLANs. IGMP snooping is enabled by default on all Cisco layer two switches

    5. Always enable PIM on layer three video switches.

    6. Avoid InterVLAN routing if possible. InterVLAN routing is easy to enable and configure but it always adds

    delay and overhead. Its recommended to use one VLAN even in encoder/PS1K port redundancy with two

    different subnets for the encoders and PS1Ks primary and backup Gigi ports.

    7. Choose stacking over trunking for connecting two or more switches whenever possible. Cisco Catalyst 3750switches have been common selections for video switches. 3750 provides Cisco StackWise technology, a

    32-Gbps stack interconnect that allows customers to build a unified, highly resilient switching systemone

    switch at a time.

    8. Use available highest bitrate ports for trunk ports when trunking two or more switches together. If there are

    more than one port available for trunking, use two or more ports to form Etherchannel to provide trunking

    redundancy and load balance.

    9. When configuring ports, use interface range command for convenience.10. QoS has to be configured on the edge routers/switches.

    11. Last but the most important, always remember to use copy run start or wr to save the configuration you

    have done at the end every time you configure a switch or make changes. Cisco switches dont

    automatically save your configuration to their flash memory.

  • 5/21/2018 Cisco Switch Config v2 0

    7/24

    7 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    3.2 VLAN configuration

    Prior to any VLAN configuration the user should have an agreed upon IP plan based on the networkdesign.

    From the privileged user mode type vlan database to put the switch into the VLAN configurationmode. This mode allows the creation and deletion of VLANS. The switch will respond by changingthe cursor to Switch# (vlan).Type vlan 100 (or any # with the exception of #1. this is the default/admin vlan and can not berecreated or deleted). Repeat this for all vlans you need to create. To delete a vlan type Switch(vlan)# no vlan 100.To apply the changes made at the vlan prompt you must type apply before exiting the vlan prompt.To exit the vlan mode, type exit

    Example creating 2 vlans (vlan 100 and vlan 200)

    Switch# vlan databaseSwitch(vlan)# vlan 100

    Switch(vlan)# vlan 200Switch(vlan)# applySwitch(vlan)# exitSwitch#Switch# conf tSwitch(config)# vlan 100Switch(config-vlan)# no shutdown (This turns the vlan on)Switch(config-vlan)# exitSwitch(config)#Switch(config)# vlan 200Switch(config-vlan)# no shutSwitch(config-vlan)# exit

    Switch(config)#

    Some optional commands that can be used when configuring your vlan are adding a description,adding an IP address, or changing the name of a vlan.Adding a description is not necessary, but can be helpful for others when doing troubleshooting downthe road.

    Option al (adding a descriptio n to the vlan, an IP address, and chang ing the vlan name)

    Switch(config-vlan)# description TS1 video vlanSwitch(config-vlan)# name video vlan1 (this changes the vlan name)Switch(config-vlan)# exit

    3.3 Interface configuration

    Every port that an Ethernet cable or SFP plugs into on a switch should be configured specifically forthe device/host that is using that port. Please refer to the Harmonic documentation for each devicethat describes the Ethernet requirements. Please remember that each RJ45 port is considered aninterface, as well as each VLAN. This will vary somewhat according to the type of switch, as L2Cisco switches will only allow one IP address per switch, thus one IP interface. L3 Cisco switchescan accommodate multiple IP interface assignments.

  • 5/21/2018 Cisco Switch Config v2 0

    8/24

    8 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    Switch# conf tSwitch(config)# interfaceGigabitEthernet 1/0/1

    Switch(config-if)# no shutSwitch(config-if)# switchport mode accessSwitch(config-if)# switchport access vlan 100Switch(config-if)# spanning-tree portfast

    Option al (adding a descrip tion to the interface and an IP address)

    Switch(config-if)# description Enc0101Switch(config-if)# ip address 192.168.10.10 255.255.255.0Switch(config-if)# exitSwitch(config)#

    Optional (us ing the range comm and to conf igure mu l t ip le in ter faces)

    The range command can be used to configure multiple interfaces simultaneously (substitute the port

    type FastEthernet or GigabitEthernet based on the switch you are using).

    In this example we are setting up gigabit Ethernet ports 1-24 and adding them to vlan 100.

    Switch(config)# interface range GigabitEthernet 1/0/1 24Switch(config-if-range)# switchport mode accessSwitch(config-if-range)# switchport access vlan 100Switch(config-if-range)# spanning-tree portfastSwitch(config-if-range)# exitSwitch(config-if)# exitSwitch(config)#

    3.4 Interface configuration for Trunking

    Switch(config)# interfaceGigabitEthernet 1/0/48Switch(config-if)# shutdown (this is an optional command)Switch(config-if)# switchport encapsulation dot1qSwitch(config-if)# switchport mode trunkSwitch(config-if)# switchport trunk allowed vlan all (optional)Switch(config-if)# no shut

    Optional (this will show you the trunking info for this interface. No

    that the interface haAsplay the parameters below).

  • 5/21/2018 Cisco Switch Config v2 0

    9/24

    9 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

  • 5/21/2018 Cisco Switch Config v2 0

    10/24

    10 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

  • 5/21/2018 Cisco Switch Config v2 0

    11/24

    11 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    Switch# sh interfaces GigabitEthernet 1/0/48 trunk

    Port Mode Encapsulation Status Native vlanGi1/0/48 on 802.1q trunking 1

    Port Vlans allowed on trunkGi1/0/48 1-4094

    Port Vlans allowed and active in management domainGi1/0/48 1,100,200

    Port Vlans in spanning tree forwarding state and not prunedGi1/0/48 noneSwitch#

    3.5 IGMP Snooping

    DToIP requires IGMP snooping and an IGMP Query device to be active on the interfaces where theMV encoders and the BNG trade information in multicast groups. The user should study the IGMPrequirements and options in Cisco publications to determine what needs to be configured. IGMPsnooping should already be enabled by default. Always look at the existing startup configuration to

    confirm (using the sh rucommand at the enable prompt). If you are still unsure you can run thecommand again.

    1. To enable IGMP snooping globally, put the switch into global configuration mode.

    Switch# conf t

  • 5/21/2018 Cisco Switch Config v2 0

    12/24

    12 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    Switch(config)# ip igmp snooping

    2. To disable global IGMP snooping, again at the global configuration prompt, type:

    Switch# conf tSwitch(config)# noip igmp snooping

    3. To enable the IGMP snooping on a vlan, at the global configuration prompt, type:

    Switch# conf tSwitch(config)# ip igmp snooping vlan 100

    4. If a query device is required and your switch is a Layer 3 switch, you can invoke the query deviceon one vlan, as it requires the vlan to have an ip address. If you intend to use the BNG as a querydevice, you can skip this step, but you must enable the query function in the BNG. Refer to theBNG and NMx documentation for more information.To enable the query device, from the interface configuration prompt, type the following:

    Switch# conf tSwitch(config)# interface FastEthernet 0/1Switch(config-if)# ip address 192.168.10.10 255.255.255.0Switch(config-if)# ip igmp snooping querierSwitch(config-if)# exitSwitch(config)#

    Note: Depending on the vers ion of your IOS you may need to run th e fo l lowing in order for the

    swi tch qu er ier to wo rk proper ly

    Switch(config)# ip routingSwitch(config)# ip multicast-routing distributed

    Switch(config)# ip pim sparseOrSwitch(config-if)# ip pim sparse-dense

    5. To disable the snooping querier, from the interface configuration prompt, type:

    Switch(config-if)# noip igmp snooping querier

  • 5/21/2018 Cisco Switch Config v2 0

    13/24

    13 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    4.0 Cisco CE 500 Configuration Guide

    Cisco Catalyst express 500 has been used more and more often for management switches. Here arethe basic configuration steps as well as important highlights.

    4.1 Basic Configuration Steps

    1. Make sure that nothing is connected to the switch.

    2. Power the switch.

    3. Wait for the SETUP LED to blink green.

    4. Click Setup. A switch port LED begins to blink green.

    5. When a switch port LED blinks green, connect your PC to that port.

    The LAN adapter of this PC must be configured to get the IP address via DHCP. The LEDs onthe PC and the switchport blink green while the switch configures the connection (this takesaround one minute).

    6. Open a web browser. Complete these steps if the browser does not pull up the GUI automatically:

    a. Issue the ipconfigcommand in order to view the dynamic address allocation.The switchconfigures its management address as the Default Gateway for the LAN adapter card ofthe PC.

    Note: For Cisco IOS Software FYseries releases, the management IP address is

    10.0.0.1. For Cisco IOS Software SEGseries releases, the IP address is 169.254.0.1.

    b. From the browser, go to the mentioned IP address. For example,http://169.254.0.1.

    7. Enter the Network Settings and Optional Settings (if required). Click Submitin order to savechanges and finish the basic configuration.

    http://169.254.0.1/http://169.254.0.1/http://169.254.0.1/http://169.254.0.1/
  • 5/21/2018 Cisco Switch Config v2 0

    14/24

    14 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    8. Enter the configured User Name and Password in order to continue the configuration of theswitch.

    9. For the Smartports dialog window:

    a. ClickYesand Submitin order to accept the predefined port roles. The Smartportswindow appears. Here you can change the predefined roles or apply new port roles.

    b. Click Noand Submitin order to apply the Smartports roles yourself.

    10. Restart the switch without turning off the power.

    11. Close the web browser and reconfigure the LAN adapter with an IP address within the samesubnet of the new management address of the switch.

    12. When the switch comes up, open a web browser and go tohttp://. For example, http://172.16.100.100.

    Note: Once the initial configuration is complete, the switch can be managed through anyswitchport that is configured for the same VLAN as that of the management IP address

    4.2 Restrictions and highlights

    1. Set the NMX ports to "server" type while you set other encoder/PS1K/Haloswitch/SL10..., to"desktop" or "other" type when you use smartports configuration. This is critical. Even thoughCisco's documents/website say the "standard server" type is the same as "desktop" type, they arenot. You will have bootp, and tftp problems if you set NMX to "desktop" type. As CE500 doesn'tCLI interface, chances are that this is a Cisco spoofing prevention machanism. It will prevent a"desktop" port to behave as a bootp, tftp, dns, or other critical servers for spoofing purpose.

  • 5/21/2018 Cisco Switch Config v2 0

    15/24

    15 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    2. Its recommandedthat you do not change specific port settings after you enable a Smartports roleon a port. Any port setting changes can alter the effectiveness of the Smartports role.

    3. Do not apply the Desktop role to ports that are connected to switches, routers, or APs.

    4. The Smartport role Switchautomatically enables 802.1Q trunking on the port. If a remote switchdoes not support 802.1Q trunking or the trunking is manually turned off, the spanning tree state ofthe port on the remote switch goes to blocking for type inconsistency. If the remote switch is theroot bridge, the switch port does not go to blocking mode. In this case, the switch port trunk statusis ON at both ends of the switches, but there is not any communication between the switchesthrough these ports. There are no diagnostic messages displayed on the Catalyst Express 500device.

    5. You normally wouldn't need to do any configuration if you have less than 24 devices to control butyou will have to if you have more than 24 because you need more than 2 switches, and you needto trunk them together. When you have only two switches, you better to use the two Gigiports onboth switches to form a Etherchannel to provide trunking redundancy/load balancing. If you havemore than 2, let's say you have 4. You better put the NMX on one switch(let's say the first one),

    truck the other three(#2 to #3, #3 to #4), and then create an Etherchannel with two ports on theNMX switch, one port on #2, and one port on #4), and so on so forth...

    6. Be careful about VLAN and ip address changes on the GUI to avoid starting it over again, whichrequires you to disconnect everything on the switch first, and it's painful. This can happen whenyou create a new VLAN and move all the ports from default VLAN 1 to your new VLAN. Leave oneport unchanged in this case, and then use this port to change the VLAN ip address, and then youcan use another port to access the VLAN again.

    5.0 Cisco Catalyst 3750 Stacking Configuration

    Cisco Catalyst 3750 Series supports StackWise technology that are used to create a unified, logicalswitching architecture through the linkage of multiple, fixed configuration switches. Stacking offersmany benefits such as much higher bandwidth between the swiches(32GB bi-direction), easy toconfigure and manage the switches as they are logically one unit, etc. And yet stacking still offers theswitch redundancy. In Harmonic IP headend setup, stacking should be preferable to trunking whenconnecting two or more Catalyst 3750 switches together for encoder and prostream port redundancysetup whenever possible. The main limitation is probably the distance. The longest stacking cable is 3meter long, and the stable cables in the boxes are only 20 inches long.

    1. Stacking cable connections

    The diagram below for the cable connections to stack 4 Catalyst 3750 switches together.

  • 5/21/2018 Cisco Switch Config v2 0

    16/24

    16 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    2. VLAN and interface configurations

    After you use stacking cables to connect multiple Catalyst 3750 switches, those switches are logicallyone switch. So, you only need to connect the console cable to the master swtich and do all the VLanand interface configurations at once unlike trunking where you need to configure each switchindividually. There are a set of rules for electing master switch and you can refer to Cisco website forthose rules. But in Harmonic IP Headend application, normally all the redundant switches are about

    the same with the same model, same software version, etc. so the master switch would the one thathas longest running time. In another word, the one you turn on power the first will be the masterswitch.

    Use the following commands for interface configurations:

    Switch(config)# interface range GigabitEthernet 1/0/1 24Switch(config-if-range)# switchport mode accessSwitch(config-if-range)# switchport access vlan 100

    where 1/0/1 stands for the first switch.

    Switch(config)# interface range GigabitEthernet 2/0/1 24Switch(config-if-range)# switchport mode accessSwitch(config-if-range)# switchport access vlan 100

    where 2/0/1 stands for the second switch.

    3. Stackwise stacking cable options.

    There are three options:

    CAB-STACK-50CM : 50 cm(16) long. This is the default that comes with the switch.CAB-STACK-1M: 1 m(3.28) longCAB-STACK-3M: 3 m(9.84) long

    6.0 Optional Configuration

    6.1 Configuring a switch IP Address

    In this example we are setting the switch IP address and subnet mask. This is done by giving an IPaddress to VLAN 1 (the default or admin vlan).

    Switch> en

  • 5/21/2018 Cisco Switch Config v2 0

    17/24

    17 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    Switch# conf tSwitch(config)# interface vlan1Switch(config-if)# ip address 192.168.10.100 255.255.255.0Switch(config-if)# exit

    Switch(config)#

    6.2 Configuring a switch default gateway

    An IP address is assigned to the switch for management purposes. If the switch needs to send trafficto a different IP network, the switch sends traffic to the default gateway. The default gateway is therouter IP address. A router is used to route traffic between different networks.

    Switch> enSwitch# conf tSwitch(config)# ip default-gateway 10.10.5.254Switch(config)# exit

    Switch#

    To remove a default gateway use the no ip default-gatewaycommand to delete a configured defaultgateway.

    6.3 Setting an enable password

    The enable command is not password protected by default. It is good security practice to add apassword to prevent unauthorized changes to your switch.In this example we are setting the enable password to harmonic.

    Switch> enSwitch# conf t

    Switch(config)# enable secret harmonicSwitch(config)# exitSwitch#

    6.4 Setting a telnet password

    If you are using telnet it is good practice to set a password to prevent unauthorized access to yourswitch. In this example we are setting the telnet password to harmonic. In order to telnet to a switchyou must first set up your switch with an IP address. Refer to section 4.1 for more info.

    Switch#Switch# conf tSwitch(config)# line vty 0 4Switch(config-line)#password harmonicSwitch(config-line)# exit

  • 5/21/2018 Cisco Switch Config v2 0

    18/24

    18 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    Switch(config)# exitSwitch#

    6.5 Saving a running configurationThere are several commands to save a running config.

    Switch#wr

    6.6 Saving a running config to a startup config

    Switch# copy run start

    6.7 Copying a startup config to a running config

    Procedure for saving a config to a tftp server. Ensure you have ip connectivity (verify by pinging the

    tftp server) before attempting.

    Switch# copy start run

    6.8 Saving a configuration to a tftp server

    Procedure for saving a config to a tftp server. Your switch must have an IP address assigned to vlan1 in order to proceed. Refer to section 4.1 for setting up an IP address. Ensure you have ipconnectivity (verify by pinging the tftp server) before attempting.

    Switch# copy run tftpAddress or name of remote host []? (enter the IP of the tftp server)

    Destination filename [switch-config](enter the name you wish to

    save the config as)(on the switch the config is usually named

    config.text).

    6.9 Restoring a configuration from a tftp server

    Procedure for restoring a config from a tftp server. Your switch must have an IP address assigned tovlan 1 in order to proceed. Refer to section 4.1 for setting up an IP address. Ensure you have ipconnectivity (verify by pinging the tftp server) before attempting.

    Switch# copy tftp startAddress or name of remote host []? (enter the IP of the tftp server)Destination filename [startup-config] (hit enter)Switch# reload

    6.10 Placeholder for text

    Place holder for text

  • 5/21/2018 Cisco Switch Config v2 0

    19/24

    19 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    6.11 Placeholder for text

    Place holder for text

    6.12 Password recovery procedure

    Follow the password recovery procedure below.

    1. Attach a terminal or PC with terminal emulation (for example, Hyper Terminal) to the console portof the switch.

    Use the following terminal settings:

    o Bits per second (baud): 9600

    o Data bits: 8

    o Parity: None

    o Stop bits: 1

    o Flow Control: Xon/Xoff

    Note: For additional information on cabling and connecting a terminal to the console port, refer toConnecting a Terminal to the Console Port on Catalyst Switchesor see section 2.4 of thisdocument.

    2. Unplug the power cable.

    3. Hold down the mode button located on the left side of the front panel, while reconnecting thepower cable to the switch.

    For 2900/3500XL and 3550 series switches:Release the mode button after the LED above Port1xgoes out.

    Note: LED position may vary slightly depending on the model.

    Catalyst 3524XL

    For 2940 and 2950 series switches:Release the mode button after the STATLED goes out.

    http://www.cisco.com/en/US/products/hw/switches/ps700/products_tech_note09186a008010ff7a.shtml#Cat1900http://www.cisco.com/en/US/products/hw/switches/ps700/products_tech_note09186a008010ff7a.shtml#Cat1900http://www.cisco.com/en/US/products/hw/switches/ps700/products_tech_note09186a008010ff7a.shtml#Cat1900
  • 5/21/2018 Cisco Switch Config v2 0

    20/24

    20 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    Note: LED position may vary slightly depending on the model.

    Catalyst 2950-24

    For 2955 series switches only:The Catalyst 2955 series switches do not use an external modebutton for password recovery. Instead the switch boot loader uses the break-key detection to stopthe automatic boot sequence for the password recovery purposes. The break sequence isdetermined by the terminal application and operating system used. Hyperterm running on

    Windows 2000 uses Ctrl + Break. On a workstation running UNIX, Ctrl-Cis the break key. Formore information, refer toStandard Break Key Sequence Combinations During PasswordRecovery.

    The example below uses Hyperterm to break into sw i tch :mode on a 2955.

    C2955 Boot Loader (C2955-HBOOT-M) Version 12.1(0.0.514), CISCODEVELOPMENT TESTVERSION

    Compiled Fri 13-Dec-02 17:38 by madisonWS-C2955T-12 starting...Base ethernet MAC Address: 00:0b:be:b6:ee:00Xmodem file system is available.Initializing Flash...flashfs[0]: 19 files, 2 directoriesflashfs[0]: 0 orphaned files, 0 orphaned directoriesflashfs[0]: Total bytes: 7741440flashfs[0]: Bytes used: 4510720flashfs[0]: Bytes available: 3230720flashfs[0]: flashfs fsck took 7 seconds....done initializing flash.Boot Sector Filesystem (bs:) installed, fsid: 3

    Parameter Block Filesystem (pb:) installed, fsid: 4

    *** The system will autoboot in 15 seconds ***Send break character to prevent autobooting.

    !--- Wait until you see this message before

    !--- you issue the break sequence.

    !--- Ctrl+Break is entered using Hyperterm.

    http://www.cisco.com/en/US/products/hw/routers/ps133/products_tech_note09186a0080174a34.shtmlhttp://www.cisco.com/en/US/products/hw/routers/ps133/products_tech_note09186a0080174a34.shtmlhttp://www.cisco.com/en/US/products/hw/routers/ps133/products_tech_note09186a0080174a34.shtmlhttp://www.cisco.com/en/US/products/hw/routers/ps133/products_tech_note09186a0080174a34.shtmlhttp://www.cisco.com/en/US/products/hw/routers/ps133/products_tech_note09186a0080174a34.shtmlhttp://www.cisco.com/en/US/products/hw/routers/ps133/products_tech_note09186a0080174a34.shtml
  • 5/21/2018 Cisco Switch Config v2 0

    21/24

    21 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    The system has been interrupted prior to initializing the flashfile system to finishloading the operating system software:

    flash_initload_helperbootswitch:

    4. Issue the flash_initcommand.

    switch: flash_initInitializing Flash...flashfs[0]: 143 files, 4 directoriesflashfs[0]: 0 orphaned files, 0 orphaned directoriesflashfs[0]: Total bytes: 3612672flashfs[0]: Bytes used: 2729472flashfs[0]: Bytes available: 883200

    flashfs[0]: flashfs fsck took 86 seconds....done Initializing Flash.Boot Sector Filesystem (bs:) installed, fsid: 3Parameter Block Filesystem (pb:) installed, fsid: 4switch:

    !--- This output is from a 2900XL switch. Output from a

    !--- 3500XL, 3550 or 2950 will vary slightly.

    5. Issue the load_helpercommand.

    switch: load_helperswitch:

    6. Issue the dir flash:command.

    Note: Make sure to type a colon ":" after the dir flash.

    The switch file system is displayed:

    switch: dir flash:Directory of flash:/2 -rwx 1803357 c3500xl-c3h2s-mz.120-5.WC7.bin

    !--- This is the current version of software.

    4 -rwx 1131 config.text

    !--- This is the configuration file.

    5 -rwx 109 info6 -rwx 389 env_vars7 drwx 640 html18 -rwx 109 info.ver403968 bytes available (3208704 bytes used)

  • 5/21/2018 Cisco Switch Config v2 0

    22/24

    22 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    switch:

    !--- This output is from a 3500XL switch. Output from a 2900XL,

    !--- 2950 or 3550 will vary slightly.

    7. Type rename flash:config.text flash:config.oldto rename the configuration file.

    switch: rename flash:config.text flash:config.oldswitch:

    !--- The config.textfile contains the password

    !--- definition.

    8. Issue the bootcommand to boot the system.

    switch:bootLoading "flash:c3500xl-c3h2s-mz.120-

    5.WC7.bin"...#####################################################################################################################################################################################File "flash:c3500xl-c3h2s-mz.120-5.WC7.bin" uncompressed andinstalled, entry point: 0x3000executing...

    !--- Output suppressed.

    !--- This output is from a 3500XL switch. Output from a 2900XL,

    2950 or 3550

    !--- will vary slightly.

    9. Enter "n" at the prompt to abort the initial configuration dialog.

    --- System Configuration Dialog ---At any point you may enter a question mark '?' for help.Use ctrl-c to abort configuration dialog at any prompt.Default settings are in square brackets '[]'.Continue with configuration dialog? [yes/no]: n

    !--- Type "n" for no.

    Press RETURN to get started.

    !--- Press Returnor Enter.

    Switch>

    !--- The Switch> prompt is displayed.

    10. At the switch prompt, type ento enter enable mode.

  • 5/21/2018 Cisco Switch Config v2 0

    23/24

    23 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    Switch>enSwitch#

    11. Type rename flash:config.old flash:config.textto rename the configuration file with its originalname.

    Switch# rename flash:config.old flash:config.textDestination filename [config.text]

    !--- Press Returnor Enter.

    Switch#

    12. Copy the configuration file into memory.

    Switch# copy flash:config.text system:running-configDestination filename [running-config]?

    !--- Press Returnor Enter.

    1131 bytes copied in 0.760 secsSwitch#

    The configuration file is now reloaded.

    13. Change the password.

    Switch# configure terminalSwitch(config)#no enable secret

    !--- This step is necessary if the switch had an enable secret

    !--- password.

    Switch(config)#enable password CiscoSwitch#(config)#^Z

    !--- Use Ctrl-Z.

    14. Write the running configuration to the configuration file with the write memorycommand.

    Switch#write memoryBuilding configuration...[OK]Switch#

    7.0 Trouble Shooting

    1. Trouble Shooting VLAN problems.

    If you're experiencing connectivity problems in a VLAN environment, you should perform thefollowing troubleshooting steps:

    1) Do you have a physical and data link layer connection? Check the status of the interface with theshow interfaces command. Use CDP to check connectivity. Check the duplexing of the connection(auto negotiation is a common problem with the negotiation of the duplexing mode).

  • 5/21/2018 Cisco Switch Config v2 0

    24/24

    24 September 2007

    CSD Systems Engineering

    Cisco Switch Configuration AppNote

    Switch# show interface Gigi 1/0/2Switch# show cdp neighborsSwitch# show cdp neighbors details

    2) Is your router and switch configuration correct? Verify that you've configured your routing protocoland your router's interface. If you're trunking between the router and the switch, verify thisconfiguration.

    3) Have you set up your VLAN configuration correctly? Check to make sure that the appropriateinterfaces are associated with the correct VLANs.

    2. Troubleshooting Trunk Connections

    If you're experiencing problems in setting up a trunk or having problems with an active trunk,examine the following points:

    1) Verify that the speed and duplexing configuration on both sides are correct and that you're usingthe correct cable type (crossover versus straight).

    2) Make sure that the trunking type (ISL or 802.1Q) is the same on both sides and that the DTPmodes are acceptable to forming a trunk.

    3) For 802.1Q trunks, check that the native VLAN is the same on both sides.