If a NAS fails to contact its peer during L2TP tunnel establishment, it can fail over to another configured tunnel server
and attempt tunnel establishment with that device.
Failover can occur in these scenarios:
-
If the router sends a Start Control Connection Request (SCCRQ) a number of times and receives no response from the peer
-
If the router receives a Stop Control Connection Notification (StopCCN) from its peer
-
If the router receives a Call Disconnect Notify (CDN) message from its peer
In both the StopCCN control message and the CDN control message, a Result Code AV pair is included, which indicates the reason
for tunnel or session termination, respectively. This AV pair might also include an optional Error Code, which further describes
the nature of the termination. The various Result Code and Error Code values have been standardized in RFC 2661. Failover
will occur if the combination of Result Code and Error Code values as defined in the table below is received from the peer.
Table 1. Defined Result and Error Codes from RFC 2661
Control Message
|
Result Code
|
Error Code
|
StopCCN, CDN
|
2: General error, see Error Code.
|
4: Insufficient resources to handle this operation now.
6: A generic vendor-specific error occurred.1
7: Try another.
9: Try another directed.
|
CDN
|
4: Temporary lack of resources.
|
--
|
When one of the three scenarios occurs, the router marks the peer IP address as busy for 60 seconds by default. During that
time no attempt is made to establish a session or tunnel with the peer. The router selects an alternate peer to contact if
one is configured. If a tunnel already exists to the alternate peer, new sessions are brought up in the existing tunnel. Otherwise,
the router begins negotiations to establish a tunnel to the alternate peer.