cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1156
Views
5
Helpful
6
Replies

DHCP

Hello111
Level 1
Level 1

Hello, I would need some help on DHCP (currently learning DHCP)... For some reasons some of the interfaces on the DHCP Clients received an IP address from the DHCP server and some other not... I am not sure why...

The interfaces on the DHCP clients connected to the DHCP server received an IP address.

However, the interfaces on the DHCP clients that are not connected to the DHCP server R1 (in this case these are connected between R2 Gi0/1 and R3 Gi0/1) are not receiving any IP address... I am not sure why... I would like that the DHCP server assigns directly an IP address to the interface connecting R2 to R3...

Here is the configuration:

R1


ip dhcp excluded-address 10.1.1.1 10.1.1.4
!
ip dhcp pool INTERNAL
network 1.1.0.0 255.255.0.0
dns-server 1.1.1.2
default-router 1.1.1.3
domain-name NETBIOS
lease 14 12 23

interface GigabitEthernet0/0
ip address 1.1.1.1 255.255.255.0

interface GigabitEthernet0/2
ip address 1.1.2.1 255.255.255.0

R2


interface GigabitEthernet0/1
ip address dhcp
interface GigabitEthernet0/2
ip address dhcp

 

R3


interface GigabitEthernet0/0
ip address dhcp
interface GigabitEthernet0/1
ip address dhcp

 

topology.png

 Thank you,

 

1 Accepted Solution

Accepted Solutions

vxcvxcvvcxvxcvxc.png
I make small lab, I use R1 to assign IP to R2 f0/0 and R3 f1/1 f2/1 interface IP. 
as a rule
the link always must 
ONE side have manual IP, other assign via DHCP 
so in my lab 
R2-R1 R1 have manual IP and R2 assign via DHCP which is R1 (local DHCP server)
R2-R3 R3 have manual IP and R3 assign via DHCp which is R1, and since the R3 is not direct connect to DHCP server we need IP helper-address in R2 f1/1 interface point to DHCP server which is R1 f0/0 IP (10.0.0.1)

R3-R1 R1 have manual IP and R2 assign via DHCP whcch is R1 (local DHCP server)

note:- in R1 you need static route toward R2 for 11.0.0.0/24 subnet 

this how you can solve your issue, if you have Q you are free to ask. 

View solution in original post

6 Replies 6

friend return to basic can you config two interface in one router with same subnet ???
NO
you need one POOL for each link to assign different IP for each interface in Router 

emurray
Level 1
Level 1

This has more to do with how routing and IP addressing work. When we are talking about routers we need to talk about IP addresses. You have to understand private and public network schemes for this. 

Once you understand that, you will understand that a router can only have one port assigned to a network and for each network, you will need a DHCP pool. 

 

In your case, you only have one DHCP pool. Your pool network 1.1.0.0 255.255.0.0  won't cover all the subnets. They ended with a mask 255.255.255.0 which is different, also you need IP addresses for the R2 to R3 connection.

 

Also you need to study how the DORA works and that the broadcast will only stay within a network 

Hello111
Level 1
Level 1

Hello MHM, Edgar,

Thank you for getting back to me and explained that several pools were needed as several subnets will have to exist. I have reviewed the configuration (and topology). I did noted that the DHCP allocation is separate from the routing process. I used EIGRP as the routing protocol; so the DHCP Relay has a route back to the pool on the DHCP server.

I created several pools on the DHCP server and referred the ip helper-address 5.5.5.5 on the DHCP Relay (5.5.5.5 is the IP of a loopback created on the DHCP Server).

Note: I did use the command

service dhcp

on the DHCP server to ensure that the service is on (should be enabled per default); so the DHCP server can listen for any Discover messages.

Going through these steps, I was able to have an IP address assigned on Gi0/0 (1.1.2.1) and Gi0/2 (1.1.3.2) on my DHCP clients. So, the different pools were used to allocate these IP addresses.

However, for some reason, I am missing something... I cannot allocate the ip addresses of the pool INTERNAL4 (network 1.1.4.0 255.255.255.0) on the interfaces Gi0/1 of my DHCP clients... Not sure if this would have to do with the Client Identifier and if I should create a Host Pool... If, I would do that, I would need to get the Client-identifier but the one provided in the command applied on the DHCP server are not from these specific interfaces (show ip dhcp binding). I put the output below... Any help would be appreciated.

Thanks

topology.png

Screenshot 2022-10-06 142640.png

 

 

DHCP Server

ip dhcp excluded-address 1.1.1.252
ip dhcp excluded-address 1.1.2.40
ip dhcp excluded-address 1.1.3.40
!
ip dhcp pool INTERNAL1
network 1.1.1.0 255.255.255.0
default-router 1.1.1.252 <== This is the Relay Gateway
dns-server 150.28.1.1
!
ip dhcp pool INTERNAL2
network 1.1.2.0 255.255.255.0
default-router 1.1.1.252 <== This is the Relay Gateway
dns-server 150.28.1.1
!
ip dhcp pool INTERNAL3
network 1.1.3.0 255.255.255.0
default-router 1.1.1.252 <== This is the Relay Gateway
dns-server 150.28.1.1
!
ip dhcp pool R2_CLIENT_POOL
host 1.1.4.10 255.255.255.0
!
ip dhcp pool INTERNAL4
network 1.1.4.0 255.255.255.0
default-router 1.1.1.252 <== This is the Relay Gateway
dns-server 150.28.1.1
!
interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface GigabitEthernet0/1
ip address 1.1.1.253 255.255.255.0
!
router eigrp 1
network 0.0.0.0
eigrp router-id 11.11.11.11

----------------------------------------------

Relay
interface GigabitEthernet0/0
ip address 1.1.2.40 255.255.255.0
ip helper-address 5.5.5.5

interface GigabitEthernet0/1
ip address 1.1.1.252 255.255.255.0

interface GigabitEthernet0/2
ip address 1.1.3.40 255.255.255.0
ip helper-address 5.5.5.5
!
router eigrp 1
network 0.0.0.0

----------------------------------------------

Client R2
interface GigabitEthernet0/0
ip address dhcp
interface GigabitEthernet0/1
ip address dhcp
!
router eigrp 1
network 0.0.0.0

----------------------------------------------

Client R3
interface GigabitEthernet0/1
ip address dhcp
interface GigabitEthernet0/2
ip address dhcp
!
router eigrp 1
network 0.0.0.0

----------------------------------------------


 

I think you missed the DHCP relay commando

con interface GigabitEthernet0/1

You should add te ip-helper address as it is in the other ineterfaces. 

vxcvxcvvcxvxcvxc.png
I make small lab, I use R1 to assign IP to R2 f0/0 and R3 f1/1 f2/1 interface IP. 
as a rule
the link always must 
ONE side have manual IP, other assign via DHCP 
so in my lab 
R2-R1 R1 have manual IP and R2 assign via DHCP which is R1 (local DHCP server)
R2-R3 R3 have manual IP and R3 assign via DHCp which is R1, and since the R3 is not direct connect to DHCP server we need IP helper-address in R2 f1/1 interface point to DHCP server which is R1 f0/0 IP (10.0.0.1)

R3-R1 R1 have manual IP and R2 assign via DHCP whcch is R1 (local DHCP server)

note:- in R1 you need static route toward R2 for 11.0.0.0/24 subnet 

this how you can solve your issue, if you have Q you are free to ask. 

Hello MHM,

Thank you for having taken the time to explain me. I tried again and it is working (I validated by adding extra clients)... The rule that gave me was the solution ("the link always must ONE side have manual IP, other assign via DHCP).

Basically, we create the pools on the DHCP server. Each pool (with a different subnet each) must include the ip address of the default router (that is the IP address of the next router). A routing protocol (e.g., EIGRP, OSPF, static routes...) must be configured on each router; so there is a route back to the DHCP server.

The router connected to the DHCP server has all interfaces configured manually. Since, these are configured manually, we add the IP helper-address on the interfaces that are facing the DHCP clients (the IP heper-address is a loopback on my DHCP server).

From there the DHCP server will be able to allocate an IP address from the relevant pools to the DHCP clients.

Then the process is repeating itself with each extra DHCP clients being added to the topology. In other words, one side of the link has its IP address manually configured with the IP helper-address added on it. The other side of the link just need the command

ip address dhcp 

configured on the interface. The DHCP server will then allocate an IP address from the relevant pool...

Thank you for having helped me to figured out my issue...

 

Review Cisco Networking for a $25 gift card