Basic configurations of catalyst 1950 and 2950 switch

setting password

//when we power on the switch or router it's come up with setup mode

--- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]: no
.
.
switch>
switch>en
Switch#configure terminal

Switch(config)#enable password ?
  7      Specifies a HIDDEN password will follow
  LINE   The UNENCRYPTED (cleartext) 'enable' password
  level  Set exec level password
Switch(config)#enable password level ?
  <1-15>  Level number
Switch(config)#enable password level 1
% Incomplete command.
Switch(config)#enable password level 1 boo     
% Converting to a secret.  Please use "enable secret" in the future.
Switch(config)#enable password level 15 boo1
% Converting to a secret.  Please use "enable secret" in the future.
Switch(config)#exit
#exit
.
.
Press RETURN to get started.
switch>en
switch#config ter
Switch(config)#line ?
  <2-499>  First Line number
  aux      Auxiliary line
  console  Primary terminal line
  tty      Terminal controller
  vty      Virtual terminal
  x/y/z    Slot/Subslot/Port for Modems
Switch(config)#line vty
Switch(config)#line vty ?
  <0-15>  First Line number
Switch(config)#line vty 0 15
Switch(config-line)#login
% Login disabled on line 1, until 'password' is set
% Login disabled on line 2, until 'password' is set
% Login disabled on line 3, until 'password' is set
% Login disabled on line 4, until 'password' is set
% Login disabled on line 5, until 'password' is set
% Login disabled on line 6, until 'password' is set
% Login disabled on line 7, until 'password' is set
% Login disabled on line 8, until 'password' is set
% Login disabled on line 9, until 'password' is set
% Login disabled on line 10, until 'password' is set
% Login disabled on line 11, until 'password' is set
% Login disabled on line 12, until 'password' is set
% Login disabled on line 13, until 'password' is set
% Login disabled on line 14, until 'password' is set
% Login disabled on line 15, until 'password' is set
% Login disabled on line 16, until 'password' is set
Switch(config-line)#login
Switch(config-line)#password boobi
Switch(config-line)#line con 0
Switch(config-line)#login
Switch(config-line)#password boo     // login console 0 password
Switch(config-line)#exit
Switch(config)#exit
Switch#

//setting up secret password
Switch(config)#enable secret boo      //thats for enable password
or
Switch(config)#enable password boo
----------------------------------------------------------------------------------
setting hostname

//setting up hostname
Switch(config)#hostname mlswitch
mlswitch(config)#
mlswitch#copy running-config startup-config
-----------------------------------------------------------------------------------
configuring the IP address and subnetmask

//to get access the swith via telnet or ssh from remote machine

//this is for multilayer swith
//all port of the swith is a member of vlan1 by default
mlswitch(config)#interface vlan1
mlswitch(config-if)#ip address 192.168.1.1 255.255.255.0
mlswitch(config-if)#no shutdown
mlswitch(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
#exit
//this if for 2950 seriour switch
mlswitch#config t
Enter configuration commands, one per line. End with CNTL/Z
mlswitch(config)#ip address 192.168.1.1 255.255.255.0
mlswitch(config)#ip default-gateway 192.168.1.100
mlswitch(config)#

----------------------------------------------------------------------------------
setting description on the interface

mlswitch(config)#interface fastEthernet0/1
mlswitch(config-if)#description firstport

----------------------------------------------------------------------------------
setting port security

mlswitch(config)#interface fastEthernet 0/1
mlswitch(config-if)#switchport port-security mac-address 01-10-02-03
//now mentioned mac address only allowed for this port
---------------------------------------------------------------------------------
earsing the switch configuration

mlswitch#delete ?
nvram NVRAM configuration
vtp Reset VTP configuration to defaults
mlswitch#delete nvram
This command resets the switch with factory defaults. All system
parameters will revert to their default factory settings. All static
and dynamic addresses will be removed.
Reset system with factory defaults, [Y]es or [N]o? Yes

or

mlswitch#erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
%SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram
mlswitch#

Post a Comment

0 Comments