A large-scale volunteer computing system is a type of distributed system in which contributors volunteer their computing resources, such as personal computers or mobile devices, to contribute to a larger computing effort. Volunteer resources are connected over the Internet and together form a powerful computing system capable of providing a service without depending on a service provider. Volunteer network resource allocation is the process of assigning computing tasks or services to a network of volunteer resources. The allocation process includes identifying the needed resources, selecting appropriate volunteers, and assigning tasks or services based on their capabilities. Volunteer computing systems consist of a large number of heterogeneous resources - in terms of processing power, storage, and availability - belonging to different authorities - users or organizations - and exhibiting uncertain behavior in terms of connection, disconnection, capacity, and failure. All of this makes resource allocation a challenging task in terms of ensuring a minimum quality of service, requiring complex algorithms and optimization techniques to ensure that services are efficiently allocated while respecting the constraints of the available resource. This paper introduces the Network-Aware Resource Allocation mechanism, which leverages the location, connectivity, and network latency of volunteer nodes to minimize the time a service runs with degraded quality of service and aims to deal with the energy consumption resulting from data replication requirements. This resource allocation mechanism applies to both the initial deployment of the service in the network and to the reallocation of nodes in the event that one of the allocated nodes fails or becomes unavailable. Our method has been validated in a simulation environment of a realistic volunteer system. The analysis of the results shows how our mechanism meets the quality requirements of users while minimizing the synchronization and replication times of service data replicas, as well as the time that services run with degraded quality of service, reducing the times by more than 70% in the service deployment phase and by more than 60% in the service execution phase. It also helps to reduce overall energy consumption.