Certain theories suggest that it should be difficult or impossible to eradicate a vaccine-preventable disease under voluntary vaccination: Herd immunity implies that the individual incentive to vaccinate disappears at high coverage levels. Historically, there have been examples of declining coverage for vaccines, such as MMR vaccine and whole-cell pertussis vaccine, that are consistent with this theory. On the other hand, smallpox was globally eradicated by 1980 despite voluntary vaccination policies in many jurisdictions. Previous modeling studies of the interplay between disease dynamics and individual vaccinating behavior have assumed that infection is transmitted in a homogeneously mixing population. By comparison, here we simulate transmission of a vaccine-preventable SEIR infection through a random, static contact network. Individuals choose whether to vaccinate based on infection risks from neighbors, and based on vaccine risks. When neighborhood size is small, rational vaccinating behavior results in rapid containment of the infection through voluntary ring vaccination. As neighborhood size increases (while the average force of infection is held constant), a threshold is reached beyond which the infection can break through partially vaccinated rings, percolating through the whole population and resulting in considerable epidemic final sizes and a large number vaccinated. The former outcome represents convergence between individually and socially optimal outcomes, whereas the latter represents their divergence, as observed in most models of individual vaccinating behavior that assume homogeneous mixing. Similar effects are observed in an extended model using smallpox-specific natural history and transmissibility assumptions. This work illustrates the significant qualitative differences between behavior-infection dynamics in discrete contact-structured populations versus continuous unstructured populations. This work also shows how disease eradicability in populations where voluntary vaccination is the primary control mechanism may depend partly on whether the disease is transmissible only to a few close social contacts or to a larger subset of the population.