Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1540
  • Last Modified:

Cisco Router as DHCP Server and Using IP Helper DHCP Relay

I have a Cisco 1841 ISR router that I'm using as a DHCP server. The router's LAN port is connected to a layer 2 switch. I have a number of VLANs setup on the router with corresponding sub-interfaces. The default network on fa0/0 is 10.10.10.1. I've implemented the ip helper-addres <ip_address> command on the fa0/0 interface, but the clients are unable to obtain a DHCP address. Did I configure something wrong?

interface FastEthernet0/0
 description LAN Interface - TO ETHERNET NETWORK
 ip address 10.10.10.1 255.255.255.0
 ip helper-address 192.168.20.1
 ip nat inside
 ip virtual-reassembly
 duplex auto
 speed auto
 no mop enabled
......
interface FastEthernet0/0.20
 description Client Network
 encapsulation dot1Q 20
 ip address 192.168.20.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly
.......
ip dhcp pool VLAN20
   import all
   network 192.168.20.0 255.255.255.0
   dns-server 4.2.2.2
   default-router 192.168.20.1
   lease 7

Open in new window

0
SilentVirtue
Asked:
SilentVirtue
2 Solutions
 
unfragmentedCommented:
Why not just create two DHCP pools on the router - one for VLAN 1 and one for VLAN 20?  Then you do not need an IP helper, and your configuration is nice and simple.
0
 
SilentVirtueAuthor Commented:
I appreciate the suggestion, but that was how I previously had things configured. I prefer to have the primary fa0/0 interface with the 10.10.10.1 ip address, but want the clients to use the 192.168.20.x network.
0
 
hoanhanhCommented:
Hi ,

This is a final configuration FYI

interface FastEthernet0/0
 description LAN Interface - TO ETHERNET NETWORK
 no shut
 ip virtual-reassembly
 duplex auto
 speed auto
 no mop enabled
......
interface FastEthernet0/0.10
 description Client Network
 encapsulation dot1Q 10
 ip address 10.10.10.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly

interface FastEthernet0/0.20
 description Client Network
 encapsulation dot1Q 20
 ip address 192.168.20.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly
.......
ip dhcp pool VLAN20
   import all
   network 192.168.20.0 255.255.255.0
   dns-server 4.2.2.2
   default-router 192.168.20.1
   lease 7

ip dhcp pool VLAN10
   import all
   network 10.10.10.1 255.255.255.0
   dns-server 4.2.2.2
   default-router 1p.10.10.1
   lease 7
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
rbaduaCommented:
What your asking is not logical.  You have an IP helper on int f0/0 which is physically attached to the 10.x.x.x network.  At the same time you want to have the everyone behind the f0/0 to have a 192.168.x.x address.  That will never work as they are completely 2 seperate networks.  The 192.x.x.x will never route if it sits on the f0/0 network
0
 
SilentVirtueAuthor Commented:
@rbadua, then how is the "ip helper-addres" command supposed to work? I'm confused about the purpose of the DHCP relay if that's the case.
0
 
SilentVirtueAuthor Commented:
I did some more research and found the following article: http://www.laboit.net/2009/05/20/enable-dhcp-relay-on-a-cisco-router/ 
Looks like in addition to setting up the DHCP relay, you have to configure the DHCP server to offer leases in the same subnet where your nodes exist. Basically, this allows you to have just one DHCP server, offering DHCP leases for different pools, while using the DHCP relay command to get those BOOTP packets to a different subnet where the DHCP server is located.
0
 
SilentVirtueAuthor Commented:
rbadua explained what the problem was, but not why it was happening. I did the additional research to understand how the "ip helper-addres" command is supposed to be used.
0

Featured Post

Become an IT Security Management Expert

In today’s fast-paced, digitally transformed world of business, the need to protect network data and ensure cloud privacy has never been greater. With a B.S. in Network Operations and Security, you can get the credentials it takes to become an IT security management expert.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now