In classical models of inventory and production control, it is assumed that all production machineries in various stages produce items with no defect and the quality of output of production stages are equal. But in practice, due to several reasons like the error of machinery and operators of productions, the performance quality of the production processes fluctuates during the time and producing the low quality and defective items is inevitable. On the other hand, producing defective items which may be reworked or deposed, have a direct and significant effect on optimal lot sizing and related costs. Hence, in problems raised in practical supply chain systems including different levels like supplier, manufacturer and customer, the defective production of items have been considered increasingly in recent years. In these systems, generally it is assumed that the low quality products are returned to the prior level in production process and they come back in manufacturing system again after passing a rework cycle. In this situations, modeling the problem and determining the optimal polices in inventory and production planning, like optimal lot sizing, are of the great concern of production managers. In this paper, an extended version of economic production quantity problem (EPQ) in which a final product consisted of two parts is considered. In this problem there is a dual echelon supply chain which includes the parts suppliers in first level and the final product producer in the second one. In both echelon, it is assumed that the production process accomplishes with a positive defective rate which may be different for parts and final product. In this study, production rate and rework rate is limited, demand is continues, and shortage is not permission. We model the problem with average cost approach and determine the optimal lot. The model validate with illustrating numerical example. Finally, we analysis sensitivity of cost depending on inventory and economic lot size according to change in defective production, rework rate, and production rate.