Wednesday 6 June 2012

Configuring Vlans and Trunks with layer 3 Switch

                                            Configuring Vlans and Trunks with layer 3 Switch



       1.       Take 1 Switch .
  2.     Configuring the switch.
        Switch>
        Switch>enable
        Switch#config t
        Enter configuration commands, one per line.  End with CNTL/Z.
        Switch(config)#hostname CCNA
        CCNA(config)#vlan 10
        CCNA(config-vlan)#name Accounts
        CCNA(config-vlan)#vlan 20
        CCNA(config-vlan)#name Sales
        CCNA(config-vlan)#vlan 30
        CCNA(config-vlan)#name HR
        CCNA(config-vlan)#exit
        CCNA(config)#exit
        CCNA#
        %SYS-5-CONFIG_I: Configured from console by console
        CCNA#config t
        Enter configuration commands, one per line.  End with CNTL/Z.
        CCNA(config)#int fastethernet 0/1
        CCNA(config-if)#switchport mode access
        CCNA(config-if)#switchport access vlan 10
        CCNA(config-if)#int fastethernet 0/2
        CCNA(config-if)#switchport mode access
        CCNA(config-if)#switchport access vlan 10
        CCNA(config-if)#int fastethernet 0/3
        CCNA(config-if)#switchport mode access
        CCNA(config-if)#switchport access vlan 20
        CCNA(config-if)#int fastethernet 0/4
        CCNA(config-if)#switchport mode access
        CCNA(config-if)#switchport access vlan 20
        CCNA(config-if)#int fastethernet 0/5
        CCNA(config-if)#switchport mode access
        CCNA(config-if)#switchport access vlan 30
        CCNA(config-if)#int fastethernet 0/6
        CCNA(config-if)#switchport mode access
        CCNA(config-if)#switchport access vlan 30
        CCNA(config-if)#exit
        CCNA(config)#exit
        CCNA#
        %SYS-5-CONFIG_I: Configured from console by console
        CCNA#sh vlan

        VLAN Name                             Status    Ports
      ------------------------------- --------- ----------------------------
         1    default                 active    Fa0/7, Fa0/8, Fa0/9, Fa0/10
                                                Fa0/11, Fa0/12, Fa0/13 Fa0/14
                                               Fa0/15, Fa0/16, Fa0/17, Fa0/18
                                               Fa0/19, Fa0/20, Fa0/21,Fa0/22
                                               Fa0/23, Fa0/24, Gig0/1, Gig0/2
        10   Accounts                         active    Fa0/1, Fa0/4
        20   Sales                            active    Fa0/2, Fa0/5
        30   HR                               active    Fa0/3, Fa0/6
        1002 fddi-default                     act/unsup
        1003 token-ring-default               act/unsup
        1004 fddinet-default                  act/unsup
        1005 trnet-default                    act/unsup
        CCNA#
        CCNA#config t
        Enter configuration commands, one per line.  End with CNTL/Z.
        CCNA(config)#int vlan 10
        %LINK-5-CHANGED: Interface Vlan10, changed state to up
        %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed     
        state to up
        CCNA(config-if)#int vlan 20
        %LINK-5-CHANGED: Interface Vlan20, changed state to up
        %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state    
        to up
        CCNA(config-if)#int vlan 30
        %LINK-5-CHANGED: Interface Vlan30, changed state to up
        %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state
        to up
        CCNA(config-if)#exit
        CCNA(config)#exit
        CCNA#
        %SYS-5-CONFIG_I: Configured from console by console
        CCNA#sh ip int brief   



        CCNA#
        CCNA#config t
        Enter configuration commands, one per line.  End with CNTL/Z.
        CCNA(config)#int vlan 10
        CCNA(config-if)#ip address 192.168.1.1 255.255.255.0
        CCNA(config-if)#int vlan 20
        CCNA(config-if)#ip address 192.168.2.1 255.255.255.0
        CCNA(config-if)#int vlan 30
        CCNA(config-if)#ip address 192.168.3.1 255.255.255.0
        CCNA(config-if)#
        CCNA(config-if)#exit
        CCNA(config)#exit
        CCNA#
        CCNA#config t
        CCNA(config)#ip routing
        CCNA(config)#exit
        CCNA#
        %SYS-5-CONFIG_I: Configured from console by console
        CCNA#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route
Gateway of last resort is not set
C    192.168.1.0/24 is directly connected, Vlan10
C    192.168.2.0/24 is directly connected, Vlan20
C    192.168.3.0/24 is directly connected, Vlan30
     
               Take 6 systems and rename as the following figure.
3.       Using the Config tab in Packet Tracer, configure the IP address, mask, and default gateway on each host
 PC – 192.168.1.10 255.255.255.0   Default gateway 192.168.1.1
 PC – 192.168.1.20 255.255.255.0   Default gateway 192.168.1.1

 PC – 192.168.2.10 255.255.255.0    Default gateway 192.168.2.1
 PC – 192.168.2.20 255.255.255.0    Default gateway 192.168.2.1

 PC – 192.168.3.10 255.255.255.0    Default gateway 192.168.3.1
 PC – 192.168.3.20 255.255.255.0    Default gateway 192.168.3.1

                    CCNA#sh ip route.
             Now try to ping from PC 192.168.1.10 to 192.168.1.20 and 192.168.1.10 to   192.168.3.20.

               If is there any mistakes and for any clarification please mail to 
                                                    ccnalab06@gmail.com

Monday 4 June 2012

Vlans and trunks between Switch and Router


Vlans and Trunks between Router and Switch


     
1.                  Take 1 Switch and 1 router.
2.                                Connect two devices through cross over.
3.     Configure the switch.
           Switch>enable
                    Switch#config t
                    Enter configuration commands, one per line.  End with CNTL/Z.
                    Switch(config)#hostname CCNA
                    CCNA(config)#vlan 10
                    CCNA(config-vlan)#name Accounts
                    CCNA(config-vlan)#vlan 20
        CCNA(config-vlan)#name HR
                    CCNA(config-vlan)#vlan 30
                    CCNA(config-vlan)#name Sales
                    CCNA(config-vlan)#exit
                    CCNA(config)#exit
                    CCNA#
                    %SYS-5-CONFIG_I: Configured from console by console
                     CCNA#show vlan

                     VLAN Name                             Status    Ports
                    ---- -------------------------------- --------- -------------------------------
                     1    default                            active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                                                Fa0/9, Fa0/10, Fa0/11, Fa0/12
                                                              Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                                              Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                                              Fa0/21, Fa0/22, Fa0/23, Fa0/24
                                                             Gig1/1, Gig1/2
                       10   Accounts                         active   
                       20   HR                                    active   
                       30   Sales                                active   
                       1002 fddi-default                           act/unsup
                       1003 token-ring-default               act/unsup
                       1004 fddinet-default                     act/unsup
                       1005 trnet-default                         act/unsup

                   VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
                     ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
                        1    enet  100001     1500         -      -      -        -    -        0      0
                        10   enet  100010     1500        -      -      -        -    -        0      0
                        20   enet  100020     1500        -      -      -        -    -        0      0
                        30   enet  100030     1500        -      -      -        -    -        0      0
                        1002 fddi  101002    1500        -      -      -        -    -        0      0  
                        1003 tr    101003      1500        -      -      -        -    -        0      0  
                        1004 fdnet 101004   1500        -      -      -        ieee -        0      0  
                        1005 trnet 101005    1500       -      -      -        ibm  -        0      0  

                       Remote SPAN VLANs
                     ------------------------------------------------------------------------------


                     Primary Secondary Type              Ports
                        ------- --------- ----------------- ------------------------------------------
                       CCNA#
                       CCNA#config t
                        Enter configuration commands, one per line.  End with CNTL/Z.
                       CCNA(config)#int fastethernet 0/2
                       CCNA(config-if)#switchport mode access
                       CCNA(config-if)#switchport access vlan 10
                       CCNA(config-if)#int fastethernet 0/3
                       CCNA(config-if)#switchport mode access
                       CCNA(config-if)#switchport access vlan 10
                       CCNA(config-if)#int fastethernet 0/4
                       CCNA(config-if)#switchport mode access
                       CCNA(config-if)#switchport access vlan 20       
                       CCNA(config-if)#int fastethernet 0/5
                       CCNA(config-if)#switchport mode access
                       CCNA(config-if)#switchport access vlan 20
                       CCNA(config-if)#int fastethernet 0/6
                       CCNA(config-if)#switchport mode access
                       CCNA(config-if)#switchport access vlan 30
                       CCNA(config-if)#int fastethernet 0/7
                       CCNA(config-if)#switchport mode access
                       CCNA(config-if)#switchport access vlan 30
                       CCNA(config-if)#exit
                       CCNA(config)#exit
                        CCNA#
                       %SYS-5-CONFIG_I: Configured from console by console
                       CCNA#show vlan

                        VLAN Name                             Status    Ports
                     ---- -------------------------------- --------- -------------------------------
                        1    default                             active    Fa0/1, Fa0/8, Fa0/9, Fa0/10
                                                                   Fa0/11, Fa0/12, Fa0/13, Fa0/14
                                                                   Fa0/15, Fa0/16, Fa0/17, Fa0/18
                                                                   Fa0/19, Fa0/20, Fa0/21, Fa0/22
                                                                   Fa0/23, Fa0/24, Gig1/1, Gig1/2
                       10   Accounts                         active    Fa0/2, Fa0/3
                       20   HR                                    active    Fa0/4, Fa0/5
                       30   Sales                                 active    Fa0/6, Fa0/7
                       1002 fddi-default                           act/unsup
                       1003 token-ring-default               act/unsup
                       1004 fddinet-default                     act/unsup
                       1005 trnet-default                         act/unsup

                      VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
                           ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
                        1    enet  100001     1500  -      -      -        -    -        0      0
                        10   enet  100010     1500  -      -      -        -    -        0      0
                        20   enet  100020     1500  -      -      -        -    -        0      0
                        30   enet  100030     1500  -      -      -        -    -        0      0
                        1002 fddi  101002    1500  -      -      -        -    -        0      0  
                        1003 tr    101003     1500  -      -      -        -    -        0      0  
                         1004 fdnet 101004   1500  -      -      -        ieee -        0      0  
                        1005 trnet 101005   1500  -      -      -        ibm  -        0      0  

                        Remote SPAN VLANs
                         ------------------------------------------------------------------------------
                         Primary Secondary Type              Ports
                         ------- --------- ----------------- ------------------------------------------
                        CCNA#
                        CCNA#
                        CCNA#config t
                         Enter configuration commands, one per line.  End with CNTL/Z.             
                        CCNA(config)#int fastethernet 0/1
                        CCNA(config-if)#description uplink
                        CCNA(config-if)#switchport mode trunk
                        CCNA(config-if)#
                        CCNA(config-if)#
                        CCNA(config-if)#exit
                        CCNA(config)#exit
                        CCNA#
                        %SYS-5-CONFIG_I: Configured from console by console
               
                        CCNA#show cdp
                        CCNA#show cdp ?
                        entry      Information for specific neighbor entry
                        interface  CDP interface status and configuration
                        neighbors  CDP neighbor entries
                        <cr>
                        CCNA#show cdp
                        CCNA#show cdp neighbors
                        Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
                         Device ID    Local Intrfce   Holdtme    Capability   Platform    Port ID
                         CCNA#
4.          Take 6 systems and rename as the following figure.
5.            Using the Config tab in Packet Tracer, configure the IP address, mask, and default gateway      on each host
            PC – 192.168.1.10 255.255.255.0   Default gateway 192.168.1.1
            PC – 192.168.1.20 255.255.255.0   Default gateway 192.168.1.1

            PC – 192.168.2.10 255.255.255.0    Default gateway 192.168.2.1
            PC – 192.168.2.20 255.255.255.0    Default gateway 192.168.2.1

             PC – 192.168.3.10 255.255.255.0    Default gateway 192.168.3.1
             PC – 192.168.3.20 255.255.255.0    Default gateway 192.168.3.1

6.          Router configuration.
                        Router>enable
                        Router#config t
                        Enter configuration commands, one per line.  End with CNTL/Z.
                        Router(config)#hostname CCNA
                        CCNA(config)#int fa
                        % Incomplete command.
                        CCNA(config)#int fa
                         CCNA(config)#int fastEthernet 0/0
                        CCNA(config-if)#no shut
                    %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
                    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to  
                     CCNA(config-if)#int fa0/0.10
                     CCNA(config-subif)#
                     %LINK-5-CHANGED: Interface FastEthernet0/0.10, changed state to up
                     %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.10, changed state    
                     CCNA(config-subif)#int fa0/0.20
                     %LINK-5-CHANGED: Interface FastEthernet0/0.20, changed state to up
                     %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.20, changed state  
                     CCNA(config-subif)#int fa0/0.30
                     %LINK-5-CHANGED: Interface FastEthernet0/0.30, changed state to up
                     %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.30, changed state  
                     CCNA(config-subif)#
                     CCNA(config-subif)#do sh ip int brief
                       Interface              IP-Address      OK? Method Status                Protocol
                      FastEthernet0/0        unassigned      YES NVRAM  up                    up
                      FastEthernet0/0.10     unassigned      YES unset  up                    up
                      FastEthernet0/0.20     unassigned      YES unset  up                    up
                      FastEthernet0/0.30     unassigned      YES unset  up                    up
                      FastEthernet0/1        unassigned      YES NVRAM  administratively down down
                       Vlan1                  unassigned      YES NVRAM  administratively down down
                       CCNA(config-subif)#int fa0/0.10
                       CCNA(config-subif)#encapsulation dot1Q 10
                       CCNA(config-subif)#ip address 192.168.1.1 255.255.255.0
                       CCNA(config-subif)#int fa0/0.20
                       CCNA(config-subif)#encapsulation dot1Q 20
                       CCNA(config-subif)#ip address 192.168.2.1 255.255.255.0
                       CCNA(config-subif)#int fa0/0.30
                       CCNA(config-subif)#encapsulation dot1Q 30
                       CCNA(config-subif)#ip address 192.168.3.1 255.255.255.0
                       CCNA(config-subif)#exi
                       CCNA(config)#exit
                        CCNA#
                        %SYS-5-CONFIG_I: Configured from console by console
                        CCNA#sh ip int brief
                        Interface              IP-Address      OK? Method Status                Protocol
                          FastEthernet0/0        unassigned      YES NVRAM  up                    up
                          FastEthernet0/0.10     192.168.1.1     YES manual up                    up
                          FastEthernet0/0.20     192.168.2.1     YES manual up                    up
                          FastEthernet0/0.30     192.168.3.1     YES manual up                    up
                          FastEthernet0/1        unassigned      YES NVRAM  administratively down down
                          Vlan1                  unassigned      YES NVRAM  administratively down down
                          CCNA#sh ip route.
               Now try to ping from PC 192.168.1.10 to 192.168.1.20 and 192.168.1.10 to 192.168.3.20.


                         If is there any mistakes and for any clarification please mail to 
                                                    ccnalab06@gmail.com 






     

Thursday 17 May 2012

VTP Configuration part 1

                              VTP Configuration part 1



1.      Take 3 Switches.
2.      Connect 3 switches through cross over.
3.     Configure the VTP in switch0.
        Switch>
                   Switch>enable
                   Switch#config t
                   Enter configuration commands, one per line.  End with CNTL/Z.
                   Switch(config)#int fastethernet fa0/1
                   Switch(config-if)#switchport mode trunk
                   Switch(config-if)#description uplink-to-switch0
                   Switch(config)#int fastethernet fa0/1
                   Switch(config-if)#switchport mode trunk
                   Switch(config-if)#description uplink-to-switch0    
                   Switch(config-if)#exit
                   Switch(config)#int vlan 1
                   Switch(config-if)#ip address 192.168.1.1 255.255.255.0
                   Switch(config-if)#exit
                   Switch(config)#exit
                   Switch# 
                   Switch#sh ip interface brief
                   Switch#config t
                   Enter configuration commands, one per line.  End with CNTL/Z.
                   Switch(config)#
                   Switch(config)#vtp domain CCNALAB
                   Changing VTP domain name from NULL to CCNALAB
                    Switch(config)#
                    Switch(config)#exit
                    Switch#
                    Switch#sh vtp status
                                  
                     Switch#config t
                     Enter configuration commands, one per line.  End with CNTL/Z.
                     Switch(config)#vlan 10
                     Switch(config-vlan)#name Accounts
                     Switch(config-vlan)#exit
                     Switch(config)#vlan 20
                     Switch(config-vlan)#name Sales
                     Switch(config-vlan)#exit
                     Switch(config)#vlan 30
                     Switch(config-vlan)#name Hr
                     Switch(config-vlan)#exit
                     Switch(config)#exit
                     Switch#
                               
                       
4.      Configuration on another switches.(Switch1)
        
                     Switch>enable
                     Switch#sh vtp status

            

                     Switch(config)#int fastethernet 0/1
                     Switch(config-if)#switchport mode trunk
                     Switch(config-if)#description uplink-to-switch0
                     Switch(config-if)#exit
                     Switch(config)#vtp mode client
                     Setting device to VTP CLIENT mode.
                     Switch(config)#exit

                     %SYS-5-CONFIG_I: Configured from console by console
                      Switch#sh vtp status

                     

                       Switch#config t
                       Enter configuration commands, one per line.  End with CNTL/Z.
                       Switch(config)#int fastethernet 0/8
                       Switch(config-if)#switchport mode access
                       Switch(config-if)#switchport access vlan 10
                       Switch(config-if)#exit
                       Switch(config)#exit
                       Switch#

5.           Configuration on another switches.(Switch2)
                      
                      Switch>enable
                      Switch#config t
                      Enter configuration commands, one per line.  End with CNTL/Z.
                      Switch(config)#int fastethernet 0/2
                      Switch(config-if)#switchport mode trunk
                      Switch(config-if)#description uplink-to-switch0
                      Switch(config-if)#exit
                      Switch(config)#exit
                      Switch# 
                      Switch#config t
                      Enter configuration commands, one per line.  End with CNTL/Z.
                      Switch(config)#int fastethernet 0/4
                      Switch(config-if)#switchport mode access
                      Switch(config-if)#switchport access vlan 10
                      Switch(config-if)#exit
                      Switch(config)#exit
                      Switch#
6.      Connect 2 Pc to switch 2 and assign ip address as (PC2 ip address 192.168.10.12  255.255.255.0) (PC3 ip address 192.168.1.13 255.255.255.0)
7.      Connect 3 Pc to switch 1 and assign ip address as (PC1 ip address 192.168.1.11 255.255.255.0) (PC4 ip address 192.168.10.13 255.255.255.0) (PC0 ip address 192.168.1.10 255.255.255.0)
8.      No ping from PC2 to PC4.


               If is there any mistakes and for any clarification please mail to 
                                                    ccnalab06@gmail.com