A virtual private network (VPN) extends a private network across a public network and allows end hosts to perform data communication across shared or public networks.
In early years, Layer 2 VPNs were pretty popular and later on came Layer 3 VPNs which started picking up pace. Both the VPN types have their own pros and cons.
Difference be Layer 2 vs Layer 3 VPN –
|PARAMETER||LAYER 2 VPN||LAYER 3 VPN|
|PHILOSOPHY||Layer 2 VPNs virtualize the datalink layer (Layer 2) so as to make geographically remote sites look as if they were operating in the same LAN network.||Layer 3 VPNs virtualize the network layer (Layer 3) so as to route your customer networks over a public infrastructure like Internet or Service provider backbone.|
|TRAFFIC FORWARDING||Provider devices forward customer traffic based on Layer 2 information.||Provider devices forward customer traffic based on Layer 3 information.|
|SCALABILITY||Generally, Layer 2 VPNs are less scalable than Layer 3 VPNs.||Generally, Layer 3 VPNs are more scalable than Layer 2 VPNs.|
|LAYER 3 CONNECTIVITY||Customer make Layer 3 (IP) connectivity with remote customer sites and not with Service provider.||Customer make Layer 3 connectivity (IP) with provider sites' edge devices.|
|SERVICE PROVIDER INVOLVEMENT||Service provider is not involved in Customer Subnets IP Routing.||Service provider is involved in Customer Subnets IP Routing.|
|ROUTING CONTROL||Preferred approach when customer wants all the routing and policy governance under its management control.||Preferred approach when customer is fine with sharing its routing information with service provider and the policy control is not so stringent.|
|EXAMPLES||LANE, IPLS, VPLS, EOMPLS, 802.1q Tunnelling||MPLS VPN, IPSEC P2P
Download the difference table here.
Hope you would have understood the comparison of layer 2 vs layer 3 VPN through detailed table mentioned above. Also, read our other extensive guides & Interview Questions-