0

Assume we have a following topology. R1 represents Router1, R2 represents Router2, R3 represents Router3 and R4 represents Router4.

Src represents the source Server.

Dest represents the destination.

There are 3 distinct paths to reach from Source server to the destnation.

R1--R2--R4 is path1, R1--R4 is path2, R1--R3--R4 is path3.

Assume, all of these are equal cost paths. BGP is running as the routing protocol and maximum paths is enabled for BGP.

Hence, we will have all the 3 paths to reach from R1 to R4.To be more precise, R1 will have all the 3 paths installed in the routing table, to reach R4.

Question1:

Let's say there is an application (which uses TCP) running on Src on port number 6811 and performing a transaction to destination on port number 53 for a period of 30 minutes.

So calculating the hash based on Source IP, Destination IP, Source Port, Destination Port and Protocol,we would get a unique hash value and this would be a TCP flow.

I believe that out of the 3 distinct paths mentioned above, only 1 of the paths will be used (even though we have BGP ECMP enabled). The remaining 2 paths will be unused since the hash value remains unchanged for those 30 minutes.

Is the above understanding correct ?

Question 2: Let's say there is another application (which uses TCP) running on Src on port number 6812 and performing a transaction to destination on port number 64 for a period of 10 minutes. (Note: source port and destination port have changed as compared to Question 1 scenario). So calculating the hash based on Source IP, Destination IP, Source Port, Destination Port and Protocol. We would get a unique hash value and this would be a different TCP flow. This hash value will definitely be different from the one calculated in Question1.

I believe that out of the 3 distinct paths mentioned above, only 1 of the paths will be used (even though we have BGP ECMP enabled). The remaining 2 paths will be unused since the hash value remains unchanged for those 10 minutes.

Is the above understanding correct ?

enter image description here

6
  • Looks like homework...
    – Zac67
    Dec 30, 2018 at 13:25
  • :) not, homework, i created the scenario on my own and trying to get clarity.
    – fsociety
    Dec 30, 2018 at 13:25
  • ECMP stands for "equal-cost multipath routing" - you've not mentioned the route costs at all...
    – Zac67
    Dec 30, 2018 at 13:28
  • already mentioned, all the paths are equal costs.
    – fsociety
    Dec 30, 2018 at 13:28
  • 1
    Paths or links of equal cost? Paths is highly unlikely, being of unequal lengths.
    – Zac67
    Dec 30, 2018 at 16:33

1 Answer 1

3

Yes, you are correct on both questions. To make it simpler: ECMP and its hashing algorithm selects a path per flow. So, a single flow will always use the same path *.

While the aggregate bandwidth of ECMP is the sum of all the links, a single flow cannot exceed the bandwidth of a single link.

* Per-packet ECMP is available in some scenarios, but is almost never used in actual networks.

1
  • One question here. In an ECMP path(consider 2 path ECMP), if one of the path(say path-1) goes down, all the flows will be mapped the remaining one path(say path2). Now, after a while, if the path1 comes back up, how will the load balancing happen ? Will some the flows will be forcefully re-mapped to the recovered path ?
    – Hemanth
    May 30, 2022 at 19:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.