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 ;)

    ReplyDelete
  2. Couldn't figure out why the import all function wasn't working. The dhcp renew command did the trick! Thanks.

    ReplyDelete
  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?

    ReplyDelete
  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.

    ReplyDelete

You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.