当前位置:网站首页>BGP ---- border gateway routing protocol ----- basic experiment
BGP ---- border gateway routing protocol ----- basic experiment
2022-07-04 10:20:00 【Attiude】
BGP: Border gateway routing protocol — Dynamic routing protocol
No category Path vector EGP agreement ;
AS– Autonomous systems – Standard No 16 position 0-65535 among 1-64511 public 64512-65535 private
Expand AS Number 32 Bit binary
IGP Agreement pursuit :1、 acyclic ( Lu Jia Xuan ) 2、 Fast convergence 3、 Less occupied resources
EGP The pursuit of agreement :
1. Controllable ( Administrators can facilitate policy interference and routing )
2、 reliability (BGP Protocol devices need to interact with a large number of routing entries , However, periodic update cannot be selected to occupy link resources , Therefore, only trigger updates can be performed ; And BGP In order to save cost in the agreement working environment , There must be indirect connections, and it is necessary to establish neighbor relations — Unicast neighbors )— be based on TCP Work - Three handshakes, four disconnects 4 A reliable transmission mechanism – TCP Can only work based on unicast
unicast — need IP Can be up to — rely on IGP BGP Carried on IGP above
3、AS-BY-AS With a AS For a jump ;
Two 、BGP characteristic :
1) Classless path vector ----- Upgraded version of distance vector —AS–BY–AS
2) Use unicast updates to send all information ; be based on TCP 179 Port operation
3) Incremental updating – Trigger only aperiodic
4) Have rich attributes to replace IGP Route selection based on measurement ---- Multiple parameter control protocol
5) You can implement a strong strategy for traffic in and out – Controllability
6) The default is not used for load balancing ----- Only one optimal path is generated through various routing rules
7)BGP Support authentication and aggregation ( Summary )
3、 ... and 、BGP Data packets
Open Only responsible for the establishment of neighborhood relations , Normal receiving and sending can be done once ; carry route-id;
Keeplive Keep alive cycle 1min Query whether the neighbor relationship exists ; Actually keep alive TCP conversation ;hold time Default 3min
Update Carry routing entries Target network number + Various attributes
Notification Send and receive error data ;
Four 、BGP Working process of
1、 be based on IGP Realization IP Can be up to ;
2、 Unicast transmission between neighbors , Establish... By shaking hands three times TCP Session channel
3、 Use open The message establishes the neighbor relationship , Generally, you can send and receive once ; Generate neighbor table ;
4、 Use update Share routing information , The information carries the target network number + Various attributes
5、 Generate BGP surface — Load all routing information sent and received locally
6、 After the BGP The optimal path in the table is loaded in the routing table ;
7、 After convergence , only keeplive Keep the cycle alive
8、 all BGP All packets are based on TCP Session to ensure the reliability of transmission
9、 If an error message appears , Will use Notification Alarm
10、 Structural mutation , Use update Trigger the update
The experimental requirements :
The topology :
First step :
Configure interface loopback IP Address :
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.1.254 24
[r1]int l0
[r1-LoopBack0]ip add 1.1.1.1 24
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 12.1.1.2 24
[r2-GigabitEthernet0/0/0]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 23.1.1.1 24
[r2-GigabitEthernet0/0/1]int g0/0/2
[r2-GigabitEthernet0/0/2]ip add 192.168.2.254 24
[r2]int l0
[r2-LoopBack0]ip add 2.2.2.2 24
R3:
GigabitEthernet0/0/0 23.1.1.2/24
GigabitEthernet0/0/1 34.1.1.1/24
GigabitEthernet0/0/2 192.168.3.254/24
LoopBack0 3.3.3.3/24
R4:
GigabitEthernet0/0/0 34.1.1.2/24
GigabitEthernet0/0/1 45.1.1.1/24
GigabitEthernet0/0/2 192.168.4.254/24
GigabitEthernet4/0/0 54.1.1.2/24
LoopBack0 4.4.4.4/24
R5
GigabitEthernet0/0/0 45.1.1.2/24 up up
GigabitEthernet0/0/1 192.168.5.254/24 up up
GigabitEthernet0/0/2 54.1.1.1/24 up up
test :
stay R1 On pingR2, The rest remains the same .
The second step :
At every AS Internal operation ospf agreement ,AS Interface between BGP, Cannot announce ospf in .
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]net 23.1.1.1 0.0.0.0
[r2-ospf-1-area-0.0.0.0]net 192.168.2.0 0.0.0.255
[r2-ospf-1-area-0.0.0.0]net 2.2.2.2 0.0.0.0
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]net 23.1.1.2 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 34.1.1.1 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]net 3.3.3.3 0.0.0.0
[r4]ospf 1 rou
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]net 192.168.4.0 0.0.0.255
[r4-ospf-1-area-0.0.0.0]net 4.4.4.4 0.0.0.0
[r4-ospf-1-area-0.0.0.0]net 34.1.1.2 0.0.0.0
AS1 And AS2 Used between BGP:
[r1]bgp 1
[r1-bgp]router-id 1.1.1.1
[r1-bgp]peer 12.1.1.2 as-number 2
[r2]bgp 2
[r2-bgp]router-id 2.2.2.2
[r2-bgp]peer 12.1.1.1 as-number 1
[r3] bgp 2
[r3-bgp]peer 4.4.4.4 as-number 2
[r3-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[r3-bgp]peer 2.2.2.2 as-number 2
[r3-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[r4]bgp 2
[r4-bgp]peer 3.3.3.3 as-number 2
[r4-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[r4-bgp]peer 5.5.5.5 as-number 3
[r4-bgp]peer 5.5.5.5 connect-interface LoopBack 0
[r5-LoopBack0]bgp 3
[r5-bgp]peer 4.4.4.4 as-number 2
[r5-bgp]peer 4.4.4.4 connect-interface LoopBack 0
R5:
R4:
R3:
R2:
R1:
The third step : stay R1 On the use of BGP Announce your user network segment
[r1]bgp 1
[r1-bgp]network 1.1.1.0 24
R1 Upper BGP route
see R2:
see R3 when , We found that ,r3 The route on is not optimal .
We modify R2 To R3 The next one
[r2-bgp]peer 3.3.3.3 next-hop-local
After the modification is completed , We found that R3 Become the best ,
But it cannot be transmitted to R4, because R4 Upper horizontal segmentation mechanism , So we let R2 And R4 Building neighborhoods between
[r2]bgp 2
[r2-bgp]peer 4.4.4.4 as-number 2
[r2-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[r2-bgp]peer 4.4.4.4 next-hop-local
[r4]bgp 2
[r4-bgp]peer 2.2.2.2 as-number 2
[r4-bgp]peer 2.2.2.2 connect-interface LoopBack 0
R5 Ibid , because R2,R3,R4 The relevant configuration has been completed on , Just announce the network segment directly .
test :
边栏推荐
- Summary of reasons for web side automation test failure
- Hands on deep learning (35) -- text preprocessing (NLP)
- Es advanced series - 1 JVM memory allocation
- Latex arranges single column table pictures in double column format articles
- Custom type: structure, enumeration, union
- 品牌连锁店5G/4G无线组网方案
- Kotlin: collection use
- Devop basic command
- uniapp 处理过去时间对比现在时间的时间差 如刚刚、几分钟前,几小时前,几个月前
- Modules golang
猜你喜欢
Online troubleshooting
Use the data to tell you where is the most difficult province for the college entrance examination!
【OpenCV 例程200篇】218. 多行倾斜文字水印
Rhsca day 11 operation
Histogram equalization
Occasional pit compiled by idea
Debug:==42==ERROR: AddressSanitizer: heap-buffer-overflow on address
品牌连锁店5G/4G无线组网方案
MongoDB数据日期显示相差8小时 原因和解决方案
Hands on deep learning (34) -- sequence model
随机推荐
libmysqlclient. so. 20: cannot open shared object file: No such file or directory
Mmclassification annotation file generation
On Multus CNI
System. Currenttimemillis() and system Nanotime (), which is faster? Don't use it wrong!
Legion is a network penetration tool
leetcode1229. Schedule the meeting
2021-08-10 character pointer
Differences among opencv versions
Golang Modules
Map container
Golang Modules
Dynamic memory management
system design
Development guidance document of CMDB
Hands on deep learning (37) -- cyclic neural network
How can Huawei online match improve the success rate of player matching
uniapp 小于1000 按原数字显示 超过1000 数字换算成10w+ 1.3k+ 显示
【Day1】 deep-learning-basics
Today's sleep quality record 78 points
Ruby time format conversion strftime MS matching format