In this paper, we construct a structural model of credit risk in order to examine how different magnitudes of exogenous shocks to bank loans propagate across the network. We also examine how bank capital, size and the network structure affect the stability of the banking system.We demonstrate that balance sheet diversification reduces the probability of bank failure much more than diversification across the interbank market, which only works for weak shocks. Larger and well-capitalized banks are expected to default not only less frequently than other banks, but also at later dates. These banks are also expected to need less additional capital to avoid bankruptcy when hit by a shock. Larger systemic shocks are highly detrimental in all network topologies, and even for moderate shocks connectivity works contagiously. Our model is capable of generating cascading defaults. Importantly, the system's microstructure affects shock consequences. In a stable banking system, if possible, bankswould primarily diversify their exposure across different systemic events, not just across the interbank market, and maintain adequate levels of capital. The stability of the system can be enhanced if a sufficient number of banks that would have otherwise defaulted is rescued. Further,we find the minimum capital ratio for each bank that is required to prevent defaults within the banking system. Finally, we demonstrate that counterparty risk leads to an extreme nonlinear characteristic in the shock effects.