A plan to set up a network of consumer banks in 25 states has presented federal regulators with the most massive challenge yet to laws prohibiting interstate banking and aroused near-unanimous opposition from the rest of the banking industry.

Bankers and state banking regulators attacked the plan here today when the Comptroller of the Currency began a series of hearings on the proposal by Dimension Financial Corp.

Dimension is the brainchild of five entrepreneurs who plan to offer banking and financial services to the upscale market through a chain of 31 institutions. Interstate banking is severely restricted by federal laws, but Dimension's founders claim they are exempt from those laws because they would set up "non-banks" that would not offer commercial loans and therefore would not be regulated as banks.

Proposed locations for Dimension non-banks include Bethesda and McLean, as well as Boca Raton, Las Vegas and Dallas and such other affluent communities as Newport, R.I. and Stamford, Conn.

Federal regulators have begun to ease the restrictions on banking across state lines and new interstate banking activity has been authorized in 15 states since the beginning of the year, the American Bankers Association says.

But Dimension's plans go far beyond present interstate networks and envision banks in more than twice as many states as the next most-widespread banking company, outraging most bankers.

Speaking for the ABA, L.A. Johns of Mount Pleasant, Mich., declared the plan "would create a new class of consumer national banks free from interstate restrictions and would tend to denigrate the value of all existing full service national banks."

Sidney A. Bailey, Virginia's commissioner of financial institutions, questioned whether Dimension would be able to offer its sophisticated clients high rates of interest on their deposits without making commercial loans. He said Dimension's claim that it will have a 5 to 6 percent spread between its costs of funds and its portfolio yield "defies logic."

New Jersey Banking Commissioner Michael Horn expressed the view of many witnesses when he acknowledged that the time may have come to end the last restraints on interstate banking, but that it should be done by Congress, not by regulators.

A planned Dimension non-bank in Newton, Mass., an affluent suburb of Boston, led a representative of the Massachusetts Urban Reinvestment Advisory Group to charge the organizers with engaging in "cruel mockery of the spirit of the Community Reinvestment Act," which requires banks to serve the entire community, rich and poor alike.

Despite the opposition, industry sources concede privately that the comptroller is likely to grant the application later this year or in early 1984.

Because of the controversy over "non-bank banks," the comptroller's office in April imposed a moratorium for the rest of the year on any new applications and declared that existing ones would be carefully scrutinized.

Today's hearing was the first of a series on the Dimension plan that is meant to air most of the public policy questions raised by interstate banking.

Speaking for Dimension's organizers, Daniel Carroll, a financial consultant from Ann Arbor, Mich., said the group plans to raise $50 million in capital to start its 31 banks. Once the application is approved Dimension would have 18 months to complete the deal. Carroll said the first offering would be a $15 million private placement, followed perhaps by a public offering.