Sunday, January 18, 2015

3 comments

Vlan and Inter-Vlan Configuration

                                                        Configuring Vlans and VTP

 Configure trunks                                                  
Configure VTP
Configure VLANS
Assign ports to VLANS
 Routing b/w VLAN

First of all we configure switches with ip address.
By default all port are belong to vlan 1



Switches VLAN IP Addressing Configuration

Ø  Switch1(config)#interface vlan1
Ø  Switch1(config-if)#ip address 192.168.1.10  255.255.255.0
Ø  Switch1(config-if)#no shutdown

Ø  Switch2(config)#interface vlan1
Ø  Switch2(config-if)#ip address 192.168.1.11  255.255.255.0
Ø  Switch2(config-if)#no shutdown

Ø  Switch3(config)#interface vlan1
Ø  Switch3(config-if)#ip address 192.168.1.12  255.255.255.0
Ø  Switch3(config-if)#no shutdown

Now switch 1, 2 and 3 is configured with ip address
We can ping switch1 and switch2 and switch 3

Step 1 :- configure trunks on switch

Switch 1 interface configuration
Ø  Switch1(config)#interface fastethernet 0/11
Ø  Switch1(config-if)#description CONNECTED WITH SW2
Ø  Switch1(config-if)#switchport trunk encapsulation dot1q
Ø  Switch1(config-if)# switchport mode trunk

Ø  Switch1(config)#interface fastethernet 0/12
Ø  Switch1(config-if)#description CONNECTED WITH SW3
Ø  Switch1(config-if)#switchport trunk encapsulation dot1q
Ø  S1(config-if)#switchport mode trunk


Ø  Switch1(config)#interface fastethernet 0/1
Ø  Switch1(config-if)#description CONNECTED WITH ROUTER
Ø  Switch1(config-if)#switchport trunk encapsulation dot1q
Ø  S1(config-if)#switchport mode trunk


Rest of the port we will configure in access port

Ø  Switch1(config)#interface range fastethernet 0/2 – 10
Ø  Switch1(config-if)#switchport mode access
Ø  Switch1(config)#interface range fastethernet 0/13 - 23
Ø  Switch1(config-if)# switchport mode access

Ø  Switch1#copy run startup
Ø  Switch1#show run



Now same configuration in switch 3 which have 1 trunk port

Ø  Switch3(config)#interface fastethernet 0/11
Ø  Switch3(config-if)#description CONNECTED WITH SW1
Ø  Switch3(config-if)# switchport mode trunk
Ø  Switch3(config-if)#exit

Ø  Switch3(config)#interface range fastethernet 0/1 - 10
Ø  Switch3 (config-if)#switchport mode access.

Ø  Switch3(config)#interface range fastethernet 0/12 - 24
Ø  Switch3(config-if)# switchport mode access

Ø  Switch3#copy run startup

Now same configuration in switch 2 which have 1 trunk port

Ø  Switch 2(config)#interface fastethernet 0/11
Ø  Switch 2(config-if)# switchport mode trunk
Ø  Switch (config-if)#exit

Ø  Switch2(config)#interface range fastethernet 0/1 - 10
Ø  Switch2 (config-if)#switchport mode access.
Ø  Switch2(config)#interface range fastethernet 0/12 - 24
Ø  Switch2(config-if)# switchport mode access

Ø  Switch2#copy run startup

Step 1 is completed

   2nd step :- configure VTP
  3 major aspects to configure VTP
Ø  VTP domain name
Ø  Password
Ø  Mode


Ø  Sw1#show vlan
1002, 1003, 1004, and 1005:- that are considered extended VLAN. That is created to support other kind of networks)

Ø  Switch1(config)#vtp domain ccnaccnplinux.com                            any name

Ø  Switch2(config)#vtp mode client
Ø  Switch3(config)#vtp mode client

Step 2 is completed

 Configuration of vlans
Ø  Switch1(config)#vlan 10                          
Ø  Switch1(config-vlan)#name sales                  (any)
Ø  Switch1(config)#vlan 20
Ø  Switch1(config-vlan)#name marketing             (any)

Vlan automatically configured in switch2 and switch3 coz… vtp is working)

Show and Verfication Comands
Ø  Sw#show run interface fastethernet 0/1
Ø  Switch#show interface trunk
Ø  Sw#show interface fastethernet 0/1 switchport

 To turn pruning
Ø  (config)#vtp pruning

  To turn on password

Ø  Switch(config)#vtp password

                             Assign ports to VLANs:-
Ø  Switch3(config)#do show vlan
Ø  Switch3(config)#interface fastethernet0/8
Ø  Switch3(config-if)#description CONNECTED WITH PC2
Ø  Switch3(config-if)#switchport mode access
Ø  Switch3(config-if)#switchport access vlan 20

Ø  Switch3(config)#interface fastethernet0/9
Ø  Switch3(config-if)#description CONNECTED WITH PC4
Ø  Switch3(config-if)#switchport mode access
Ø  Switch3(config-if)#switchport access vlan 10


Ø  Switch2(config)#interface fastethernet0/8
Ø  Switch2(config-if)#description CONNECTED WITH PC1
Ø  Switch2(config-if)#switchport mode access
Ø  Switch2(config-if)#switchport access vlan 10

Ø  Switch2(config)#interface fastethernet0/9
Ø  Switch2(config-if)#description CONNECTED WITH PC3
Ø  Switch2(config-if)#switchport mode access
Ø  Switch2(config-if)#switchport access vlan 20

Three method to route b/w vlans:-

Separate port to each VLAN



Router on a stick


Layer 3 switching






v Understanding how a  router on-a-stick:-







vUnderstanding how a  router on-a-stick:-


Ø  Router’s physical interface divided into sub interfaces
Ø  Switchport connecting to router set up as trunk
Ø  Router’s sub interface assigned specific vlan tag

                              VLAN=subnet=broadcast
Ø  Sub-interface:- allow you take a one interface and break it into many

Interface Configuration
Ø  R2(config)#interface fastethernet 0/0
Ø  R2(config)#no shutdown
Ø  R2(config)#exit

Ø  R2(config)#interface fastethernet 0/0.10                    any number
Ø  R2 (config-subif)#encapsulation dot1q 10                  vlan number
Ø  R2(config-subif)#ip address 192.168.1.1 255.255.255.0
Ø  R2(config-subif)#exit

Ø  R2(config)#interface fast ethernet 0/0.20                        any number
Ø  R2 (config-subif) #encapsulation dot1q 20                    vlan number
Ø  R2(config-subif)#ip address 10.250.250.1 255.255.255.0
Ø  R2(config-subif)#exit

Show Commands
Ø  R2(config)#do show ip interface brief

Router configuration is done

Now ping all devices pinging together


Click Here To Download The PDF File

3 comments:

  1. I have create a vlan network and configure a firewall i m ping all network by vlan console mode but i want to try ping via laptop console firewall not pind so what should i do for

    ReplyDelete
  2. Great Article
    Cyber Security Projects

    projects for cse

    Networking Security Projects

    JavaScript Training in Chennai

    JavaScript

    Training in Chennai


    The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals,

    Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer.

    Angular Training

    ReplyDelete