virtual-template
To specify which virtual template is used to clone virtual access interfaces (VAI), use the virtual-template command in BBA group configuration mode and in VPDN group configuration mode. To remove the virtual template from a virtual private dialup network (VPDN) group, use the no form of this command.
virtual-template template-number
no virtual-template
Syntax Description
template-number |
Number of the virtual template that will be used to clone VAIs. The range is 1 to 1000. |
Command Default
No virtual template is enabled.
Command Modes
BBA group configuration mode (config-bba-group)
VPDN group configuration (config-vpdn)
Command History
Release |
Modification |
---|---|
12.0(5)T |
This command was introduced. |
12.1(1)T |
This command was enhanced to enable PPPoE on ATM to accept dial-in PPP over Ethernet (PPPoE) sessions. |
12.2(15)T |
This command was enhanced to allow IP per-user attributes to be applied to a Layer 2 Tunneling Protocol (L2TP) dial-out session. |
12.2(33)SXH |
This command was integrated into Cisco IOS Release 12.2(33)SXH. |
12.2(33)SB |
This command’s default configuration was modified and implemented on the Cisco 10000 series router for the PRE3 and PRE4 as described in the "Usage Guidelines" section. |
Cisco IOS XE Release 2.5 |
This command was implemented on Cisco ASR 1000 series routers. |
Usage Guidelines
You must first enable a tunneling protocol on the VPDN group by using the protocol (VPDN) command before you can enable the virtual-template command. Removing or modifying the protocol command removes the virtual-template command from the VPDN group.
Each VPDN group can clone only VAIs using one virtual template. If you enter a second virtual-template command on a VPDN group, it replaces the first virtual-template command.
The table below lists the VPDN group commands under which the virtual-template command can be entered. Entering the VPDN group command starts VPDN group configuration mode. The table includes the command-line prompt for the VPDN group configuration mode and the type of service configured.
VPDN Group Command |
Command Mode Prompt |
Type of Service |
---|---|---|
accept-dialin |
|
Tunnel server |
request-dialout |
|
L2TP network server (LNS) |
When the virtual-template command is entered under a request-dialout VPDN subgroup, IP and other per-user attributes can be applied to an L2TP dial-out session from an LNS. Before this command was enhanced, IP per-user configurations from authentication, authorization, and accounting (AAA) servers were not supported; the IP configuration comes from the dialer interface defined on the router.
The enhanced virtual-template command works in a way similar to configuring virtual profiles and L2TP dial-in. The L2TP VAI is first cloned from the virtual template, which means that configurations from the virtual template interface is applied to the L2TP VAI. After authentication, the AAA per-user configuration is applied to the VAI. Because AAA per-user attributes are applied only after the user has been authenticated, the LNS must be configured to authenticate the dial-out user (configuration authentication is needed for this command).
With the enhanced virtual-template command, all software components can now use the configuration present on the VAI rather than what is present on the dialer interface. For example, IP Control Protocol (IPCP) address negotiation uses the local address of the VAI as the router address while negotiating with the peer.
Cisco 10000 Series Router Usage Guidelines
In Cisco IOS Release 12.2(33)SB, the virtual-template snmp command has a new default configuration. Instead of being enabled by default, no virtual-template snmp is the default configuration. This setting enhances scaling and prevents large numbers of entries in the MIB ifTable, thereby avoiding CPU Hog messages as SNMP uses the interfaces MIB and other related MIBs.
If you configure the no virtual-template snmp command, the router no longer accepts the snmp trap link-status command under a virtual-template interface. Instead, the router displays a configuration error message such as the following:
Router(config)# interface virtual-template 1
Router(config-if)# snmp trap link-status
%Unable set link-status enable/disable for interface
If your configuration already has the snmp trap link-status command configured under a virtual-template interface and you upgrade to Cisco IOS Release 12.2(33)SB, the configuration error occurs when the router reloads even though the virtual template interface is already registered in the interfaces MIB.
Examples
The following example enables the LNS to accept an L2TP tunnel from an L2TP access concentrator (LAC) named LAC2. A VAI will be cloned from virtual template 1.
vpdn-group 1
accept-dialin
protocol l2tp
virtual-template 1
terminate-from hostname LAC2
The following example enables PPPoE on ATM to accept dial-in PPPoE sessions. A VAI for the PPP session is cloned from virtual template 1.
vpdn-group 1
accept-dialin
protocol pppoe
virtual-template 1
The following partial example shows how to configure an LNS to support IP per-user configurations from a AAA server:
!
vpdn enable
vpdn search-order domain
!
vpdn-group 1
.
.
.
request-dialout
protocol l2tp
rotary-group 1
virtual-template 1
initiate-to ip 10.0.1.194.2
local name lns
l2tp tunnel password 7094F3$!5^3
source-ip 10.0.194.53
!
The previous configuration requires a AAA profile such as the following example to specify the per-user attributes:
5300-Router1-out Password = "cisco"
Service-Type = Outbound
cisco-avpair = "outbound:dial-number=5550121"
7200-Router1-1 Password = "cisco"
Service-Type = Outbound
cisco-avpair = "ip:route=10.17.17.1 255.255.255.255 Dialer1 100 name 5300-Router1"
5300-Router1 Password = "cisco"
Service-Type = Framed
Framed-Protocol = PPP
cisco-avpair = "lcp:interface-config=ip unnumbered loopback 0"
cisco-avpair = "ip:outacl#1=deny ip host 10.5.5.5 any log"
cisco-avpair = "ip:outacl#2=permit ip any any"
cisco-avpair = "ip:inacl#1=deny ip host 10.5.5.5 any log"
cisco-avpair = "ip:inacl#2=permit ip any any"
cisco-avpair = "multilink:min-links=2"
Framed-Route = "10.5.5.6/32 Ethernet4/0"
Framed-Route = "10.5.5.5/32 Ethernet4/0"
Idle-Timeout = 100