Sunteți pe pagina 1din 75

Switch Configuration

UiTM CISCO NETWORKING ACADEMY FACULTY OF ELECTRICAL ENGINEERINGErasing and Reloading the
http://www.scribd.com/doc/88194921/Switch-Configuration (1 of 75)4/13/2012 3:34:30 PM

Switch Configuration

Switch
For the majority of the labs, it is necessary to start with an unconfigured switch. Using a switch with an existing configuration may produce unpredictable
http://www.scribd.com/doc/88194921/Switch-Configuration (2 of 75)4/13/2012 3:34:30 PM

Switch Configuration

results. These instructions show you how to prepare the switch prior to starting the lab. These instructions are for the 2960 switch; however, the procedure for the 2900and 2950 switches
http://www.scribd.com/doc/88194921/Switch-Configuration (3 of 75)4/13/2012 3:34:30 PM

Switch Configuration

is the same. Step 1: Enter privileged EXEC mode by typing the enable command. If prompted for a password, enter class or cisco
http://www.scribd.com/doc/88194921/Switch-Configuration (4 of 75)4/13/2012 3:34:30 PM

Switch Configuration

. If that does not work, ask theinstructor.Switch> enableStep 2: Remove the VLAN database information file. Switch# delete flash:vlan.dat
http://www.scribd.com/doc/88194921/Switch-Configuration (5 of 75)4/13/2012 3:34:30 PM

Switch Configuration

Delete filename [vlan.dat]?[ Enter ]Delete flash:vlan.dat? [confirm] [ Enter ]If there is no VLAN file, this message is displayed:%
http://www.scribd.com/doc/88194921/Switch-Configuration (6 of 75)4/13/2012 3:34:30 PM

Switch Configuration

Error deleting flash:vlan.dat (No such file or directory) Step 3: Remove the switch startup configuration file from NVRAM. Switch# erase startup-config
http://www.scribd.com/doc/88194921/Switch-Configuration (7 of 75)4/13/2012 3:34:30 PM

Switch Configuration

The responding line prompt will be:Erasing the nvram filesystem will remove all files! Continue? [confirm]Press Enter to confirm. The response should be:Erase of nvram:
http://www.scribd.com/doc/88194921/Switch-Configuration (8 of 75)4/13/2012 3:34:30 PM

Switch Configuration

complete Step 4: Check that the VLAN information was deleted. Verify that the VLAN configuration was deleted in Step 2 using the
http://www.scribd.com/doc/88194921/Switch-Configuration (9 of 75)4/13/2012 3:34:30 PM

Switch Configuration

show vlan command.If the VLAN information was successfully deleted in Step 2, go to Step 5 and restartthe switch using the reload
http://www.scribd.com/doc/88194921/Switch-Configuration (10 of 75)4/13/2012 3:34:30 PM

Switch Configuration

command.If previous VLAN configuration information is still present (other than the defaultmanagement VLAN 1), you must power-cycle the switch (hardware
http://www.scribd.com/doc/88194921/Switch-Configuration (11 of 75)4/13/2012 3:34:30 PM

Switch Configuration

restart ) insteadof issuing the reload command. To power-cycle the switch, remove the power cordfrom the back of the switch or unplug it, and then plug it back in.
http://www.scribd.com/doc/88194921/Switch-Configuration (12 of 75)4/13/2012 3:34:30 PM

Switch Configuration

Step 5: Restart the software. Note: This step is not necessary if the switch was restarted using the powercyclemethod.At the privileged EXEC mode prompt, enter the
http://www.scribd.com/doc/88194921/Switch-Configuration (13 of 75)4/13/2012 3:34:30 PM

Switch Configuration

reload command.Switch(config)# reload The responding line prompt will be:System configuration has been modified. Save? [yes/
http://www.scribd.com/doc/88194921/Switch-Configuration (14 of 75)4/13/2012 3:34:30 PM

Switch Configuration

no]: Type n and then press Enter . The responding line prompt will be:Proceed with reload? [confirm] [
http://www.scribd.com/doc/88194921/Switch-Configuration (15 of 75)4/13/2012 3:34:30 PM

Switch Configuration

Enter ] The first line of the response will be:


1 | Page

http://www.scribd.com/doc/88194921/Switch-Configuration (16 of 75)4/13/2012 3:34:30 PM

Switch Configuration

Reload requested by console.After the switch has reloaded, the line prompt will be: Would you like to enter the initial configuration
http://www.scribd.com/doc/88194921/Switch-Configuration (17 of 75)4/13/2012 3:34:30 PM

Switch Configuration

dialog? [yes/no]: Type n and then press Enter . The responding line prompt will be:Press RETURN to get
http://www.scribd.com/doc/88194921/Switch-Configuration (18 of 75)4/13/2012 3:34:30 PM

Switch Configuration

started! [ Enter ]

! Basic Switch Configuration


Switch> enable
http://www.scribd.com/doc/88194921/Switch-Configuration (19 of 75)4/13/2012 3:34:30 PM

Switch Configuration

Switch# configure terminal Switch(config)# hostname Switch_A <--- to set switch


http://www.scribd.com/doc/88194921/Switch-Configuration (20 of 75)4/13/2012 3:34:30 PM

Switch Configuration

hostnameSwitch_A (config)# enable secret class <--- to set enable password (encrypted)
http://www.scribd.com/doc/88194921/Switch-Configuration (21 of 75)4/13/2012 3:34:30 PM

Switch Configuration

Switch_A(config)# enable password cisco <--- to set enable password in clear textSwitch_A(config)# line con 0
http://www.scribd.com/doc/88194921/Switch-Configuration (22 of 75)4/13/2012 3:34:30 PM

Switch Configuration

<--- to set console passwordSwitch_A (config-line)# password cisco Switch_A(config-line)#


http://www.scribd.com/doc/88194921/Switch-Configuration (23 of 75)4/13/2012 3:34:30 PM

Switch Configuration

login Switch_A(config-line)# line vty 0 15 <--- to set telnet passwordSwitch_A (config-line)# password
http://www.scribd.com/doc/88194921/Switch-Configuration (24 of 75)4/13/2012 3:34:30 PM

Switch Configuration

cisco Switch_A(config-line)# login Switch_A(config-line)# exit

! To set IP add to
http://www.scribd.com/doc/88194921/Switch-Configuration (25 of 75)4/13/2012 3:34:30 PM

Switch Configuration

the switch
Switch_A(config-line)# interface vlan 1 Switch_A(config)# ip address 192.168.1.2
http://www.scribd.com/doc/88194921/Switch-Configuration (26 of 75)4/13/2012 3:34:30 PM

Switch Configuration

255.255.255.0 Switch_A(config-if)# no shutdown Switch_A(config-if)# exit

! To set defaultgateway to the


http://www.scribd.com/doc/88194921/Switch-Configuration (27 of 75)4/13/2012 3:34:30 PM

Switch Configuration

switch
Switch_A(config)# ip default-gateway 192.168.1.1 <--- to set defaultgatewaySwitch_A
http://www.scribd.com/doc/88194921/Switch-Configuration (28 of 75)4/13/2012 3:34:30 PM

Switch Configuration

(config)# end!

! Creating VLANs
Switch_A# configure terminal Switch_A(config)# vlan
http://www.scribd.com/doc/88194921/Switch-Configuration (29 of 75)4/13/2012 3:34:30 PM

Switch Configuration

2 Switch_A(config-vlan) # name VLAN2


http://www.scribd.com/doc/88194921/Switch-Configuration (30 of 75)4/13/2012 3:34:30 PM

Switch Configuration

Switch_A(config-vlan) # vlan 3 Switch_A(config-vlan) #


http://www.scribd.com/doc/88194921/Switch-Configuration (31 of 75)4/13/2012 3:34:30 PM

Switch Configuration

name VLAN3
2 | Page

http://www.scribd.com/doc/88194921/Switch-Configuration (32 of 75)4/13/2012 3:34:30 PM

Switch Configuration

http://www.scribd.com/doc/88194921/Switch-Configuration (33 of 75)4/13/2012 3:34:30 PM

Switch Configuration

Switch_A(config-vlan)#
http://www.scribd.com/doc/88194921/Switch-Configuration (34 of 75)4/13/2012 3:34:30 PM

Switch Configuration

end

! Configuring Static VLAN (Assigning ports to VLAN, e.g vlan2)


Switch_A# configure terminal
http://www.scribd.com/doc/88194921/Switch-Configuration (35 of 75)4/13/2012 3:34:30 PM

Switch Configuration

Switch_A(config)# interface fastethernet 0/4 Switch_A(config-if)# switchport mode access Switch_A(config-if)#


http://www.scribd.com/doc/88194921/Switch-Configuration (36 of 75)4/13/2012 3:34:30 PM

Switch Configuration

switchport access vlan 2 Switch_A(config-if)# end

! Configuring Static VLAN (Assigning


http://www.scribd.com/doc/88194921/Switch-Configuration (37 of 75)4/13/2012 3:34:30 PM

Switch Configuration

range of ports to specificVLANs)


S3(config)# interface range fa0/6-10 S3(config-if-range)# switchport access vlan 30
http://www.scribd.com/doc/88194921/Switch-Configuration (38 of 75)4/13/2012 3:34:30 PM

Switch Configuration

S3(config)# interface range fa0/1117 S3(config-if-range)# switchport access vlan 10 S3(config)#


http://www.scribd.com/doc/88194921/Switch-Configuration (39 of 75)4/13/2012 3:34:30 PM

Switch Configuration

interface range fa0/1824 S3(config-if-range)# switchport access vlan 20 S3(config-if-range)# end


http://www.scribd.com/doc/88194921/Switch-Configuration (40 of 75)4/13/2012 3:34:30 PM

Switch Configuration

! To remove a host (port) from a VLAN (e.g vlan 2)


Switch_A# configure terminal Switch_A(config)# interface fastethernet
http://www.scribd.com/doc/88194921/Switch-Configuration (41 of 75)4/13/2012 3:34:30 PM

Switch Configuration

0/4 Switch_A(config-if)# no switchport access vlan 2


http://www.scribd.com/doc/88194921/Switch-Configuration (42 of 75)4/13/2012 3:34:30 PM

Switch Configuration

! To delete a VLAN
Switch_A# vlan database Switch_A(vlan)# no vlan 3
http://www.scribd.com/doc/88194921/Switch-Configuration (43 of 75)4/13/2012 3:34:30 PM

Switch Configuration

Switch_A(vlan)# exit!

! To create 802.1q trunk


Switch_A(config)# interface fastethernet
http://www.scribd.com/doc/88194921/Switch-Configuration (44 of 75)4/13/2012 3:34:30 PM

Switch Configuration

0/1 Switch_A(config-if)# switchport mode trunk Switch_A(config-if)# switchport trunk encapsulation dot1q <--- Not required
http://www.scribd.com/doc/88194921/Switch-Configuration (45 of 75)4/13/2012 3:34:30 PM

Switch Configuration

forCatalyst 2950Switch_A(configif)# end

! VTP Configuration
Switch_A# configure terminal
http://www.scribd.com/doc/88194921/Switch-Configuration (46 of 75)4/13/2012 3:34:30 PM

Switch Configuration

Switch_A(config)# vtp mode server <--- to set server modeSwitch_A(config) # vtp domain
http://www.scribd.com/doc/88194921/Switch-Configuration (47 of 75)4/13/2012 3:34:30 PM

Switch Configuration

group1 <--- to set domain nameSwitch_A(config)# exit Switch_B# configure terminal Switch_B(config)#
http://www.scribd.com/doc/88194921/Switch-Configuration (48 of 75)4/13/2012 3:34:30 PM

Switch Configuration

vtp mode client <--- to set client modeSwitch_B(config)# vtp domain group1 <--- to set domain
http://www.scribd.com/doc/88194921/Switch-Configuration (49 of 75)4/13/2012 3:34:30 PM

Switch Configuration

nameeSwitch_B(config) # exit
3 | Page

http://www.scribd.com/doc/88194921/Switch-Configuration (50 of 75)4/13/2012 3:34:30 PM

Switch Configuration

! Configuring
http://www.scribd.com/doc/88194921/Switch-Configuration (51 of 75)4/13/2012 3:34:30 PM

Switch Configuration

InterVLAN Routing
! This configuration is on the ROUTER interface used as the trunk.! Router_A(config)# interface fastethernet
http://www.scribd.com/doc/88194921/Switch-Configuration (52 of 75)4/13/2012 3:34:30 PM

Switch Configuration

0/0 Router_A(config-if)# no shutdown Router_A(config-if)# interface fastethernet


http://www.scribd.com/doc/88194921/Switch-Configuration (53 of 75)4/13/2012 3:34:30 PM

Switch Configuration

0/0.1 Router_A(config-subif) # encapsulation dot1q 1 Router_A(config-subif)


http://www.scribd.com/doc/88194921/Switch-Configuration (54 of 75)4/13/2012 3:34:30 PM

Switch Configuration

# ip address 192.168.1.1 255.255.255.0 Router_A(config-if)# interface fastethernet


http://www.scribd.com/doc/88194921/Switch-Configuration (55 of 75)4/13/2012 3:34:30 PM

Switch Configuration

0/0.2 Router_A(config-subif) # encapsulation dot1q 10


http://www.scribd.com/doc/88194921/Switch-Configuration (56 of 75)4/13/2012 3:34:30 PM

Switch Configuration

Router_A(config-subif) # ip address 192.168.5.1 255.255.255.0 Router_A(config-if)#


http://www.scribd.com/doc/88194921/Switch-Configuration (57 of 75)4/13/2012 3:34:30 PM

Switch Configuration

interface fastethernet 0/0.3 Router_A(config-subif) # encapsulation dot1q


http://www.scribd.com/doc/88194921/Switch-Configuration (58 of 75)4/13/2012 3:34:30 PM

Switch Configuration

20 Router_A(config-subif) # ip address 192.168.7.1 255.255.255.0


http://www.scribd.com/doc/88194921/Switch-Configuration (59 of 75)4/13/2012 3:34:30 PM

Switch Configuration

Router_A(config-subif) # end

! Setting duplex
switch(config) #interface fa0/1swconfig-if)
http://www.scribd.com/doc/88194921/Switch-Configuration (60 of 75)4/13/2012 3:34:30 PM

Switch Configuration

#duplex {auto | full | half}

! Setting a static mac-address


switch(config)# mac-address-table static
http://www.scribd.com/doc/88194921/Switch-Configuration (61 of 75)4/13/2012 3:34:30 PM

Switch Configuration

mac-addr

vlan
vlan-id

interface
interface-id

e.g: switch(config)# mac-address-table static


http://www.scribd.com/doc/88194921/Switch-Configuration (62 of 75)4/13/2012 3:34:30 PM

Switch Configuration

0004.5600.67ab vlan 1 interfacefastethernet0/2

! Securing Switch Configuring Port Security


switch(config-if)# switchport port-security
http://www.scribd.com/doc/88194921/Switch-Configuration (63 of 75)4/13/2012 3:34:30 PM

Switch Configuration

[ mac-address mac-address ] |[ maximum value ]|[


http://www.scribd.com/doc/88194921/Switch-Configuration (64 of 75)4/13/2012 3:34:30 PM

Switch Configuration

violation { protect | restrict | shutdown


http://www.scribd.com/doc/88194921/Switch-Configuration (65 of 75)4/13/2012 3:34:30 PM

Switch Configuration

}]e.g:switch(config)# interface fa0/1 switch (config-if)# switchport mode access switch (config-if)# switchport port-security switch config-if)#
http://www.scribd.com/doc/88194921/Switch-Configuration (66 of 75)4/13/2012 3:34:30 PM

Switch Configuration

switchport port-security maximum 1 switch (config-if)# switchport port-security mac-address 0008.eeee. eeee switch (config-if)#
http://www.scribd.com/doc/88194921/Switch-Configuration (67 of 75)4/13/2012 3:34:30 PM

Switch Configuration

switchport port-security violation shutdown

! SSH Access Telnet is unsecure. Cisco recommends usingSSH to


http://www.scribd.com/doc/88194921/Switch-Configuration (68 of 75)4/13/2012 3:34:30 PM

Switch Configuration

encrypt communication between Cisco device and thehost.


Switch_B# configure terminal Switch_B(config)#
http://www.scribd.com/doc/88194921/Switch-Configuration (69 of 75)4/13/2012 3:34:30 PM

Switch Configuration

username ccna password cisco123 Switch_B(config)# ip domain-name cisco. com Switch_B(config)# crypto key generate rsa
http://www.scribd.com/doc/88194921/Switch-Configuration (70 of 75)4/13/2012 3:34:30 PM

Switch Configuration

Switch_B(config)# ip ssh ver 2 Switch_B(config)# line vty 0 15


4 | Page
http://www.scribd.com/doc/88194921/Switch-Configuration (71 of 75)4/13/2012 3:34:30 PM

Switch Configuration

http://www.scribd.com/doc/88194921/Switch-Configuration (72 of 75)4/13/2012 3:34:30 PM

Switch Configuration

1
of 5

Leave a Comment
Characters: 400

Submit

Switch Configuration
Download or Print Info and Rating
7 Reads

http://www.scribd.com/doc/88194921/Switch-Configuration (73 of 75)4/13/2012 3:34:30 PM

Switch Configuration

Uploaded by

zainal2101

Embed Doc Copy Link Add To Collection Comments Readcast Share


q q q

Search

More from This User Related Documents


5 p.

Switch Configuration
4 p.

Buku Program CCNA 2 Siri 1


262 p.

CCNA 3 Lab Answers


Next

http://www.scribd.com/doc/88194921/Switch-Configuration (74 of 75)4/13/2012 3:34:30 PM

Switch Configuration

http://www.scribd.com/doc/88194921/Switch-Configuration (75 of 75)4/13/2012 3:34:30 PM

S-ar putea să vă placă și