Monday, 18 February 2019
Inter Vlan Configuration
Intervlan
1. Intervlan is used for to
create virtual network in two different ip network.
2. In intervlan ise
dot1q protocol.
3. dot1q protocol is
create the sub interface and divide the virtual local area network.
Diagram
Basic Configuraation:-
Go to first router
Router#conf t
Router(config)#int s0/0
Router(config-if)#ip ad
Router(config-if)#ip address 192.168.30.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#cl rate 64000
Router(config-if)#exit
Router(config)#int f0/0
Router(config-if)#no shut
Router(config-if)#exit
Now create sub-network
Router(config)#int f0/0.1
Router(config-subif)#encapsulation dot1Q 1
Router(config-subif)#ip address 192.168.10.1 255.255.255.0
Router(config-subif)#no shut
Router(config-subif)#exit
Router(config)#int f0/0.2
Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip address 192.168.6.1 255.255.255.0
Router(config-subif)#no shut
Router(config-subif)#exit
Router(config)#int f0/0.3
Router(config-subif)#encapsulation dot1Q 30
Router(config-subif)#ip address 192.168.5.1 255.255.255.0
Router(config-subif)#no shut
Router(config-subif)#exit
Go to second router
Router>en
Router#conf t
Router(config)#int s0/0
Router(config-if)#ip address 192.168.30.2 255.255.255.0
Router(config-if)#no shut
Router(config)#int f0/0
Router(config-if)#no shut
Router(config-if)#exit
Now create sub-network
Router(config)#int f0/0.1
Router(config-subif)#encapsulation dot1Q 1
Router(config-subif)#ip address 192.168.20.1 255.255.255.0
Router(config-subif)#no shut
Router(config-subif)#exit
Router(config)#int f0/0.2
Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip address 192.168.6.1 255.255.255.0
Router(config-subif)#no shut
Router(config-subif)#exit
Router(config)#int f0/0.3
Router(config-subif)#encapsulation dot1Q 20
Router(config-subif)#ip address 192.168.5.1 255.255.255.0
Router(config-subif)#no shut
Router(config-subif)#exit
Now Switching
go to router first switch
Switch>en
Switch#conf t
Switch(config)#vlan 10
Switch(config-vlan)#name abc
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#name xyz
Switch(config-vlan)#exit
Switch(config)#int f0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit
Switch(config)#int f0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit
Switch(config-if)#int f0/4
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
Switch(config)#int f0/5
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
go to seconf router switch
Same as above switch
or
Switch>en
Switch#conf t
Switch(config)#vlan 10
Switch(config-vlan)#name abc
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#name xyz
Switch(config-vlan)#exit
Switch(config)#int f0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit
Switch(config)#int f0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit
Switch(config-if)#int f0/4
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
Switch(config)#int f0/5
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
Now routing with rip
Go to first router
Router(config)#router rip
Router(config-router)#network 192.168.10.0
Router(config-router)#network 192.168.30.0
Router(config-router)#network 192.168.5.0
Router(config-router)#network 192.168.6.0
Go to Second router
Router(config)#router rip
Router(config-router)#network 192.168.20.0
Router(config-router)#network 192.168.30.0
Router(config-router)#network 192.168.5.0
Router(config-router)#network 192.168.6.0
Now give ip to all pc's according to above diagram
Testing
Send packet from all pc. vlan 10 not send able to send packet to vlan 20 in both network so it's fail.
and also vlan 20 pc's not send packet to vlan 10 pc's so it also fail
only same vlan's send packet to each other and they are successfull.
as shown in the figure.
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment