Traffic engineering (TE) is a mechanism to use network resources more efficiently. Because bandwidth is one of the most important requirements of these applications, network hardware development cannot eliminate the need for bandwidth management techniques. Network operators use TE to achieve different objectives such as load balancing, congestion avoidance and average delay reduction. TE with the objective of load balancing can reduce maximum link utilization (MLU) and increase bandwidth efficiency (BWE). Because considerable delay may occur at congested links, reduction of end to end delay could be considered as a side result of load balancing. One approach for analyzing the TE problem is formulating it with optimization theory problems. If we consider load-balancing as an objective of the optimization problem and consider the amount of traffic load on all links that belong to specific session as the problem outcome, the solution of such problem is the path of each session that causes minimum congestion. Destination-based routing is not manageable and so it is highly susceptible to congestion. Because of this reason the concept of TE was developed in MPLS-based networks but Support explicit routing in these networks is difficult. The main idea of IP-based TE is to find a set of weights that optimizes a specific objective function. Plane IP routing protocols such as OSPF, a popular intradomain routing protocol, are believed to be insufficient for TE. OSPF is based on the shortest path algorithm in which link weights are set using the inverse proportional bandwidth capacity. Optimization theory helps network researchers to analyze the network behavior more precisely. But this approach lacks feasibility facts. These attempts result in a new definition such as equivalent weight set and equivalent constraints. We define a new optimization problem this thesis proposes that to address the feasibility requirements a weight set can be calculated in order to be used as a link metric in OSPF. Linear programming algorithms help us to propose a traffic engineering method that satisfies practical requirements of the methods. Also, IP based TE method can be used for LSP setup phase in MPLS network. So IP based TE can help MPLS based TE. In this thesis we analyze the optimization problem from feasibility perspective and show that a set of link weights that can be embedded as a link metric in OSPF protocol result in optimal or near optimal load balancing. Our simulation in this thesis verifies the network performance in both IP and MPLS and shows that our new method improves bandwidth efficiency and reduces network congestion. Key Worlds Traffic engineering, IP network, MPLS network, Linear Programming, Optimization