01-31-2023 01:59 PM - last edited on 02-05-2023 11:07 PM by Translator
The above the toplogy which reflects the problem I'm facing with ip helper.
R1 is DHCP server for the 172.16.1.1/24 network
I have configured static routes between R2 and R3 with next-hop addresses.
Interface g0/0/1 on R3 is configured with ip address 172.31.1.1 255.255.255.0. This interface contains also the ip helper-address of 172.16.1.2 which resides on R2.
Everytime I try to obtain a lease in simulation mode, the dhcp packets sre dropped at g0/0/0 on R2 with the message: "No congured DHCP pool for this port"
This is my complete configuration for all routers:
R1
en
conf t
h R1
ip dhcp pool RELAY
network 172.16.1.0 255.255.255.0
default-router 172.16.1.1
ip dhcp excluded-address 172.16.1.1
int g0/0/0
ip add 172.16.1.1 255.255.255.0
no sh
end
!-----------------------------------
!R2
en
conf t
h R2
ip route 172.31.1.0 255.255.255.0 10.0.0.2
int g0/0/0
ip add 172.16.1.2 255.255.255.0
no sh
int g0/0/1
ip add 10.0.0.1 255.255.255.252
no sh
end
!-----------------------------------
!R3
en
conf t
h R3
ip route 172.16.1.0 255.255.255.0 10.0.0.1
int g0/0/1
ip add 10.0.0.2 255.255.255.252
no sh
int g0/0/0
ip add 172.31.1.1 255.255.255.0
ip helper-address 172.16.1.2
no sh
end
!-----------------------------------
What I am doing wrong?
Solved! Go to Solution.
02-01-2023 01:17 PM - last edited on 02-05-2023 11:12 PM by Translator
Hello,
You still did not change the DHCP pool to reflect the actual network you're trying to get a lease for which is the 172.31.1.0/24 network. You still have it trying to assign a lease for the 172.16.1.0/24 network.
Secondly I looked at the PT file. If you click on simulation mode and then go to the PC and click on command prompt and issue the
ipconfig /renew
command, you can see the packet make it all the way to R1. It drops it because R1 does not have an interface in that network of the 172.31.1.0/24 network. t just has a route to it. I believe there is away to assign an interface to the pool you'd like the lease to be issues out of if you are tying to use an interface not in the pool but I don't believe PT supports that function as they have very limited commands.
Maybe try adding a DHCP server on R1 (an actual server that hands out IPs) and use a routing protocol, not static routes. This eliminates the issue with routing. See example below:
-Remove all static routes
On all routers issues these commands:
conf t
router eigrp 1
network 0.0.0.0
That will create all routes to all routers and you can just focus on the DHCP part to get that working.
-David
02-01-2023 09:24 PM - last edited on 02-05-2023 11:14 PM by Translator
I took a look at the PT file again. You need to do 2 things.
1. Make sure the pool is correct - it wasn't in the initial configuration. You had 172.16.1.0/24 when the interface attached to the PC is 172.31.1.0/24.
2. The helper address needs to be the address of the DHCP server. The interface address of R1 is 172.16.1.1 - you have the helper address pointing to 172.16.1.2 as per @mlund
!
R1
en
conf t
h R1
router eigrp 1
network 0.0.0.0
ip dhcp pool RELAY
network 172.31.1.0 255.255.255.0
default-router 172.31.1.1
ip dhcp excluded-address 172.31.1.1
int g0/0/0
ip add 172.16.1.1 255.255.255.0
no sh
end
!-----------------------------------
!R2
en
conf t
h R2
router eigrp 1
network 0.0.0.0
int g0/0/0
ip add 172.16.1.2 255.255.255.0
no sh
int g0/0/1
ip add 10.0.0.1 255.255.255.252
no sh
end
!-----------------------------------
!R3
en
conf t
h R3
router eigrp 1
network 0.0.0.0
int g0/0/1
ip add 10.0.0.2 255.255.255.252
no sh
int g0/0/0
ip add 172.31.1.1 255.255.255.0
ip helper-address 172.16.1.2
no sh
end
!-----------------------------------
I have attached the working file
-David
01-31-2023 02:15 PM
Hello,
The 2 things I see is the DHCP scope looks incorrect. You have 172.16.1.0 but your PC is in the 172.31.1.0 network.
Secondly R1 does not have a route back to the 172.31.1.0/24 network. So either configure a static one or implement a routing protocol on all routers.
All routers involved need to know how to get to and from the source and destination.
-David
01-31-2023 03:22 PM - last edited on 02-05-2023 11:15 PM by Translator
Hello,
post your zipped
Packet Tracer project (.pkt)
file...
02-01-2023 12:18 AM - last edited on 02-05-2023 11:09 PM by Translator
In the attachment:
ip-helper.zip
It was created in PacketTracer 8.20.0162.
Following the suggestion of @David Ruess I included the ip route on router 1 to the 172.31.1.0 network.
02-01-2023 01:17 PM - last edited on 02-05-2023 11:12 PM by Translator
Hello,
You still did not change the DHCP pool to reflect the actual network you're trying to get a lease for which is the 172.31.1.0/24 network. You still have it trying to assign a lease for the 172.16.1.0/24 network.
Secondly I looked at the PT file. If you click on simulation mode and then go to the PC and click on command prompt and issue the
ipconfig /renew
command, you can see the packet make it all the way to R1. It drops it because R1 does not have an interface in that network of the 172.31.1.0/24 network. t just has a route to it. I believe there is away to assign an interface to the pool you'd like the lease to be issues out of if you are tying to use an interface not in the pool but I don't believe PT supports that function as they have very limited commands.
Maybe try adding a DHCP server on R1 (an actual server that hands out IPs) and use a routing protocol, not static routes. This eliminates the issue with routing. See example below:
-Remove all static routes
On all routers issues these commands:
conf t
router eigrp 1
network 0.0.0.0
That will create all routes to all routers and you can just focus on the DHCP part to get that working.
-David
02-01-2023 01:59 AM
As an add on for @David Ruess your ip helper must point to the router that is configured with pool.
02-01-2023 02:34 PM
Thanks for your input! Still I am confused about the implementation of a dhcp relay and ip helper.
I tried to build my -wrong- configuration from a cisco website, in order to understand the concepts better.
The image shows the topology I tried to rebuild.
So to my understanding ip helper is applied for clients that have to get addresses from a 'remote' dhcp pool. So the clients are in fact connected to a router which has another network ID than the ip address they will lease from the remote dhcp server.
But I guess that is wrong?
02-01-2023 03:06 PM
According to your screenshot I was able to pull up the documentation. By your account it "looks like it should work" and I agree.
You entered the helper in the correct spot on R3 of G0/0/0. (You had the wrong Network configured on the DHCP server of R1 initially and in the PT file you sent as mentioned)
When a DHCP Discover message is sent form the PC its sent as a broadcast. Once it hits the router interface (its default gateway) it would stop, since routers don't forward broadcast. What the IP helper address does is turn the broadcast into a unicast to forward to the IP specified in the helper address command. This should get it to the DHCP server as long as there is a route in the routing able.
The DHCP server needs a route back to the client network as well if on a different subnet.
That's why I mentioned implementing a routing protocol (very basic) to eliminate the possibility of missing or incorrect static routes and focus just to the DHCP issue.
I may be able to look at it late tonight again to see if that works for me.
02-01-2023 09:24 PM - last edited on 02-05-2023 11:14 PM by Translator
I took a look at the PT file again. You need to do 2 things.
1. Make sure the pool is correct - it wasn't in the initial configuration. You had 172.16.1.0/24 when the interface attached to the PC is 172.31.1.0/24.
2. The helper address needs to be the address of the DHCP server. The interface address of R1 is 172.16.1.1 - you have the helper address pointing to 172.16.1.2 as per @mlund
!
R1
en
conf t
h R1
router eigrp 1
network 0.0.0.0
ip dhcp pool RELAY
network 172.31.1.0 255.255.255.0
default-router 172.31.1.1
ip dhcp excluded-address 172.31.1.1
int g0/0/0
ip add 172.16.1.1 255.255.255.0
no sh
end
!-----------------------------------
!R2
en
conf t
h R2
router eigrp 1
network 0.0.0.0
int g0/0/0
ip add 172.16.1.2 255.255.255.0
no sh
int g0/0/1
ip add 10.0.0.1 255.255.255.252
no sh
end
!-----------------------------------
!R3
en
conf t
h R3
router eigrp 1
network 0.0.0.0
int g0/0/1
ip add 10.0.0.2 255.255.255.252
no sh
int g0/0/0
ip add 172.31.1.1 255.255.255.0
ip helper-address 172.16.1.2
no sh
end
!-----------------------------------
I have attached the working file
-David
02-02-2023 02:55 AM
Great!
The solution was to add two ip helper-addresses on R3 g0/0/1 pointing to 172.16.1.1 and 172.16.1.2. Furthermore I forgot to apply a route back to 172.31.1.0/24 from R2, as many of you mentioned.
Thanks!
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