Knowledge is Power

Knowledge is Power

About Me

Chennai, TN, India
Its my life

Blog Archive

Thursday, June 12, 2008

L2TP Handshaking Sequence for Tunnel Setup (Layer 2 Tunneling Protocol)

Layer 2 tunneling protocol is used mostly to carry(tunnel) PPP packets(L2 layer) over IP Networks, as UDP payload destined to port number 1701. L2TP works by peer to peer communication principles which is different from master slave scenario. Any one peer can intiate the tunnel by requesting the other peer to assign a unique tunnel id and session id for establishing a dedicated tunnel before exchanging data packets (for simplicity we call LNS as server which responds to request & LAC as client which initiates request).

L2TP tunnel initiation between two peers can be established by the following four methods based on tunnel initiation: voluntary tunnel, compulsory tunnel — incoming call, compulsory tunnel — remote dial and L2TP multi-hop connection

In the voluntary tunnel model, a tunnel is created by the user, typically by the use of an L2TP enabled client which is called the LAC client. The user will send L2TP packets to the Internet Service Provider (ISP) which will forward them on to the LNS. The ISP does not need to support L2TP, it only forwards the L2TP packets between LAC and LNS. The LAC client acts as an L2TP tunnel initiator which effectively resides on the same system as the remote client. The tunnel extends across the entire PPP session from the L2TP client to the LNS.

In the compulsory tunnel model-incoming call, a tunnel is created between ISP LAC and the LNS home gateway. The company may provide the remote user with a Virtual Private Network (VPN) login account from which he can access the corporate server. As a result the user will send PPP packets to the ISP (LAC) which will encapsulate them in L2TP and tunnel them to the LNS. In the compulsory tunneling cases, the ISP must be L2TP capable. In this model the tunnel only extends across the segment of the PPP session between the ISP and the LNS.

In the compulsory tunnel model-remote dial the home gateway (LNS) initiates a tunnel to an ISP (LAC) (outgoing call) and instructs the ISP to place a local call to the PPP enabled client which is the remote user. This model is intended for cases where the remote PPP Answer Client has a permanently established phone number with an ISP. This model is expected to be used when a company with established presence on the Internet needs to establish a connection to a remote office that requires a dial-up link. In this model the tunnel only extends across the segment of the PPP session between the LNS and the ISP.

An L2TP Multi-hop connection is a way of redirecting L2TP traffic on behalf of client LACs and LNSs. A Multi-hop connection is established using an L2TP Multi-hop gateway. A tunnel is established from a client LAC to the L2TP Multi-hop gateway and then another tunnel is established between the L2TP Multi-hop gateway and a target LNS. L2TP traffic between client LAC and LNS is redirected to each other through the gateway.

During tunnel initiation numerous control packets were exchanged between two peers for handshaking and to assign tunnel and session ID between two peers, which were later used to uniquely represent the tunnel for exchanging data.The handshaking methods for assigning and negotiating tunnel and session id for a voluntary tunnel were explained by the below picture which was hosted by me in wikipedia.

No comments: