BGP routing protocol

Source: Internet
Author: User

BGP routing protocol
Public AS: 0-64511 PRIVATE: 64512-65535 China Telecom: 4134 China Netcom: 9929BGP use 1. Cross different, management issues 2. OSPF Support 1 W + routes ISIS support 2 W + routes 3. High Policy controllability 4. Strong scalability free public network route table route-server.ip.att.netreviews do not use BGP: 1. You have not completed the NP course, not familiar with BGP 2. Only one interface is connected to AS3, And the router performance is insufficient. BGP uses TCP port 179 to maintain the neighbor relationship through keepalive packets only by triggering update to update the route table. establish an EBGP relationship, the following conditions must be met: 1. The autonomous system numbers are different. 2. The neighbors are defined. 3. IBGP can be established, the following conditions must be met: 1. The autonomous system number is the same. 2. The neighbor is defined. 3. The BGP connection status can be reached: 1. IDLE2, Connect3, and Active: the status of the adjacent link is problematic. 4. Open Confirm5 and Open Sent6. And Established if a route entry is R and>, it indicates that the route entry is optimal, but cannot be added to the route table due to the management distance problem, however, this route can be passed to other BGP peer EBGP 20 IBGP 200 Neighbor tableBGP table by default, Server Load balancer IP routing tableBGP Message TypesOpen MessageRouter ID election and OSPF same Keepalive MessageUpdate Message (transmission BGP Route) notification Message (when an error occurs, an error Message is advertised.) BGP does not necessarily need to connect directly to a neighbor. Only the route that can reach the neighbor can solve the black hole at the route data layer: 1. All vrouters running BGP on the physical line full mesh are connected through direct connections. 2. The full mesh of BGP peers enables vrouters between BGP to run BGP3, BGP-> IGP (LAB) for redistribution, inform the router that does not run BGP Route 4. Establish Tunnel5 and MPLSEBGP horizontal segmentation between edge routers in the AS. BGP routes that contain the AS number are not accepted. a bgp session receives an EBGP route, AS long AS the AS number of the receiver in the neu of the ebgp route, the route will be discarded immediately. 1. For a BGP Route, if one router is the originating router of the route, the router will pass the route to all other IBGP peers and all EBGP peers. 2. For a BGP Route, if a router is not the originating router of the route, if this route entry is an EBGP route for this vro, the router forwards the route entry to all IBGP peers and all other EBGP peers. If the route entry is an IBGP route for the router, then, the router forwards the route entry to all EBGP peers instead of any IBGP peers. After the BGP connection is established, no route is transmitted between routers. To allow BGP routers to transmit BGP routes to each other, you must use the Network statement to advertise BGP routes in the BGP process, either the Redistribute is used for Route redistribution, which leads to BGP Route optimization. 1. The next hop accessibility of the BGP Route. 2. Synchronization principle. When a router receives an IBGP route through an IBGP peer, this route entry cannot be placed in a route table or transmitted to any other neighbor, unless the router learns the ICMP Redirect route entry through some IGP at the same time. When a router receives a packet through an excuse, the router query table finds that the packet needs to be forwarded again through the receiving interface. When a BGP Speaker passes a BGP Route to the next hop EBGP neighbor of the same MA network segment, if the router finds that the interface IP address of the route entry transmitted by the previous neighbor and the IP address of the interface that the next hop neighbor receives the route interface are in the same subnet segment, at this time, the router will change the next hop address of the route entry to the sending path of the previous neighbor. The IP address of the router interface about the next hop address of the BGP Route Entry 1. If a router advertises a local route to the BGP process, the next hop of the entry in the local bgp table of the vro is 0.0.0.0 C S2. If a route entry learned through IGP is advertised to the BGP process, the next hop of these routes in the BGP table of the router inherits the next hop address of the corresponding IGP route. 3. If a router transmits the local route advertised locally to any BGP peer, the next hop of the route entry is changed to the local update source for these neighbors. 4. If a router sends a route entry through the EBGP School, when the router is passed to the IBGP peer, the Next Hop will not change by default (unless Next-Hop-Self is implemented) 5. If a router advertises any BGP Route to other EBGP peers, the next hop of the route will become the horizontal split network of the router for the bgp update source address IBGP of the neighbor: 1. hello neighbor Neighbor2. Advertise route networkIGP interface B There is no label in the GP route BGP table>: (invalid route) 1. It will not be placed in the route table 2. It will not pass BGP Route optimization conditions to other BGP neighbors: 1. synchronization (from IGP to/no syn) 2. In earlier IOS versions, the next hop BGP Auto-summary is enabled by default for the BGP process of a router, in later versions of IOS, Auto-Summary is automatically disabled: whether or not Atuo-Summary is enabled on the vrobgp does not affect the BGP Route advertised by BGP. This feature has only two functions. 1. When you use the Summary notice on the vro, if the router table has detailed routes in the summary route entries, and the router has enabled automatic summary, the router will suppress the detailed route and summarize it in the main network boundary to the neighbor. 2. When the BGP process of the router resends the external route, if Atuo-Summary is enabled, the router will send the routes to the neighbors in the form of the primary class. It also writes the next hop address of the route to be redistributed to 0.0.0.0. Even if these routes carry Metric, they will not inherit from the BGP table. The IP address of the interface and the prefix of the router are not in the same main Class address segment. Manual aggregation of BGP 1. Create a local aggregation route pointing to the Null0 interface, in addition, the Network statement is used in the bgp process of the vrobgp to advertise the aggregated route, without the need to advertise any detailed Route 2. BGP Route aggregation principle, as long as the aggregation command is configured, if the router has a detailed route in the aggregation in the BGP table, the aggregated route is generated directly in the local BGP table, and then advertise to other neighbors len <ge-value <= le-valueip prefix-list 10 permit x. x. x. x/x ge y le z solves horizontal IBGP segmentation: 1. Route reflectors 2. Federal route reflectors RR receive an EBGP route, it is forwarded to all other EBPG peers and all IBGP peers (including the Client and Non-Client). RR receives an IBGP route (which is transmitted by the Client ), RR will forward it to all other RR and Non- The Client and all EBGP peer RR receive an IBGP route (this route is transmitted by Non-Client), and the RR forwards it to all clients and all EBGP peers, but it is not passed to any other Non-Client1, the routes received by the RP from the EBGP are reflected both to the client and to the server. 2. The RR is reflected both to the client and to neighbor 3. RR is reflected only to the client and to the EBGP neighbor federated Confederation1 and router bgp small AS (private AS) from a non-client) 2. Familiarity with the large AS Community where the declaration is located: Community "optional": the router may not recognize this familiarity. (Default) neighbor x. x. x. x send-community "pass": neighbor x is valid only for nei neighbors. x. x. x send-communityno-advertise: the routes with this knowledge will not pass out the small AS1. The AS numbers that enable the BGP process on the federated router are all sub-AS numbers, and the federated neighbor refers to the sub-AS numbers of the peer, external route value: the BGP neighbor in the Federation refers to the master AS number 2. All the federated routers must declare that they belong to the master as3. the federated router must specify the local and what sub-AS is adjacent to the Community attribute (group attribute) it is accepted that free transmission is not allowed. 1. StandardNo-Advertise: When the router receives a BGP Route with this group attribute, the route cannot be passed to any other BGP peer No-Export: when the router receives When a BGP Route with group attributes is configured, the route cannot be passed to other AS, but can only be passed within the AS. If the AS is federated, then, the route can also be transmitted between the federated sub-AS: when the router receives a BGP Route with this group attribute, the route can only be transmitted within the AS where the receiver is located, whether the AS is a master AS or a federated sub-AS1.Extended MPLS VPNip community-list standard Deny permit 3276850route-map com deny 10 match community Denyroute-map com permit 20 router bgp 65001 neighbor 1.1.1.1 route-map com inBPG's 13 optional attributes AS path * Next-hop * Origin * Local preferenceMEDOthersBGP attributes 1. Recognized attributes: required for bgp update packets Attributes that must be included and must be recognized by all BGP vendors, including ORIGIN, AS_PATH, and Next_Hop ① ORIGIN. This attribute describes how the ORIGIN route is stored in the CD table. there are three possible sources: IGP, EGP, and INCOMPLETE. This information is used in the processing of Multiple Route entries. the router selects a path with the lowest ORIN type. OPIGIN; the order from low to high is JGP <EGP <INCOMPLETE. ② AS_PATH (AS path) indicates the sequence of the route information contained in the UPDATE packet passing through the ELE. Me autonomous system. ③ NEXT_HOP (Next Hop); Next Hop of the BGP Route obtained by the Life router. for an EBGP Session, the next hop is the source address of the neighboring router through this route. for IBGP sessions, there are good varieties. First, the source address of the router is advertised next to the routes in the origin AS, and second, the routes injected into the AS by EBGP, its next hop will remain unchanged in IBGP. 2. Public Well-Known Discretionary indicates the attributes that must be recognized by all BGP implementations, but can be sent or not sent in bgp update packets, including LOCAL_PREF and ATOMIC_AGGREGATE. ① LOCAL_PREF (local priority): The local priority attribute is used to tell the vro in the autonomous system how to exit the autonomous system when there are multiple paths. The higher the local priority, the higher the routing priority. This attribute is only transmitted between IBGP neighbors. ② ATOMIC_AGGREGATE (original word aggregation): The Atomic aggregation attribute indicates that the information has been lost. When a route is aggregated, information is lost because the aggregation comes from different origins with different attributes. If a router sends an aggregation that causes information loss, the router is required to attach the atomic aggregation attribute to the route. 3. Optional transition (Optional Transitive) Optional transition attributes are not supported by all BGP implementations. If the attribute cannot be recognized by the BGP process, it will look at the transition flag. If the transition flag is set, the BGP process accepts this attribute and transfers it without modification, including AGGREGATOR and COMMUNITY. ① AGGREGATOR: This attribute indicates the BGP router ID implementing route aggregation and the AS number of the router for the aggregation route. ② COMMUNITY (group): This attribute refers to a group of routers that share a public attribute. 4. Optional non-transition (Optional Nontransitive) Optional non-excessive attributes are not required for all BGP implementations. If these attributes are sent to non-peer routers, they are discarded and cannot be sent to BGP peers, including MED, ORIGNATOR_ID, and CLUSTER_LIST. ① MED (Multi-exit differentiation): This attribute notifies the router other than AS which route is passed to the AS. It is also considered AS an external measurement of the route, and the low MED value indicates a high priority. The MED attribute is exchanged between autonomous systems, but the MED attribute cannot be passed to a third-party. ② ORIGNATOR_ID (origin ID): The route reflectors are attached to this attribute, which carries the router ID of the AS source router to prevent loops. ③ CLUSTER_LIST (cluster list): This attribute shows the reflected path used. BGP routing determines that BGP uses many attributes that describe the routing characteristics. These attributes are sent together with each route in the bgp update message. The router uses these attributes to select the best route to the destination. It is important to understand the process of determining a BGP Route. The following describes the process of determining a router's BGP Route Selection in priority: ① if the next hop is not reachable, this route is not considered; ② The priority selection tool has the maximum Weight (Weight) value path, and the Weight is the Cisco proprietary attribute; ③ if the Weight value is the same, the priority is selected for routes with the highest local priority; ④ if the local priority is the same, the priority selection is derived from the BGP Route on the current vrobgp (that is, the county hop is "0.0.0.0"); ⑤ if the local priority is the same and there is no route from this vro, select a route with the shortest AS path; ⑥ if the same AS path length exists, select a route with the lowest source code (IGP <EGP <INCOMPLETE); 7 if the source code is the same, select the path with the lowest MED value first. If the MED value is the same, in the EBGP route and the EBGP route, the EBGP route is preferred. In the EBGP route and IBGP route, select the preferred EBGP route. If all the preceding attributes are the same, the path closest to the IGP neighbor is preferentially selected; If the internal path is the same, select the path with the lowest BGP router ID first. Weight (Weight attribute) 1. Transfer range this attribute can only make sense locally on the router, this attribute is not carried when the router sends any BGP Route. 2. The default value is for a BGP Route whose next hop address is 0.0.0.0, in the local bgp table of the vro, the Weight value of the vrobgp is 32768. If the vrobgp is advertised by a neighbor, both IBGP and EBGP are 0 by default. If the route is advertised locally but is from IGP, the weight of the route is also 0. The value range is 0 ~ 655353. The greater the Weight attribute value, the better the route entry, modify Path 1 through Weight, ip prefix-list s seq 5 permint 2.2.2.0/242, route-map W permit 10 match ip adderss prefix-list2 set weight 3 route map W permit 203, router bgp 1 neighbor 1.1.1.1 route-map W inLocal Preference (local priority) the transfer range can only be transmitted within one AS (only when the IBGP route is passed). The default value is AS long AS the BGP Route is generated locally or not, the default value is 100. The larger the comparison principle, the better. BGP default local preference 101BGP open-source Route Filtering When the router receives a route through another peer, if the router uses the prefix list to filter the route, the neighbor will not know that the route is rejected by default, this route will still send these filtered routes to the route when the topology is changed or the soft cleaning process, thus wasting the neighboring CPU resources. To optimize the performance, you must enable this feature on both sides of the router. The router filter provider will notify the router transmitter of the PRF packet and send it to inform the router filter, when the route sender knows the situation, it will be bored and will no longer send the filtered route to the filter side. 1. Enable address-family routing 42, activate the neighbor Activate3 in the address family, and filter the route. define the prefix list specify the route sender's inbound Filter route 4. Specify the sender in the filter, specify Send5, specify the filter side in the route sender, and specify the Receive precautions, the basic BGP verification command must be hard reset: show ip bgp summary view BGP neighbor table Show ip bgp view BGP Route table Show ip bgp as xx view the topology database of a network Show ip bgp neighbors adver view neighbor forwarding table Show ip bgp rib-failure display no route entry added to the routing information library and, clear ip bgp * clears BGP neighbors because it is not added. re-learn the route table Clear ip bgp * soft does not Clear BGP neighbors, only updates the route table

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.