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 switch#config t switch(config)#no ip domain-lookup

Enters privileged mode Enters global config mode Turns off DNS queries so that spelling mistakes will not slow you down Sets host name Sets encrypted secret password to cisco Enters line console mode Appends commands to new line; router information will not interrupt User must log in to console before use Sets password to switch Console will never log out Moves back to global config mode Moves to line auxiliary mode User must log in to auxiliary port before use Sets password to class Back to global config mode Moves to configure all 16 vty ports at same time User must log in to vty port before use Sets password to class

switch(config)#hostname 2900 2900(config)#enable secret cisco

2900(config)#line con 0 2900(config-line)#logging synchronous

2900(config-line)#login

2900(config-line)#password switch 2900(config-line)#exec-timeout 0 0 2900(config-line)#exit

2900(config)#line aux 0

2900(config-line)#login

2900(config-line)#password class 2900(config-line)#exit 2900(config)#line vty 0 15

2900(config-line)#login

2900(config-line)#password class

255.0 2900(config-if)#no shut 2900(config-if)#int fa 0/1 2900(config-if)#desc Link to Router 2900(config-if)#int fa 0/4 2900(config-if)#desc Link to Workstation A 2900(config-if)#port security 2900(config-if)#port security max-mac-count 1 2900(config-if)#port security action shutdown 2900(config-if)#int fa 0/8 2900(config-if)#desc Link to Workstation B 2900(config-if)#port security 2900(config-if)#port security max-mac-count 1 2900(config-if)#port security action shutdown 2900(config-if)#exit 2900(config)#exit 2900#copy run start 2900# .168.255.p 2900(config-line)#exit 2900(config)#ip default-gateway 192.2 255.1 2900(config)#int vlan 1 Back to global config mode Sets default gateway Moves to virtual interface VLAN 1 Sets IP address for switch Turns virtual interface on Moves to interface fa 0/1 Sets local description Moves to interface fa 0/4 Sets local description Activates port security Only one MAC address will be allowed in the MAC table Port will be turned off if more than one MAC address is reported Moves to interface fa 0/8 Sets local description Activates port security Only one MAC address will be allowed in the MAC table Port will be turned off if more than one MAC address is reported Returns to global config mode Returns to privileged mode Saved configuration to NVRAM 2900(config-if)#ip add 192.1.1.168.