Let us say that we have R01, R02, and R03 connected to each other, and each of them is connected to a different subnet SUB01, SUB02, and SUB03, respectively. R03 is set up as a DHCP server, and DHCP works fine for the workstation in its own subnet. Now we setup R01 and R02 with an IP helper-addresses of R03, where each is connected. Assuming all configurations are correct. Do we need to configure routing protocols or not for the DHCP and DHCP relay to do their magic? or should they work just fine with these configurations?
UPDATE (28APR2023):
Here is an example of the situation in question with all running configs for the three routers, along with routing tables. Also, Here is a link to the Packet Tracer file.
R01(config)#do sh run
Building configuration...
Current configuration : 787 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R01
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2911/K9 sn FTX1524X850-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
ip address 192.168.0.30 255.255.255.224
ip helper-address 192.168.0.254
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 192.168.0.126 255.255.255.224
duplex auto
speed auto
!
interface GigabitEthernet0/2
ip address 192.168.0.253 255.255.255.224
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
----------------------
R01(config)#do sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
192.168.0.0/24 is variably subnetted, 6 subnets, 2 masks
C 192.168.0.0/27 is directly connected, GigabitEthernet0/0
L 192.168.0.30/32 is directly connected, GigabitEthernet0/0
C 192.168.0.96/27 is directly connected, GigabitEthernet0/1
L 192.168.0.126/32 is directly connected, GigabitEthernet0/1
C 192.168.0.224/27 is directly connected, GigabitEthernet0/2
L 192.168.0.253/32 is directly connected, GigabitEthernet0/2
========================
R02(config)#do sh run
Building configuration...
Current configuration : 787 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R02
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2911/K9 sn FTX1524U1U3-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
ip address 192.168.0.62 255.255.255.224
ip helper-address 192.168.0.189
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 192.168.0.125 255.255.255.224
duplex auto
speed auto
!
interface GigabitEthernet0/2
ip address 192.168.0.190 255.255.255.224
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
----------------------
R02(config)#do sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
192.168.0.0/24 is variably subnetted, 6 subnets, 2 masks
C 192.168.0.32/27 is directly connected, GigabitEthernet0/0
L 192.168.0.62/32 is directly connected, GigabitEthernet0/0
C 192.168.0.96/27 is directly connected, GigabitEthernet0/1
L 192.168.0.125/32 is directly connected, GigabitEthernet0/1
C 192.168.0.160/27 is directly connected, GigabitEthernet0/2
L 192.168.0.190/32 is directly connected, GigabitEthernet0/2
============================
R03(config)#do sh run
Building configuration...
Current configuration : 1125 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R03
!
!
!
!
ip dhcp excluded-address 192.168.0.30
ip dhcp excluded-address 192.168.0.62
ip dhcp excluded-address 192.168.0.94
!
ip dhcp pool SUB01
network 192.168.0.0 255.255.255.224
default-router 192.168.0.30
ip dhcp pool SUB02
network 192.168.0.32 255.255.255.224
default-router 192.168.0.62
ip dhcp pool SUB03
network 192.168.0.64 255.255.255.224
default-router 192.168.0.94
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2911/K9 sn FTX15244VUL-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
ip address 192.168.0.94 255.255.255.224
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 192.168.0.254 255.255.255.224
duplex auto
speed auto
!
interface GigabitEthernet0/2
ip address 192.168.0.189 255.255.255.224
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
----------
R03(config)#do sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
192.168.0.0/24 is variably subnetted, 6 subnets, 2 masks
C 192.168.0.64/27 is directly connected, GigabitEthernet0/0
L 192.168.0.94/32 is directly connected, GigabitEthernet0/0
C 192.168.0.160/27 is directly connected, GigabitEthernet0/2
L 192.168.0.189/32 is directly connected, GigabitEthernet0/2
C 192.168.0.224/27 is directly connected, GigabitEthernet0/1
L 192.168.0.254/32 is directly connected, GigabitEthernet0/1
=====================