Configuring DHCP Local Server
You can use DHCP to configure the router to allow remote access to non-PPP clients. DHCP-based access is also an alternative to PPP in environments such as Public Wireless LANs (PWLANs). In PWLANS, a user scans for available broadband networks, then is redirected to a web-based authentication mechanism to request service.
DHCP provides address assignment information for users. Authentication, authorization, and accounting are separate processes, and are up to the Internet service provider (ISP) to define.
The DHCP local server can configure a client with the following DHCP options:
DHCP Local Server Modes
The router offers an embedded DHCP server, known as the DHCP local server. The DHCP local server has two modes: equal-access and standalone.
NOTE: The E-series router also supports an embedded DHCP version 6 (DHCPv6) local server. The DHCPv6 local server provides a subset of the features of the DHCP local server. For information about configuring the DHCPv6 local server, see DHCPv6 Local Server.
- In equal-access mode, the DHCP local server works with the Juniper Networks SDX software to provide an advanced subscriber configuration and management service.
- In standalone mode, the DHCP local server provides a basic DHCP service.
DHCPv6 Local Server
In addition to the embedded DHCP local server that is used for IP version 4 (IPv4) address support, the E-series router includes an embedded DHCPv6 local server. This server enables the router to function as a server for the DHCP protocol for IP version 6 (IPv6). The DHCPv6 local server sends and receives packets via IPv6 and informs IPv6 of the routing requirements of the router clients.
The DHCPv6 local server provides the following IPv6 address support:
- Delegates IPv6 prefixes to client routers; one prefix is allowed per client; prefixes and DNS information can be locally configured or derived from RADIUS via AAA.
- Provides DNS server information to directly connected router clients.
NOTE: You must add a vendor-specific attribute to RADIUS to enable the E-series router to retrieve IPv6 Domain Name System (DNS) addresses.
Equal-Access Mode
In equal-access mode, the main purpose of the router is to enable access to non-PPP users. The DHCP local server performs the following functions in equal-access mode:
- Communicates with SDX software.
- Assigns an IP address with a long lease time, which allows the subscriber to access services.
- Provides the relay of DHCP requests from cable modems to DHCP servers that support DHCP requests from cable modems.
Non-PPP equal access requires the use of:
Local Pool Selection and Address Allocation
The DHCP local server selects a DHCP pool from which to allocate an address using the framed IP address or pool name parameters. The router checks the parameters against the local DHCP pools in the order presented in Table 38. Once the router finds a match, it selects a pool based on the match and does not check other parameters.
Cable Modem DHCP Relay
The DHCP local server does not support DCHP requests from cable modems. However, you can set up the DHCP local server to relay DHCP packets that originate from a cable modem to an external DHCP server that can provide the cable modem with the configuration it requests.
The DHCP local server determines whether a DHCP packet is from a cable modem by looking at the Vendor Class ID option. If the Vendor Class ID option value is "docsis1.0" or "docsis1.1," then the packet is from a cable modem.
Once the DHCP local server determines that a DHCP packet is from a cable modem, it checks to see whether a cable modem DHCP server is configured. You can configure up to four cable modem DHCP servers. If one or more cable modem DHCP servers are configured, then the DHCP local server relays DHCP packets to each cable modem DHCP server. If no cable modem DHCP servers are configured, then the DHCP local server drops DHCP packets from cable modems.
If the router receives a DHCP packet from a cable modem and a cable modem DHCP server is configured, the DHCP local server determines whether it has to keep track of the relay by checking the giaddr as follows:
- If the giaddr is zero, then the cable modem is directly connected, and the DHCP local server keeps track of the request. The local server registers the reception of the packet as a request, transmits the packet to the configured servers, and waits for a response. If a response to a registered request is not received in 5 seconds, then the request is considered stale and it is deleted.
- If the giaddr is not zero, then the cable modem is not directly connected, and the DHCP local server does not keep track of the request. The DHCP local server sends the packet to the configured servers without registering the request.
The Connection Process
The following sequence describes how the subscriber connects to the network for the first time using equal-access mode. Figure 10 illustrates the process.
- The subscriber's computer boots and issues a DHCP request.
- If the SDX software is configured, DHCP queries it for information that DHCP uses to select the address pool and IP address and to configure the client.
- After standard DHCP negotiations, the DHCP local server supplies an enduring IP address to the subscriber's computer from a local address pool, as described in the previous section.
The router maintains a host route that maps the enduring IP address to the router's interface associated with the subscriber's computer.
- The subscriber's computer retains the enduring IP address until the subscriber turns off the computer.
![]()
Standalone Mode
In standalone mode, the DHCP local server operates as a basic DHCP server; clients are not authenticated. The DHCP local server receives DHCP client requests for addresses, selects DHCP local pools from which to allocate addresses, distributes public addresses to the clients, and maintains the resulting DHCP bindings in a server management table.
Local Pool Selection and Address Allocation
In standalone mode, the DHCP local server selects a pool to allocate a public address for a client; the SDX application is never notified or queried.
The DHCP local server selects a pool by matching the local pool's network address to the giaddr or the received interface IP address. The router first attempts to match the giaddr to a local pool network address. If it does not find a match, the router attempts to match the received interface IP address to a local pool network address.
- Giaddr—A giaddr, which indicates a client's subnetwork, can be presented to the DHCP local server in the client's DHCPREQUEST message. The giaddr field in the DHCP request message usually contains the IP address of a DHCP relay server. The router attempts to match the giaddr address in the DHCP request message with the network address of a DHCP local pool. If it finds a match, the router uses the matching DHCP local pool.
- Received interface IP address—The router uses the IP address of the interface on which the DHCP packet is being processed.
Once the router selects a DHCP local pool, the DHCP local server first tries to find a reserved IP address for the client in the selected pool. If no reserved address is available, the router attempts to allocate a client's requested IP address. If the requested IP address is not available, the router allocates the next available address in the pool.
Server Management Table
For each client that makes requests of the DHCP local server, the router keeps an entry in the server management table. The entry defines client-specific information and state information. The router uses this table to identify clients when it receives subsequent messages and to maintain the state of each client within the DHCP protocol. In addition, the table contains information that may be transferred to and from the SDX software.
Linking Local Address Pools
In both equal-access mode and standalone mode, you can link a DHCP local pool to another local pool. The linked pool serves as a backup pool. If there are no addresses available in a pool, the DHCP local server attempts to allocate an address from the linked pool.
DHCP Local Server Event Logs
To troubleshoot and monitor your DHCP local server, use the following system event logs:
- dhcpLocalClients—DHCP local server client events
- dhcpLocalGeneral—DHCP local server infrastructure-related events
NOTE: The dhcpLocalGeneral category replaces the dhcpLocalServerGeneral category.
- dhcpLocalHighAvailability—DHCP high availability events
- dhcpLocalPool—DHCP local address pool events
- dhcpLocalProtocol—DHCP local server protocol events
- dhcpLocalProtocolDecode— DHCP discover, offer, request, decline, and ACK/NAK packet events; events are logged per interface; packets that do not leave the line module are not logged
See JUNOSe System Basics Configuration Guide, Chapter 13, Logging System Events for additional information about the DHCP local server logs.
DHCP Local Server SNMP Traps
The DHCP local server supports a configurable global SNMP trap that generates severity level 1 (alert), 2 (critical), and 3 (error) events. This trap helps administrators monitor DHCP local server general health, error statistics, address lease status, and protocol events.
You use the following command to enable SNMP traps for DHCP local server.
host1(config)#ip dhcp-local snmpTrapsThe DHCP local server also supports SNMP traps for local address pool utilization. You use the warning command to define the maximum and minimum threshold values and the snmpTrap command to generate traps when utilization occurs above or below the defined values. For example:
host1(config-dhcp-local)#warning 50 40host1(config-dhcp-local)#snmpTrapBefore You Configure DHCP Local Server
Before you configure DHCP local server, you need to configure interfaces. You can configure ATM or Ethernet interfaces for DHCP local server. These interfaces can be numbered or unnumbered. Because subscribers connect to the router from different subnetworks, you must configure an IP address for each subnetwork on the interface. This action provides connectivity between the subnetwork and the router.
To configure a numbered IP address for DHCP local server:
- Select an ATM or Ethernet interface.
- Assign the primary IP address for one subnetwork to this interface.
- Assign secondary IP addresses for all other subnetworks to this interface.
To configure an unnumbered IP address for DHCP local server:
- Specify a loopback interface.
- Assign the primary IP address for one subnet to the loopback interface.
- Assign secondary IP addresses for all other subnets to the loopback interface.
- Select an ATM or Ethernet interface.
- Configure an unnumbered IP address associated with the loopback interface on the ATM or Ethernet interface.
For information about defining IP addresses, see JUNOSe Routing Protocols Configuration Guide, Vol. 1, Chapter 5, Configuring IP.
Configuration Tasks
This section covers the configuration tasks for equal-access and standalone modes. Perform the appropriate procedure:
- For both equal-access and standalone modes, configure the DHCP local server.
- For non-PPP equal access, configure the router to relay DHCP requests from cable modems.
- For non-PPP equal access, configure the router to work with the SDX application.
Configuring the DHCP Local Server
To configure the DHCP local server:
- Enable the DHCP local server for either equal-access or standalone mode.
host1(config)#service dhcp-local equal-accesshost1(config)#service dhcp-local standalone- Specify the maximum number of IP addresses that the DHCP local server can supply to each VPI, VCI, VLAN, or Ethernet subnetwork.
host1(config)#ip dhcp-local limit ethernet 6- Specify any addresses that the DHCP local server must not assign.
host1(config)#ip dhcp-local excluded-address 10.10.3.4- (Optional) Enable DHCP local server traps.
host1(config)#ip dhcp-local snmpTraps- For both equal-access and standalone modes, configure the DHCP local server to supply enduring IP addresses to subscribers who want to access a domain.
- Access DHCP Local Pool Configuration mode for the local address pool.
host1(config)#ip dhcp-local pool ispBostonhost1(config-dhcp-local)#- Specify the enduring IP addresses that the DHCP local server can assign from the local address pool.
host1(config-dhcp-local)#network 10.10.0.0 255.255.0.0- (Optional) Specify a DNS server.
host1(config-dhcp-local)#dns-server 10.10.1.1- (Optional) Specify a Net-Bios server.
host1(config-dhcp-local)#netbios-name-server 10.10.1.1 10.10.1.2- (Optional) Define threshold values for local address pool utilization.
host1(config-dhcp-local)#warning 50 40- (Optional) Enable SNMP traps for local address pool utilization.
host1(config-dhcp-local)#snmpTrap- Specify the router that will forward traffic from these IP addresses to destinations on other subnets.
NOTE: The default router must be on the same subnetwork as the local server pool IP addresses.
host1(config-dhcp-local)#default-router 10.10.1.3- Specify the lease time for IP addresses.
host1(config-dhcp-local)#lease 0 0 24- (Optional) Specify the type of Net-Bios server.
host1(config-dhcp-local)#netbios-node-type b-node- (Optional) Specify a domain name that can be returned to the subscriber if requested.
host1(config-dhcp-local)#domain-name ispBoston- (Optional) For DHCP standalone mode, reserve an IP address for a specific MAC address.
host1(config-dhcp-local)#reserve 10.10.13.8 0090.1a10.0552- For DHCP standalone mode, set the DHCP server address that is sent to DHCP clients.
host1(config-dhcp-local)#server-address 10.10.20.8
- (Optional) For both equal-access and standalone modes, link the local address pool to a backup address pool.
- Access DHCP Local Pool Configuration mode for the local address pool.
host1(config)#ip dhcp-local pool ispBostonhost1(config-dhcp-local)#- Link the current local address pool to another local address pool.
host1(config-dhcp-local)#link ispChicagodefault-router
- Use to specify the IP address of the router that the subscriber's computer will use for traffic destined for locations beyond the local subnetwork.
- The default router must be on the same subnetwork as the local server pool IP addresses that you configure with the network command.
- Specify the IP address of a primary server, and optionally, specify the IP address of a secondary server.
- Example
host1(config-dhcp-local)#default-router 10.10.1.1Use the no version to remove the association between the address pool and the router. dns-server
- Use to assign a DNS server to an address pool.
- Some DHCP clients ask the DHCP local server to assign a DNS server.
- Example
host1(config-dhcp-local)#dns-server 10.10.1.1Use the no version to remove the association between the address pool and the DNS server. domain-name
- Use to specify a domain name that can be returned to the subscriber if requested.
- The name of the domain must match the name you specified for the RADIUS vendor-specific attribute (VSA) and for authentication, authorization, accounting, and address assignment (AAAA).
- Example
host1(config-dhcp-local)#domain-name ispBostonUse the no version to remove the association between the address pool and the domain name. ip dhcp-local excluded-address
- Use to specify IP addresses that the DHCP local server should not supply from the default address pool because those addresses are already used by devices on the subnetwork.
- Specify a single IP address or a start-of-range IP address and an end-of-range IP address.
- Example
host1(config)#ip dhcp-local excluded-address 10.10.1.1Use the no version to allow the local server to supply the specified IP address. ip dhcp-local limit
- Use to specify the maximum number of IP addresses that the DHCP local server can supply to each VPI, VCI, VLAN, or Ethernet subnetwork.
- Example
host1(config)#ip dhcp-local limit ethernet 6Use the no version to restore the default situation, in which there is no limit on the number of IP addresses that the DHCP local server can supply to each VPI, VCI, VLAN, or Ethernet subnetwork. ip dhcp-local pool
- Use to access DHCP Local Pool Configuration mode.
- The DHCP local server uses pool names other than default to maintain configuration information for subscribers to a particular domain.
- Example
host1(config)#ip dhcp-local pool ispBostonUse the no version to prevent the DHCP local server from supplying IP addresses from the specified pool. ip dhcp-local snmpTraps
- Use to enable SNMP traps for DHCP local server general health, error statistics, address lease status, and protocol events.
- Traps are generated for severity level 1 (alert), 2 (critical), and 3 (error) events.
- Example
host1(config)#ip dhcp-local snmpTrapsUse the no version to disable SNMP traps for DHCP local server. lease
- Use to specify the time period for which the supplied IP address is valid.
- Specify the number of days, and optionally, the number of hours, minutes, and seconds.
- Specify the keyword infinite to specify a lease that does not expire.
- Example
host1(config-dhcp-local)#lease 0 0 24Use the no version to restore the default lease time, one day. link
- Use to link the DHCP local address pool being configured to another local address pool. If there are no addresses available in the local pool, the DHCP local server attempts to allocate an address from the linked pool.
- Example
host1(config-dhcp-local)#link ispChicagoUse the no version to remove the link. netbios-name-server
- Use to assign a Net-Bios server for subscribers.
- Specify the IP address of a primary server and, optionally, the address of a secondary server.
- Some DHCP clients ask the DHCP local server to assign a Net-Bios server.
- Example
host1(config-dhcp-local)#netbios-name-server 10.10.1.1 10.10.1.2Use the no version to remove the association between the address pool and the Net-Bios server. netbios-node-type
host1(config-dhcp-local)#netbios-node-type b-nodeUse the no version to restore the default situation, in which the node type is unspecified. network
- Use to specify the IP addresses that the DHCP local server can provide from an address pool.
- Example
host1(config-dhcp-local)#network 10.10.1.0 255.255.0.0Use the no version to remove the network address and mask. Specify the force keyword with the no version to delete the address pool even if the pool is in use. reserve
host1(config-dhcp-local)#reserve 10.10.13.8 0090.1a10.0552Use the no version to remove the reservation. server-address
host1(config-dhcp-local)#server-address 10.10.20.0Use the no version to remove the server address. service dhcp-local
- Use to enable the DHCP local server to operate in either equal-access mode or standalone mode.
- Example
host1(config)#service dhcp-local equal-accessUse the no version to disable the DHCP local server. snmpTrap
- Use to enable Simple Network Management Protocol (SNMP) traps for local address pool utilization. Traps are generated based on threshold values for utilization. You can define threshold values by using the warning command.
- Example
host1(config-dhcp-local)#snmpTrapUse the no version to disable the SNMP traps for DHCP local pool utilization. warning
- Use to define the maximum and minimum threshold values for local address pool utilization. If you issue the snmpTrap command, SNMP traps are generated when utilization occurs above or below the specified threshold values.
- Example
host1(config-dhcp-local)#warning 50 40Use the no version to restore the default threshold values for DHCP local address pool utilization. Clearing an IP DHCP Local Server Binding
You can use the clear ip dhcp-local binding command to force the removal of a connected user's IP address lease and associated route configuration. Using this command allows you to:
- Recover functional resources from a user who has not explicitly terminated connectivity and whose lease is unexpired.
- Discontinue connectivity to a user, prompting or forcing the user to request a new lease in order to reestablish network connectivity.
clear ip dhcp-local binding
- Use to force the removal of a connected user's IP address lease and associated route configuration.
- Example
host1(config)#clear ip dhcp-local binding 10.10.20.41There is no no command. Configuring the DHCPv6 Local Server
To configure the DHCPv6 local server, you enable the service on the E-series router. The router can then delegate IPv6 prefixes to client routers and provide DNS server information to directly connected router clients.
service dhcpv6-local
host1(config)#service dhcpv6-localUse the no version to disable the DHCPv6 local server. ipv6 dhcpv6-local delegated-prefix
- Use to specify the IPv6 prefix and lifetime that are to be delegated to the DHCPv6 client. The specified prefix is delegated by the DHCPv6 local server when requested by the client.
- Use the lifetime keyword to specify the time period for which the prefix is valid. This lifetime overrides the default lifetime that is set in Global Configuration mode. If no lifetime is specified, the default lifetime is assigned.
- Specify the number of days and, optionally, the number of hours, minutes, and seconds. You cannot specify a lifetime of zero (that is, you cannot set the days, hours, minutes, and seconds fields all to zero).
- Use the keyword infinite to specify a lifetime that does not expire.
host1(config-if)#ipv6 dhcpv6-local delegated-prefix 2001:db8:17::/48 lifetime infiniteUse the no version to remove the IPv6 prefix from the interface. ipv6 dhcpv6-local dns-domain-search
- Use to specify the name of a DNS domain that will be searched by DHCPv6 clients in the current virtual router.
- Specify a maximum of four DNS domains for a DHCPv6 local server's search list.
- Example
host1(config-if)#ipv6 dhcpv6-local dns-domain-search xyzcorporation.comhost1(config-if)#ipv6 dhcpv6-local dns-domain-search xyzcorp.comUse the no version to remove the specified DNS domain from the search list. ipv6 dhcpv6-local dns-server
- Use to specify the IPv6 address of the DNS server and to assign the server to the DHCPv6 clients in the current virtual router.
- Specify a maximum of four DNS servers.
- Example
host1(config-if)#ipv6 dhcpv6-local dns-server 2001:db8:18::Use the no version to delete the specified DNS server. ipv6 dhcpv6-local prefix-lifetime
- Use to set the default lifetime for which a prefix delegated by this DHCPv6 local server is valid. This default is overridden by an interface-specific lifetime.
- Specify the number of days and, optionally, the number of hours, minutes, and seconds. You cannot specify a lifetime of zero (that is, you cannot set the days, hours, minutes, and seconds fields all to zero).
- Use the keyword infinite to specify a lifetime that does not expire.
host1(config-if)#ipv6 dhcpv6-local prefix-lifetime infiniteUse the no version to restore the default lifetime to 1 day. Configuring Cable Modem DHCP Relay
For non-PPP equal-access mode, you can set up the router to relay DHCP messages it receives from cable modems to an external DHCP server that can handle cable modem messages. To do so, use the ip dhcp-local cable-modem command.
ip dhcp-local cable-modem
- Use to specify the IP address of the external DHCP server to which the router relays DHCP requests from cable modems.
- You can configure up to four external DHCP servers.
- Example
host1(config)#ip dhcp-local cable-modem dhcp-server 10.10.22.8Use the no version to remove the external DHCP server. Configuring the Router to Work with the SDX Application
The E-series router has an embedded SDX client that interacts with the SDX application. For information about configuring the SDX client, see Configuring the SDX Client in Chapter 1, Configuring Remote Access.
Configuration Example
Figure 11 shows the scenario for this example. Subscribers obtain access to ISP Boston via a router. Subscribers log in through the SDX application, and a RADIUS server provides authentication.
![]()
The following steps show how to configure this scenario.
- Configure interfaces on the router.
host1(config)#interface loopback 0host1(config-if)#ip address 10.10.1.1 255.255.255.0host1(config-if)#ip address 10.10.2.1 255.255.255.0 secondaryhost1(config-if)#exithost1(config)#interface fastEthernet 2/0host1(config-if)#ip unnumbered loopback 0- Configure the parameters to enable the router to forward authentication requests to the RADIUS server.
host1(config)#radius authentication server 10.10.1.2host1(config)#udp-port 1645host1(config)#key radius- Specify the authentication method.
host1(config)#aaa authentication ppp default radiushost1(config)#aaa authentication ppp default none
- Enable the DHCP local server.
host1(config)#service dhcp-local- Specify the IP addresses that are in use, so that the DHCP local server cannot assign these addresses.
host1(config)#ip dhcp-local excluded-address 10.10.1.1host1(config)#ip dhcp-local excluded-address 10.10.1.2- Configure the DHCP local server to provide enduring IP addresses to subscribers of ISP Boston.
host1(config)ip dhcp-local pool ispBostonhost1(config-dhcp-local)#network 10.10.2.0 255.255.255.0host1(config-dhcp-local)#domain-name ispBostonhost1(config-dhcp-local)#default-router 10.10.2.1host1(config-dhcp-local)#lease 0 0 10host1(config-dhcp-local)#ip dhcp-local limit atm 5- Configure the SDX client.
host1(config)#sscc primary address 10.10.1.2 port 3310host1(config)#sscc enablehost1(config)#sscc retryTimer 200