IRAQ KNOWS exactly what it's doing. The United States and Great Britain protest that its renewed attacks on oil tankers in the Persian Gulf, and the Iranian response, are raising tensions. That's quite right. The long war with Iran has brought Iraq into terrible danger -- never mind who started it -- and the Iraqis think that the larger countries are not doing nearly enough to stop it. Most of the fighting is on land -- infantry and artillery combat reminiscent of World War I. It's a war of attrition in which the Iraqis are outnumbered three to one. They are entrenched behind massive fortifications, but they are on the defensive, and desperate to bring it to an end. That's why they have reopened the tanker war. They want to make the Gulf much more dangerous for everybody and force the United States to impose a settlement.

That raises the chance of an attack on American naval ships. What will the United States do in response? The Reagan administration has given no clear answer to that question, and it's unwise to let the present uncertainty persist. Neither friends nor adversaries ought to be left in any doubt about the consequences. Confusion about American aims increases the danger to the ships; precision and clarity reduce it.

President Reagan was right to send American warships into the Persian Gulf. He has built a large Navy, and that's what the Navy is for -- to protect American interests abroad. The United States has the strongest of interests in preventing Ayatollah Khomeini's xenophobia from dominating the Gulf region. Among other things, the Iranians want to push up the price of oil, and if they can establish themselves as the military masters of that part of the world, the Arab oil-exporting countries will have to follow their lead. The Saudis survive by accommodating power. Late last year, as it became clear that the United States was selling arms to Iran, the Arabs got a little closer to Iran and oil prices rose. Then when the United States returned to its previous policy of favoring Iraq, oil prices stabilized. Saudi Arabia will lead the opposition to Iran only as long as the U.S. Navy is visible on the horizon.

Now that the Navy is in the Gulf, there is one thing it cannot do -- and that is to pull out. The Iraqis are right about one thing: the war has to be brought to an end, and not just the tanker war. So far, that's only a minor part of it. The serious fighting -- far more destructive, far more deadly -- is the war on land. That, if it continues, will decide whether Iran is to succeed in imposing its will and its suzerainty on the Arab states of the Persian Gulf