Scarpping SNMP metrics from Targets

I am trying to scrape the SNMP metrics from different switches and Routers.

When try explictly with XXXXX:9116 I am able get the results

But I see status down for same target in prometehus and error is
“Get “http://XXXXXXX:9116/snmp?module=if_mib&target=XXXXXXX”: context deadline exceeded”

i tried with multiple configuartions and different versions. still getting the same error.