The U.N. Security Council yesterday set in motion the machinery for Namibia (Southwest Africa) to gain its independence from white-dominated South Africa - a breakthrough in the West's search for peaceful solutions to racial conflicts in the region.

However, a shadow was cast over the proceedings by South African Foreign Minister Pik Botha who said his government still has reservations about plans for dealing with a disputed port area. Botha added that he would have to consult his government further before making a final judgment.

Earlier, the council's action touched off a flood of oratory about how the Namibia agreement can point the way for other African countries to solve their racial problems without bloodshed. Peaceful solution of the Namibia question through a plan calling for U.N. surpervised elections has been regarded as a triumph for U.S. diplomacy.

Secretary of State Cyrus R. Vance, summing the attitude of the west, told the council:

"In my government's view, the importance of what has been achieved has implications which go far beyond the Namibia problem itself. The successful resolution of this international issue can encourage solutions for other pressing problems of Africa, particularly in the case of Rhodesia. There the same spirit of goodwill and compromise exhibited by the parties in Namibia could create a basis for a peaceful settlement."

Namibia, formerly known as South West Africa, is a sparsely populated, but mineral-rich territory twice the size of California that South Africa began governing after World War I under a League of Nations mandate. The United Nations, which assumed League mandate authoriey, revoked the one for Namibia.

The territory's back population has sought independence for more than 30 years. For the past decade, it has been the scene of bitter guerrilla warfare between South African troops and the guerrilla forces of the Southwest Africa People's Organization (SWAPO).

The plan for its independence resulted from an unprecedented diplomatic effort that brought together the five major Western powers and the five so-called front-line African states, including two Marxist countries, Angola and Mozambique. Through pressure, persuasion and long negotiations, they won agreement from the opposing sides earlier this month.

What the Security Council did was to give the formal endorsement of the international community to the agreement by approving two resolutions - one establishing the mechanisms for Namibian independence and the other setting aside for the time being the principal unresolved issue in the conflict.

That sticking point involves the status of Walvis Bay, the territory's deep-water port.Namibian black nationalists insist it must be part of an independent Namibia, but South African claims it is historically and legally part of its territory and has demanded permanent sovereignty over the port.

The West's proposed solution was to make Walvis Bay the subject of a seperate resolution declaring that "the territorial integrity and unity of Namibia must be assured through the reintegration of Walvis Bay within its territory." But the resolution added that the Security Council "decides to remain seized of the matter until Walvis Bay is fully reintegrated into Namibia." The Security Council accepted this proposal.

Vance read a statement on behalf of the United States and the other four Western countries involved in the Namibia negotiations: Britain, France, West Germany and Canada. He said the five "recognized that there are arguments of a geographic, political, social, and administrative nature which supports the union of Walvis Bay with Namibia."

He added, however, that five nations interpret the deliberately ambigious language of the resolution as meaning that the future status of Walvis Bay will be a subject of further negotiations between South Africa and Namibia and that the resolution "does not prejudice the legal position of either party."

When Botha addressed the council he said that had the West accepted the Walvis Bay resolution without reservation, South Africa would have withdrawn from the agreement. However, he added, in view of Vance's qualifying statement, he would refer the matter back to his government for a final decision.

On the other side, SWAPO's leader, Sam Nujoma, told the council that his people considered the port vital to their safety and territorial integrity and warned "We will take up arms that safety and integrity is threatened."

The Walvis Bay resolution was passed by unanimous vote of 15 Security Council members. The other resolution affirming Namibia's independence received 13 yes votes, with two and Czechoslovakia, abstaining.

Their abstentions indicated that the accord is considered a blow to the Soviet bloc's hopes of increasing its influence in Africa - a drive that has been one of the major causes of tension in recent U.S.Soviet relations

Rhodesia is regarded as a potential flashpoint for escalating violence possibly involving the Soviets and their Cuban allies in behalf of guerrilla forces fighting the transitional government there. This has led the Carter administration to hope that the Namibia agreement will put added pressure on Rhodesia's leaders to take part in a Western-sponsored peace conference with its guerrilla adversaries.

For that reason, Washington puts tremendous effort and emphasis on the Namibia problem. Its outcome was a personal triumph for the principal U.S. negotiator, Donald McHenry, the deputy to U.N.Ambassador Andrew Young. McHenry spent 15 months crisscrossing Africa in a tireless effort to bring the many countries and parties involved into agreement.

The plan provides for U.N. supervised elections in Namibia for a constituent assembly that will draw up a new constitution. The assembly would also prepare the country for independence under a black majority government by the end of this year.