Odd-even gasoline rationing rules went into effect at 12:01 a.m. today throughout the Washington metropolitan area.

The decision to go ahead with the staggered sales plan - last used in this area during the Arab oil embargo five years ago - was taken yesterday as long lines of motorists continued to form outside area service stations.

While gas lines at some stations were shorter yesterday than they have been in more than a week, District Mayor Marion Barry, Maryland Gov. Harry Hughes and Virginia Gov. John N. Dalton felt the odd-even plan still was necessary.

"We view this as the most substantial possible action the District can take to relieve the frustrations, traffic congestion, delays in service and other problems which have resulted from the gasoline shortage in the District," Barry said.

Simply stated, the odd-even plan provides that:

On odd-numbered weekdays, such as today, the 21st, cars with license tags ending in odd number can buy gas.

On even-numbered weekdays, beginning Friday, the 22nd, cars with plates ending in even numbers, including zero, and those with personalized tags or tags with letters only, can buy gas.

On Saturdays, Sunday, holidays and the 31st of each month, anyone who can find an open station can buy gas.

Penalties for violating the odd-even plan vary among the jurisdictions. In Maryland, violators can be fined up to $100. The District order empowers the mayor to ask for fines of up to $1,000 for violations, but Barry said he will not invoke fines unless the voluntary system fails. No penalty was provided in the Virginia order.

Hughes and Barry both said yesterday that they also are attempting to come up with plans to stagger service station hours and encourage more stations to remain open weekends.

Barry said he hoped to announce plans Friday for staggered hours for the 325 service stations in the District. The mayor has the authority to order staggered hours, "but we don't want to do that," he said at a news conference yesterday. "We hope it is voluntary."

Hughes said he had asked the Maryland Energy Policy Office to come up with a plan, in cooperation with service station operators, to stagger the hours that stations will be open in Maryland.

He also said a portion of Maryland's emergency set-aside supply of gas will be used to encourage more stations to remain open on weekends.

Beyond the new odd-even rules, a new flag system also will go into effect today that should show motorists at a glance what kind of gasoline, if any, is available at the area's 1,500 stations.

A red flag flying outside a station will mean no gas, yellow will mean that only leaded gas is available and green will mean that all grades of gasoline are on sale.

Metro bus and rail systems yesterday were again jammed with passengers who turned to public transportation because of the gas shortage.

Adding to the public transportation jam was the derailment of an eightcar Metro train at the National Airport station yesterday. The derailment occurred just before the start of the morning rush. No one was hurt.

Meanwhile, D.C. cab drivers seeking higher fares to cope with rising gas prices continued their protest yesterday with a slow moving motorcade through downtown Washington during the evening rush hour. (Related story B5. )

While long gas lines continued to be the order of the day yesterday, motorists in some cases seemed delighted with waits that would have been intolorable a month ago.

William Henson, who said he waited an hour and a half for a fillup at the Gulf Station at 38th Street and Rhode Island Avenue NE last week, exulted that it "took him" only 40 minutes yesterday.

But motorists in downstate Virginia - which has been less affected by the shortages and where the odd-even plan does not apply - seemed less reconciled to their growing difficulties.

In Norfolk, a hatchet-wielding man and his wife struggled with another customer while waiting in line for gasoline. Witnesses said the fight started after a third man used his car to bump the car of one of the two.

The man with the hatchet was disarmed and no one was injured in the 10-minute melee.

As in any crisis, some entrepreneurs have figured out a way to make money on it. One young person placed a classified advertisement in today's editions offering to car-sit in gas lines. And in Bethesda, in the area near Landon School, teen-agers have been going door-to-door offering to sit in gas lines for a $4 service fee.