Why PPTP, L2TP, PPPOE are in OSI Layer2

l2tplayer2osippppppoe

PPTP, L2TP, PPPOE – these are tunneling protocols. And they are Data link Layer protocols. Why?
As I understood, Layer2 protocols work only in same subnet. They don't use IP addresses and cannot be routed. They operate only with MAC addresses.
These Layer2 members: LACP, WOL, CDP, Trunk/VLAN don't use IP addresses! Ofcource some of them could be routed using some broadcasting technologies. However, PPTP, PPPOE and L2TP protocols use IP addresses. Moreover, they use TCP ports, higher OSI layer. Why?

Best Answer

PPTP, PPPoE, and L2TP all provide OSI Layer 2 services. That is, the user of these protocols (usually, a network layer protocol suite) thinks it's running over a "normal" link layer. However, each of these protocols provides the link layer service by transporting packets over another service, rather than over the physical layer.

  • PPTP provides PPP (link layer) service by running over TCP (transport layer).
  • PPPoE provides PPP (link layer) service by running over Ethernet (a different link layer)
  • L2TP provides PPP (link layer) service by running over UDP (transport layer).

So, each of these protocols plays two different roles. Each provides a service that's a link-layer service, so looking at it from above, it's a "link layer service provider". But each runs atop a different service, so, looking from below, it's a transport service user, network service user, or link service user.

Phrases like "X service user" and "X service provider" are generally more useful than the less distinct phrase "in the X layer". This user/provider distinction is an important part of the OSI layer model, though it may not be obvious from some tutorials.