Difference and usage of BGP LOCAL_PREF and MED

Source: Internet
Author: User

These days have been looking at BGP, I think the attribute of BGP is a difficult point, sometimes look at to their own are confused, especially the difference between LOCAL-PREF and MED in BGP. after finding some information on the Internet, I can understand a lot.

Med is used to affect the inbound traffic. It is an announcement to the ebgp peer.
The local-pref is used to influence the outbound traffic. It is announced to the ibgp peer.

BGPDesign

We know that there is no planning policyBGPThe design is incomplete. BRFTBGPThe design is comprehensively planned through effective useBGPAnd design and plan a practical routing policy to better optimize the network. By controlling the routing policy, you can control the flow direction of data streams between AS, which is of great significance for protecting network security and rationally using network resources. In route policy control, traffic is controlled by attributes such as A S_PATH, Local_Preference, and MEDMULTI_EXIT_DISC. For example, the AS-PATH attribute can be used to filter data by AS. By controlling the length of the AS-Path table, such AS adding a dumb AS number) you can control which path the data goes in when other conditions are the same,BGPSelect a route with a small length AS-Path ). You can control the outbound path of a data stream by controlling the Loca1-Preference attributes of inbound) routing information. You can control the inbound path of the data stream by controlling the MED attribute of the outbound route. By setting these attributes properly, you can achieve load balancing and symmetric routing.BGPDifferent properties have different priorities, where the priority of the Loca1-Preference property is higher than the MEDMULTI-EX-IT-DISC) property, when both properties are applied to the routing policy at the same time, the routing policy executes the Loca1-Peference property.

Loca1-Preference properties can control the outbound path of business data streams. The priority of a high Loca1-Preference property value is high, as shown in 5.

You can control the inbound path of the data stream by controlling the MED attribute of the outbound route. The priority of a low MED attribute value is high, as shown in figure 6.

Pass ControlBGPAttribute to generate a routing policy. The routing protocol calls the corresponding routing policy to control the output input, so as to control and filter the network path and network traffic, as shown in figure 7.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.