当前位置:网站首页>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 :
边栏推荐
- What is devsecops? Definitions, processes, frameworks and best practices for 2022
- Deep learning 500 questions
- Today's sleep quality record 78 points
- 什么是 DevSecOps?2022 年的定义、流程、框架和最佳实践
- Golang Modules
- Tables in the thesis of latex learning
- Hands on deep learning (45) -- bundle search
- Exercise 9-5 address book sorting (20 points)
- 基于线性函数近似的安全强化学习 Safe RL with Linear Function Approximation 翻译 2
- MongoDB数据日期显示相差8小时 原因和解决方案
猜你喜欢
5g/4g wireless networking scheme for brand chain stores
对于程序员来说,伤害力度最大的话。。。
How can Huawei online match improve the success rate of player matching
基于线性函数近似的安全强化学习 Safe RL with Linear Function Approximation 翻译 2
Qtreeview+ custom model implementation example
Hands on deep learning (38) -- realize RNN from scratch
PHP代码审计3—系统重装漏洞
MySQL develops small mall management system
Reprint: summation formula of proportional series and its derivation process
Reasons and solutions for the 8-hour difference in mongodb data date display
随机推荐
Rhcsa - day 13
Latex insert picture, insert formula
六月份阶段性大总结之Doris/Clickhouse/Hudi一网打尽
MySQL case
Batch distribution of SSH keys and batch execution of ansible
Introduction to extensible system architecture
PHP代码审计3—系统重装漏洞
2020-03-28
Pcl:: fromrosmsg alarm failed to find match for field 'intensity'
Hands on deep learning (38) -- realize RNN from scratch
Button wizard business running learning - commodity quantity, price reminder, judgment Backpack
leetcode1-3
Fabric of kubernetes CNI plug-in
2021-08-10 character pointer
按键精灵打怪学习-识别所在地图、跑图、进入帮派识别NPC
Lavel document reading notes -how to use @auth and @guest directives in lavel
Hands on deep learning (44) -- seq2seq principle and Implementation
直方图均衡化
7-17 crawling worms (15 points)
Golang defer