Speaking after a working lunch with Italian premier Matteo Renzi at the World Expo, Cameron said the two countries agreed on the need for a "comprehensive" approach to a crisis which has caused a deepening rift between Italy and its EU partners.
Britain is one of the countries refusing to have anything to do with proposals to ease the strains caused by unprecedented numbers of migrants arriving by sea in Italy and Greece by distributing 40,000 refugees around Europe over the next two years.
But Cameron insisted Britain was doing its bit through the operation of Royal Navy ships rescuing migrants in the Mediterranean and by increasing aid to countries in North Africa and the Horn of Africa, where many of the 220,000 migrants who have landed in Italy in the last 18 months originate.
"We need a comprehensive approach that sees a new government in Libya, that goes after the criminal gangs and where we work with you (Italy) and your intelligence fusion cell in Sicily where we will be putting in people and resources," Cameron said.
"We need a comprehensive approach to every aspect of this, particularly trying to break the link between taking people off boats in the Mediterranean and getting settlement in Europe."
Renzi, who is under growing domestic pressure over the migrant issue and a perception that Italy has been abandoned by its neighbours, welcomed Cameron's emphasis on the need for concerted international action.
"We know there are different approaches in the European Union but I think we have the same values (and agree) this problem is a European problem," he said. "It is not only an Italian problem."
He added that there was "a fundamental convergence of views that this problem has to be solved at its roots, in Africa".
Risotto and roast veal
Cameron was in Milan to visit the acclaimed British pavilion at the Expo and to drum up support in his campaign for reforms to the way the European Union works before Britain holds an in-out referendum on membership.
Over a meal of risotto alla Milanese and roast veal, washed down with Soave and Bardolino wines, Cameron appeared to have been given a fairly sympathetic hearing from a counterpart pushing his own reform agenda in Italy.
"For us it is a priority the UK can continue to work inside the European Union because a European Union without the UK is impossible," Renzi said.
"So we will discuss in the next months about this point."
Italy has ruled out any changes to EU treaties and remains committed to more, not less, integration between member states.
But Renzi said there were areas where London and Rome could work together.
"We (came to) the decision to use this time to improve the quality of life of our citizens, cut bureaucracy and reduce the risk of a bureaucratic approach of the European Union," the centre-left prime minister said.
Cameron said the pair had agreed on "the importance of reform and change in Europe, where I do think we have some common perspectives and some common ideas.
"We discussed the need for competitiveness and flexibility and that was very welcome."