Sudan has promised to cease hostilities with South Sudan and comply with a UN Security Council resolution.
However the foreign ministry also said that Khartoum reserved the right to respond to "aggression" from the South.
The statement came hours after Juba alleged fresh bombing by the Khartoum government's forces.
A UN resolution on Wednesday backed an African Union plan demanding both sides cease hostilities, amid fears of an all-out war between the neighbours.
The Security Council called for a written commitment by both governments within 48 hours, and threatened sanctions if its terms were not met.
The South has already said it accepts the terms of the roadmap.
The BBC's James Copnall in Khartoum says that both sides appear to have been brought back to the negotiating table, but tension is still high.
In a statement, a foreign ministry spokesman said Sudan would "fully commit to what has been issued in the resolution about stopping hostilities with South Sudan according to the time limits issued".
It added that it hoped the "other party will commit to stop the hostilities completely and withdraw its troops from the disputed areas so as not to put SAF [Sudanese Armed Forces] in a situation where it has to defend itself".
Under the roadmap, the two countries have until next Tuesday to restart negotiations and three months to reach an agreement.
Our correspondent says that while both countries have now committed themselves to the roadmap, they have also accused each other of new attacks.
In its statement, he says, Sudan pointed out the numerous ways in which it considers it has been attacked by South Sudan in the last few days.
Meanwhile, South Sudan said that Sudanese warplanes had bombed a military position in Unity state, and said that there had also been a ground attack.
The latest crisis began last month when the south seized a disputed oil field at Heglig.
Disputes over the sharing of oil revenue is a major cause of conflict between Juba and Khartoum.
South Sudan took most of the oil reserves when it seceded in July 2011, but relies on pipelines to seaports in Sudan for distribution.
The South seceded from Sudan as part of a 2005 peace treaty following two decades of civil war in which some 1.5m people died.