Expo lan not getting ip adress automatically

hi, I am my expo was working fine but after i set up react native environment. Something wrong happened. On lan it is not getting my ip address automatically it show me local address like 127.0.00… .Everytime i have to do set REACT_NATIVE_PACKAGER_HOSTNAME=my ip

Please tell me how do i set my lan to get ip address automatically.