I have a basic question about ECMP, say I have a /20 route and also a /16 route to a host, and both are reachable, can ECMP load-balance between different prefix length or is it like, hardware first determines the route through LPM and then only applies ECMP?
I mean not just about hardware, is there something wrong in this approach by principles? What are the general hardware capabilities like? Like ASICS from Broadcom etc. Do they support this if at all this is reasonable?
There is no hidden thing, I work with a networking company, and just learning routing related things and wanted to understand. I just got this question that what prevents ECMP in this situation ? Why do you think that its random ? Since my company uses these chips so I asked about this.
Best Answer
Question 1: I have a basic question about ECMP, say I have a /20 route and also a /16 route to a host, and both are reachable, can ECMP load-balance between different prefix length or is it like, hardware first determines the route through LPM and then only applies ECMP?
Quoting rfc 1812, Requirements for IPv4 Routers, Section 2.2.5.2
Once the router has picked the longest match prefix for the destination (using what the rfc calls "pruning rules"), it must pick the next-hop to forward the traffic to. At this point ECMP (or "load-splitting") occurs...
Quoting rfc 1812, Requirements for IPv4 Routers, Section 5.2.4.3 Next Hop Address,
Question 2: How it would cause loops? Could you please explain in detail?
Assumptions...
Diagram...
Question 3: So I see you are saying that hardware are really not capable of not doing it. Does this apply to all kind of chips?
This applies to all kinds of chips that handle IP forwarding. Relevant portions of RFC compliance are required if the silicon vendor wants any hope of selling their chips.