17 April, 2013

GNS3 LAB CCNA Layer 2 Configuration




!Objective 1 - Basic Configuration
!Objective 2 - Vlan database 
!Objective 3 - Etherchanel
!Objective 4 - Trunking
!Objective 5 - VLAN Port Assignments
!Objective 6 - Default Route & Interface Configuration
!Objective 7 - Layer 3 Switchin Configuration
!Objective 8 - Spanning Tree Configuration
!Bonus       - Converting to a Router on a Stick


Download Link (All inc: ios,conf files,topology )
Used IOS : c3660-telcoentk9-mz.124-13b.bin  on all Devices


!Objective1 Basic Configuration

enable

configure terminal

hostname NL-B1-SW1


enable secret cisco

usename admin secret cisco
line vty 0 4 
login local
logging synchronous
exec-timeout 30
line con 0
no login
exec-timeout 180
logging synchronous
banner motd $
*******************
*  DO NOT LOG IN  *
*******************
$


ip ssh version 2

ip domain-name nuggetlabs.com
crypto key generate rsa 
 1024
ip name-server 4.2.2.2 4.2.2.3
no ip http server
ntp server 64.73.32.135

interface vlan 1

no ip address
shutdown

interface vlan 71

ip address 10.1.71.1 255.255.255.0
no shutdown

end


clock set 22:11:00 21 oct 2012


write mem 


!Objective2 Vlan database 

erase flash:

squeeze flash:
configure terminal
vtp file nvram:vlan.dat
do write mem
exit

!SW1

vlan database
vlan 64 "Client Voice"
vlan 66 "Client Data"
vlan 68 "Server"
vlan 69 "Public WIFI"
vlan 70 "Private LAB"
vlan 71 "Management"
vlan 10 "Internet DMZ"

!SW2 & SW3

vlan database
vlan 64 "Client Voice"
vlan 66 "Client Data"
vlan 68 "Server"
vlan 71 "Management"

!Objective3 - Etherchanel


!SW1 

configure terminal
interface range fastethernet 1/0 - 1
 channel-group 1 mode on
interface range fastethernet 1/2 - 3
 channel-group 2 mode on

!SW2 & SW3
configure terminal
interface range fastethernet 1/0 - 1
 channel-group 1 mode on 

!Objective4 - Trunking


!SW1

configure terminal
interface range port-channel 1 - 2
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 1,64,66,68,69,71,1002-1005

!SW2 & SW3


!SW1

configure terminal
interface port-channel 1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 1,64,66,69,71,1002-1005

!Objective5 - VLAN Port Assignments

!SW1


configure terminal

interface range fastethernet 1/4 - 13
 switchport mode access
 switchport access vlan 68
interface fastethernet 1/14
 switchport mode access
 switchport access vlan 70

!SW2 & SW3

configure terminal

interface range fastethernet 1/2 - 13
 switchport mode access
 switchport access vlan 66
 switchport voice vlan 64
interface fastethernet 1/15
 switchport mode trunk
 switchport trunk allowed vlan 1,,66,69,71,1002-1005

!Objective 6 - Default Route & Interface Configuration


!SW1
configure terminal
ip route 0.0.0.0 0.0.0.0 10.1.254.2

interface fastethernet 1/15
 no shwitchport
 ip address 10.1.254.1 255.255.255.252
  no shutdown

!Objective 7 - Layer 3 Switchin Configuration


!SW1

configure terminal
ip routing
 interface vlan 64
 description "Voice VLAN"
  ip address 10.1.64.1 255.255.254.0
 interface vlan 66
 description "Data VLAN"
  ip address 10.1.66.1 255.255.254.0
 interface vlan 68
 description "Server VLAN"
  ip address 10.1.68.1 255.255.255.0
 interface vlan 69
 description "Public WIFI VLAN"
  ip address 10.1.69.1 255.255.255.0
   interface vlan 70
   description "Private Lab VLAN"
  ip address 10.1.70.1 255.255.255.0
   interface vlan 71
  description "Management VLAN"
  ip address 10.1.71.1 255.255.255.0

!Objective 8 - Spanning Tree Configuration

!SW1


configure terminal

spanning-tree vlan 64 root primary
spanning-tree vlan 66 root primary
spanning-tree vlan 68 root primary
spanning-tree vlan 69 root primary
spanning-tree vlan 70 root primary
spanning-tree vlan 71 root primary

 interface range fastEthernet 1/5 - 15

  spanning-tree portfast 

!SW2 & SW3

configure terminal
 interface range fastEthernet 1/2 - 14
  spanning-tree portfast 

!Bonus: Converting to a Router on a Stick

!SW1

configure terminal
no interface vlan 64
no interface vlan 66
no interface vlan 68
no interface vlan 69
no interface vlan 70
no ip routing

!RT1

configure terminal
 interface fastethernet 0/0
  no shutdown
  speed 100
  full duplex
 interface fastethernet 0/0.64
  description ROUTED INTERFACE FOR VOICE VLAN
  encapsulation dot1Q 64
  ip address 10.1.64.1 255.255.254.0
 interface fastethernet 0/0.66
  description ROUTED INTERFACE FOR DATA VLAN
  encapsulation dot1Q 66
  ip address 10.1.66.1 255.255.254.0
 interface fastethernet 0/0.68
  description ROUTED INTERFACE FOR SERVER VLAN
  encapsulation dot1Q 68
  ip address 10.1.68.1 255.255.255.0
 interface fastethernet 0/0.69
  description ROUTED INTERFACE FOR PUBLIC WIFI VLAN
  encapsulation dot1Q 69
  ip address 10.1.69.1 255.255.255.0
 interface fastethernet 0/0.70
  description ROUTED INTERFACE FOR PRIVATE LAB VLAN
  encapsulation dot1Q 70
  ip address 10.1.70.1 255.255.255.0
 interface fastethernet 0/0.71
  description ROUTED INTERFACE FOR MANAGEMENT VLAN
  encapsulation dot1Q 71
  ip address 10.1.71.254 255.255.255.0