03-23-2015 04:09 AM - edited 03-05-2019 01:04 AM
Dear friends,
For a number of years, I have been under an impression that for all new rollouts of BGP, it is recommended to use the bgp bestpath med missing-as-worst command to make sure that the MED is always an unambiguous value, either the explicit value advertised by the peer, or the 2^32-1 if no MED was advertised.
However, when I went out today to confirm this assumption, I could not find any documents that would corroborate it. In fact, RFC 4271 is specific enough to state that if MED is not present, 0 should be taken as its implicit value. Some other documents I could dig out (RFC 4451, for example), state that using the maximum value (as opposed to the minimum value) was an old behavior and RFC 4271 made sure to be specific that a value of 0 is to be used whenever MED is not explicitly advertised. In short, while I thought it is the best practice to use the bgp bestpath med missing-as-worst, I could not find any documents supporting this assumption, and in fact, it seems that by configuring it, I am going against the RFC 4271 which should be considered the canonical behavior description.
So this is my question: What is the best practice regarding missing MED in BGP - leave the default (and RFC 4271-endorsed) behavior of assigning an implicit 0 to the MED, or configuring the bgp bestpath med missing-as-worst? Do you know any documents out there explaining why either of these options is reasonable?
Thank you very much!
Best regards,
Peter
Solved! Go to Solution.
03-24-2015 08:56 AM
Hi Peter
I don't know of any documents for this but as no one else has answered.
As you know I am quite practical when it comes to networking so this may well not answer your question to your satisfaction but that's never stopped me before ... :-)
From a purely empirical point of view I would have thought the reasonable assumption to make was RFC 4271 behaviour. In all of the BGP posts I have been involved with on these forums and with my own use of BGP I have yet to see that command being used.
But I don't and never have worked for an ISP so perhaps it is used more there.
But empirical evidence and RFC 4271 aside I don't see how any document could make a reasonable argument for one or the other.
The issue with MED is it from a neighboring AS over which, by definition, you have no control. If you received a set of routes from them, some with the MED set explicitly and some with no MED it would be impossible for you to know which set of routes should be preferred because you have no idea which default they are assuming, so how can there be a best practice.
The best practice if you want to use MED to influence routing is to explicitly set the MED for all routes so there is no ambiguity or, heaven forbid, pick up the phone and talk to your equivalent in the other AS.
Anything else is just making assumptions and there is no guarantee that it will work as you want.
Appreciate this probably hasn't answered your question :-)
Jon
03-26-2015 01:58 AM
Peter,
after reading section 3.2 of RFC 4451, I understand that there were amibiguities in RFC 1771 regarding the treatment of a missing MED, stating that some implementations were giving less preference of MED 0 compare to a missing MED. Also, that not all the implementations treat/were treating the max value of 2^32-1 the same, as for some that is/was an "infinity" metric and they would rewrite it to 2^32-2. These cases produced inconsistencies and therefore, RFC 4271 states that if the MED is missing, it should be assigned a value of 0.
So, back to your question I have not seen any documents explaining which behavior or best practice is better. However, it is my understanding that it is better to leave it by default, assing a MED of 0, as it is what the RFC 4271 states and it is to correct the inconsistencies that the ambiguities in the original RFC produced.
In my experience, I have never seen the command bgp bestpath med missing-as-worst used. I have worked for 2 big Service Providers and they were not using it and I am not aware of anyone using it nowadays. I would recommend and this is what I have seen, is to always explicitly assign a MED value to the prefixes you advertise and also reset it to the prefixes you receive, according to the agreement you previously signed.
Best Regards,
Jose.
03-24-2015 08:56 AM
Hi Peter
I don't know of any documents for this but as no one else has answered.
As you know I am quite practical when it comes to networking so this may well not answer your question to your satisfaction but that's never stopped me before ... :-)
From a purely empirical point of view I would have thought the reasonable assumption to make was RFC 4271 behaviour. In all of the BGP posts I have been involved with on these forums and with my own use of BGP I have yet to see that command being used.
But I don't and never have worked for an ISP so perhaps it is used more there.
But empirical evidence and RFC 4271 aside I don't see how any document could make a reasonable argument for one or the other.
The issue with MED is it from a neighboring AS over which, by definition, you have no control. If you received a set of routes from them, some with the MED set explicitly and some with no MED it would be impossible for you to know which set of routes should be preferred because you have no idea which default they are assuming, so how can there be a best practice.
The best practice if you want to use MED to influence routing is to explicitly set the MED for all routes so there is no ambiguity or, heaven forbid, pick up the phone and talk to your equivalent in the other AS.
Anything else is just making assumptions and there is no guarantee that it will work as you want.
Appreciate this probably hasn't answered your question :-)
Jon
03-26-2015 01:58 AM
Peter,
after reading section 3.2 of RFC 4451, I understand that there were amibiguities in RFC 1771 regarding the treatment of a missing MED, stating that some implementations were giving less preference of MED 0 compare to a missing MED. Also, that not all the implementations treat/were treating the max value of 2^32-1 the same, as for some that is/was an "infinity" metric and they would rewrite it to 2^32-2. These cases produced inconsistencies and therefore, RFC 4271 states that if the MED is missing, it should be assigned a value of 0.
So, back to your question I have not seen any documents explaining which behavior or best practice is better. However, it is my understanding that it is better to leave it by default, assing a MED of 0, as it is what the RFC 4271 states and it is to correct the inconsistencies that the ambiguities in the original RFC produced.
In my experience, I have never seen the command bgp bestpath med missing-as-worst used. I have worked for 2 big Service Providers and they were not using it and I am not aware of anyone using it nowadays. I would recommend and this is what I have seen, is to always explicitly assign a MED value to the prefixes you advertise and also reset it to the prefixes you receive, according to the agreement you previously signed.
Best Regards,
Jose.
03-26-2015 09:13 AM
Jon, Jose,
Thank you both for your exquisite and insightful answers. Rated as deserved.
I do have a feeling that it must have been some old certification preparation book I must have read where I saw the recommendation of using the missing-as-worst approach. Perhaps that book went according to the then-current best practices that ultimately turned out to be not that perfect after all. Nonetheless, you both have presented very good arguments and what you said makes absolute sense.
Thank you both!
Best regards,
Peter
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide