There can be a separate link between the two AS to exchange the data volume between them, but it is not advertised to other AS. In this case, you can add network192.1.12.2backdoor to the routers at both ends of the link, which is called a backdoor route.
1. the backdoor routing attribute is to make the router prefer the Routes learned from IGP rather than the Routes learned from the IBGP neighbor, because the EBGP neighbor's AD is 20 by default, it will always give priority to the routes transmitted by other ad igp routing protocols. Backdoor routing is used to set the IGP route priority higher than EBGP in some special cases, the following is a special case.
2. Access the OSPF route through redistribution. On R5 and R3, you will learn the IGP route from R4. At the same time, R5, as the IBGP neighbor of R4, will learn an IBGP route. Because the IBGP route management distance is large, routing is not affected on R5, but for R3, it learns an EBGP route from R5 and receives the IGP route of R4, r3 defines the next hop of 199.172.0.0 as R5, which generates a loop. To solve this problem, mount the backdoor parameter neiip-addressbackdoor after neighbor on R5 and R3.
III. The reason for this is that the next-hop attribute is used in BGP learning entries. The default next hop rule is as follows. The next hop of the self-generated route is 0.0.0.0, after receiving the message from the EBGP route, change the next hop to the IP address of the EBGP peer, and do not change the next hop value when releasing the message to the IBGP. However, you can use next-hop-self to modify this rule and then advertise the next hop address to IBGP.
Next-hop-unchanged can also be used to prevent the next hop value from being modified after receiving the EBGP route, such as the above loop problem, you can also declare Next-hop-unchanged on R5 and R4 to solve the Next hop attribute. You can also use route-map to change the attribute.
Iv. Injection conditions. For a general topology, AS100 follows the best egress principle. The configuration method is as follows:
1. MED, set MED on AS200 to make AS100 recognize;
2. AS-PathPrepend. The 2.0 route advertised by R4 to R2 is extended AS-path, and R5 is the same;
3. Use conditional route injection.
Five, first left as300, there are more refined 172.16.1.0/24 routing, then, in as100 received 172.16.0.0/16 routing, normal may not take the best path of the r2-4, A conditional route injection (bgpinject-maproute-mapnameexist-maproute-mapname) may be taken from the r3-5ebgp, meaning:
1. When 172.16.0.0/16bgp is displayed in the r2bgp table and the route update source for the next hop is 192.168.24.4 (r4, forcibly insert a more refined bgp Route of 172.16.1.0/24 into your as100IBGP.
2. The ibgp Route Selection of r1 will change. It will be affected from r2r3 at the same time by 172.16.0.0/16 and 172.16.1.0/24, but according to the longest routing matching principle, he will select the 172.16.1.0/24 advertised by R2. The overall call process is understood as: matching the entries matching the second route graph (172.16.0.0/16 and 192.168.24.4/32 ), set it to the attribute of the first route graph (172.16.1.0/24 and no-export ).
3. When 172.16.0.0/16bgp is displayed in the r2bgp table and the next hop route update source is 192.168.24.4 (r4, forcibly insert a more refined bgp Route of 172.16.1.0/24 into your as100IBGP.
4. If the vroday Day of AS8 is migrated, it is assumed that Day and Night are merged into AS9 without modifying AS141 ~ The routers of AS143 (they still think that Day belongs to AS8). This migration requires a loca-as parameter. After the BGP process of Day is changed to 9, make the following changes to the pointing neighbor: neighbor192.1.12.2remot-as200.
We can see from the above introduction that, before nei192.1.24.4local-as12 is configured, the neighbor relationship about R2 on R4 is still the EBGP neighbor of BGP12, but the router has changed the bgp as number, therefore, After configuring nei192.1.24.4local-as12, R2 successfully transits to AS6 and establishes a neighbor relationship with R4 in as6.