Donald Trump says parts of the US federal government will remain closed until Democrats agree to put up more walls along the US-Mexico border to deter criminals.

In a Christmas Day appearance in the Oval Office, Mr Trump issued a lengthy defence of his desire for a wall, saying it is the only way to stop drugs and human traffickers from entering the US.

In a nod to the political stakes he's facing, the president said he wants the wall by "election time" in 2020.

The promise of a border wall was a central component of Mr Trump's presidential campaign.

"I can't tell you when the government's going to be open. I can tell you it's not going to be open until we have a wall or fence, whatever they'd like to call it," Mr Trump said, referring to Democrats who staunchly oppose walling off the Mexican border.

"I'll call it whatever they want, but it's all the same thing," he told reporters after participating in a holiday video conference with representatives from the five branches of the US military stationed in Alaska, Bahrain, Guam and Qatar.

Mr Trump argued that drug flows and human trafficking can only be stopped by a wall.

"We can't do it without a barrier. We can't do it without a wall," he said.

"The only way you're going to do it is to have a physical barrier, meaning a wall. And if you don't have that then we're just not opening."

Democrats oppose spending money on a wall, preferring instead to pump the dollars into fencing, technology and other means of controlling access to the border.

Mr Trump argued that Democrats oppose a wall only because he is for one.

The stalemate over how much to spend and how to spend it caused the partial government shutdown that began on Saturday following a lapse in funding for departments and agencies that make up about 25 per cent of the US government.

Some 800,000 government workers are affected. Many are still working but must wait until after the shutdown to be paid again.

Mr Trump claimed that many of these workers "have said to me and communicated 'stay out until you get the funding for the wall'. These federal workers want the wall. The only one that doesn't want the wall are the Democrats."