You are on page 1of 5

CABLING Crossover Between host and routers Straight-through Between routers/switches and routers/switches OR host to switches Rollover/Console Between

een host and routers/switches Clear configuration Remove the VLAN database Switch#delete flash:vlan.dat Delete filename [vlan.dat]?[Enter] Delete flash:vlan.dat? [confirm] [Enter] Remove the startup configuration from NVRAM Switch#erase startup-config Restart the software Switch#reload Basic configuration Privileged mode Router>enable Configuration mode Router#config term Enter configuration commands, one per line. End with CNTL/Z. Change device (prompt) name Router(config)#hostname Router1 Configure a login banner Router(config)#banner login Authorized Personnel Only! Configure a message of the day banner Router(config)#banner motd Authorized Personnel Only! Set the switch default gateway S1(config)#ip default-gateway 172.17.99.1 Disable DNS lookup S1(config)#no ip default-gateway Encrypt privileged exec password Router1(config)#enable secret class Set console access password Router1(config)#line console 0 Router1(config-line)#password cisco Router1(config-line)#login Set telnet access password Router1(config-line)#line vty 0 4 Router1(config-line)#password cisco Router1(config-line)#login Set the interface layer 3 address Router1(config-line)#interface fa0/0 Router1(config-if)#ip address 192.168.7.126 255.255.255.128 Router1(config-if)#no shutdown Set the interface description Router1(config-if)#description connection to host1 Exit from configuration mode Router1(config-if)#end Page 1 of 5

Router1# Initialize all ports in the shutdown state Switch#config term Switch(config)#interface range fa0/1-24 Switch(config-if-range)#shutdown Switch(config-if-range)#interface range gi0/1-2 Switch(config-if-range)#shutdown Configure VTP Configure the VTP mode (server,client,transparent) S1(config)#vtp mode server or client or transparent Device mode already VTP SERVER mode S1(config)#vtp domain ZYXCORP Changing VTP domain name from NULL to Lab4 S1(config)#vtp password cisco Setting device VLAN database password to cisco S1(config)#end Configure Trunking S1(config)#interface range fa0/1-5 S1(config-if-range)#switchport mode trunk S1(config-if-range)#switchport trunk native vlan 99 S1(config-if-range)#no shutdown S1(config-if-range)#end S1#show interface trunk

Configure port security S2(config)#interface fa0/6 S2(config-if)#switchport port-security S2(config-if)#switchport port-security maximum 1 S2(config-if)#switchport port-security mac-address sticky

Configure VLANs Create VLAN on the switch 1(VTP server) and VTP will advertise the VLANs configuration S1(config)#vlan 99 S1(config-vlan)#name S1(config-vlan)#exit S1(config)#vlan 10 S1(config-vlan)#name S1(config-vlan)#vlan S1(config-vlan)#name S1(config-vlan)#vlan S1(config-vlan)#name S1(config-vlan)#end S1#show vlan brief Configure the management interface address on all switches management faculty/staff 20 students 30 guest

Page 2 of 5

ALSwitch(config)#interface vlan 99 ALSwitch(config-if)#ip address 172.17.99.11 255.255.255.0 ALSwitch(config-if)#no shutdown ALSwitch(config-if)#exit Assign switch ports to VLAN S3(config)#interface range fa0/6-10 S3(config-if-range)#switchport access vlan 30 S3(config-if-range)#interface range fa0/11-17 S3(config-if-range)#switchport access vlan 10 S3(config-if-range)#interface range fa0/18-24 S3(config-if-range)#switchport access vlan 20 S3(config-if-range)#end

Configure STP Configuring Port Costs S1# configure terminal S1(config)#interface fastethernet 0/1 S1(config-if)#spanning-tree cost 25 S1(config-if)#end Configuring Port priority S1# configure terminal S1(config)#interface fastethernet 0/1 S1(config-if)#spanning-tree port-priority 112 S1(config-if)#end

Configuring the bridge priority value. S1# configure terminal S1(config)#spanning-tree vlan 1 root primary (priority set to 24576 from default 32768) S1(config)#spanning-tree vlan 1 root secondary (priority set to 28672 from default 32768) OR S1(config)#spanning-tree vlan 1 priority 24576 (in increments of 4096 between 0 and 65536) S1(config)#end

Configuring the spanning tree diameter S1# configure terminal S1(config)#spanning-tree vlan 1 root primary diameter 5 S1(config)#end

Configuring the Portfast S1# configure terminal Page 3 of 5

S1(config)#interface fastethernet 0/1 S1(config-if)#spanning-tree portfast S1(config)#end Configuring the Rapid-PVST+ S1# configure terminal S1(config)#spanning-tree mode rapid-pvst S1(config)#interface fastethernet 0/1 S1(config-if)#spanning-tree link-type point-to-point S1(config)#end S1#clear spanning-tree detected-protocols S1#debug spanning-tree events S1#show spanning-tree Configure the FastEthernet 0/1 interface on Router. R1(config)#interface fastethernet 0/1 R1(config-if)#ip address 192.168.1.1 255.255.255.0 R1(config-if)#no shutdown Configure the Serial 0/0/0 interface on Router DCE port. R1(config)#interface serial 0/0/0 R1(config-if)#ip address 192.168.2.1 255.255.255.0 R1(config-if)#clock rate 64000 R1(config-if)#no shutdown R1#show IP interface brief Configure the trunking interface on Router. R1(config)#interface fastethernet 0/1 R1(config-if)#no shutdown R1(config-if)#interface fastethernet 0/1.1 R1(config-subif)#encapsulation dot1q 1 R1(config-subif)#ip address 172.17.1.1 255.255.255.0 R1(config-if)#interface fastethernet 0/1.10 R1(config-subif)#encapsulation dot1q 10 R1(config-subif)#ip address 172.17.10.1 255.255.255.0 R1(config-if)#interface fastethernet 0/1.20 R1(config-subif)#encapsulation dot1q 20 R1(config-subif)#ip address 172.17.20.1 255.255.255.0 R1(config-if)#interface fastethernet 0/1.99 R1(config-subif)#encapsulation dot1q 99 native R1(config-subif)#ip address 172.17.99.1 255.255.255.0

Page 4 of 5

R1#show IP route Configure the server LAN interface R1(config)# interface FastEthernet0/0 R1(config-if)#ip address 172.17.50.1 255.255.255.0 R1(config-if)#description server interface R1(config-if)#no shutdown R1(config-if)#end

Page 5 of 5

You might also like