Charlie Gilmour was accused of throwing a bin at a convoy of cars containing Prince Charles, sitting on a security officer's car and smashing a window during a day of riots in central London last year.
He was among thousands of people who protested in Trafalgar Square and Parliament Square on 9 December over the decision to treble to tuition fee cap to £9,000.
The 21-year-old University of Cambridge student was photographed hanging from a Union Jack flag on the Cenotaph during the march, an incident for which he later apologised.
Kingston Crown Court heard he had taken LSD and valium before joining a 100-strong mob which smashed windows at Oxford Street’s Top Shop.
He was later seen leaping on to the bonnet of a Jaguar car that formed part of a royal convoy containing the Prince of Wales and Duchess of Cornwall and hurling a rubbish bin at the vehicle.
The car carried royal protection officers accompanying the couple as they were chauffeured up Regent Street in a Rolls-Royce to a Royal Variety Performance.
He was filmed shouting: “They broke the moral law, we're going to break all the laws.”
Gilmour's barrister David Spens QC said he was “thoroughly intoxicated” and had no recollection of throwing the bin.
Gilmour, who is a second year history undergraduate at Girton College, Cambridge, admitted violent disorder at a hearing in May and was bailed to allow him time to finish his exams.
Passing sentence, Judge Nicholas Price QC accepted that Gilmour's behaviour at the Cenotaph did not form part of the violent disorder, but accused him of disrespect to the war dead.
“Such outrageous and deeply offensive behaviour gives a clear indication of how out of control you were that day,” he told the student. “It caused public outrage and understandably so.”
Gilmour claimed he had not realised the significance of the memorial - an excuse the judge rejected.
“For a young man of your intelligence and education and background to profess to not know what the Cenotaph represents defies belief,” he said.
“You have shown disrespect to those who gave the ultimate sacrifice, to those who fell defending this country.”
In a statement released following sentencing, Girton says: "The college notes the gravity of the offence and is firmly opposed to public disorder. Due legal process has been observed, and Mr Gilmour has been tried and sentenced accordingly."