mark as green and if incoming traffic is between committed information rate and peak information rate (PIR) then first few packet marked green and then orange. If incoming traffic is above Peak information rate then that packets gets discarded and that packets colour as red. QOS OPTIMIZATION The network bandwidth provided by a wired/wireless network link is limited. When a network flow passes through the network link, it consumes some or all of the limited network bandwidth. Usually, the network administrators do not manage the bandwidth usage of each flow because manually changing network devices setting on demand is error-prone and the response time to demands is usually too long to satisfy needs on time. In the case that several flows pass through the same link, consume all the limited bandwidth and each flow still needs more bandwidth, the bandwidth bottleneck occurs at the entrance of the congested link. In the following simulation, eight traffic-source nodes from Internet generate eight traffic flows to those eight traffic-destination nodes, located at a local area network (LAN), separately (i.e., node 11 to node 1, node 12 to node 2, node 13 to node 3, and SO on). Because the total link bandwidth from Internet is 80 Mbps (10 Mbps * 8 links) and the wired link bandwidth of the LAN is 1000 Mbps, no bandwidth bottleneck occurs at the entrance into the LAN. However, the wireless link bandwidth of the LAN is only 25 Mbps and is less than 80 Mbps. This causes the bandwidth bottleneck at the entrance into the wireless link. Because of the bandwidth bottleneck, the network packets sent from the eight traffic-source nodes are randomly dropped at the entrance into the wireless link (i.e., the access point device). As a consequence, the obtained receiving throughput of each traffic-destination node is unstable. The unstable receiving throughput may result in poor user experience on some real-time network applications, such as on-line video, video conference, etc In order to avoid the situation of unstable receiving t