当前位置:网站首页>Hcip 13th day notes
Hcip 13th day notes
2022-07-03 22:37:00 【xiaoxiaoxyxz】
IBGP Horizontal segmentation : That is, when the router starts from a IBGP The peer learns a routing message , He will not announce this route to other IBGP peers .
Routing reflectors : Router Reflector — RR
We can put one IBGP The device is configured as a routing reflector (RR), A device configured as a routing reflector will reflect the learned routing information under certain conditions .
Under certain conditions, it means : After we specify a device to become a routing reflector RR At the same time , One or more neighbors must be designated as his customers ,RR And customers , We call it reflection cluster , Set one for each cluster cluster ID----- In this reflection cluster RR Of RID. Other neighbors not defined as customers are called non customers .
Reflection rules :
1、 If the routing reflector learns one from its own customer IBGP route , Then he will reflect to all his customers and non customers .
2、 If the routing reflector learns one from its own non customers IBGP route , Then he will reflect it to all his customers , But not reflected to non customers .----- Non non non transmission .
3、 When the router is performing route reflection , Refers to reflection of oneself BGP The best route in routing .----- and BGP The routing rules are the same .
because IBGP Horizontal segmentation is mainly to prevent routing loops , The reflection of the route reflector is equivalent to breaking IBGP Rules for horizontal segmentation , It is possible that a routing loop . therefore , To avoid routing loops , The routing reflector was designed , Two attributes are specifically introduced , To avoid loop generation .-------originator_ID( Originator ID),cluster_list( Cluster list )
Originator ID: Reflect the originator of this route information RID----- When this route passes through RR After reflection , This attribute will be added to the reflected routing information . If RR The originator already exists in a routing message ID attribute , Do not modify this property . When a device receives a routing message , Discover the originator inside ID It's local RID, You will not receive this routing information , Avoid routing backhaul .
If one AS If there are multiple reflections inside , that , There must be multiple reflection clusters , Then each RR When reflecting routing information , Local clusters will be added to the cluster list attribute in the routing information ID.
Be careful : These two properties , It's just for IBGP Internal anti ring , therefore , When these routes are passed to EBGP Peer time , These attributes will not be carried .
RR During route reflection , In addition to adding the above two attributes to the routing information , Other properties remain unchanged .
RR Configuration of :
[r3-bgp]peer 2.2.2.2 reflect-client ---- Appoint R2 As a reflector customer , meanwhile R3 Become yourself RR.
The federal
The federal : The federal EBGP Relationships inherit only ENGP Rules for routing between , But not like ENGP Modify routing properties like peers , It's a special being .
The federal EBGP The anti ring can be directly used EBGP Horizontal segmentation mechanism to prevent ring , Directly in AS_PATH Add a member to the property AS To prevent the ring , It's just , Federal AS The number will be enclosed in parentheses , To distinguish .---- This attribute is mainly used for AS Use of internal anti ring , therefore , Nor will it be passed on to EBGP peers .
[r2]bgp 64512 ---- Federal members start BGP The process needs to use a small number ( Of federal members AS Number ) start-up
[r2-bgp]router-id 2.2.2.2
[r2-bgp]confederation id 2 ---- Federal members must declare their large size in the process ( Where it really is AS Number )
[r2-bgp]peer 12.0.0.1 as-number 1
[r2-bgp]peer 3.3.3.3 as-number 64512— Establish... With members of the Federation IBGP Use the trumpet when you're in a neighborhood
[r2-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[r3]bgp 64512
[r3-bgp]router-id 3.3.3.3
[r3-bgp]confederation id 2
[r3-bgp]peer 2.2.2.2 as-number 64512
[r3-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[r3-bgp]confederation peer-as 64513---- Need to establish a federal EBGP Peer relationship , You need to declare the other party's trumpet first
[r3-bgp]peer 4.4.4.4 as-number 64513
[r3-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[r3-bgp]peer 4.4.4.4 ebgp-max-hop 2— Because the Federation EBGP According to... Between EBGP Peer to peer transmission rules , therefore , default TTL value 1, And there is direct connection detection , therefore , It needs to be modified TTL The way of value , Let it turn off direct detection .
Federal settlement IBGP The drawback of horizontal segmentation is that there can only be one pair within a federation IBGP Peer relationship , because IBGP Routes between can only be passed once , therefore , In practical engineering , Federation and routing reflectors can often be used in combination .
BGP The road selection principle
BGP The prerequisite for choosing a route : Discard all unavailable routing information
1、 optimization preferred-valie Maximum route of attribute value
This property is Huawei's private property , It can be understood as weight .
PV Attribute is the attribute with the highest routing priority on the device , The bigger the attribute, the better -( The larger the value, the better )– This property is not passed , Modifications can only be made on this device , It can only work on this device , The route entry passed out will not carry this attribute , therefore , After the other party receives the route , This attribute will still be added according to the default value .
Therefore, this attribute will be the most convenient attribute for interference routing on this device .
The first modification method :
[r4-bgp]peer 3.3.3.3 preferred-value 100------- With this command, you can modify the routing information sent by the corresponding neighbor PV value
Load sharing : That is, different flows take different lines , Share the pressure of a single line .
The second method : Modify attributes through traffic fetching
1)、 The prefix list captures traffic
[r4]ip ip-prefix pv permit 10.0.0.0 24
2)、 Routing policy modification properties
[r4]route-policy pv permit node 10
Info: New Sequence of this List.
[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---- Add empty table , Discharge the remaining flow
Info: New Sequence of this List.
[r4-route-policy]q3)、 stay BGP Call routing policy
3) stay BGP Call routing policy
[r4-bgp]peer 3.3.3.3 route-policy pvimport ---- Be careful , When calling, you need to choose the direction ; The direction of entry affects itself , Go out and influence others .
2、 optimization local-preference Route with the largest attribute
LP— Local preference , The default value is 100, The bigger the better ( The larger the value, the better ).LP Property can be passed , But only in IBGP Between neighbors , Pass on to EBGP Neighbor will not carry this attribute , therefore , This property is in IBGP The most common attribute of internal routing .
The first modification method :
[r3-bgp]default local-preference 200— take R3 In the routing information sent LP Value is modified to 200
The second method of modification :
[r3]ip ip-prefix lp permit 10.0.0.0 24
[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 200
[r3-route-policy]q
[r3]route-policy lp permit node 20
Info: New Sequence of this List.
[r3-bgp]peer 4.4.4.4 route-policy lp export ---- in the light of 4.4.4.4 Execute the routing strategy of out direction
3、 What you start is greater than what you learn from others , The priority of multiple methods of routing published by yourself is : Manual aggregation > Automatic aggregation >network> Reissue .
4、 optimization AS_PATH Attribute the shortest route
AS_PATH The basic principle of route selection — Record AS The fewer the number, the better
1) We turn on when aggregating routes AS_SET After function , Will be different AS Detailed routing AS The number is enclosed in curly braces and placed in AS_PATHS Properties of the . But pay attention to , When comparing routes , No matter how many... Are in braces AS Number , We all treat it as one .
2) Federal time , We also need to use... Within the Federation AS Conduct anti ring , We use parentheses to indicate . In this case , We're doing AS_PATH When comparing lengths , The contents in parentheses will not be considered .
The first modification method :( stay R1 In the direction of exit )
[r1]ip ip-prefix as permit 10.0.0.0 24
The second method of modification :( stay R2 In the direction of )
[r1]route-policy as permit node 10
Info: New Sequence of this List.
[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 Add... On the basis of No AS Number
overwrite Overwrite original As Number ---- Know the original AS Number , Then add AS Number
[r1-route-policy]apply as-path 11 22 33 additive ---- In consideration of anti ring , It is recommended to use additive
[r1]route-policy as permit node 20 — Empty table to put through all
Info: New Sequence of this List.
[r1-route-policy]
[r1-bgp]peer 12.0.0.2 route-policy as export — Out direction call affects AR2
[r2-route-policy]apply as-path 1 1 1 additive ---- We just added AS Number , May exist in real networks . because AS_PATH Property can also be used to prevent ring , therefore , Writing like this may lead to these AS Unable to accept the routing information . therefore , To avoid that , We can add AS Change all the numbers to the ones that actually leave AS Number , After all , The route selection is only related to the length , Nothing to do with the content .
5、 Preferred origin code (origin) Attribute optimal routing
OGN : Origin code
1) adopt Network Published routes ----I ----I Indicates that the route originated from IGP agreement ( Including static routing and direct routing ).
2) adopt EGP Protocol published routing ----e ---- refer to BGP The external gateway protocol before the protocol –EGP agreement , Because at present, the agreement is basically not used , therefore ,e Markers are rare .
3) Routes published in addition to the above two ways ----?---- The origin code mark of republishing route is ?
The priority relationship of these three origin codes is :I > E > ?
[r1]route-policy ogn permit node 10
Info: New Sequence of this List.
[r1-route-policy]if-match ip-prefix ogn
[r1-route-policy]apply origin ?
egp Remote EGP
Igp Local IGP
incomplete Unknown heritage
[r1-route-policy]apply origin incomplete
6、 optimization MED The route with the smallest attribute value
MED: Multi exit authentication attribute —MED The initial value of the property , Is inherited IGP The overhead value of the protocol or static route or direct route in the routing table .
This attribute can affect other AS How the traffic flows into yourself AS in
BGP When the agreement is announced , You can declare any routing entry in the routing table , By default, the cost values of these routes are inherited to BGP The routing MED Properties of the . If locally announced BGP Route to EBGP neighbor , Will carry MED value , Easy EBGP Neighbor's AS Internal equipment for routing . If it passes locally IBGP What the neighbors learned BGP route , Will also be passed on to their own EBGP neighbor , But it will MED Value return 0 Pass on . Because these metrics are not locally generated .
summary : There is EBGP All devices in the neighborhood are advised to declare internal AS The routing .
Be careful : We're doing MED When comparing values , Multiple identical route information must come from the same AS Can only be , namely AS_PATH The leftmost of the properties AS The numbers have to be the same , Otherwise, there is no comparability , We will skip this comparison directly .
[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 100
[r2-route-policy]q
[r4]ping -r -a 4.4.4.4 1.1.1.1 — Record orders , It can record the path information of data transmission
边栏推荐
- BUUCTF,Misc:LSB
- (POJ - 2912) rochambau (weighted concurrent search + enumeration)
- Bluebridge cup Guoxin Changtian single chip microcomputer -- hardware environment (I)
- Yyds dry goods inventory Spring Festival "make" your own fireworks
- 2022 electrician (elementary) examination questions and electrician (elementary) registration examination
- Some 5000+ likes, the development notes of a director of cosmic factory, leaked
- Programming language (1)
- WiFi 2.4g/5g/6g channel distribution
- The latest analysis of R1 quick opening pressure vessel operation in 2022 and the examination question bank of R1 quick opening pressure vessel operation
- 6.0 kernel driver character driver
猜你喜欢
3 environment construction -standalone
Summary of basic knowledge of exception handling
Cesium terrain clipping draw polygon clipping
Morning flowers and evening flowers
Take you to master the formatter of visual studio code
Exness: the Central Bank of England will raise interest rates again in March, and inflation is coming
Shell script three swordsman awk
Quick one click batch adding video text watermark and modifying video size simple tutorial
How can enterprises and developers take advantage of the explosion of cloud native landing?
Bluebridge cup Guoxin Changtian single chip microcomputer -- detailed explanation of schematic diagram (IV)
随机推荐
Mongoose the table associated with the primary key, and automatically bring out the data of another table
Covariance
[sg function]split game (2020 Jiangxi university student programming competition)
China's coal industry investment strategic planning future production and marketing demand forecast report Ⓘ 2022 ~ 2028
Exness: the Central Bank of England will raise interest rates again in March, and inflation is coming
LeetCode 1646. Get the maximum value in the generated array
Blue Bridge Cup -- Mason prime
IPhone development swift foundation 08 encryption and security
[flax high frequency question] leetcode 426 Convert binary search tree to sorted double linked list
Some 5000+ likes, the development notes of a director of cosmic factory, leaked
On my first day at work, this API timeout optimization put me down!
Classification and extension of OC
Leetcode week 4: maximum sum of arrays (shape pressing DP bit operation)
Yyds dry goods inventory Prometheus alarm Art
QGIS grid processing DEM data reclassification
What are the common computer problems and solutions
Data consistency between redis and database
Summary of fluent systemchrome
[golang] leetcode intermediate - alphabetic combination of island number and phone number
Leetcode: a single element in an ordered array