CCNA Command Guide: Configuration / Practice

How to Erase a Switch

Switch# write erase
Switch# delete flash:vlan.dat
Switch# reload
erase startup-config


Basic Port Configuration

show running-config interface fastEthernet 0/8 < check the status of the

interface fastethernet 0/8
switchport access vlan 2
switchport mode access
switchport port-security maximum 30
switchport port-security aging time 1
switchport port-security
no shutdown
duplex full
macro description fzj-accessport
no cdp enable
spanning-tree portfast edge


Setting Port Security

#show running-config

interface fastEthernet 1/1
#interface FastEthernet1/1
#switchport access vlan 20
#switchport mode access
#switchport port-security mac-address 00e0.c560.1bb8
#switchport port-security aging time 1
switchport port-security
duplex full
macro description xyz-accessport
no cdp enable
spanning-tree portfast edge

#show interfaces fastEthernet 1/1
FastEthernet1/1 is down, line protocol is down (notconnect)
Hardware is Fast Ethernet Port, address is 0007.ebe3.f2a8 (bia 0007.ebe3.f2a8)
MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, link type is auto, media type is 100BaseFX
input flow-control is unsupported output flow-control is unsupportedARP Timeout 04:00:00
Last input never, output never, output hang never

Last clearing of “show interface” counters never
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec…
show interfaces fastEthernet 1/1 counters errors

Port CrcAlign-Err Dropped-Bad-Pkts Collisions Symbol-Err
Fa1/1 0 0 0 0
Port Undersize Oversize Fragments Jabbers
Fa1/1 0 0 0 0
Port Single-Col Multi-Col Late-Col Excess-Col
Fa1/1 0 0 0 0
Port Deferred-Col False-Car Carri-Sen Sequence-Err
Fa1/1 0 2 1 0


#Conf t

#Interface fastethernet 1/1
#Switchport access vlan 11
#No shutdown

Basic Switch Configuration

(vlan 10 Management & vlan 2 IEK–9 Institutes)

switch1(config)#spanning–tree mode rapid–pvst
switch1(config)#vlan 10
switch1(config–vlan)#name management
switch1(config–vlan)#exit
switch1(config)#vlan 2
switch1(config–vlan)#name IEK–9
switch1(config–vlan)#exit
switch1(config)#exit
switch1#wr

To confirm the vlans have been created use the following command

switch1#show vlan