Embodiments of the invention relate to Layer 2 network extensions over Layer 3 networks using packages. Techniques are disclosed for session-based routing within a Layer 2 (L2) network of an Open
System Interconnect (OSI) model extended over a Layer 3 (L3) network. In one example, an L2 network connects a first
client device to a first
router and a second
client device to a second
router. And the L3 network is connected with the first
router and the second router. A first router receives, from a first
client device, a non-session-based L2 frame destined for a second client device. The first router forms an L3 packet including an L3 header specifying L3 addresses of the first router and the second router and a protocol of L3
service selection based on the L2 frame, a
payload including the L2 frame, and
metadata including a session identifier clearly identifying the L2 frame, and forwards the L3 packet to the second router. The second router restores the L2 frame from the
payload and forwards the L2 frame to the second client device.