President Donald Trump doesn't need a wall to stop undocumented immigration along the U.S. southern border, three-time presidential candidate and well-known Libertarian Ron Paul told CNBC on Tuesday.

Instead, the Trump administration should remove incentives for coming to America, said Paul, who also served 12 terms as a U.S. congressman from Texas, a state that shares 1,254 miles of a common border with Mexico.

In previous negotiations with Trump, Democrats had agreed to some border wall funding as part of an ultimately scuttled deal to protect the so-called Dreamers, people who were illegally brought to the U.S. as children.

"I don't like walls," Paul added. "I don't want to wall people in and wall people out."

The White House was not immediately available to respond to CNBC's request for comment on Paul's remarks.

Paul joined "Squawk Box" as the partial government shutdown entered its 18th day due to a stalemate between Trump and Democrats who now control the House. The president has demanded that any deal to end the shutdown must include funds toward the construction of a barrier along the U.S.-Mexico border. Democrats have refused to allocate any money for a wall.

Trump, whose administration has been accused of using false statistics and dubious claims to push for a wall, is expected to describe what he calls a crisis at the U.S.-Mexico border in a prime-time address to the nation Tuesday night.

There is doubt among Democrats that a wall would do much to solve the issue of illegal immigration, and data from the Center for Migration Studies, a New York-based think tank, show only one-third of recent undocumented immigrants came through the southern border.

Still, Trump has threatened that he could circumvent Congress by declaring a national emergency and using the military to construct a wall.

Republican Sen. Rand Paul from Kentucky, son of Ron Paul, has said he would support a wall-funding compromise to open the government. Rand Paul said recently that he'd support funding for Trump's wall if budget cuts were made elsewhere. He has suggested that pulling American troops out of Afghanistan could more than pay for the wall.

Meantime, Ron Paul said the partial government shutdown is not too significant "in the grand scheme of things" just "another thing that can stir up trouble and people react to it." Paul, a longtime critic of the Federal Reserve, blamed the central bank's easy money policies since the 2008 financial crisis for creating the conditions for what he says is a coming U.S. economic recession.

Paul, who practiced medicine before being elected to Congress, unsuccessfully ran for president three times, first on the Libertarian Party ticket and two more times as a Republican.

— CNBC's Kevin Breuninger contributed to this report.

WATCH: Ron Paul blasts the Fed, blaming central bankers for setting up the US for a recession