Shaping: Shaping is used to control the traffic flow by buffering excess packets during periods of high demand and then releasing them at a rate that conforms to the desired profile. In this case, shaping can be employed to ensure that each subnet receives no less than 10 Mbps during peak traffic times. Policing: Policing is used to enforce traffic policies by discarding or remarking packets that exceed specified rate limits. In this scenario, policing can be employed to ensure that a subnet does not exceed its allocated bandwidth (40 Mbps) during non-peak times.