How does GEOIP works?
Well there is a database with around 17,000,000 IP combinations from 0.0.0.* to 255.255.255.*.
We get your location like this.
Your IP is 54.166.77.32, so we check the database ip_54 for b 166 and c 77 which contains the country id of , region id of , and city id of .
That lets us know where in the database your location is. which is country , region and city
Anyone with in 54.166.77.* has the same location as you, because the ISP buys all IPs in that range for your city.