Requirement:
Customer has Layer 2 switch and 3 VLAN's are created. Customer wants inter-vlan communication.
![](https://higherlogicdownload.s3.amazonaws.com/HPE/MigratedInlineFiles/454ece144e154153be3b7bfaccf11030_inter.JPG)
Solution:Hosts in different VLANs cannot directly communicate with each other. We need to configure Layer 3 routing to allow all VLANs to communicate. Routing is not possible on Layer 2 switch .
We need to configure Inter-vlan routing on the router.
We have to create sub interfaces and need to encapsulate with 802.1Q protocol so the Interface can understand the VLAN traffic.
interface interface-type interface-number.subnumber
- Configure 802.1Q encapsulation
vlan-type dot1q vid <vlan-number>
ip address X.X.X.X X.X.X.X
Configuration:Router Configuration :
![](https://higherlogicdownload.s3.amazonaws.com/HPE/MigratedInlineFiles/454ece144e154153be3b7bfaccf11030_router.JPG)
Switch Configuration :
VLANs & UP-Link
![](https://higherlogicdownload.s3.amazonaws.com/HPE/MigratedInlineFiles/454ece144e154153be3b7bfaccf11030_uplin.JPG)
End Users Interfaces
![](https://higherlogicdownload.s3.amazonaws.com/HPE/MigratedInlineFiles/454ece144e154153be3b7bfaccf11030_user.JPG)
VerificationVerification from PC : 1
<PC- 1>ping 192.168.40.10 -------> Ping to PC-3
Ping 192.168.40.10 (192.168.40.10): 56 data bytes, press CTRL_C to break
56 bytes from 192.168.40.10: icmp_seq=0 ttl=254 time=3.000 ms
56 bytes from 192.168.40.10: icmp_seq=1 ttl=254 time=2.000 ms
56 bytes from 192.168.40.10: icmp_seq=2 ttl=254 time=2.000 ms
56 bytes from 192.168.40.10: icmp_seq=3 ttl=254 time=2.000 ms
56 bytes from 192.168.40.10: icmp_seq=4 ttl=254 time=2.000 ms
--- Ping statistics for 192.168.40.10 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
<PC-1>ping 192.168.30.10 ------ > Ping to PC -2
Ping 192.168.30.10 (192.168.30.10): 56 data bytes, press CTRL_C to break
56 bytes from 192.168.30.10: icmp_seq=0 ttl=254 time=2.000 ms
56 bytes from 192.168.30.10: icmp_seq=1 ttl=254 time=2.000 ms
56 bytes from 192.168.30.10: icmp_seq=2 ttl=254 time=2.000 ms
56 bytes from 192.168.30.10: icmp_seq=3 ttl=254 time=2.000 ms
56 bytes from 192.168.30.10: icmp_seq=4 ttl=254 time=3.000 ms
--- Ping statistics for 192.168.30.10 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
Verification from PC : 2
<PC-2>ping 192.168.10.10 ------ > Ping to PC -1
Ping 192.168.10.10 (192.168.10.10): 56 data bytes, press CTRL_C to break
56 bytes from 192.168.10.10: icmp_seq=0 ttl=254 time=2.000 ms
56 bytes from 192.168.10.10: icmp_seq=1 ttl=254 time=3.000 ms
56 bytes from 192.168.10.10: icmp_seq=2 ttl=254 time=2.000 ms
56 bytes from 192.168.10.10: icmp_seq=3 ttl=254 time=2.000 ms
56 bytes from 192.168.10.10: icmp_seq=4 ttl=254 time=2.000 ms
--- Ping statistics for 192.168.10.10 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
<PC-2>ping 192.168.40.10 ------ > Ping to PC -3
Ping 192.168.40.10 (192.168.40.10): 56 data bytes, press CTRL_C to break
56 bytes from 192.168.40.10: icmp_seq=0 ttl=254 time=3.000 ms
56 bytes from 192.168.40.10: icmp_seq=1 ttl=254 time=2.000 ms
56 bytes from 192.168.40.10: icmp_seq=2 ttl=254 time=2.000 ms
56 bytes from 192.168.40.10: icmp_seq=3 ttl=254 time=3.000 ms
56 bytes from 192.168.40.10: icmp_seq=4 ttl=254 time=3.000 ms
--- Ping statistics for 192.168.40.10 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
Verification from PC : 3
<PC-3>ping 192.168.10.10 ------ > Ping to PC -1
Ping 192.168.10.10 (192.168.10.10): 56 data bytes, press CTRL_C to break
56 bytes from 192.168.10.10: icmp_seq=0 ttl=254 time=2.000 ms
56 bytes from 192.168.10.10: icmp_seq=1 ttl=254 time=1.000 ms
56 bytes from 192.168.10.10: icmp_seq=2 ttl=254 time=3.000 ms
56 bytes from 192.168.10.10: icmp_seq=3 ttl=254 time=2.000 ms
56 bytes from 192.168.10.10: icmp_seq=4 ttl=254 time=3.000 ms
--- Ping statistics for 192.168.10.10 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
<PC-3>ping 192.168.30.10 ------ > Ping to PC -2
Ping 192.168.30.10 (192.168.30.10): 56 data bytes, press CTRL_C to break
56 bytes from 192.168.30.10: icmp_seq=0 ttl=254 time=3.000 ms
56 bytes from 192.168.30.10: icmp_seq=1 ttl=254 time=3.000 ms
56 bytes from 192.168.30.10: icmp_seq=2 ttl=254 time=2.000 ms
56 bytes from 192.168.30.10: icmp_seq=3 ttl=254 time=2.000 ms
56 bytes from 192.168.30.10: icmp_seq=4 ttl=254 time=2.000 ms
--- Ping statistics for 192.168.30.10 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss