当前位置:网站首页>GVRP of hcna Routing & Switching

GVRP of hcna Routing & Switching

2021-08-08 00:02:49 Linux-1874

   We learned a lot about the different vlan Inter routing related topics , Please refer to https://www.cnblogs.com/qiuhom-1874/p/15110336.html, Let's have a chat today vlan Dynamic registration related topics ;

   First of all GVRP Let's get to know before GARP;GARP yes Generic Attribute Registration Protocol An acronym for , General attribute registration protocol ; It is a protocol specification , The main function is to distribute between switches 、 spread 、 Register some kind of information (VLAN attribute 、 Multicast address, etc ), It is mainly used in large and medium-sized networks , Used to improve the management efficiency of the switch ; and GVRP yes GARP A concrete realization of ,GARP VLAN Registration Protocol,VLAN Registration Agreement ; It is mainly used to maintain equipment dynamic status VLAN attribute ; adopt GVRP agreement , A switch vlan Will quickly spread to the entire switching network ;GVRP Realized VLAN Dynamic distribution of properties , Registration and dissemination , This reduces the workload of Administrators , Also can guarantee VLAN The correctness of the configuration ;

   Technical background

   experiment : The following Topology , Achieve the same VLAN Of pc Interworking

   analysis : To realize the above experimental Topology pc1 and pc3 Communications ,pc2 and pc4 Communications , All we need to do is sw1 and sw2 To create a vlan 10 and vlan 20, Then add the corresponding port to the corresponding port vlan in , Then set the ports connected to each switch to trunk that will do ;

  sw1 Configuration of

sys
sys sw1
vlan batch 10 20
int g0/0/1
p l a
p d v 10
int g0/0/3
p l a
p d v 20
int g0/0/2
p l t
p t a v 10 20 
View Code

   verification : see sw1 Upper vlan Information

  sw2 Configuration of

sys
sys sw2
int g0/0/1
p l t
p t a v all 
int g0/0/2
p l t
p t a v all
View Code

   verification : see sw2 The port of vlan Information

   Tips : You can see g0/0/1 and g0/0/2 Both interfaces are trunk, And allow all vlan adopt ;

  sw3 Configuration of

sys
sys sw3
vlan batch 10 20
int g0/0/1
p l a
p d v 10
int g0/0/3
p l a
p d v 20
int g0/0/2
p l t
p t a v 10 20
View Code

   verification : see sw3 Of vlan Information

   verification :pc1 ping pc3 perhaps pc2ping pc4 See if it works ?

   Tips : You can see pc1 Now? ping no pc3, Again pc2 also ping no pc4;

   stay sw2 Of g0/0/1 Grab the bag and have a look , Look at the corresponding pc1pingpc2 Whether your bag has passed ?

   Tips : You can see pc1 Send to arp The broadcast arrived sw2, But no reply ;

   stay sw2 Of g0/0/2 Mouth grab , Look at the corresponding arp Whether it has passed g0/0/2?

   Tips : You can see in the sw2 mouth g0/0/2 Mouth grab , I didn't catch it pc1 Send to arp radio broadcast , This explanation pc1 The data sent is in sw2 It's discarded ; Why is that ? The reason is simple , stay pc1 send out arp On the radio , stay sw1 After receiving it , It will be hurt vlan10 The label of , And then from sw1 Of g0/0/2 Send it out through the mouth , stay sw2 received sw1 Send to with vlan10 The label of the packet , although sw2 Of trunk All... Are allowed vlan The data package passed through , however sw2 There is no vlan10 and vlan20, therefore sw2 No port is in vlan10 and vlan20 , So when sw2 Received with vlan10 or vlan20 Label data , It can't flood out ( Switch flooding is at the same time vlan Flooding under port , The default is vlan1);

   The way to solve the above problem is simple , Is in the sw2 Create above vlan10 or vlan20 that will do ;

   verification : stay sw2 To create a vlan10, have a look pc1 Is it possible ping through pc3 Well ?

   Tips : You can see when sw2 To create a vlan10 in the future , Corresponding g0/0/1 and g0/0/2 The mouth will be automatically added to this vlan in ( as a result of trunk allow vlan The list contains vlan10); If at this time sw2 Received with vlan10 Tag broadcast , You can start from g0/0/1 and g0/0/2 Flood out of the mouth ;

   verification :pc1 ping pc3 See if it works ?

   Tips : You can see at this time pc1 can ping through pc3 了 ; From the above experiment, we can conclude that , If the same vlan Cross device communication , All switches along the link must have corresponding vlan, Packets can pass through the switch , just trunk Allow correspondence vlan, No corresponding vlan, Packets cannot be flooded out ;

  GVRP It is mainly to solve the above similar problems , The experimental topology above is relatively simple , We created it manually vlan It solved the problem , When the current network topology environment is complex ,vlan More , Manual management vlan It's easy to make a mistake , In order to facilitate administrator configuration and dynamic management vlan,GVRP Dynamic registration can be realized 、 Cancellation vlan, Let other switches learn dynamically vlan, And automatically add the corresponding port to the corresponding port vlan in ;

  GVRP Application

  1、 Receive messages from other switches VLAN Registration information , And dynamically update the local VLAN Registration information , Including the current VLAN、VLAN Members, etc .

  2、 Local VLAN The registration information is transmitted to other switches , So that all the supports in the same switching network GVRP Characteristic of the device VLAN Information agreed .

  3、 Switches can be created statically VLAN, It can also be dynamically through GVRP obtain VLAN Information . Manually configured VLAN Is static VLAN, adopt GVRP Created VLAN It's dynamic VLAN.GVRP Spread VLAN The registration information includes the static registration information manually configured locally and the dynamic registration information from other switches .

  GARP Message type

  1、join: Join in , Port join VLAN, Registration properties

 

   Tips : When a switch wants other switches to register their properties , It will send out join news ; When a switch wants other switches to log off their attribute information , It will send out leave news ; When the switch sends leave all When the news , Other exchanges that receive this message log off all properties ;

   experiment : Or the experimental topology mentioned above , Each switch is turned on at the corresponding interface GVRP, And then in sw1 Static creation on vlan20, Look at the other switches vlan change

  sw1 Of g0/0/2 Mouth open gvrp

  sw2 Of g0/0/1 and g0/0/2 Mouth open gvrp

  sw3 Of g0/0/2 Mouth open gvrp

   Tips : Turn on GVRP It must be enabled globally in system mode gvrp, Then enter the port mode and turn it on gvrp Talent , secondly gvrp Only in trunk Open your mouth , Not trunk The mouth won't open ;

   verification : see sw2 Have you learned vlan20?

   Tips : You can see in the sw2 On , adopt gvrp I learned vlan20, And put g0/0/1 Mouth and g0/0/2 Add everything to vlan20 in ; Here's a point ,gvrp The registration and logout of are one-way , Only received gvrp The port of the message can be learned and added to the corresponding port vlan in ; For logoff, it is also one-way , Only receive the corresponding gvrp Of leave news , The corresponding port will start from the corresponding port vlan In the delete ;

  GVRP One way registration

   experiment : In the above experimental environment , stay sw1 To create a vlan100, have a look sw2 and sw3 Those ports can be added to vlan100?

   Tips : Here's a little bit of attention , We created vlan It has to be a correspondence trunk Allow... In the list vlan, Corresponding vlan Will be sent out , Let other switches learn to register ;

   verification : see sw2 Upper vlan Information

   Tips : You can see in the sw2 On , Dynamically created vlan100, also g0/0/1 Add the mouth to vlan100 in ,g0/0/2 The mouth is not added to vlan 100 in , The reason is g0/0/2 Port did not receive switch 1 Of join news ;

   verification : see sw3 Upper vlan Information

   Tips : You can see sw3 I didn't learn vlan100, The reason is vlan100 Not in the sw3 Of trunk In the permission list of the mouth , therefore sw3 Didn't learn vlan100;

   verification : modify sw3trunk The allowed list is all allowed vlan, have a look sw3 Whether we can learn vlan100 Well ?

   Tips : You can see when sw3 Of g0/0/2 Mouth permission vlan The list is modified to allow all vlan After the adoption of , Corresponding sw3 Just learn vlan100 also g0/0/2 The mouth is also added to vlan100 in ( as a result of g0/0/2 I can receive sw2 forwarding join news );

   GVRP One way logoff

   experiment : In the above experimental environment , stay sw3 Delete... On vlan20, have a look sw2 Upper vlan What will happen to the information ?

   Tips : You can see in the sw3 It's deleted from vlan20 in the future , Corresponding vlan20 From static to dynamic , And it corresponds to g0/0/2 Join it , This shows that this dynamic vlan20 It's from g0/0/2 Received by mouth , From sw2 Learned vlan20;

   verification : see sw2 Upper vlan Information

   Tips : You can see from the screenshot above , stay sw3 Delete... On vlan20 Before ,sw2 On g0/0/1 and g0/0/2 Add everything to vlan20; stay sw3 Delete... On vlan20 in the future , Corresponding g0/0/2 The mouth starts from vlan20 In the delete ,g0/0/1 The mouth is still there vlan20 in ; The reason here is the same as one-way registration , because g0/0/1 received sw3 Of leave news , therefore g0/0/2 from vlan20 In the delete , and g0/0/1 Didn't receive sw3 Of leave news , So it will still be vlan20 in ;

   verification : see sw1 Upper vlan Information , See if there's any change ?

   Tips : stay sw1 Check out vlan Information , Corresponding vlan20 Nothing has changed , The reason is that sw1 On vlan20 We created it manually , Statically created vlan Priority is higher than dynamic learning , So even if sw1 received sw2 forwarding leave Information ,sw1 Upper vlan20 It will not be deleted , The corresponding port will not be from vlan20 In the delete ; Through the above experiments , We can sum up ,GVRP The registration and logout of are one-way , Only the port receiving the corresponding message will join the corresponding port vlan Or from the corresponding vlan In the delete ; Secondly, static priority is higher than dynamic priority ;

  GVRP Registration mode

  GVRP There are three registration modes , Namely normal,fixed,forbidden Pattern ; Default on gvrp Time is normal Pattern ;

  1、normal Pattern : The default mode , Allows the corresponding port to be static and dynamic vlan register , Cancellation , Both dynamic and static messages are sent vlan Declaration message for ( namely , Port is normal Pattern , It will receive and send dynamic and static messages sent by other switches vlan Registration or logout message );

  2、fixed Pattern : Dynamic... Is not allowed vlan Register or unregister on Port , And send only static vlan Declaration message for ;( We can understand it as fixed Mode can only send static messages vlan Registration or cancellation of , Don't learn dynamics vlan, If you have learned , Delete , It only restricts the corresponding port of the switch to learn and send dynamic messages vlan Information )

  3、forbidden Pattern : Dynamic... Is not allowed vlan Register or unregister on Port , Delete the port at the same time vlan1 Everything else vlan; That is, don't learn dynamics VLAN, At the same time, the learned before the corresponding port vlan Empty it all , Retain VLAN1;

   verification : see sw1 Of gvrp Registration mode

   verification : The above experiment , stay sw1 Admiral g0/0/2 The registration mode of is modified to forbidden Pattern , Look at the corresponding vlan What's going to change ?

   Tips : You can see in the sw1 Change the registration mode to forbidden in the future , Corresponding g0/0/2 In all except vlan1 All but vlan It's deleted ;

   verification : see sw2 and sw3 Upper vlan, See what's changed ?

   Tips : You can see in the sw2 Shanghe sw3 Before that sw1 On learning vlan20 It was also cancelled ;

   verification : stay sw3 To create a vlan1000, have a look sw1 Will you learn ?

   stay sw3 To create a vlan1000

   stay sw1 Check out , Did you learn sw3 Upper vlan1000 Well ?

   Tips : You can see in the sw3 To create a vlan 1000, stay sw1 I didn't learn ; Description: change the registration mode to forbidden in the future , Corresponding to the dynamic data on the link vlan For this port , It won't learn , At the same time, it will send out to log off all vlan news , Let other switches delete the dynamic information learned from this port vlan; That is, in this mode, the corresponding port does not send dynamic or static registration messages , Nor do you accept registration or logout messages sent by other switches , At the same time, it will only send leave all Message to other switches ;

   verification : In the above experiment sw3 Of g0/0/2 The port registration mode is modified to fixed, Look at the corresponding vlan What has changed ?

   Tips : You can see in the sw3 Upper handle g0/0/2 It is amended as follows fixed Pattern , Corresponding sw3 Come on ,vlan The information has not changed , The reason is that sw3 All the vlan It's all static ;

   verification : stay sw2 To create a vlan500, have a look sw3 Can you learn ?

   Tips : We are sw3 Of g0/0/2 Modify the registration mode of the port to fixed, Corresponding sw2 Upper vlan The information has not changed ,vlan1000 You can still start from sw3 Learning to ;

   stay sw3 View the corresponding vlan500 Did you learn ?

   Tips : You can see in the sw3 I didn't learn vlan500; From the above experiments we can see that fixed Registration mode , It only limits the ability of the corresponding port to dynamically learn from other switches vlan Information , When it does not affect you to send your own to other switches vlan Information , It doesn't affect other switches to learn their own vlan Information , and forbidden Compared to model ,fixed Mode only limits you to learn from other switches vlan Information ( If there is dynamic learning before vlan, Will be deleted , Dynamic information forwarded from this port vlan To other switches , Corresponding on other switches vlan Information will also be deleted , That is, the port has only static vlan, There's no movement vlan, dynamic vlan You can't get through this port , Only static vlan Get out of this port ), It does not limit other switches to learn their own vlan Information ; and forbidden Pattern , It limits yourself from learning other switches vlan Information , At the same time, it also restricts other switches from learning their own vlan Information ;

版权声明
本文为[Linux-1874]所创,转载请带上原文链接,感谢
https://chowdera.com/2021/08/20210808000124151f.html

随机推荐