  We study stochastic dynamics of the Prisoner's Dilemma game on random
Erd\"{o}s-R\'{e}nyi and Barab\'{a}si-Albert networks with a cost of maintaining
a link between interacting players. Stochastic simulations show that when the
cost increases, the population of players located on Barab\'{a}si-Albert
network undergoes a sharp transition from an ordered state, where almost all
players cooperate, to a state in which both cooperators and defectors coexist.
At the critical cost, the population oscillates in time between these two
states. Such a situation is not present in the Erd\"{o}s-R\'{e}nyi network. We
provide some heuristic analytical arguments for the phase transition and the
value of the critical cost in the Barab\'{a}si-Albert network.
