Log in to ask questions, share your expertise, or stay connected to content you value. Don’t have a login? Learn how to become a member.
I'm using MX204 with 20.4R3-S3.4 Junos OS and enabled load-balancing as follows:
<BGP multipath enabled>
set policy-options policy-statement LOAD-BALANCE-ALL term 1 then load-balance per-packet
set routing-options forwarding-table export LOAD-BALANCE-ALL
Based on this documentation Junos should use:
to create a hash and this way to identify a traffic flow.
The Source IP / Destination IP / Protocol type / Incoming interface index were all identical, only the port numbers differed, but still, both Connection 1 and Connection 2 was actively used.
Why is that?
a few things:
1) I'm afraid that what you explain is not perfectly clear :) What is used and when ?
2) the document you mention is not relevant to MX routers. Of course one would say that juniper doc is quite unclear about this, but whatever... The documentation relevant for MX routers and ECMP is: Understanding the Algorithm Used to Load Balance Traffic on MX Series Routers
3) in order to check what is really actually used by the forwarding engine on your MX router you would do some:
request pfe execute target fpc0 command "show jnh lb"
as explained in (good old) [MX] Hash key computation on MPC cards
<BGP multipath enabled>set policy-options policy-statement LOAD-BALANCE-ALL term 1 then load-balance per-packetset routing-options forwarding-table export LOAD-BALANCE-ALL
thank you very much for your answer, it helped a lot!
1, Well, what I try to do is execute 2 SCP copy with the same source and destination IP addresses. Based on the documentation that I linked, the hash-key is generated by Source IP + Destination IP + Protocol, so the 2 parallel SCP copy should use only 1 Connection. But the test results show that the one of the SCP copy uses Connection1 and the other SCP copy uses Connection 2 (they are running parallel).
2, Stupid question, but how do I know that the documentation that I mentioned is not relevant for MX routers? I found that documentation in the same page that you referred: " Understanding the Algorithm Used to Load Balance Traffic on MX Series Routers" :
"Per-packet load balancing–All next-hop addresses for a destination in the active route are installed in the forwarding table (the term per-packet load balancing in Junos is equivalent to what other vendors may call per-flow load balancing). See Configuring Per-Packet Load Balancing for more information."
3, Thank you, this table is GOLD:
I disabled Source/Destination port:
set forwarding-options enhanced-hash-key family inet no-destination-portset forwarding-options enhanced-hash-key family inet no-source-port
And now when I repeat my test, both SCP use the same connection.
Actually, L3 (srcip + dstip) + L4 (proto + dstport + srcport) is very classical in ECMP (and MX adds very useful stuff, MPLS labels and so on).
I would actually suggest to leave the (enhanced)hashkey using its default values in production network, it works well.
About the non-relevance of some documents in Junos documentation? Well, that's the point :D Stuff written by various writers and updated on a multi-years scheme pointing to docs not updated anymore... Not that easy if you don 't follow JunOs release notes and forums.
I do not intend to modify the default behavior, actually original goal was to use Source + Destination Port in the hashing algorithm, but since that documentation stated otherwise I started testing and the whole thing didn't make sense :D
I think I'll start reading release notes then and be more active on forum haha
Everything is clear now, thank you for your help, have a nice weekend! :)