Friday, February 07, 2014

Basic Cisco Switch Configuration ( 3560 multilayer )


Sebelumnya, kita sudah bahas mengenai router cisco, sekarang kita beralih ke peralatan yang baru, yang namanya switch. Untuk perintah dasar dari switch Cisco, hampir semuanya sama seperti perintah dasar pada router Cisco. Lihat posting sebelumnya, tentang konfigurasi dasar router Cisco. Jika sudah bisa dan lancar pada Cisco router, tentunya anda tidak akan kesulitan dengan switch Cisco.
Switch multilayer 3560 and PC0
Berikut list command basic yang saya copy pastekan dari situs tetangga.

Command
Descriptions
switch>?
The ? works here the same as in a router Used to get the list of all available commands
switch>enable
User mode, same as a router
switch#
Privileged mode
switch#disable
Leaves privileged mode
switch>exit
Leaves user mode
switch#show version
Displays information about software and hardware.
switch#show flash:
Displays information about flash memory (will work only for the 2900/2950 series).
switch#show mac-address-table
Displays the current MAC address forwarding table
.
switch#show running-config
Displays the current configuration in DRAM.
switch#show startup-config
Displays the current configuration in NVRAM.
switch#show vlan
Displays the current VLAN configuration.
switch#show interfaces
Displays the interface configuration and status of line: up/up, up/down, admin down.
switch#show interface vlan1
Displays setting of virtual interface VLAN 1, the default VLAN on the switch.
To Reset Switch Configuration
Switch#delete flash:vlan.dat
Removes the VLAN database from flash memory.
Delete filename [vlan.dat]?
Press Enter
Delete flash:vlan.dat? [confirm]
Press Enter
Switch#erase startup-config
Erases the file from NVRAM.
Switch#reload
Restarts the switch.
To Set Host Names
Switch#configure terminal
Moves to global configuration mode
Switch(config)#hostname Switch1
Creates a locally significant host name of the switch. This is the same command as the router.
Switch1(config)#

To Set Passwords
Switch(config)#enable password vinita
Sets the enable password to vinita
Switch(config)#enable secret nikki
Sets the encrypted secret password to nikki
Switch(config)#line console 0
Enters line console mode
Switch(config-line)#login
Enables password checking
Switch(config-line)#password vinita
Sets the password to vinita
Switch(config-line)#exit
Exits line console mode
Switch(config-line)#line vty 0 4
Enters line vty mode for all five virtual ports
Switch(config-line)#login
Enables password checking
Switch(config-line)#password vinita
Sets the password to vinita
Switch(config-line)#exit
Exits line vty mode
Switch(config)#

To Set IP Addresses and Default Gateways
Switch(config)#interface vlan1
Enters the virtual interface for VLAN 1, the default VLAN on the switch
Switch(config-if)#ip address 192.168.0.10 255.255.255.0
Sets the IP address and netmask to allow for remote access to the switch
Switch(config-if)#exit

Switch(config)#ip default-gateway 192.168.0.5
Allows IP information an exit past the local network
To Set Interface Descriptions
Switch(config)#interface fastethernet 0/1
Enters interface configuration mode
Switch(config-if)#description Finance VLAN
Adds a description of the interface
To Set Duplex Operation
Switch(config)#interface fastethernet 0/1
Moves to interface configuration mode
Switch(config-if)#duplex full
Forces full-duplex operation
Switch(config-if)#duplex auto
Enables auto-duplex config
Switch(config-if)#duplex half
Forces half-duplex operation
To Set Operation Speed
Switch(config)#interface fastethernet 0/1

Switch(config-if)#speed 10
Forces 10-Mbps operation
Switch(config-if)#speed 100
Forces 100-Mbps operation
Switch(config-if)#speed auto
Enables autospeed configuration
MAC Address Table
switch#show mac address-table
Displays current MAC address forwarding table
switch#clear mac address-table
Deletes all entries from current MAC address forwarding table
switch#clear mac address-table dynamic
Deletes only dynamic entries from table

Di bawah ini contoh konfigurasi dasar switch yang saya buat.
Switch>en
Switch#config ter
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#host SW-CORE
SW-CORE(config)#enable secret ensecret
SW-CORE(config)#username user01 password user01pass
SW-CORE(config)#inter vlan 1
SW-CORE(config-if)#ip address 10.1.1.1 255.255.255.0
SW-CORE(config-if)#no shut
SW-CORE(config-if)#exit
SW-CORE(config)#aaa new-model
SW-CORE(config)#aaa authentication login default local

SW-CORE(config)#inter range fa0/1-24
SW-CORE(config-if-range)#shut

SW-CORE(config-if-range)#inter range gi0/1-2
SW-CORE(config-if-range)#shut
SW-CORE(config-if-range)#inter fa0/1
SW-CORE(config-if)#description PC0 to manage switch
SW-CORE(config-if)#switchport access vlan 1
SW-CORE(config-if)#duplex auto
SW-CORE(config-if)#speed auto
SW-CORE(config-if)#no shut

SW-CORE(config)#banner motd c
Enter TEXT message.  End with the character 'c'.

Warning...!!!

Segala aktifitas perubahan pada router ini,
termonitor oleh kami...

by
Admin

C
SW-CORE(config)#

Dari komputer client/user, coba ping dan telnet ke arah switch. Hasilnya seperti gambar di bawah ini.
Ping and telnet dari PC0

Sampai disini, selanjutnya akan saya bahas mengenai vlan pada posting selanjutnya…

Reference :
http://computernetworkingnotes.com/switching-vlan-stp-vtp-dtp-ether-channels/basic-switch-configurations.html

No comments:

Post a Comment