Defense Secretary Jim Mattis said Tuesday he does not see "divergence" between his strong support of Secretary of State Rex Tillerson's effort to negotiate with North Korea and President Trump's comment Sunday that talking with the regime is it a waste of time.

Mattis, who was testifying before the Senate, said the U.S. is looking for opportunities to start a dialogue with the North over its nuclear missile program, but currently is not talking due to the president's wishes.

"All we are doing is probing, we are not talking, consistent with the president's dismay about not talking with them before the time is right, before they are willing to talk," Mattis told the Senate Armed Services Committee. "So, I do not see the divergence as strongly as some have interpreted it."

Trump's guidance has been "very clear" to press on with diplomatic efforts, including with China, and to pursue economic sanctions to bring North Korea to the negotiating table, he said.

Mattis began his testimony by saying the Defense Department fully supports Tillerson's effort at a diplomatic solution with the North.

Tillerson, who is the top U.S. diplomat, said over the weekend that he was reaching out to Kim Jong Un's regime and hoped to start new dialogue after a series of intercontinental ballistic missile and nuclear tests have brought the two countries to the brink of conflict.

But Trump appeared to undercut Tillerson's statements with a tweet on Sunday.

"I told Rex Tillerson, our wonderful Secretary of State, that he is wasting his time trying to negotiate with Little Rocket Man," wrote Trump, who was using a nickname he recently created for Kim.

Sen. Jack Reed, D-R.I., the top Armed Services Democrat, asked Mattis about North Korea in what was the first question in a hearing that was called to focus on the administration's Afghanistan strategy.

"On one hand you strongly support him and on the other hand … the president is telling him to knock it off," Reed said.