cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1472
Views
10
Helpful
9
Replies

ip-helper problems with static route Packet Tracer

keesepema
Level 1
Level 1

topology.png

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?

 

 

2 Accepted Solutions

Accepted Solutions

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

View solution in original post

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

View solution in original post

9 Replies 9

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

Hello,

post your zipped

Packet Tracer project (.pkt)

file...

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.

 

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

mlund
Level 7
Level 7

As an add on for @David Ruess your ip helper must point to the router that is configured with pool.

keesepema
Level 1
Level 1

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?

 

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. 

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

keesepema
Level 1
Level 1

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!

Review Cisco Networking for a $25 gift card