Vous êtes sur la page 1sur 1

Blog Home | INE Home | Members | Contact Us | Subscribe

Free Resources View Archives All Access Pass CCIE Bloggers

03 Using the DHCP Import statement


May Search
Posted by Petr Lapukhov, 4xCCIE/CCDE in IP Services 3 Comments Search

A question on GroupStudy gave me an idea for the short post dedicated to explaining the use of DHCP Submit

import all command. The command first appeared in IOS 12.2T. It allows importing certain DHCP
information learned from some external source, such as another DHCP server. This is helpful in reducing the Categories
amount of configuration needed in large hub-and-spoke networks, where spokes use centralized servers (e.g.
Select Category
WINS, DNS, TFTP). Instead of configuring the repetitive settings in every spoke router, you may import them by
requesting an IP address for the router via DHCP. More than that, any change in central configuration could be
easily imported in the remote routers, using DHCP address refresh. Here is how it works: CCIE Bloggers
Brian Dennis, CCIEx5 #2210
1) The router requests an IP address on its WAN interface via DHCP. In addition to the IP/subnet information, the
Routing & Sw itching
router also learns other DHCP information, such as various DHCP options (DNS, WIN, TFTP IP addresses). This is Voice
store with the local DHCP client configuration. Security
2) The is a local pool configured in the router, with the subnet corresponding to the local Ethernet interface (say Service Provider
ISP Dial
office network). This pool is configured with the statement import all.
Brian McGahan, CCIEx4 #8593,
3) By the virtue of import all statement and the default origin dhcp setting, the local pool imports the information CCDE #2013::13
learned by the routers DHCP client. The imported information does not preempt the local subnet and mask, but Design
Data Center
instead add missing information.
Routing & Sw itching
4) Every time the DHCP lease expires, the router will re-request it, thus re-learning all other information as well. Security
Service Provider
As an alternative to using the DHCP it is possible to use IPCP for information import, if the WAN link uses PPP Mark Snow , CCIEx4 #14073
protocol (e.g. PPPoE). You simply need the statement ip address negotiated on the PPP link plus configured Data Center
origin ipcp under the DHCP pool. Notice that the amount of IPCP options is much smaller than that of DHCP. Collaboration
However, you may still send WINS and DNS servers IP addresses, and even the netmask, using the command Security
Voice
ppp ipcp mask. See the post The myster of PPP IPCP mask request command for more information on this
Petr Lapukhov, CCIEx4 #16379,
command. CCDE #2010::7
Design
Routing & Sw itching
Here is a sample configuration.
Security
Service Provider
R1 is the DHCP client to R3. The server has a DCHP pool for subnet 10.0.0.0/24 configured, with TFTP, DNS and Voice
WINS servers set. All servers belong to the Ethernet segment connected to R3. R1 imports those settings from R3.
Notice the use of the Dialer interface in R1 you cannot configure ip address dhcp on the physical interface, as
Popular Posts
this feature was intended for use with PPPoE/PPPoA interfaces. Also, pay attention to the ip unnumbered
No posts to display
command on R3s PPP interface. It is important to have this command, so that incoming DHCP REQ packets are
matched against R3s DHCP pool.

R1:
interface Serial0/1
no ip address
encapsulation ppp
dialer in-band
dialer pool-member 1
!
interface Dialer1
ip address dhcp
dialer pool 1
!
ip dhcp pool LOCAL
import all
network 20.0.0.0 255.255.255.0
default-router 20.0.0.1
!
interface FastEthernet0/0
ip address 20.0.0.1 255.255.255.0

R3:
ip dhcp pool POOL
network 10.0.0.0 255.255.255.0
dns-server 10.0.0.100 10.0.0.200
netbios-name-server 10.0.0.100
option 150 ip 10.0.0.150
default-router 10.0.0.3
!
interface FastEthernet0/0
ip address 10.0.0.3 255.255.255.0
!
interface Serial1/2
ip unnumbered FastEthernet0/0
encapsulation ppp
clock rate 128000

And now some quick verifications:

R1#show ip dhcp pool

Pool LOCAL :
Utilization mark (high/low) : 100 / 0
Subnet size (first/next) : 0 / 0
Total addresses : 254
Leased addresses : 0
Pending event : none
1 subnet is currently in the pool :
Current index IP address range Leased addresses
20.0.0.1 20.0.0.1 - 20.0.0.254 0

R1#show ip dhcp import

Address Pool Name: LOCAL


Domain Name Server(s): 10.0.0.100 10.0.0.200
NetBIOS Name Server(s): 10.0.0.100
TFTP Server Address Option: 10.0.0.150

R3#show ip dhcp binding


Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type
Hardware address/
User name
10.0.0.2 0063.6973.636f.2d30. May 04 2009 10:21 AM Automatic
3030.642e.6564.6338.
2e34.6636.302d.4469.
31

And last, but not least. It is possible to import the DHCP pool information from a RADIUS server, which sounds
pretty attractive. However, we do not provide an example in this post. Maybe next time

Tags: dhcp, import, origin

Download this page as a PDF

About Petr Lapukhov, 4xCCIE/CCDE:


Petr Lapukhov's career in IT begain in 1988 w ith a focus on computer programming, and progressed into netw orking
w ith his first exposure to Novell NetWare in 1991. Initially involved w ith Kazan State University's campus netw ork
support and UNIX system administration, he w ent through the path of becoming a netw orking consultant, taking part in
many netw ork deployment projects. Petr currently has over 12 years of experience w orking in the Cisco netw orking
field, and is the only person in the w orld to have obtained four CCIEs in under tw o years, passing each on his first
attempt. Petr is an exceptional case in that he has been w orking w ith all of the technologies covered in his four CCIE
tracks (R&S, Security, SP, and Voice) on a daily basis for many years. When not actively teaching classes, developing
self-paced products, studying for the CCDE Practical & the CCIE Storage Lab Exam, and completing his PhD in Applied
Mathematics.
Find all posts by Petr Lapukhov, 4xCCIE/CCDE | Visit Website

You can leave a response, or trackback from your own site.

3 Responses to Using the DHCP Import statement

May 3, 2009 at 10:12 pm


nowy1981

Once again thanks for clear clarification.

nowy

Reply

May 11, 2013 at 3:01 am


bigzaqui

thanks for the info

Reply

February 7, 2016 at 1:06 pm


Felix

Hi

Thank you for the post. One feature that could be done with local DHCP is overcoming inability of PPP to negotiate subnet.
When using OSPF and setting network type to broadcast, OSPF will see a different subnet mask on link with addresses derived by
IPCP. Tried to find solution in sending subnet info and couldnt find vie IPCP. Somebody showed me workaround with using local
DHCP to assign IP address to the interface and using import all vis IPCP. Works fine. One of the limitation that I see, you cant use
/31 addresses max mask accepted is /30.

Reply

Leave a Reply

Name (required)

Mail (will not be published) (required)

Submit Comment

twitter.com/ine

2011 INE, Inc., All Rights Reserved

pdfcrowd.com

Vous aimerez peut-être aussi