This example shows how you can configure a dynamic subscriber interface in a GRE tunnel configuration by using packet detection.
This example uses the following software and hardware components:
Figure 1 shows the interface stack built for this configuration.
Figure 1: GRE Tunnel Dynamic Subscriber Interface Configuration

To configure a dynamic subscriber interface in a GRE tunnel configuration by using packet detection, perform the following steps:
For instructions, see the Configuration Tasks section in JunosE IP Services Configuration Guide .
You must specify the layer 2 encapsulation before you set the IP address. Issuing this command creates the primary IP interface. You must create a primary IP interface on which to enable dynamic creation of subscriber interfaces.
Use the no version to remove the IP address or to disable IP processing.
When an unmatched packet is detected, an event is generated that determines whether to create a dynamic subscriber interface.
Use the no version to restore the default, in which packet detection is disabled.
A dynamically created subscriber interface is deleted if it is inactive for a period longer than the inactivity timer value. The timer value can be in the range 1–65335 minutes. A timer value of 0 specifies that dynamically created subscriber interfaces are never deleted by the inactivity timer.
Use the no version to restore the default, in which inactivity timer feature is disabled.
You can use this command to configure a subscriber interface or a primary IP interface enabled for dynamic creation of subscriber interfaces to demultiplex traffic with the specified source address. Use the no version to remove the association between the interface and the specified IP source address and mask.