# Configuring the Receive Window Size

You can configure the L2TP receive window size (RWS) for an L2TP tunnel. L2TP uses the RWS to implement a sliding window mechanism for the transmission of control messages.

When you configure the RWS, you specify the number of packets that the L2TP peer can transmit without receiving an acknowledgment from the router. If the RWS is not configured, the router determines the RWS and uses this value for all new tunnels on both the LAC and the LNS.

You can configure the L2TP RWS in the following ways:

- Configure the systemwide default RWS setting for a tunnel on both the LAC and the LNS by using the l2tp tunnel default-receive-window command (in global Configuration mode).
- Configure the RWS for a tunnel on the LAC by using either the receive-window command (in Domain Map Tunnel Configuration mode) or by including the L2tp-Recv-Window-Size RADIUS attribute (VSA 26-54) in RADIUS Access-Accept messages.
- Configure the RWS for all tunnels that use a particular host profile on the LNS by using the receive-window command (in L2TP Destination Profile Host Configuration mode).

1. Configuring the Default Receive Window Size
2. Configuring the Receive Window Size on the LAC
3. Configuring the Receive Window Size on the LNS

## Configuring the Default Receive Window Size

Use the l2tp tunnel default-receive-window command to configure the default L2TP RWS for a tunnel on both the LAC and the LNS. The default L2TP RWS is the number of packets that the L2TP peer can transmit without receiving an acknowledgment from the router. The only supported value is 4.

To configure the default RWS setting:

1. From Global Configuration mode, set the L2TP default RWS. The only value supported for the default RWS is 4.
   host1(config)#l2tp tunnel default-receive-window 4

   The router uses this RWS value for all new tunnels on both the LAC and the LNS. The new command has no effect on previously configured tunnels.

2. (Optional) Use the show l2tp command to verify the default RWS configuration.

       host1#show l2tp
       Configuration
         L2TP administrative state is enabled
         Dynamic interface destruct timeout is 600 seconds
         Data packet checksums are disabled
         Receive data sequencing is not ignored
         Tunnel switching is disabled
         Retransmission retries for established tunnels is 5
         Retransmission retries for not-established tunnels is 5
         Tunnel idle timeout is 60 seconds
         Failover within a preference level is disabled
         Weighted load balancing is disabled
         Tunnel authentication challenge is enabled
         Calling number avp is enabled
         Ignore remote transmit address change is disabled
         Disconnect cause avp is disabled
         Default receive window size is 4
       Sub-interfaces      total      active     failed     auth-errors
         Destinations      0          0          0          n/a
         Tunnels           0          0          0          0
         Sessions          0          0          0          n/a
         Switched-sessions 0          0          0          n/a

## Configuring the Receive Window Size on the LAC

Use the receive-window command to configure the L2TP RWS for a tunnel on the LAC. Use the no version of the command to revert to the systemwide RWS setting configured with the l2tp tunnel default-receive-window command.

| Tip: The RWS setting must be the same for all users of the same tunnel. If you modify the RWS setting for an existing tunnel, subsequent tunnel users might be not be able to log in if their RWS setting conflicts with the new RWS setting for the tunnel.

To configure the RWS for a tunnel on the LAC:

1. Access Domain Map Tunnel Configuration mode as described in Mapping a User Domain Name to an L2TP Tunnel Overview . For example:
   host1(config)#aaa domain-map fms.com host1(config-domain-map)#router-name westford host1(config-domain-map)#tunnel 3 host1(config-domain-map-tunnel)#
2. From Domain Map Tunnel Configuration mode, set the tunnel RWS. The only value supported for the tunnel RWS is 4, and it must be the same for all users of the same tunnel.
   host1(config-domain-map-tunnel)#receive-window 4
3. (Optional) Use the show aaa domain-map command to verify the RWS configuration.

       host1#show aaa domain-map

       Domain: fms.com; router-name: westford; ipv6-router-name: default
                                                                        Tunnel
       Tunnel   Tunnel   Tunnel   Tunnel   Tunnel    Tunnel    Tunnel   Client
        Tag      Peer    Source    Type    Medium   Password     Id      Name
       ------   ------   ------   ------   ------   --------   ------   ------
       3        <null>   <null>   l2tp     ipv4     <null>     <null>   <null>
                Tunnel                 Tunnel
       Tunnel   Server     Tunnel       Max      Tunnel
        Tag      Name    Preference   Sessions    RWS
       ------   ------   ----------   --------   ------
       3        <null>   2000         0          4

You can also configure the RWS for a tunnel on the LAC by including the L2tp-Recv-Window-Size RADIUS attribute (VSA 26-54) in RADIUS Access-Accept messages. For more information about RADIUS Access-Accept messages, see Configuring RADIUS Attributes. For more information about the L2tp-Recv-Window-Size attribute, see RADIUS IETF Attributes.

## Configuring the Receive Window Size on the LNS

Use the receive-window command to configure the L2TP RWS for a tunnel on the LNS. Use the no version of the command to revert to the systemwide RWS setting configured with the l2tp tunnel default-receive-window command.

To configure the RWS for a tunnel on the LNS:

1. Access L2TP Destination Profile Host Configuration mode. For example:
   host1(config)#virtual-router fms02 host1:fms02(config)#l2tp destination profile fms02 ip address 192.168.5.61 host1:fms02(config-l2tp-dest-profile)#remote host fms03 host1:fms02(config-l2tp-dest-profile-host)#
2. From Destination Profile Host Configuration mode, set the tunnel RWS. The only value supported for the tunnel RWS is 4.
   host1:fms02(config-l2tp-dest-profile-host)#receive-window 4

   | Tip: If you modify the RWS setting of a host profile for an existing tunnel, the router drops the tunnel. This action is consistent with router behavior when you modify an L2TP host profile.

3. (Optional) Use the show l2tp destination profile command to verify the RWS configuration.

       host1:fms02#show l2tp destination profile fms02
       L2TP destination profile fms02
       Destination address
         Transport ipUdp
         Virtual router fms02
         Peer address 192.168.5.61
       Host profile attributes
         Remote host is fms03
           Receive window size is 4
       1 L2TP host profile found