You want the relay agent (ip helper-address) on the interface of the network for which it is requesting an address. There are no hosts on the loopback, so it makes no sense to put the relay agent on the loopback.
For example, if interface GigabitEthernet0/1 is connected to the network (10.11.12.0/24) from which the host is requesting DHCP service, then you ...
While configuring DHCP pool " default gateway information is configured for example
Switch(config) ip DHCP pool vlan30
Switch(config)# network 192.168.10.0 255.255.255.0
Switch(config)#ip default gateway 192.168.10.1
This last command tell the device to allocate ips from this DHCP scope for pc using default gateway 192.168.10.1
According to your requirement SVI 's are configured in layer3 multilayered switch that is virtual L3 interfàce by creating vlan 10 & 20
Now to ensure ip allocation dynamically to PCs . Dynamic host configuration protocol(DHCP) configuration is required on switch
Switch (config)# ip DHCP pool vlan10
Switch(config)#network 192.168.10.0 255.255.255.0
ip dhcp pool POOL10
network 192.168.10.0 255.255.255.0
ip dhcp pool POOL20
network 192.168.20.0 255.255.255.0
The dhcp agent knows which pool to use based on the source interface of the request. So, a request arriving on the SVI VLAN10 will get an address from POOL10. (and so forth)
When the DHCP server isn't in the same network, the dhcp relay ...
First of all, if you're running Wireshark on Linux, do you have proper permission? E.g. sudo
Second, are you on the right network interfaces? Refer to the image, notice that there are a few interfaces on it. Some of them have network activities, while the others are not. You don't want to capture the one with no activities as it will bring you nothing.
Capture logs in wireshark by neither way by taking TCP dump on client computer with source as client ip address and destination as DHCP server ip address . Please trigger DHCP traffic from client by enable DHCP options on network adapter setting so that DHCP dora process start and traffic is capture on TCP dump
Later open this TCP dump pcap file in ...
I hope picture above shows it really nice, basically once one Gateway node for example GW1 will fail then server nodes will automatically use other dynamic gateways GW2 and GW3. Also dynamic gateways allows servers to load balance the traffic among them so you can avoid overloading one Gateway.