Limit Bandwidth using Ubuntu Server

view story

http://serverfault.com – Intro - We are planning on applying for Bandwidth-on-Demand from our ISP which gives us upto 8Mbps of data upsteam/downstream. If we exceed the allowable bandwidth the ISP will bill us for additional cost per Mb of data exceeded. Question - is there a way to setup an ubuntu server to limit the total upstream and downstream bandwidth on the internet facing interface (uplink) to 8Mbps? Additional info - the server will also work as a gateway server distributing traffic to four subnets each with his own interface. (HowTos)