Example: Configuring Dynamic Subscriber Interfaces Using Loopback Interfaces
This example shows how to configure dynamic subscriber interfaces by using the same loopback interface referenced by multiple unnumbered IP interfaces.
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
The procedure in this topic shows how to configure dynamic subscriber interfaces by using the same loopback interface referenced by multiple unnumbered IP interfaces. Instead of assigning a different IP address to each physical interface, this example assigns an IP address to a loopback interface (loopback 0). Each physical interface is then configured as an unnumbered IP interface, referencing the same loopback interface. This example uses a DHCP local server.
This approach has the following benefits:
- A loopback interface provides a stable IP address that can minimize the impact if a physical interface in the network goes down.
- Unnumbered IP interfaces preserve valuable IP address space.
Configuring a Dynamic Subscriber Interface
Step-by-Step Procedure
To configure dynamic subscriber interfaces, perform the following steps:
- Enable the DHCP local server for standalone mode.host1(config)#service dhcp-local standalone
- Configure DHCP relay to use information in the giaddr
in DHCP server-destined packets to identify the primary interface
on which dynamic subscriber interfaces are built. See the Using the Giaddr to Identify the Primary Interface for Dynamic Subscriber
Interfaces section in DHCP Relay and BOOTP Relay Overview for additional information
about this feature. host1(config)#set dhcp relay giaddr-selects-interface
Use the noversion to restore the default in which DHCP relay builds dynamic subscriber interfaces on the IP interface that is used for DHCP server-destined messages.
- Access DHCP Local Pool Configuration mode for the local
address pool.host1(config)#ip dhcp-local pool ispWestford
The DHCP local server uses pool names other than default to maintain configuration information for subscribers to a particular domain.
Use the no version to prevent the DHCP local server from supplying IP addresses from the specified pool.
- Specify the enduring IP addresses that the DHCP local
server can assign from the local address pool.host1(config-dhcp-local)#network 10.20.0.0 255.255.192.0
- Specify the router to forward traffic from the IP addresses
to destinations on other subnets.host1(config-dhcp-local)#default-router 10.20.32.1
You can specify the IP address of a primary server, and optionally, specify the IP address of a secondary server.
Use the no version to remove the association between the address pool and the router.
- Exit DHCP Local Pool Configuration mode.host1(config-dhcp-local)#exit
- Configure a loopback interface.host1(config)#interface loopback 0
Best Practice: We recommend that you configure a 32-bit subnet mask for the loopback interface. For example, if you configure a loopback interface with the IP address and mask as 1.1.1.1/16, the 1.1.0.0/16 route entry is entered on the line module and all traffic destined to the to 1.1.0.0/16 subnet is forwarded to the SRP module by the line module. Although the SRP module responds only to traffic destined to the 1.1.1.1 subnet and discards traffic to all other host IP addresses within that subnet (1.1.1.1/16), if no specific or longer route entry is found or if the SRP module receives too much traffic from subnets other than 1.1.1.1, the CPU utilization on the SRP module reaches the saturation level.
If you use a subnet mask other than a /32 mask for the IP address configured on the loopback interface, traffic from the entire subnet is routed to the loopback interface. Therefore, that subnet cannot be routed through any other interface on the router, unless a more specific route points to another interface.
- Assign an IP address and mask to the loopback
interface.host1(config-if)#ip address 10.20.32.1 255.255.255.255
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.
- Exit Interface Configuration mode.host1(config-if)#exit
- Specify a Fast Ethernet port.host1(config)#interface fastEthernet 3/0
Use the no version to remove IP from an interface or subinterface. You must issue the no version from the highest level down; you cannot remove an interface or a subinterface if the one above it still exists.
- Create an unnumbered primary IP interface associated with
the loopback interface configured in Steps 6 and 7.host1(config-if)#ip unnumbered loopback 0
This command enables IP processing on an interface without assigning an explicit IP address to the interface. You must specify an interface location, which is the identifier of another interface on which the router has an assigned IP address. This interface cannot be another unnumbered interface.
Use the no version to disable IP processing on the interface.
- Configure a static primary IP interface to use framed
routes as source IP addresses when creating dynamic subscriber interfaces.host1(config-if)#ip use-framed-routes ip-subscriber
The router uses the Framed-Route RADIUS attribute [22] sent in Access-Accept messages to apply framed routes to subscriber interfaces associated with the primary interface.
Use the no version to disable the use of framed routes when creating dynamic subscriber interfaces associated with this primary IP interface.
- Configure the primary IP interface to enable dynamic creation
of subscriber interfaces. The specified IP interface is considered
the primary interface.host1(config-if)#ip auto-configure ip-subscriber
The router creates the required dynamic subscriber interfaces when the IP address is assigned to the associated subscriber. The address might be assigned by an external DHCP server, the DHCP local server, or the packet detect feature.
Use the include-primary keyword to specify that the primary interface can be assigned to a subscriber. Use the exclude-primary keyword to specify that the primary interface is not used for subscribers. The primary interface is not assigned to a subscriber by default. You can issue this command from Interface Configuration mode, Subinterface Configuration mode, or Profile Configuration mode.
Use the no version to disable creation of dynamic subscriber interfaces associated with this primary IP interface. Use the no version with the include-primary keyword to specify that the primary interface is not assigned to a 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
You can use this command to allow more than one subscriber to have the same IP address across different virtual routers in the DSI configuration by appending the virtual router name to the interface. You can issue this command from either Interface Configuration mode or Profile Configuration mode.
Use the no version to disable ip auto-configure on the static primary interface if it is already configured. This feature is enabled by default in a non-DSI configuration with the DHCP local server.
- Exit Interface Configuration
mode.host1(config-if)#exit
- Repeat Steps 9 through 12 for each Fast Ethernet interface
on which you want to configure dynamic subscriber interfaces. For
example:host1(config)#interface fastEthernet 3/1 host1(config-if)#ip unnumbered loopback 0 host1(config-if)#ip auto-configure ip-subscriber host1(config-if)#ip auto-configure append-virtual-router-name host1(config-if)#exit host1(config)#interface fastEthernet 3/2 host1(config-if)#ip unnumbered loopback 0 host1(config-if)#ip auto-configure ip-subscriber host1(config-if)#ip auto-configure append-virtual-router-name host1(config-if)#exit
Related Documentation
- Example: Configuring Dynamic Subscriber Interfaces
- atm pvc
- encapsulation bridge1483
- encapsulation vlan
- interface atm
- interface fastEthernet
- interface gigabitEthernet
- interface tenGigabitEthernet
- interface loopback
- ip address
- ip auto-configure append-virtual-router-name
- ip auto-configure ip-subscriber
- ip auto-detect ip-subscriber
- ip dhcp-local pool
- ip inactivity-timer
- ip source-prefix
- ip unnumbered
- ip use-framed-routes ip-subscriber
- network
- service dhcp-local
- set dhcp relay giaddr-selects-interface
- vlan id