The scrapy infighter in John B. Anderson took over the podium of his presidential campaign today and delivered a caustic oration on the evils of Jimmy Carter and Ronald Reagan.

Carefully measuring the minutes spent denouncing each major party opponent, the independent presidential hopeful said:

"Mr. Rreagan isn't even a man for the 1950s. He is reallly a man of the 1920s . . . Mr. Reagan is irrelevant. That's the sum total of what he's said in this campaign. He's irrelevant."

Carter, the Illinois congressman said, cammpaigned as an advocate of nuclear arms control four years ago and "now says nuclear war is winnable.

"He says we're going to develop kinds of weapons so precise and so sugical that can zero in on silos and command centers. We'll lob a few at them. And back and fourth. And somebody is going to win."

His voice lowering, Anderson added, "We're not going to fight that kind of war unless we want to destroy life on this planet as we know it."

It was the most biting and personal attack on his two opponents Anderson has made in months.

Later he said at a news conference that he had based his criticism of Carter on the recently disclosed signing of Presidential Directive 59, which calls for targeting nuclear attacks on defense installations in the Soviet Union.

Anderson's Labor Day attacks on Reagan and Carter came before a crowd at a Jaycees auction in the white-collar suburb of Park Forest, south of Chicago.

Earlier, he and his vice presidential running mate, Patrick J. Lucey, had marched in a Labor Day parade in the traditional Democratic stronghold of Calumet City. They received a warm, if not overly enthusiatic, reception.

The attacks are part of a standard stump speech Anderson aides have been trying to get the candidate to make at each stop. He tried some of them out Saturday night before students at the University of Wisconsin in Madison.

The new Anderson litany begins with mocking admiration for Reagan's skill in giving soothing, one-line answers to questions.

Referring to Reagan's long career as a movie actor, Anderson said the Republican nominee had obviously perfected the skill of "being able to flick off one-liners" during "his many years before the camera."

Reagan has long advocated a program calling for a 30 percent cut in taxes, major increases in defense spending and a balanced federal budget that Anderson, in a one-liner of his own, said can only be done with mirrors."

'i still don't think any one-liner will supply the answer to that one question, Mr. Reagan: How are we going to do it? How are we going to do it?"

After spending five minutes attacking Reagan, the Illinois congressman shifted to Carter.

"He hasn't kept his [campaign] promises. He hasn't provided the kind of leadership this country needs. He hasn't rallied Congress or our allies," he said.

Carter, he said, has one accomplishment: "He planned a recession, and, by golly, it worked."

The recessiion, Anderson said, bears the "label of 'Made in the Federal Reserve Board' with some of the high interest rate policies that represent the only visible economic architecture of the Carter administration."

Anderson said his own anti-inflation policy rejects tax-cut proposals advocated by Reagan and Carter and calls for a gathering of labor and management officials to draw up voluntary wage and price guidelilnes. The guidelines would be enforced by tax breaks for businesses that agree to go along with them.

In his speech before a crowd of about 350, he also praised Polish strikers as "brave workers," adding "I hail the heroics of those workers who stood up to risk being sent to concentration camps."

Anderson's appearance at Callumet City's annual Labor Day parade was a symbolic visit into one of this area's Democratic strongholds, the kind of place where Anderson must gain a foothold if his long-shot independent presidential campaign is to succeed.

He was greeted politely as he and his wife, Keke, made their way on foot dodwn the mile-long parade route shaking hands, signing autographs and posing for photographs.

Many people interviewed along the route said they will support him even if it means deserting their own party. "I am sick and tired of Carter and I don't think Reagan can handle the job," said John Plug, a mechanic, as he sipped beer.

Calmet City Mayor Bob Sefaniak, a Democrat, explained the reception this way: "We like high-class politicians." He invited Anderson to join him atop a reviewing stand and held the congressman's hand high in the air a traditional sign of unity.

At the end of the route, Anderson met Gov. Jim Thompson, a fellow Illinois Republican. Thompson praised Anderson's selection of Lucey, a former Democratic governor of Wisconsin, as a running mate. But he predicted that Anderson would run third in voting in Illinois.

Asked why Anderson would finish third, Thompson replied: "Because Ronald Reagan will finish first and Jimmy Carter will finish second."

Anderson and Lucey will continue a five-day swing through the Midwest Tuesday with separate visits to cities in Michigan. The trip began Saturday in Milwaukee and Madison, Lucey's home.