About 2,000 students from colleges around the country rallied on the steps of the Capitol yesterday afternoon to protest what some called the Reagan administration's "vicious" attack on student financial-aid programs.

Earlier, hundreds of the students spent the day lobbying their senators and congressmen for restoration of proposed cutbacks in some student grant and loan programs and to press for repeal of other new restrictions on financial-aid eligibility.

Chief among their concerns, however,was a recently enacted measure that requires all male students aged 18 to 21 to register for the draft in order to qualify for federal financial aid. Dozens of the students spoke out against the law at a hearing before the National Commission on Student Financial Assistance.

Craig Shelton, a junior at Xavier University in New Orleans and president of the student government there, told the Congressionally-mandated commission that the law is discriminatory. "It singles out needy male students and it's unconstitutional," he said.

At the rally later, student leaders declared that the Reagan budget proposals would sharply reduce the amount of federal aid most students could receive and prevent many from receiving any aid at all. The leaders said also that they feared the proposed cutbacks and restrictions, coupled with the rising cost of attending college, would make higher education something that only the rich can afford.

"We students are the scapegoat of this administration and we resent that," said Meg Jenkins, vice president of the United States Student Association, which organized the event. "The dreams of student protestors of the '60s are gone, but they left strength and determination that lives on today."

Standing on a marble stairway with the Capitol dome in the background, Jenkins looked down on the boisterous, chanting students, who applauded and waved placards as she spoke.

The cheers of the students reached a peak when Howard University Student Association president Howard Newell took the microphone and told them that the fight for student aid is only part of a bigger struggle. "We must tell this administration that we are against the vicious arms build-up . . . against exploitation, against apartheid . . . against this vicious system that Ronald Reagan has created."

The crowed responded with the chant: "We're fired up! We're fired up! We're fired up!"

Gwen McKinney, an organizer of the one-day event--called National Student Action and Lobby Day--said most students who took part were members of one of three major groups: The USSA, the National Organization of Black University and College Students and the National Coaliton of Independent College and University Students.