Judge Daniel Nishigaya, in a hearing crowded with news media, imposed the sentence on the 24-year-old Smith, who pleaded no contest on May 21 to charges of possessing three assault rifles in 2012 and driving while over the legal limit for alcohol last year.
Smith had faced a maximum sentence of four years and four months in prison on the charges, according to the District Attorney's Office.
He was sentenced to three years' probation for the DUI charges in addition to the 11 days in the work program in lieu of jail time.
Prosecutors did not make a deal with Smith to plead to reduced or fewer charges, but Smith did agree in May to change his previous not guilty pleas to the felony and misdemeanor charges to no contest, according to Santa Clara County Deputy District Attorney Brian Buckelew said.
Smith decided not to contest charges he possessed three assault rifles, a .308 caliber Armalite AR10-T, Bushmaster ARC for 5.56mm bullets and a .223 caliber Bushmaster Carbon-15 in his rented home in an unincorporated area outside of San Jose in 2012, prosecutors said.
In the DUI case, Smith was arrested last Sept. 20 on suspicion of DUI and marijuana possession after he drove his car into the front lawn of a suburban home in San Jose and crashed his car into a tree.
Smith, who was not injured, was released after posting bail. Prosecutors did not filed charges related to the marijuana.
He then entered a rehabilitation program for alcohol abuse, was placed on the nonfootball injury list by the 49ers and missed five games after his DUI arrest.
On Oct. 9, he turned himself in at the sheriff's office in response to a warrant for his arrest on the assault rifle charges. He was released on $75,000 bail. The 49ers activated him to resume playing in the 2013 season two days later.
In 2012, sheriff's deputies seized Smith's three rifles -- which Smith bought in 2011 in Arizona, but are illegal in California -- as part of an investigation into an unruly party at his home where gang members showed up and two guests were shot and wounded.
Deputies also recovered large-capacity magazines of bullets on the floor of Smith's bedroom and other live and expended bullets of various calibers in his bedside table.
During the 2012 party, someone fired a shot into Smith's garage and then Smith himself fired two shots from a .45 caliber handgun into the air to disperse the crowd of hundreds of people outside.
Also attending the party were 49ers player Chris Culliver and former team player Delanie Walker, who also fired a gun into the air in an attempt to encourage the crowd to leave.
At one point, while Smith stood in his driveway to tell the crowd to leave, Steven Raymond Barba, 28, an alleged member of the Norteno criminal street gang, came forward and stabbed Smith in the chest.
The wound to the muscular 49ers linebacker was only superficial and Smith was not badly hurt.
On Monday, Barba, who was convicted last month of assault with a deadly weapon in Smith's stabbing and unrelated gun charges, was sentenced to three years of parole after serving about 560 days in county jail and receiving enough credit to quality for parole, prosecutors said.