A Cabinet committee has discussed how to grant amnesty to aliens who have lived in the United States illegally for a substantial period of time.

Labor Secretary Ray Marshall and Atty. Gen. Griffin B. Bell said committee members agreed that illegal aliens who have been in this country for a period of years should be allowed to stay.

"We start from that premise," Marshall said. "There was universal agreement that we won't have a roundup."

Marshall, Bell, Under Secretary of State Warren Christopher and Joseph A. Califano Jr., secretary of health, education and welfare, met privately at the Justice Department to discuss immigration policies to recommend to President Carter. Marshall and Bell spoke with reporters afterward.

Committee members agree something should be done "to legalize the residency of people who have been here for some lengthe of time," Marshall said.

The group has not yet decided on the length of residency which would entitle illegal aliens to legal status, he added. In addition to the length of residency, such other factors as the illegal alien's record of holding jobs, paying taxes and obeying the law probably would be considered, Marshall and Bell said.

The plan also would require a cutoff date, making the amnesty available only to those who came into the United States before that date, Marshall said.

He suggested the cutoff date might be set at three, five or seven years ago.

The committee has no way of determining for certain how many illegal aliens could gain legal status through this procedure. Marshall continued. "We don't even know how many are here."

The Immigration and Naturalization Service has estimated there are from 6 million to 8 million illegal aliens in the country but there are no statistics on how many have been here for various periods of time.

In drafting ways to grant many of them legal status without criminal penalties, the carter administration is following up on a recommendation issued by a domestic council committee in the final weeks of the Ford adminstration.

That committee said it would be inhumane to try to apprehend and deport the thousands and probably millions of illegal aliens who have lived and worked in the United States for years.

Carter's Cabinet officers discussed various options for stopping the flood of aliens continuing to pour into the country illegally, most of them from Mexico. Marshall said the options include spending more money on enforcing immigration laws, dealing in some way with the job shortages and othe conditions in Mexico which cause Mexicans to migrate north, and "doing something to stop the hiring" of illegal aliens by U.S. employers.

But he and Bell said the committee has reached no consensus on legislation proposed several years ago which would make it a crime for an employer knowlingly to hire an illegal alien.