Configure router as DHCP relay agent

Hi, I have flashed my router with openwrt version 21.02.0 . Can anyone help me out on how it can be set up as DHCP relay agent which will relay DHCP request to a remote DHCP server for IP allocation of devices connecting to the router?

PS : I am very new to OpenWRT, please correct me if there are any mistakes.

start by upgrading, 21.02 is EOL.

Thank you for responding. Currently the task I am working on requires that particular version, but I will upgrade it soon.
For now it would be very helpful if you can share some knowledge on how a DHCP relay agent can be configured for the latest versions. At least I will have a point to start with.

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik

ubus call system board

21.02 or 23.05 literarily has the option in web ui for dhcp4 relay in place of default server.

Here is the output -

{
        "kernel": "5.4.143",
        "hostname": "OpenWrt-Ver21",
        "system": "MediaTek MT7621 ver:1 eco:3",
        "model": "Netgear R6350",
        "board_name": "netgear,r6350",
        "release": {
                "distribution": "OpenWrt",
                "version": "21.02.0",
                "revision": "r16279-5cc0535800",
                "target": "ramips/mt7621",
                "description": "OpenWrt 21.02.0 r16279-5cc0535800"
        }
}

23.05 is available for your device. What is the specific reason that you need to stay on 21.02? And if there really is a hard requirement to remain on 21.02, can you at least upgrade to 21.02.7 to patch some of the vulnerabilities (there will still be some potentially serious vulnerabilities that remain unpatched because of the fact that 21.02 has been EOL and unsupported for over a year and a half).

Yes, I have to configure it for that exact version for now. But I started exploring the 23.05 version as well through LuCI and noticed that there is an option for relay in the newer version. Was that option not available in older versions through LuCI?

Why? That version should not be used unless there is a really good really good reason for it. Could you help us understand why you feel you need to use such an old version (maybe we can help you find a way to use somethign that is supported)

No idea, you the master archaeologist, mr Indiana Jones.