Top Carter administration officials warned D.C. Mayor Marion Barry yesterday that any violence resulting from a planned march and rally by Iranian students here today could further endanger Americans being held hostage in Iran.

The White House did not specifically ask that the city cancel the student's permit to march and demonstrate in downtown Washington, but two federal agencies, the Park Police and Capitol Police, revoked permits for additional demonstrations by the Iranians. Both agencies said they acted on strong advice from the State Department.

But Barry, clearly reluctant to rescind the Iranians' demonstration permit, met yesterday with White House chief of staff Hamilton Jordan, Attorney General Benjamin Civiletti and White House chief counsel Lloyd Cutler to discuss other possible options.

White House spokesman Jody Powell told reporters that Secretary of State Cyrus R. Vance had warned President Carter that "the situation is so delicate that any demonstration would pose a clear and present danger to the Americans in Iran."

Other federal and local officials expressed fear that the march, scheduled to cover several dozen blocks through the center of the city, might prompt spontaneous incidents of violence by the students or by spectators angry about the American hostages.

The growing concern here was apparent yesterday when more than 200 District of Columbia police officers surrounded a small rally of about 30 Iranians who gathered in front of the Immigration and Naturalization Service at Vermont Avenue and L Street NW.

The Iranians are demanding the extradition of deposed Shah Mohammad Reza Pahlavi to Iran.

The shah is in New York undergoing treatment for cancer.

Their shouts of "Death to the shah" and "Long live the ayatollah" were met by cries of "Go home, go home" by Americans who passed by.

A White House aide and city officials indicated yesterday that the Carter administration at least would like the march sharply curtailed or kept away from the State Department and the White House, both of which are on the Iranians' planned route.

When asked if the president wanted the demonstration banned, the aide replied: "The White House does not tell the mayor what to do."

Barry, a former civil rights activist and veteran of many marches, said last night he recognized the "sensitivity of the situation" in Iran and also the constitutional rights of political protesters.

"Whatever the cause, no matter if you don't like it, you can't arbitrarily cut it off." Barry said late last night.

"I asked for the meeting [at the White House]," Barry said. "We need to see what all the options are. This has never happened in the District before in terms of the sensitivity of the international situation." Barry said he asked for the meeting after Civiletti had telephoned him Wednesday night and Jordan called him yesterday.

Barry said he saw a "clear difference" between Lafayette Park as federal property and "the streets of Washington, D.C." as local property.

he sutdents' permit canceled by the park police was for a demonstration to be held in Lafayette Park.

D.C. Deputy Police Chief Robert Klotz head of the department's special operations division, met until past midnight last night with student leaders in an effort to arrange a compromise on the size and route of the planned march.

An aide to Barry said, however, that because of "the delicacy" of the situation," the mayor will not announce his decision until later this morning.

Klotz told reporters yesterday that the city is "ready for any demonstration." Leaders of the Moslem Student Assoication, which obtained the permit earlier this week, estimated that the march and rally may attract as many as 3,000 demonstrators.

The zig-zag pattern of the march, taking the demonstrators several times in front of the White House, is a "logistical nightmare" one officer said. More than 50 crossings of intersections will take place in the march which begins at 10 a.m.

The march includes stops of 20 minutes each at the National Press Building at 14th and F streets NW and the State Department at 200 22d street. It is scheduled to start at Vermont and K Streets before winding up at Farragut Square where the demonstrators' permit expires at 6 p.m., Klotz said.

On Nov. 15, 1977, rival demonstrations here by Iranians supporting and opposing the shah ended in bloody violence in the streets around the White House. At least 96 demonstrators were injured as members of the rival groups attacked each other; 28 police officers were injured, some seriously, trying to restore order.

Three weeks later, in an action unprecedented at the time, park police refused to permit a group of anti-shah students to demonstrate at Lafayette Park. Later that week, however, the District allowed the students to conduct a march and protest rally near the Iranian Embassy. This demonstration was peaceful.