Saturday, 3 September 2011

Basic configuration of Cisco Switch

Command Description
Interface vlan 1 Global command, config interface for VLAN interface
ip address [address][subnet mask] Interface configuration, set ip-address
ip default-gateway [address] Global command that sets default gateway
interface fastethernet 0/x Puts user into user configuration mode
duplex {auto|full|half} Set duplex mode for interface
speed {10|100|1000|auto|nonegotiate} Sets the speed of the interface
switchport port-security mac-address Statically add MAC address as allowed address on that port
switchport port-security mac-address sticky Tells switch to learn MAC addresses on the interface, and add to config as secure MACs
switchport port-security maximum [value] Max of static secure MAC allowed on the interface
switchport port-security violation {protect|restrict|shutdown} Tells switch what to do if inappropriate MAC tries to access network through secure switch port.
hostname [name] Assign hostname to switch
line con 0 Enter console configuration mode
line vty 0 15 Enter vty configuration mode
login Tells switch to ask for password
password [password] Sets the password
enable secret [password] Sets encrypted password
enable password [password] Sets password to enter privileged mode
configure terminal Enter configuration mode
show interfaces fastethernet 0/x Display interface status
show interfaces vlan 1 Displays the ip address configuration
show interfaces Display info about specific interfaces
show {running|startup}-config Display RAM/NVRAM settings
show-mac-address-table Displays the MAC address table
show port-security [interface][address] Show security options on interface
erase startup-config Erases startup configuration

0 comments: