当前位置:网站首页>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 :
边栏推荐
- 【OpenCV 例程200篇】218. 多行倾斜文字水印
- 【Day2】 convolutional-neural-networks
- uniapp 处理过去时间对比现在时间的时间差 如刚刚、几分钟前,几小时前,几个月前
- Talk about scalability
- 技术管理进阶——如何设计并跟进不同层级同学的绩效
- Matlab tips (25) competitive neural network and SOM neural network
- Es entry series - 6 document relevance and sorting
- What is devsecops? Definitions, processes, frameworks and best practices for 2022
- Golang Modules
- Check 15 developer tools of Alibaba
猜你喜欢

Occasional pit compiled by idea

Hands on deep learning (35) -- text preprocessing (NLP)

MongoDB数据日期显示相差8小时 原因和解决方案

leetcode842. Split the array into Fibonacci sequences

转载:等比数列的求和公式,及其推导过程

Servlet基本原理与常见API方法的应用

Three schemes of ZK double machine room

Intelligent gateway helps improve industrial data acquisition and utilization

C language pointer interview question - the second bullet

Rhcsa day 10 operation
随机推荐
【Day1】 deep-learning-basics
Map container
Machine learning -- neural network (IV): BP neural network
Occasional pit compiled by idea
Tables in the thesis of latex learning
有老师知道 继承RichSourceFunction自定义读mysql怎么做增量吗?
Rhcsa day 10 operation
System. Currenttimemillis() and system Nanotime (), which is faster? Don't use it wrong!
Fabric of kubernetes CNI plug-in
Work order management system OTRs
2. Data type
How to teach yourself to learn programming
Hands on deep learning (43) -- machine translation and its data construction
Latex error: missing delimiter (. Inserted) {\xi \left( {p,{p_q}} \right)} \right|}}
Es entry series - 6 document relevance and sorting
Ruby时间格式转换strftime毫秒匹配格式
Whether a person is reliable or not, closed loop is very important
Realsense of d435i, d435, d415, t265_ Matching and installation of viewer environment
[200 opencv routines] 218 Multi line italic text watermark
Native div has editing ability