  We "solve" the Freed-Witten anomaly equation, i.e., we find a geometrical
classification of the B-field and A-field configurations in the presence of
D-branes that are anomaly-free. The mathematical setting being provided by the
geometry of gerbes, we find that the allowed configurations are jointly
described by a coset of a certain hypercohomology group. We then describe in
detail various cases that arise according to such classification. As is
well-known, only under suitable hypotheses the A-field turns out to be a
connection on a canonical gauge bundle. However, even in these cases, there is
a residual freedom in the choice of the bundle, naturally arising from the
hypercohomological description. For a B-field which is flat on a D-brane,
fractional or irrational charges of subbranes naturally appear; for a suitable
gauge choice, they can be seen as arising from "gauge bundles with not integral
Chern class": we give a precise geometric interpretation of these objects.
