Objective: To configure Inter-Vlan routing between two VLANS
Topology:
Router f0/0
|
|
Router f0/0.1 (sub-interface 1)
|
192.168.1.1
|
Router f0/0.2 (sub-interface 2)
|
192.168.2.1
|
PC -1
|
192.168.1.2
|
PC- 2
|
192.168.1.3
|
PC-3
|
192.168.2.2
|
PC -4
|
192.168.2.3
|
Switch 1 – F0/24
|
Enable trunk
|
Switch-1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch-1(config)#vlan 10
Switch-1(config-vlan)#name sales
Switch-1(config-vlan)#exit
Switch-1(config)#vlan 20
Switch-1(config-vlan)#name hr
Switch-1(config-vlan)#exit
Switch-1(config)#interface range fastEthernet 0/1-2
Switch-1(config-if-range)#switchport mode access
Switch-1(config-if-range)#switchport access vlan 10
Switch-1(config-if-range)#exit
Switch-1(config)#interface range fastEthernet 0/3-4
Switch-1(config-if-range)#switchport mode access
Switch-1(config-if-range)#switchport access vlan 20
Switch-1(config-if-range)#exit
Switch-1(config)#exit
Switch-1#
%SYS-5-CONFIG_I: Configured from console by console
Switch-1(config)#interface fastEthernet 0/24
Switch-1(config-if)#switchport mode trunk
Switch-1(config-if)#switchport trunk allowed vlan all
Switch-1(config-if)#exit
Switch-1(config)#exit
Switch-1#
Router Configuration:
Router-1(config)#interface fastEthernet 0/0
Router-1(config-if)#no shutdown
Router-1(config-if)#exit
Router-1(config)#interface fastEthernet 0/0.1
Router-1(config-subif)#encapsulation dot1Q 10
Router-1(config-subif)#ip address 192.168.1.1 255.255.255.0
Router-1(config-subif)#exit
Router-1(config)#interface fastEthernet 0/0.2
Router-1(config-subif)#encapsulation dot1Q 20
Router-1(config-subif)#ip address 192.168.2.1 255.255.255.0
Router-1(config-subif)#exit
Router-1(config)#
Verification
No comments:
Post a Comment