The Layer 2 Forward protocol (L2F) is used to establish a secure tunnel across a public infrastructure (such as the Internet) that connects an ISP POP to a enterprise home gateway. This tunnel creates a virtual point-to-point connection between the user and the enterprise customer"s network.
Layer Two Forwarding protocol (L2F) permits the tunneling of the link layer (i.e., HDLC, async HDLC, or SLIP frames) of higher level protocols. Using such tunnels, it is possible to divorce the location of the initial dial-up server from the location at which the dial-up protocol connection is terminated and access to the network provided.
L2F allows encapsulation of PPP/SLIP packets within L2F. The ISP NAS and the Home gateway require a common understanding of the encapsulation protocol so that SLIP/PPP packets can be successfully transmitted and received across the Internet.
Key functions of the Cisco L2F have been covered by L2TP, which is the IETF standard protocol for tunneling.
Protocol Structure
| 1 bit | 1 bit | 1 bit | 1 bit | 1 bit | 1 bit | 1 bit | 1 bit | 1 bit | 1 bit | 1 bit | 1 bit | 1 bit | 16 bits | 24 bits | 32 bits |
| F | K | P | S | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | C | Version | Protocol | Sequence |
| Multiplex ID | Client ID | ||||||||||||||
| Length | Offset | ||||||||||||||
| Key | |||||||||||||||
- Version - The major version of the L2F software creating the packet.
- Protocol - The protocol field specifies the protocol carried within the L2F packet.
- Sequence - The sequence number is present if the S bit in the L2F header is set to 1.
- Multiplex ID - The packet multiplex ID identifies a particular connection within a tunnel.
- Client ID - The client ID (CLID) assists endpoints in demultiplexing tunnels.
- Length - The length is the size in octets of the entire packet, including the header, all the fields and the payload.
- Offset - This field specifies the number of bytes past the L2F header at which the payload data is expected to start. This field is present if the F bit in the L2F header is set to 1.
- Key - The key field is present if the K bit is set in the L2F header. This is part of the authentication process.
- Checksum - The checksum of the packet. The checksum field is present if the C bit in the L2F header is set to 1.
Related protocols: PPP, L2TP, GRE, PPTP, SLIP
Sponsor Source: L2F is defined by Cisco
Reference: http://www.javvin.com/protocol/rfc2341.pdf: Cisco Layer Two Forwarding (Protocol) "L2F"
