For data-collection applications in sensor networks, it is important to ensure all data sources have equal (or weighted) access to network bandwidth so that the base stations receive a complete picture about the monitored area. We point out the fairness problem in the current design of sensor networks, which may cause extremely biased bandwidth allocations. It is a challenge to design a fully distributed fairness solution due to the lack of global knowledge about the distribution of data sources and their routing paths. This paper proposes a new aggregate fairness model and a localized algorithm (called AFA) that implements the model. AFA is designed to work with any routing protocol. In particular, it allows the packets from a data source to follow an arbitrary set of forwarding paths to the base stations. This flexibility makes it considerably harder to allocate bandwidth fairly among different data sources. AFA solves the problem with only localized operations at the sensors. It i...