Example: Configuring Dynamic Subscriber Interfaces over GRE Tunnels
This example shows how you can configure a dynamic subscriber interface in a GRE tunnel configuration by using packet detection.
Requirements
This example uses the following software and hardware components:
- JunosE Release 7.1.0 or higher-numbered releases
- E Series router (ERX7xx models, ERX14xx models, the ERX310 router, the E120 router, or the E320 router)
- ASIC-based line modules that support Fast Ethernet or Gigabit Ethernet
Overview
Figure 12 shows the interface stack built for this configuration.
Figure 12: GRE Tunnel Dynamic Subscriber Interface Configuration

Configuring Dynamic Subscriber Interfaces over GRE Tunnels
To configure a dynamic subscriber interface in a GRE tunnel configuration by using packet detection, perform the following steps:
- Create a GRE tunnel interface.
For instructions, see the Configuration Tasks section in the JunosE IP Services Configuration Guide.
- Create the primary IP interface by assigning an IP address
and mask to the bridged Ethernet interface (or make it unnumbered).host1(config-subif)#ip address 192.168.2.20 255.255.255.0
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.
- Configure the packet detect feature and specify that IP
automatically detect packets that do not match any entries in the
demultiplexer table. host1(config-if)#ip auto-detect ip-subscriber
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.
- Configure the primary IP interface to enable dynamic creation
of subscriber interfaces.host1(config-subif)#ip auto-configure ip-subscriber
- (Optional) Append the virtual router name to the subscriber
interface in case of DSI configuration.host1(config-if)#ip auto-configure append-virtual-router-name
- (Optional) Specify the IP inactivity timer.host1(config-subif)#ip inactivity-timer 100
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.
- (Optional) Specify the source address of traffic that
is destined for the primary IP interface.host1(config-subif)#ip source-prefix 192.168.2.1 255.255.255.0
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.
Related Documentation
- Dynamic Interfaces and Dynamic Subscriber Interfaces Overview
- Dynamic Creation of Subscriber Interfaces Overview
- Inheritance of MAC Address Validation State for Dynamic Subscriber Interfaces Overview
- Example: Configuring Dynamic Subscriber Interfaces over Ethernet
- Example: Configuring Dynamic Subscriber Interfaces over VLANs
- Example: Configuring Dynamic Subscriber Interfaces over Bridged Ethernet
- Example: Configuring Dynamic Subscriber Interfaces Using Loopback Interfaces