A man with special credentials, Gen. William C. Westmoreland, former Vietnam war commander, said yesterday that the Soviet Union made a "strategic mistake" by invading Afghanistan.

Westmoreland, in a telephone interview, said the Soviets were doing fine under the game plan of letting Cubans fight their battles for them outside the Warsaw Pact countries.

But the retired general predicted that, by departing from that plan and going into Afghanistan, the Soviets will pay a heavy price as their forces run into many of the same problems that plagued the U.S. military in Vietnam.

While Westmoreland drew the Vietnam parallel, other military leaders who were interviewed, most on active duty and not willing to be identified, made these points:

Soviet forces seem intent on stabilizing the political situation in Afghanistan to the Kremlin's liking rather than conducting the first phase of a more ambitious undertaking, such as an eventual southward drive to abtain a warm-water port on the Iranian or Pakistani coast, as some have speculated.

The invasion was an impressive display of Soviet ability to airlift heavily armed troops long distances, but should not be compared to the 10,000-mile thrust the United States made to Vietnam.

"Damned impressive show," said Adm. Harold E. Shear, commander of allied forces on NATO's southern flank. Another general with extensive Vietnam experience said, "Don't compare it with Vietnam. Remember that Afghanistan is just across the Soviet border."

Anti-Soviet forces in Afghanistan have yet to do much damage, but the big test for them and the Soviets is still to come as supply lines lengthen and Soviet troops become scattered through the countryside in more vulnerable positions.

The Soviet Navy is keeping its normal tempo during the Afghanistan operation, as evidenced by the sending of five warships into the Mediterranean last week to keep the Soviet fleet up to strength there.

In elaborating on the parrallels of Afghanistan with Vietnam, Westmoreland theorized that the Soviet leadership found itself "between the devil and the deep blue sea" as it watched the Afgan political situation deteriorate. The leaders, he continued, evidently concluded that the Soviets' political needs outweighed the military costs.

Westmoreland predicted those costs will be heavy because the Afghan guerrillas will be able to use Pakistan as a sanctuary while they conduct hit-and-run operations against the Soviets. He said that this strategy proved costly to American forces when the Viet Cong and North Vietnamese used it in Vietnam, Laos and Cambodia.

The former Vietnam commander also said that Soviet troops in Afghanistan will soon be at the end of a vulnerable supply line as they run out of their initial stores of ammunition and food and will find logistics increasingly difficult, especially if rebel forces prove effective.

Pentagon leaders are mapping plans to capitalize on Soviet military volnerabilities in Afghanistan. One plan is an effort to ally the United States, Saudi Arabia, Pakistan and China in supplying anti-Soviet forces in Afghanistan with modern weapons.

Saudi Arabia has expressed interest in supplying such weapons, either directly or by paying for those supplied by another country, according to administration sources. But the Saudi connection is not expected to be made public by the Carter administration officially. Any Pentagon effort to supply American weapons to the Afghan rebels runs into congressional restrictions.

Defense Secretary Harold Brown is in China, where he will discuss with Chinese officials plans for strengthening anti-Soviet forces in Afghanistan as well as for shoring up Pakistan's defenses.

Afghanistan also has provided an extra thrust for efforts by the Joint Chiefs of Staff to find what they call "a network of bases" for the Rapid Deployment Force President Carter has decided to organize. This force would be equipped to respond quickly to crises in such distant spots as the Persian Gulf and East Africa.

The bases the chiefs have in mind would be in addition to rights of access for U.S. forces to airfields and ports in East Africa and the Persian Gulf regions.

Although not advertised by the State Department in discussing the recent swing of a State-Pentagon team through Kenya, Somalia and Oman in search of access rights, a representative of Joint Chiefs went along to describe the separate network of bases sought for the Rapid Deployment Force. The force is expected to be ready for duty in 1982.

in another move to increase the U.S. military presence, the Joint Chiefs have drafted a request for about $170 million to build up the U.S. Navy facilities on the British island of Diego Garcia in the Indian Ocean.