Import DHCP options from an upstream DHCP server

If your router gets its IP address from an upstream DHCP server, it can automatically import the other DHCP options (DNS server, WINS server, domain prefix etc.) into its DHCP pools. For example, if you use a router to connect to a cable or MAN Ethernet ISP (see the following figure), you can use the DHCP option import to minimize your router configuration (and make it fail safe from any changes in the ISP network).

To configure the DHCP option import, use the import all DHCP pool configuration command. You cannot select which options you want to import, but you can override them with other DHCP pool configuration commands.

The import only happens when a DHCP reply is received. To force an immediate import, use the renew dhcp interface exec-level command.

The sample configuration for the above network topology is included below:

ip dhcp pool LAN
 import all
 network 10.0.0.0 255.255.255.0
 default-router 10.0.0.1
!
interface FastEthernet0/0
 description *** Internal LAN ***
 ip address 10.0.0.1 255.255.255.0
!
interface FastEthernet0/1
 description *** Public LAN interface ***
 ip address dhcp client-id FastEthernet0/1

4 comments:

  1. Ivan,
    you finally open my eyes for option import all - I always wonder what it does mean ;)
  2. Couldn't figure out why the import all function wasn't working. The dhcp renew command did the trick! Thanks.
  3. Why is the default-router command set to 10.0.0.5 when the routers internal interface is set to 10.0.0.1?
  4. @Daniel: The example is a cleaned-up configuration of a router on which I was also testing HSRP. The default-router was the HSRP IP address.

    Thanks for the comment; I've fixed the configuration to match the diagram.
Add comment
Sidebar