Configuration Example: 2900 Series Switch


Figure 16-3 shows the network topology for the basic configuration of a 2900 series switch using the commands covered in this chapter.

Figure 16-3. Network Topology for 2900 Series Switch Configuration


switch>en

Enters privileged mode

switch#config t

Enters global config mode

switch(config)#no ip domain-lookup

Turns off DNS queries so that spelling mistakes will not slow you down

switch(config)#hostname 2900

Sets host name

2900(config)#enable secret cisco

Sets encrypted secret password to cisco

2900(config)#line con 0

Enters line console mode

2900(config-line)#logging synchronous

Appends commands to new line; router information will not interrupt

2900(config-line)#login

User must log in to console before use

2900(config-line)#password switch

Sets password to switch

2900(config-line)#exec-timeout 0 0

Console will never log out

2900(config-line)#exit

Moves back to global config mode

2900(config)#line aux 0

Moves to line auxiliary mode

2900(config-line)#login

User must log in to auxiliary port before use

2900(config-line)#password class

Sets password to class

2900(config-line)#exit

Back to global config mode

2900(config)#line vty 0 15

Moves to configure all 16 vty ports at same time

2900(config-line)#login

User must log in to vty port before use

2900(config-line)#password class

Sets password to class

2900(config-line)#exit

Back to global config mode

2900(config)#ip default-gateway 192.168.1.1

Sets default gateway

2900(config)#int vlan 1

Moves to virtual interface VLAN 1

2900(config-if)#ip add 192.168.1.2 255.255.255.0

Sets IP address for switch

2900(config-if)#no shut

Turns virtual interface on

2900(config-if)#int fa 0/1

Moves to interface fa 0/1

2900(config-if)#desc Link to Router

Sets local description

2900(config-if)#int fa 0/4

Moves to interface fa 0/4

2900(config-if)#desc Link to Workstation A

Sets local description

2900(config-if)#port security

Activates port security

2900(config-if)#port security max-mac-count 1

Only one MAC address will be allowed in the MAC table

2900(config-if)#port security action shutdown

Port will be turned off if more than one MAC address is reported

2900(config-if)#int fa 0/8

Moves to interface fa 0/8

2900(config-if)#desc Link to Workstation B

Sets local description

2900(config-if)#port security

Activates port security

2900(config-if)#port security max-mac-count 1

Only one MAC address will be allowed in the MAC table

2900(config-if)#port security action shutdown

Port will be turned off if more than one MAC address is reported

2900(config-if)#exit

Returns to global config mode

2900(config)#exit

Returns to privileged mode

2900#copy run start

Saved configuration to NVRAM

2900#

 





CCNA Self-Study(c) CCNA Portable Command Guide
CCNA Portable Command Guide
ISBN: 1587201585
EAN: 2147483647
Year: 2006
Pages: 261
Authors: Scott Empson

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net