US defence secretary Jim Mattis has given a stark warning about the threat of confrontation with North Korea.

"Storm clouds are gathering" over the Korean Peninsula, he said as diplomats try to resolve the nuclear standoff.

Mr Mattis told soldiers that the US military must do its part by being ready for war.

Without forecasting a conflict, Mattis emphasized that diplomacy stands the best chance of preventing a war if America's words are backed up by strong and prepared armed forces.

"My fine young soldiers, the only way our diplomats can speak with authority and be believed is if you're ready to go," Mattis told several dozen soldiers and airmen at the 82nd Airborne Division's Hall of Heroes, his last stop on a two-day pre-holiday tour of bases to greet troops.

Mattis' comments came as the U.N. Security Council unanimously approved tough new sanctions against North Korea, compelling nations to sharply reduce their sales of oil to the reclusive country and send home all North Korean expatriate workers within two years. Such workers are seen as a key source of revenue for North Korean leader Kim Jong Un's cash-strapped government.