02-27-2014 06:08 AM - edited 03-07-2019 06:26 PM
Hello all,
I want to set up a dhcp-relay.
There are 2 routers one is the dhcp server the other one is the forwarder.
Please see the attached file (from Cisco packet tracer).
The pc on the right side only give my a message with a failure of retrieving a ip address.
What am I doing wrong??
Thanks in advanced!
Solved! Go to Solution.
02-27-2014 11:41 AM
Hi,
on R2:
enable
conf t
ip route 10.1.11.0 255.255.255.0 10.1.10.1
Regards
Alain
Don't forget to rate helpful posts.
02-27-2014 06:30 AM
A lot of us don't use packet tracer. Can you post the configs instead?
Basically, without seeing the config, you will have R1 as dhcp server and R2 as a forwarder. The helper address will be configured on the lan side toward the pc, and you'll have to have routes between R1 and R2:
R1 --- R2 --- PC
R1:
ip dhcp pool Test
network 192.168.12.0
default-router 192.168.12.1
R1 connection to R2 - 10.10.10.1
R2 connection to R1 - 10.10.10.2
R2 Lan address - 192.168.12.1
R2 fa0/1
ip addre 192.168.12.1
ip helper-addre 10.10.10.1
There are a few bugs in packet tracer too, so posting the configs will allow us to see if there's a problem. When the pc broadcasts for a dhcp server, the lan interface on R2 will see it and package it up as a unicast and send it to R1. R1 will see the requesting subnet and assign an address from the 192.168.12.0 pool.
HTH,
John
*** Please rate all useful posts ***
02-27-2014 06:34 AM
Hi,
You must have a route for the gia address( which is the ip address where your helper-address is set) on the DHCP server(which is router2). This is because the DHCP replies are unicasted to this IP and then relayed as unicast or broadcast to the DHCP client.
Regards.
Alain
Don't forget to rate helpful posts.
02-27-2014 10:53 AM
Ok here we go,
Pc is dhcp not static
Forwarder (I removed some of the "!" there were a lot of them ):
Building configuration...
Current configuration : 473 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
interface FastEthernet0/0
ip address 10.1.10.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 10.1.11.1 255.255.255.0
ip helper-address 10.1.10.2
duplex auto
speed auto
!
ip classless
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
end
DHCP router:
Building configuration...
Current configuration : 566 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
ip dhcp excluded-address 10.1.11.1
!
ip dhcp pool hallo
network 10.1.11.0 255.255.255.0
default-router 10.1.11.1
dns-server 4.4.4.4
!
interface FastEthernet0/0
ip address 10.1.10.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
ip classless
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
end
So makes this it a little bit more clear??
02-27-2014 10:58 AM
Hi,
look at my reply, without this routing info R2 will never reply to DHCP requests from the client as it doesn't know how to send them.
Regards
Alain
Don't forget to rate helpful posts.
02-27-2014 11:22 AM
i read it, but don't get it.
How do I make that route?
02-27-2014 11:41 AM
Hi,
on R2:
enable
conf t
ip route 10.1.11.0 255.255.255.0 10.1.10.1
Regards
Alain
Don't forget to rate helpful posts.
02-27-2014 12:08 PM
Thanks man that was the answer I was looking for!!
02-27-2014 11:44 AM
Pop in the route to the subnet so that it knows what to send them down
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide