当前位置:网站首页>Day 12 notes
Day 12 notes
2022-07-23 14:07:00 【[white head]】
8, Routing reflectors
Router Reflector --- Routing reflectors --- RR ---- We can do it through configuration , take Some devices are called route reflectors under certain conditions , after , The device will be able to Reflect what you learned IBGP Routing information .
We are specifying a router called a routing reflector (RR) At the same time , Must be in him Of IBGP Selecting one or more devices in the peer relationship is called his client (client),RR The system formed between and customers is called reflection cluster (Cluster). Each reflection cluster will use RR Of RID As a cluster ID. The rest didn't be called RR Customer's IBGP Peer relationship , We will call them non customers .
Reflection rules of routing reflectors :
1, When a route reflector learns a route from its client , Then he will take this road Information is reflected to all customers and non customers
2, If the route reflector learns a route from its non customers , Then he will put this Route information is reflected to all customers, but not to non customers . “ Non non non transmission ”
3, When the router performs route reflection , He only uses the best BGP Route for reflection .
because IBGP Horizontal segmentation is to prevent the generation of loops , The route reflector reflects the route Then break IBGP The horizontal division of , It may cause the appearance of the loop . ---- therefore , road By the reflector in order to prevent the emergence of the loop , Two more attributes are introduced --- Originator_ID( Originator ID),Cluster_list( Cluster list )
Originator ID --- O_ID --- When a routing message comes to the routing reflector , Reflectors need Reflect this route information , This attribute will be added to the routing information before reflection , This The value of the attribute is that of the notifier who received this route information RID, after , other The routing reflector receives a routing message if it contains O_ID, Then he will not change this Attributes . If a device receives a routing entry, the originator ID For their own local RID, You will no longer learn this routing information , Play the effect of preventing loops .
If in a AS among , There are multiple reflections , Then there must be multiple reflection clusters , Then each RR When reflecting the routing information, local clusters will be added to the cluster list attribute ID. Be one Devices receive a reflected routing message , The cluster list attribute contains local clusters ID, You will no longer learn this route , To prevent the generation of loops .
[r3-bgp]peer 2.2.2.2 reflect-client --- Appoint R2 As a reflective customer , At the same time R3 Automatically become RR
9, The federal
The idea of the union is to put the same AS In the middle of IBGP The peer relationship is changed to EBGP reciprocity Body relationships , In this way to break IBGP The horizontal division of . This requires different IBGP Peers are divided into different members AS among , member AS Between the establishment of EBGP Peer relationship is a A special EBGP Peer relationship , They only follow EBGP Transitivity of peers , And from From the perspective of delivered content , Still need to follow AS-BY-AS The rules , Because from a macro point of view , He We are still in the same AS among .
The federal approach is also equivalent to breaking IBGP The horizontal division of , Then there may also be loop questions topic , You need to consider anti ring . The anti ring method can be directly used for reference EBGP Horizontal segmentation , stay AS_PATH Add members to the attribute AS No. to prevent backtransmission . Be careful , To distinguish members AS and natural AS, member AS The number will be enclosed in parentheses .
Configuration of federation :
[r2]bgp 64512 --- Federate device startup BGP The process needs to be started with a small number
[r2-bgp]confederation id 2 --- Declare the large size of federal members
[r2-bgp]peer 3.3.3.3 as-number 64512 --- Between members of the Federation IBGP reciprocity Body relationships need to be established with a trumpet [r3-bgp]confederation peer-as 64513 --- In need of federation EBGP reciprocity The adjacent members need to be declared on the device with body relationship AS Number
[r3-bgp]peer 4.4.4.4 as-number 64513 --- Federal EBGP Peer relationships use Small build neighbors
[r3-bgp]peer 4.4.4.4 ebgp-max-hop --- Because of the federal EBGP Peer relationship Need to follow EBGP Transitivity of peers , therefore , Its TTL The value is defaults to 1, In non direct When building neighbors, you need to TTL Only when the value is modified can the neighbor be built normally
10,BGP The road selection principle
BGP The prerequisite for choosing a route --- Discard all unavailable routing information
The attribute name The scope of communication The default value is Criteria
PV No transmission 0(0 - 65535) The bigger the better
LP IBGP Between peers 100 The bigger the better
AS_PATH bgp Between peers The smaller the number of records, the more optimal
OGN bgp Between peers Depending on the type of origin I > e > ?
MED bgp Between peers By default, it inherits the cost value in the global routing table The smaller the better
1, optimization PV The route with the largest value
PV Value is Huawei's private attribute , It can be understood as weight , The greater the numerical , The higher the priority is high , And because he is the first of all the principles of road selection , therefore , This attribute is local One of the most convenient attributes for selecting routes . --- This attribute can only take effect on this device , He Cannot be passed to any BGP peers .
modify PV Affect the configuration of routing :
Method 1 : Global modification
[r4-bgp]peer 3.3.3.3 preferred-value ?
INTEGER Preference value
[r4-bgp]peer 3.3.3.3 preferred-value 100
AS-path 1, origin igp, MED 0, localpref 100, pref-val 0, valid, internal, pre 2
55, IGP cost 1, not preferred for PreVal
Load sharing --- That is, let different traffic go on different lines , Share the pressure of a single line force .
Method 2 : Fine control
1, Grab traffic
[r4]ip ip-prefix PV permit 10.0.0.0 24
2, Make routing strategy
[r4]route-policy PV permit node 10
[r4-route-policy]if-match ip-prefix pv
[r4-route-policy]apply preferred-value 100
[r4-route-policy]q [r4]route-policy PV permit node 20 --- Be careful , Empty tables must be configured Discharge all remaining flows
Info: New Sequence of this List.
[r4-route-policy]q
3, stay BGP Call the routing policy
[r4-bgp]peer 3.3.3.3 route-policy PV import
2, optimization LP The route with the largest attribute value
LP --- Local priority --- The default value is 100, The bigger the better . This property can be used in IBGP Pass between peers , therefore , He is AS The most common attribute of internal routing . Routing letter Breath is passed to EBGP Peer will not carry this attribute .
By modifying the LP Value to affect routing
Method 1 : Global modification
[r3-bgp]default local-preference 200 --- R3 Then send it to IBGP Equivalent The routing LP Properties will be changed to 200
Method 2 : Fine control
stay R3 Out of the direction to do
1, Grab traffic
[r3]ip ip-prefix lp permit 10.0.0.0 24
2, Make routing strategy
[r3]route-policy lp permit node 10 Info: New Sequence of this List.
[r3-route-policy]if-match ip-prefix lp
[r3-route-policy]apply local-preference 300
[r3-route-policy]q [r3]route-policy lp permit node 20
Info: New Sequence of this List.
[r3-route-policy]q
3, stay BGP Call in process
[r3-bgp]peer 4.4.4.4 route-policy lp export
3, The priority of self initiated routes is higher than that learned from peers , There are also ways to start your own In a variety of , Their priority relationship is manual aggregation > Automatic aggregation > network > import
4, optimization AS_PATH Attribute the shortest route
AS_PATH Attribute when selecting a route , Two points need to be noted :
1, When we are doing route aggregation , If activated AS_SET After keyword , Will be different AS Aggregate detailed routes , Then we will AS_PATH Attribute carries all details AS Of AS Number , And enclose it with braces . When comparing routes , The contents of braces are treated as a individual AS No .
2, In the union , We also need to use... Within the Federation AS_path To protect the environment , We will Use parentheses to place AS Put the numbers around , When comparing routes , It will not count Content .
Method 1 : stay R1 Modify the exit direction of AS_PATH attribute .
1, Grab traffic
[r1]ip ip-prefix as permit 10.0.0.0 24
2, Configure routing policies
[r1]route-policy as permit node 10
Info: New Sequence of this List.
[r1-route-policy]if-match ip-prefix as
[r1-route-policy]apply as-path 11 22 33 ?
INTEGER <1-4294967295> AS number in asplain format
(number<1-4294967295>)
STRING<3-11> AS number in asdot format
(number<1-65535>.number<0-65535>)
additive Append to original As Number ---- In the original AS_PATH Add the configured based on the property AS Number
overwrite Overwrite original As Number ---- Directly cover the original Of AS_PATH Property value
[r1-route-policy]apply as-path 11 22 33 additive --- It is recommended to use Tim Add , because AS_path Property is mainly used to prevent loops , Overwrite the original attribute It may cause routing backhaul , Cause loop generation .
[r1-route-policy]q
[r1]route-policy as permit node 20
Info: New Sequence of this List.
3, stay BGP Call policy
[r1-bgp]peer 12.0.0.2 route-policy as export
*>i 10.0.0.0/24 3.3.3.3 0 100 0 1i
* i 2.2.2.2 0 100 0 1 11 22 33
*> 10.0.0.0/24 12.0.0.1 0 0 11 22 33 1 i
[r2-route-policy]apply as-path 1 1 1 additive ---- It is suggested that AS_PATH Add the real leaving AS Of AS Number , because AS_PATH The attribute itself has Anti ring effect , add to AS The route cannot be sent to the corresponding AS When in , Affect the delivery of routes .AS_PATH Attribute when selecting a route , Just focus on AS Length of No , Don't pay attention to the content .
5, Choose the route with the best origin code attribute . Priority of origin code --- I > E > ?
OGN --- Origin code --- I,e,? --- Used to identify the origin of routing entries
I --- Represents that the routing information originates from IGP agreement ( Not limited to IGP agreement , Including static state , Direct connection ), Represents that the route entry originated from AS Inside --- adopt network Hair The origin code of the distributed routing information is I
E --- Represents that the routing information originates from EGP agreement --- EGP refer to BGP Before External gateway protocol used
? --- Routes learned through other than the above two methods --- Republish the imported road From the origin code is ?
Control the method of route selection :
1, Grab flow
[r2]ip ip-prefix ogn permit 10.0.0.0 24
2, Configure routing policies
[r2]route-policy ogn permit node 10
Info: New Sequence of this List.
[r2-route-policy]if-match ip-prefix ogn
[r2-route-policy]apply origin ?
egp Remote EGP
igp Local IGP
incomplete Unknown heritage
[r2-route-policy]apply origin incomplete
[r2-route-policy]q
[r2]route-policy ogn permit node 20
Info: New Sequence of this List.
[r2-route-policy]q
3, stay BGP Call in the
[r2-bgp]peer 12.0.0.1 route-policy ogn import
6, optimization MED Routes with small attribute values
MED --- Multi exit authentication attribute --- MED The default initial value is not 0, But inherited The cost value of this route entry in the routing table , therefore , It can reflect the arrival of the target network segment in this AS Internal overhead size , Through this parameter , other AS The flow is entering this AS When will You can choose a less expensive entry . By modifying this attribute value , We can also shadow Ring others AS Flow into this AS The path of . If it passes locally IBGP Peers learn a strip BGP route , There is MED value , Then you need to pass this route to the local EBGP peers , Then he will no longer carry this MED value . This setting may cause Poor route selection . therefore , Suggest , If there are multiple groups of boundary devices, you need to send the route Send EBGP Peer relationship , All routing information needs to be published .( Each set All equipment needs to be released )
Interference routing method :
stay R2 On the configuration , influence R1 The right way
1, Grab traffic
[r2]ip ip-prefix med permit 4.4.4.0 24
2, Configure routing policies
[r2]route-policy med permit node 10
Info: New Sequence of this List.
[r2-route-policy]if-match ip-prefix med
[r2-route-policy]apply cost 10
[r2-route-policy]q
[r2]route-policy med permit node 20
Info: New Sequence of this List.
[r2-route-policy]q
3, stay BGP Call in process
[r2-bgp]peer 12.0.0.1 route-policy med export
Be careful :MED Value affects others AS The flow enters the city through multiple outlets AS Inside Ministry , If the inflow is not the same AS, That is, in the received routing entries AS_PATH Belong to Leftmost sex AS Different numbers , Then we will not compare Article 6 , Compare directly with 7 strip .
[r4]ping -r -a 4.4.4.4 1.1.1.1 --- It can record the whole process of flow
7,EBGP Peer routing is better than IBGP peers
边栏推荐
- Excel essay record
- C: readonly and Const
- script之type=module
- T-SEDA编码
- How to open the thought map pdf of postgraduate entrance examination in the small program of postgraduate entrance examination question bank
- How to judge whether an object is empty
- 第六天笔记
- rtx3090ti什么水平 rtx3090ti显卡什么级别 rtx3090ti显卡怎么样
- KingbaseES DENSE_ Rank function usage
- Principle and implementation of Tencent mmkv
猜你喜欢

In depth analysis of common cross end technology stacks of app

LeetCode_ 491_ Longest increasing subsequence

OSPF详解(1)

Xilinx FPGA一路时钟输入两个PLL

Connaissance détaillée du GRE, du mgre; Connaissance de la configuration de base de l'OSPF

使用Stream流来进行分类展示。

Principle of container network

Where does pytorch work?

笔记本酷睿i5 1135g7相当于什么水平?i5 1135g7性能怎么样

HCIA的复习
随机推荐
C #: in, out, ref Keywords
静态综合实验(HCIA)
How to ensure the reliable transmission of messages? What if the message is lost
How can Creo 9.0 quickly modify CAD coordinate system?
Golang remote server debugging
Notes on the fifth day
Image processing 4: corrosion
How to judge whether an object is empty
配置firecracker流程即踩坑记录
Image processing 3: Sobel edge detection
Kingbasees formatting function
Medium range
【微信小程序】案例 - 本地生活
Best practices of JD cloud Distributed Link Tracking in financial scenarios
使用Stream流来进行分类展示。
rip的详细介绍
第五天笔记
Thousands of databases, physical machines all over the country, JD logistics full volume cloud live record | interview with excellent technical team
LeetCode_ 46_ Full Permutation
js 实现 encode64 加密