BGP experiment (2)

demand

Insert picture description here

1. First divide the AS internal address

Insert picture description here

2. Enable ospf protocol in AS

Because there is no special area and its summary, and only area0, the configuration process here is too simple, so I won’t go into details.
Insert picture description here

3. Start configuring the BGP protocol

R1 and R8 are establishing BGP neighbors (because there is only one route between AS and AS, the interface is used to establish neighbors)
Insert picture description here

R2 (neighboring with R1, R5R3)

Insert picture description here
The configuration of R3
Insert picture description here
R4
Insert picture description here
R5-R8 is similar to R1-R4, so I won't go into details.

R3 and R6 can be used as reflectors

  peer 172.16.0.1 reflect-client

Then declare its own loopback, and announce all loopbacks of the federation on R2 and R4. (The same on R5 and R7).

But at this time, you will find that the 10.1.1.0 route is not optimal on R3, and there is no table added. (The reason is that the next hop is unknown network segment). At this time, you need to modify the next hop to be yourself on R2

  peer 172.16.1.1 next-hop-local

The process will not be repeated. Did not hit the loop (maybe because of luck)

Add table to all routes learned by BGP

Insert picture description here
Insert picture description here

In the first requirement, the 192.168.1.0 and 192.168.2.0 network segments are no longer declared in any protocol to communicate with each other. (It turned out to use GRE)

Insert picture description here
Insert picture description here

Summarize, reduce routing entries

Because of the rubbish of the address division, it is difficult to summarize,
so one of the backbones in the federation is changed to
172.16.5.0 24
172.16.69.0 24

[r2-bgp]aggregate 172.16.0.0 22 detail-suppressed
[r4-bgp]aggregate 172.16.0.0 22 detail-suppressed 
[r5-bgp]aggregate 172.16.64.0 22 detail-suppressed 
[r7-bgp]aggregate 172.16.64.0 22 detail-suppressed 

Route after summary
Insert picture description here
Insert picture description here

test:

Insert picture description here
Insert picture description here

to sum up:

In this experiment, one of my address masks was wrong, which caused BGP to fail to establish a neighbor (18 is matched to 28); and the address was mismatched; but the error is not panic, it is nothing more than checking the result analysis process; if it fails, use the packet capture tool to see See why this interface can't establish neighbors. It's all small details, fortunately. Address division is still a delicate task. Finally, the backbone routing network segment is modified to make the loopback address summary in AS2 more successful.

Guess you like

Origin blog.csdn.net/qq_43710889/article/details/109346631