Thursday, January 6, 2011

Starting a CISCO Switch

Basic Switch Configuration

User-exec mode:
    Limited examination of a switch / router
             Prompt is <hostname> + “>”
    Switch>

Privilege-exec mode:
    Detailed examination of a switch / router
    Debugging / Administration / Prerequisite for other config modes                
    Prompts is <hostname> + “#”
    Switch#   

Global configuration mode:
    Configuration that affects the whole device
    Prerequisite for other config modes
    Prompt is <hostname> + “(config)#”
    Switch(config)#

Interface mode:
    Per interface configuration
    Prompt is <hostname> + ”(config-if)#”
    Switch(config-if)#




Ways to Manage a Cisco Switch:


Console - Needs a physical connection from an end device to the
                  switch using a console cable then running a terminal
                  application in the end device.

Telnet    - The switch and the end devices needs to be connected in
                  the network.
             - A switch must be configured first before it could be managed this way.

Modem  - The switch’s aux port must be connected to a modem and the
                 modem needs to be connected to a phone line.
               - A switch must be configured first before it could be
                 managed this way.




Setting Device Name:
Switch(config)#hostname Switch1 -> sets an identifier for a device
Switch1(config)#

Setting Console Password:
Switch1(config)#line con 0 -> switches to console management mode
Switch1(config-line)#password cisco -> sets the console password
Switch1(config-line)#login -> console password will be used

Setting Telnet Password:
Switch1(config)#line vty 0 4 -> switches to telnet management mode
Switch1(config-line)#password cisco -> sets the telnet password
Switch1(config-line)#login -> telnet password will be used

Setting Enable Password:
Switch1(config)#enable password cisco -> sets the enable password
Switch1(config)#enable secret ccna -> sets the secured enable password

Encrypting Passwords:
Switch1(config)#service password-encryption -> encrypts all passwords

Saving the Configuration:
Switch#copy <source> <destination>
Switch#copy running start -> saves the configuration
                          OR
Switch#write -> saves the configuration

Setting the IP address of a Switch:
Switch(config)#interface vlan 1
Switch(config-if)#ip address 10.10.10.1 255.255.255.0
Switch(config-if)#no shutdown
NOTE: the ip address assigned in “interface vlan 1” is the address that other devices must use to managed the switch.

Setting the Default Gateway of a Switch:
Switch(config)#ip default-gateway 10.10.10.254
NOTE: the default-gateway address is where the traffic, originated by the switch, will go when communicating to other network.



Configuring a More Secure Authentication:
Switch(config)#username teacher password cisco -> creates a local account

Switch(config)#line con 0
Switch(config-line)#no login 0 -> means do not use the console password
Switch(config-line)#login local -> means use the local account as console password

Switch(config)#line vty 0 4
Switch(config-line)#no login -> means do not use the telnet password
Switch(config-line)#login local -> means use the local account as telnet  password

Configuring Banners:
Switch(config)#banner motd $ <Message> $ -> configures a message that will be viewed by anyone who connects to this device.

Switch(config)#banner login $ <Message> $ -> configures a message that will be viewed by anyone who connects to this device through telnet.

Example:

*************************************************
                                                                
     CISCO SYSTEMS INCORPORATED  

*************************************************
You are connected to 2948G-L3

Unauthorized Entry Is Strictly PROHIBITED!!!
Disconnect Immediately!!!
Contact the Cisco Network Administrator.

Verifying the Configuration:
Switch#show running -> shows the running config (most recent config)

Switch#show startup -> shows the startup config (saved config)

NOTE: the show running / show startup commands would let you view the ff:

    Global configurations
    Interface configurations
    Routing / Services configurations
    Console and Telnet management configurations

Commonly Used Show Commands:
Switch#show version -> shows the hardware and software information
Switch#show ip interface brief -> shows the summary of the interfaces
Switch#show interface <interface type> <module / port> -> shows the detailed information of an interface.
Switch#show mac-address-table -> shows the content of the MAC table.

Identifying directly connected CISCO Devices:
Switch#show cdp neighbor {detail} -> shows the directly connected Cisco devices
NOTE:  *to disable this feature for the whole switch, type in “no cdp run” from global config
             *to disable this feature per interface, type in “no cdp enable” at interface mode

No comments:

Post a Comment