Basic Switch Configuration Essay

Submitted By cynthia_liu
Words: 742
Pages: 3

Basic Switch Configuration
Switch>enable
Switch#
Examine the current running configuration file.
Switch#show running-config

Examine the current contents of NVRAM:
Switch#show startup-config
Examine the characteristics of the virtual interface VLAN1:
Switch#show interface vlan1
Switch#show ip interface vlan1
Examine the following version information that the switch reports.
Switch#show version
Examine the default properties of the FastEthernet interface used by PC1.
Switch#show interface fastethernet 0/18
Switch#show vlan examine the contents of the flash directory.
Switch#dir flash: or Switch#show flash
Switch#dir flash:c2960-lanbase-mz.122-25.SEE3
To save the contents of the running configuration file to non-volatile RAM (NVRAM), issue the the command copy running-config startup-config.
Switch#copy running-config startup-config
S1#configure terminal
S1(config)#hostname S1
S1(config)#exit
S1#configure terminal
S1(config)#line console 0
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#line vty 0 15
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#exit
S1(config)#enable secret class
First, you will create the new VLAN 99 on the switch. Then you will set the IP address of the switch to
172.17.99.11 with a subnet mask of 255.255.255.0 on the internal virtual interface VLAN 99.
S1(config)#vlan 99
S1(config-vlan)#exit
S1(config)#interface vlan99
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to down
S1(config-if)#ip address 172.17.99.11 255.255.255.0
S1(config-if)#no shutdown
S1(config-if)#exit
S1(config)#
Notice that the VLAN 99 interface is in the down state even though you entered the command no shutdown. The interface is currently down because no switchports are assigned to VLAN 99.
Assign all user ports to VLAN 99.
S1(config)#interface range fa0/1 - 24
S1(config-if-range)#switchport access vlan 99
S1(config-if-range)#exit
S1(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up to establish connectivity between the host and the switch, the ports used by the host must be in the same VLAN as the switch. Notice in the above output that VLAN 1 interface goes down because none of the ports are assigned to VLAN 1. After a few seconds, VLAN 99 will come up because at least one port is now assigned to VLAN 99.
S1(config)#ip default-gateway 172.17.99.1
S1(config)#exit
ig-if)#speed 100
S1(config-if)#duplex full
S1(config-if)#end
S1#copy running-config startup-config
Destination filename [startup-config]?[Enter] Building configuration...
[OK]
S1#
S1#show mac-address-table
S1(config)#interface fastethernet 0/18
S1(config-if)#switchport port-security ? aging Port-security aging commands mac-address Secure mac address maximum Max secure addresses violation Security violation mode

S1(config-if)#switchport port-security
Configure switch port FastEthernet 0/18 to accept only two devices, to learn the MAC addresses of those devices dynamically, and to block traffic from invalid hosts if a violation occurs.
S1(config-if)#switchport mode access
S1(config-if)#switchport port-security
S1(config-if)#switchport port-security maximum 2
S1(config-if)#switchport port-security mac-address sticky
S1(config-if)#switchport port-security violation protect