Branch network is connected with DC through two point -point leased lines of different bandwidth . I want both links to be in active -active mode. How can use both link in active -active mode we are using OSPF as routing protocol..
There are a few points to consider when attempting load balancing.
For Cisco routers at least, you have the option of per-flow load balancing, where the first stream of data will use only one link and the next stream will use the next link, with streams alternating between the two; and per-packet load balancing where each ip packet uses a different link.
Per-packet load balancing will cause lots of problems, as @ronmaupin explained in the comment.
You can do per-flow (the default setting on the router), but there still are problems:
- Since all the packets of a flow take the same path, if that flow exceeds the bandwidth of the link, you will drop packets. In other words, the available bandwidth for a single flow is no more than the bandwidth of a single link. Since you don't know which link will be chosen, you have to assume it might be the slower link.
- If a flow is sent over one link (e.g. the slower link), that link could be saturated even though there's plenty of bandwidth on the other link.
- OSPF on Cisco routers can only do equal-cost load balancing, where flows alternate equally between the links). With links of different bandwidths, you don't want that. The EIGRP protocol can do proportional load balancing, but it's a bit complicated to set up.
- You have to consider that traffic flows in both directions. Each router makes an independent decision on which link to use. The router at site A may choose the fast link to send traffic to site B, but the B router may choose the slower link for the return traffic. Depending on the circumstances, this may be a problem.
As explained by Ron Maupin in comment, doing Equal Cost Multipath Routing (ECMP), especially with different bandwidth, may cause issue.
(But it is supported by some OSPF implementation, including Cisco one.)
What you could do is use Policy Based Routing (PBR) to have some kind of traffic routed over a link and other traffic routed over the second link, with fallback.
To do this with a routing protocol you will likely need some kind of VRF.
The exact way to do it is very dependent on the functionalities available on the routers used.