当前位置:网站首页>CCNP Part 11 BGP (III) (essence)

CCNP Part 11 BGP (III) (essence)

2022-07-06 19:07:00 CCIE-Yasuo

CCNP- Chapter 11 -BGP( 3、 ... and )

BGP Thirteen line principles ( Bigger )

Can be modified before 7 strip , After 6 Article cannot be modified , So actually 7 strip
Follow ACL equally , From top to bottom , For example, if the first comparison comes out, it won't go on

 More commonly used in work , Article 4 basis as-path

One , The weight -Weight

1. Cisco is called weight , It is privately owned by Cisco , In Huawei, it is called first priority (Pref-Val)
Cisco and Huawei are both locally effective , This means that only incoming routing entries can be managed

 The same environment as the previous load balancing , The middle device 
 Then both sides have the same address 

stay BGP in , The first selection principle is weight ,Weight
 Insert picture description here
Generally, as long as you receive this thing , The default is 0( The bigger the better )
But locally 32768
Because the default is 0, So normal can't compare
Modification method At this time, we need to use strategies !
ACL combination Route-map, So why is learning bad Route-map I'm sure I can't learn well BGP

First use acl Take this 123.1.1.0 The network segment , You can catch whatever network segment you want to change
then route-map Match first
 Insert picture description here
Once it was to modify the next hop so that it could connect even when there was no route
But here , It's modification weight value
 Insert picture description here
Anyway, no matter how much , If you are older than him
We also need to make an empty permit 20
Then hook up in the agreement
stay BGP The connection in is not connected in the whole agreement
But for the corresponding neighbors
 Insert picture description here

> meanwhile , because Weight It can only be valid locally 
> So this attribute can only be used in The direction of the route-map

Let's have a look at this time bgp surface
 Insert picture description here
You can see that the weight has become 123, The next one also jumps to 3.3.3.3
 Insert picture description here
Same , The routing table will also change , To verify .

There is another modification weight The way to
 Insert picture description here
But this kind also has disadvantages
The disadvantage is that as long as the weight of any item announced to the neighbor is sent 123
Use route-map The reason is that it needs to be refined to a network segment , Even a host IP

Two , Local priority

This thing is called local-preference, The default value is 100

stay BGP This one in the table is abbreviated locprf This is the local priority
 Insert picture description here > The same is for acl+route-map Grab prefix > The practice is almost the same , It's just a change of name  Insert picture description here

stay route-map This one inside set In the options
Many things in it are BGP Of
 Insert picture description here
set local-preference Numbers

 Don't forget to write an empty route-map

 Insert picture description here
Now come to hook
The same is done here in the neighborhood

TAG: If someone else sent it in route-map Write on in, You can modify the priority when sending it out

 Insert picture description here
For all routing entries on this machine , This is all for local priority .

 Insert picture description here
Means any network announced locally , This number is sent out

Then go to see bgp It has changed
 Insert picture description here

 But there is a special case 
 stay IBGP in in/out All directions are ok 
 But in EBGP in ,in Sure ,OUT Direction is not allowed 
route-map Do it , It doesn't work 
 So this route selection is generally used for IBGP

3、 ... and , Prefer local routes

The biggest feature : The next jump is 0.0.0.0, It means local
This applies to EBGP Of
But it can't be used IBGP
because , If you receive a routing entry from yourself, it's a loop
As long as it is received, it will trigger horizontal segmentation , So I can't use it here

for instance :
EBGP Under the environment of , The default setting is no configuration
192.168.1.0/24
I have
But I received , At this time, please tell me which way I will choose ?
 Insert picture description here
You can see that you have selected the following , But this is the weight chosen .
If we force the above weight Change to ratio 32768 Big
So what happens ?
Let's see
 Insert picture description here
You can see , There is one in front of both entries R,R What is the ?
R The delegate cannot write to the routing table
Why is that ?

 First think , Why can we announce ?
 Before any agreement is announced , At least you have ?
 that , I am directly connected , What's wrong with you like me? Why should you 
 You look exactly like me , It's better than me ?
 My wife loves me, and I'm the genuine !!!
 I admit that you are better than me ( The weight )
 therefore BGP He was selected in the table , But it will not enter the routing table 

Four :AS-PATH( It can only be used for EBGP)

In this , Is the most commonly used value , It's also the default value , Why do you say that ?
Look!
1. The weight , Everyone defaults to the same
2. priority , Everyone is the same
3. Local , You've done my original match ?
4. You can also interfere with how I walk ?

Insert a dongdongha
This thing is called neighbor shutdown , You can also ask him to freeze .

 If you can contact operators in the future , Data Center 
 I'm sure it can be used BGP Of 
 Then here's a question 
 The customer suddenly stopped renewing , He said he would give you the money in a few days, and you said you believed him 
 But what? , If you take his neighbor no 了 
 It means to reconfigure 
 At work BGP You can only configure more but not less 
 And you this no, It may also involve other issues 
 So the general industry habits in this industry 
 Meeting shutdown Lose this neighbor , Even if something goes wrong, just drive it directly 
 If you don't recover, it won't be so good to put it here all the time 
 But if you reconfigure , It will be a lot of trouble 

 Insert picture description here
His interface will not be closed , It's just that the neighbors shut down
 Insert picture description here
You can see clearly here idle state , It was manually closed by the administrator

Back to the point ,AS-Path

Here we go again AS-PATH 了 ? What does that mean ?
It's this thing
 Insert picture description here
Follow this i It doesn't matter !
 Insert picture description here
For example, the meaning of this picture , This is this. 123.1.1.0 The routing entry for , Yes, first 300, after 200 Come here

In this attribute , It's the way of comparison , Who is more and who is less .
The less, the better. . Represents faster .

In this modified place , Can only increase , Can't reduce
What does that mean ?

 It's meaningless 
 Like you killed someone , Rebel 10 year 
 Hey, I don't , Poor quality , There is no repentance after killing , Still like this or that 
 Life imprisonment , You know what 
 Can only add , But it can't be reduced 

How to do this ?
Same use acl+route-map Catch it first
then set as-path prepend Insert picture description here
Then write the number after it ( representative AS Just number it , Add as much as you like )
But be careful
Remember to write an empty route-map rearwards
Remember to hook it up behind the neighbors !
 Insert picture description here

effect :
 Insert picture description here

 There is a question 
 If the one I added happens to be in this network , After that, it's really 
 Don't you trigger the anti ring mechanism? Then don't you gg Did you? ?
 Missing routing entries will kill you 

Then it can be written like this at this time
I copy myself infinitely  Insert picture description here
Since you can't be executed , I can double it for you ?

Let's see the effect at this time
 Insert picture description here
You can see , The above ones are all the same
So this as-path, The path is selected according to the number
It can prevent loop , It can also be adjusted manually
What if the same quantity cannot be compared ?
That's a question , Next jump , coming

5、 ... and . Origin attribute

The origin attribute is here
The priority is from I-E-?
 Insert picture description here
This path hinder i and e and ?
It doesn't mean igp and egp And what
This i On behalf of BGP Medium IBGP agreement
This E That is the representative. EGP,EGP It's something that was more than ten years ago, and it has long been eliminated
Then the question mark represents the meaning of redistribution
It's the same thing , Also in route-map Medium set Inside
 Insert picture description here
The detailed steps are exactly the same as the previous ones, so I won't write them
1.ACL take sb. into custody
2.route-map matching
3.set Attribute find what you want
4. Interface or protocol hooking
5. Remember to write an empty route-map Follow me

6、 ... and .MED value ( By default IBGP Effective within... And modifiable )

This parameter is actually the routing entry in the routing table
Manage the data behind the distance

It's called MED, This value is in the BGP The smaller China is, the better

practice :
ACL Grasp the routing prefix
 Insert picture description here
First do in Direction
 Insert picture description here
It means that coming in from this neighbor takes effect
Then come and have a look at this time bgp surface
 Insert picture description here
Sometimes it may not take effect , Then you can use this command  Insert picture description here
This situation is : By default , stay EBGP Of in Direction is not effective .
What does this command mean , Always compare med value

summary

1. The weight ( Locally available , It can be applied to IBGP and EBGP) Cisco private , It can only be used for in Direction , The default value is 0.
2. Local priority , It can be used for IBGP In the environment , The default value is 100,in/out All possible 
 stay EBGP In the environment , It can only be used in in Direction ,out Direction does not take effect 
3. More believe in local , The next jump is 0.0.0.0 Local 
4.as-path, The less you pass, the better , Copy yourself , What you compare is not size 
 And it passes from the back to the front ( Support only EBGP)IBGP It can be transmitted but not effective 
5. Origin attribute (I>E>?), All environments are in effect 
6.MED, measurements , The smaller the better. . By default 0. Not supported by default EBGP
 If you want to use EBGP The situation of , The parameters will change after modification, but ` The router itself does not compare by default `
 Need to make a bgp always-compare-med
 It means always compare MED value  
 All experiments of this time are built on the simulator EVE-NG Next 
 So every experiment will be done with soft restart or direct restart 
clear ip bgp * soft  bgp Soft restart 
clear ip bgp *  bgp Process restart 
 Is it clear in actual work , But if the environment is very large, it is better to soft restart or wait 

The next chapter goes on BGP

OK, this time is over , Welcome to my article . I am a CCIE-Yasuo, Just pay attention to me if you like , See you in the next issue .
Welcome the students of Xinmeng education to communicate together , I am a 41 The strong wind and swordsman of the period
At the same time, I am also a 18 It was written at school by a student from a college aged , If there is any mistake or infringement, please contact us in time to delete .

原网站

版权声明
本文为[CCIE-Yasuo]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202131247086122.html

随机推荐