CN113542136B - Interface attribute adjusting method and device - Google Patents

Interface attribute adjusting method and device Download PDF

Info

Publication number
CN113542136B
CN113542136B CN202110629484.6A CN202110629484A CN113542136B CN 113542136 B CN113542136 B CN 113542136B CN 202110629484 A CN202110629484 A CN 202110629484A CN 113542136 B CN113542136 B CN 113542136B
Authority
CN
China
Prior art keywords
interface
attribute
route
value
evpn
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110629484.6A
Other languages
Chinese (zh)
Other versions
CN113542136A (en
Inventor
魏建军
黄慧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202110629484.6A priority Critical patent/CN113542136B/en
Publication of CN113542136A publication Critical patent/CN113542136A/en
Application granted granted Critical
Publication of CN113542136B publication Critical patent/CN113542136B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/48Routing tree calculation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/66Layer 2 routing, e.g. in Ethernet based MAN's

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides an interface attribute adjusting method and device, which are applied to a first PE device in an EVPN (event-transient-noise protection) networking, wherein the EVPN networking also comprises a second PE device, and the method comprises the following steps: receiving a first EVPN route sent by the second PE device, wherein the first EVPN route comprises a first extended community attribute of an Ethernet virtual private tree and first extended template information, the first extended community attribute comprises a leaf tag and a flag bit, and the first extended template information comprises a corresponding relation between an interface attribute of an input interface of the second PE device and time; according to the leaf label and the flag bit, if the fact that an ingress interface of the second PE device is configured with an Ethernet virtual private tree function is confirmed, the first extended template information is analyzed from the first EVPN route; and based on the current time, refreshing a local routing table by utilizing the corresponding relation between the interface attribute in the first extended template information and the time.

Description

Interface attribute adjusting method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for adjusting an interface attribute.
Background
With the increasing of the traffic carried on the Ethernet Virtual Private Network (EVPN) Network, the Media Access Control (MAC) addresses managed by the EVPN will also increase, these MAC addresses of the users will spread in the Network along with the EVPN route, and finally all interfaces in the same broadcast domain can be intercommunicated in two layers. But users without the need for mutual access neither can isolate the flooded BUM (Broadcast)&Unknown unicast of Unknown-unicast&Multicast) traffic, unicast traffic cannot be isolated. Therefore, if the user wants to isolate the user interfaces without the requirement of mutual access in the same broadcast domain, it is necessary to do soEthernet virtual private tree (Eth) to be deployed in EVPN networks e rn e t Virt ua l Pri va t e Tr ee ,EVPN E-Tr ee ) And (4) performing functions.
According to the standard protocol, once the ROOT/LEAF attribute is deployed on the incoming interface of the user access side, the routing and traffic forwarding are continuously performed according to the rule corresponding to the state. For some special requirement scenarios, for example, some enterprises need to make the devices have different interface attributes at different time periods, only the configuration can be continuously modified by an administrator, and the flexibility is not provided.
Therefore, how to configure the attributes of the interface so that the interface has flexibility to meet different service requirements is one of the considerable technical problems.
Disclosure of Invention
In view of the above, the present application provides a method and an apparatus for adjusting an attribute of an interface, so that the interface has flexibility to meet different service requirements.
Specifically, the method is realized through the following technical scheme:
according to a first aspect of the present application, there is provided an interface attribute adjustment method applied to a first service provider network edge PE device in an ethernet virtual private network EVPN networking, where the EVPN networking further includes a second PE device, the method including:
receiving a first EVPN route sent by the second PE device, wherein the first EVPN route comprises a first extended community attribute of an Ethernet virtual private tree and first extended template information, the first extended community attribute comprises a leaf tag and a flag bit, and the first extended template information comprises a corresponding relation between an interface attribute of an input interface of the second PE device and time;
according to the leaf tag and the flag bit, if the fact that an ingress interface of the second PE device is configured with an Ethernet virtual private tree function is confirmed, the first extended template information is analyzed from the first EVPN route;
and based on the current time, refreshing a local routing table by utilizing the corresponding relation between the interface attribute in the first extended template information and the time.
According to a second aspect of the present application, there is provided an interface attribute adjusting apparatus, which is disposed in a first service provider network edge PE device in an ethernet virtual private network EVPN networking, where the EVPN networking further includes a second PE device, the apparatus including:
a first receiving module, configured to receive a first EVPN route sent by the second PE device, where the first EVPN route includes a first extended community attribute of an ethernet virtual private tree and first extended template information, the first extended community attribute includes a leaf tag and a flag, and the first extended template information includes a correspondence between an interface attribute of an ingress interface of the second PE device and time;
a first parsing module, configured to parse the first extended template information from the first EVPN route according to the leaf tag and the flag bit if it is determined that an ingress interface of the second PE device is configured with an ethernet virtual private tree function;
and the refreshing module is used for refreshing a local routing table by utilizing the corresponding relation between the interface attribute in the first extended template information and the time based on the current time.
According to a third aspect of the present application, there is provided an electronic device comprising a processor and a machine-readable storage medium, the machine-readable storage medium storing a computer program executable by the processor, the processor being caused by the computer program to perform the method provided by the first aspect of the embodiments of the present application.
According to a fourth aspect of the present application, there is provided a machine-readable storage medium storing a computer program which, when invoked and executed by a processor, causes the processor to perform the method provided by the first aspect of the embodiments of the present application.
The beneficial effects of the embodiment of the application are as follows:
by carrying the first extended group attribute and the first extended template information in the EVPN route, when the second PE device is confirmed to start the virtual Ethernet special tree function based on the first extended group attribute, the recorded corresponding relation between the interface attribute of the access interface of the second PE device and the time is obtained based on the first extended template information, and then the routing table locally recorded by the first PE device is updated, so that the interface attribute of the access interface is adjusted in a time-sharing and flexible manner, and the flexibility of flow forwarding of the PE device in the EVPN networking is improved.
Drawings
Fig. 1a is a schematic diagram of a message format of an E-Tree extended community attribute provided in the present application;
fig. 1b is a schematic diagram of an EVPN networking architecture provided herein;
fig. 2 is a schematic flowchart of an interface attribute adjusting method according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another interface attribute adjustment method according to an embodiment of the present application;
fig. 4a is a schematic flowchart of another method for adjusting an interface attribute according to an embodiment of the present application;
fig. 4b is a schematic diagram of another message format for extending community attributes according to an embodiment of the present application;
fig. 5 is a schematic architecture diagram of another EVPN networking network provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of an interface attribute adjusting apparatus according to an embodiment of the present application;
fig. 7 is a schematic diagram of a hardware structure of an electronic device implementing an interface attribute adjustment method according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with aspects such as the present application.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the corresponding listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at" \8230; "or" when 8230; \8230; "or" in response to a determination ", depending on the context.
Currently, the EVPN E-Tree function implements an E-Tree model defined by the Metro Ethernet Forum (MEF) by setting an ingress interface of an access PE device to a Leaf (Leaf) attribute or a Root (Root) attribute. The model can realize that:
(1) The interfaces with the Leaf attribute can only send the traffic with the interfaces with the Root attribute, and the traffic between the interfaces with the Leaf attribute is isolated.
(2) The port attribute interface can communicate with interfaces of other port attributes and interfaces of Leaf attributes.
Based on this principle, the standard defines an E-Tree extended community attribute. The format of the packet of the extended community attribute is shown in fig. 1a, and includes a Leaf Label (Leaf Label) and a flag bit (Flags), where the bit width of the flag bit is 8, and the lowest bit (i.e., the last bit) of the flag bit is used to indicate whether the EVPN route is from an interface of the Leaf attribute; the extended group attribute can be carried in an EVPN route to be transmitted in an EVPN networking so as to realize the isolation of the flow between interfaces of the Leaf attribute; with different traffic, EVPN routes propagated in EVPN networking correspondingly differ. When the traffic is known unicast traffic, the extended community attribute is propagated in the EVPN network through a Media Access Control (MAC) route, and when the traffic is BUM traffic, the extended community attribute is propagated in the EVPN network through an Ethernet Auto Discovery route (Ethernet Auto Discovery Per ES).
Describing by taking the EVPN networking shown in fig. 1b as an example, the EVPN networking shown in fig. 1b includes 2 service Provider Edge (PE) devices and 5 Customer Edge (CE) devices, where the 2 PE devices are PE1 and PE2, respectively; the 5 CE devices are: CE1, CE2, CE3, CE4, and CE5, CE1 and CE2 are connected to PE1, and CE3 to CE5 are connected to PE2.
As shown in fig. 1b, when the propagated traffic is known unicast traffic, the implementation process is as follows:
(1) The MAC addresses of the access sides are mutually propagated between PE1 and PE2 through MAC routing. Taking the MAC address of CE1 accessing PE1 as MAC1 as an example, since the ingress interface of CE1 accessing PE1 is an interface with Leaf attribute, the MAC route carrying MAC1 address will carry the extended community attribute of EVPN E-Tree. All bits of the Leaf tag field of the extended community attribute will all be set to 0 and the lowest bit of the Flags (i.e., the bit labeled L in Flags in FIG. 1 a) will be set to 1 to indicate that the interface attribute of the ingress interface corresponding to MAC address 1 is configured as a Leaf attribute.
(2) PE2, upon receiving the MAC route of PE1, checks the least significant bits of the Flags. Since the position is set to 1, PE2 marks the entry corresponding to MAC1 in the local MAC routing table.
(3) When PE2 receives a known unicast traffic sent to CE4 from its Leaf attribute interface, PE2 will determine, according to the flag in the local MAC routing table, that the known unicast traffic needs to be sent to an interface belonging to a Leaf attribute at a remote end, and discard the known unicast traffic, thereby implementing isolation of the known unicast traffic between the Leaf attribute interfaces.
As shown in fig. 1b, when the propagated traffic is BUM traffic, the implementation process is as follows:
(1) After an EVPN E-Tree function is deployed in an EVPN networking, a special Ethernet automatic discovery route is mutually transmitted between PE1 and PE2. The normal Ethernet automatic discovery route carries an Ethernet Segment Identifier (ESI), but a field where the ESI is located in the Ethernet automatic discovery route used by the Ethernet virtual private Tree EVPN E-Tree function is set to be all 0, and the Ethernet automatic discovery route carries the extended community attribute of the EVPN E-Tree. The Leaf tag of the extended community attribute is the tag value, and the lowest bit of Flags is set to 0.
(2) After PE1 receives the ethernet auto-discovery route, since the ESI value is all 0, it is determined that the ethernet auto-discovery route is used to transmit a Leaf tag, and PE1 stores the tag value carried by the Leaf tag in the extended community attribute.
(3) When the PE1 needs to send the BUM traffic to the PE2, and the BUM traffic comes from the Leaf attribute interface of the PE1, the PE1 encapsulates the label value of the Leaf label stored in the previous step for the traffic packet, and then sends the traffic packet to the PE2.
(4) After receiving the BUM traffic sent by the PE1, the PE2 finds that the message of the BUM traffic encapsulates the locally allocated Leaf label, so that the BUM traffic is not sent to the CE4 and the CE5 having the interface attribute of the access PE2 as the Leaf attribute, but only sent to the CE3 (the interface attribute of the access interface of the access PE2 is the Root attribute), thereby realizing isolation of the BUM traffic between the Leaf attribute interfaces.
However, the inventor finds that, in the two schemes, once the Root or Leaf attribute is deployed on the ingress interface of PE1 or PE2 according to the standard protocol interface, the routing and traffic forwarding are continuously performed according to the rule corresponding to the state, and for some special demand scenarios, when the interface attribute needs to be frequently switched, the configuration can be continuously modified only by an administrator, and there is no flexibility.
In view of this, the present application provides an interface attribute adjusting method, which is applied to a first PE device in an EVPN networking, where the EVPN networking further includes a second PE device, and the first PE device receives a first EVPN route sent by the second PE device, where the first EVPN route includes a first extended group attribute of an ethernet virtual private tree and first extended template information, the first extended group attribute includes a leaf tag and a flag bit, and the first extended template information includes a corresponding relationship between an interface attribute of an ingress interface of the second PE device and time; analyzing the first extended template information from the first EVPN route if it is determined that the ingress interface of the second PE device is configured with an ethernet virtual private tree function according to the leaf tag and the flag bit; based on the current time, the corresponding relation between the interface attribute in the first extended template information and the time is used for refreshing a local routing table. By adopting the method, the first extended group attribute and the first extended template information are carried in the EVPN route, when the second PE equipment is confirmed to start the virtual Ethernet special tree function based on the first extended group attribute, the recorded corresponding relation between the interface attribute of the interface of the second PE equipment and the time is obtained based on the first extended template information, and then the routing table locally recorded by the first PE equipment is updated, so that the interface attribute of the interface is adjusted in a time-sharing and flexible manner, and the flexibility of flow forwarding of the PE equipment in the EVPN networking is improved.
The following describes the interface attribute adjustment method provided in the present application in detail.
Referring to fig. 2, fig. 2 is a flowchart of an interface attribute adjusting method provided in the present application, where the method is applied to a first PE device in an EVPN networking network, the EVPN networking network further includes a second PE device, and when the first PE device implements the interface attribute adjusting method, the method may include the following steps:
s201, receiving a first EVPN route sent by a second PE device.
The first EVPN route comprises a first extended community attribute and first extended template information of the Ethernet virtual private tree, the first extended community attribute comprises a leaf label and a flag bit, and the first extended template information comprises a corresponding relation between an interface attribute of an input interface of the second PE device and time.
In this step, when the second PE device opens the EVPN-E-Tree function and the interface attribute of the access interface accessed to the second PE device changes, the second PE device captures first extended template information, where the first extended template information includes a correspondence between the interface attribute and time, and then encapsulates the first extended template information into the first EVPN route; meanwhile, the second PE device modifies the values of the leaf tag and the flag bit in the first extended community attribute to indicate that the ingress interface of the second PE device opens the EVPN-E-Tree function and indicate that the interface attribute changes. And then carrying the first extended community attribute and the first extended template information in a first EVPN route and sending the first extended community attribute and the first extended template information to the first PE equipment.
It should be noted that the first extended community attribute is an extended community attribute of EVPN-E-Tree, and "first" is merely distinguished from a second extended community attribute that follows, and has no actual physical meaning. Similarly, the first extension template information, the first EVPN route, the first MAC route, and the first ethernet auto discovery route have no actual meaning, and are only distinguished from the subsequent second extension template information, the second EVPN route, the second MAC route, and the second ethernet auto discovery route.
Optionally, the first extended template information may be set in a TLV extended field in the first EVPN route.
S202, according to the leaf label and the flag bit, if the fact that the Ethernet virtual private tree function is configured on the input interface of the second PE device is confirmed, first expansion template information is analyzed from the first EVPN route.
In the step, when the value of the leaf label and the value of the flag bit meet the starting condition of the EVPN-E-Tree function, the fact that the EVPN-E-Tree function is started by the access interface of the second PE device is confirmed. And then, analyzing first extension template information from the first EVPN route, wherein the first extension template information records the corresponding relation between the interface attribute of the input interface of the second PE device and time. The time may be understood as a time period, i.e. the interface attribute that is enabled by the incoming interface during the time period.
It should be noted that the number of the ingress interfaces included in the first extension template information may be multiple, that is, the correspondence between the interface attribute of the multiple ingress interfaces on the second PE device and the time.
S203, based on the current time, refreshing a local routing table by using the corresponding relation between the interface attribute in the first extended template information and the time.
In this step, after the first PE device parses the first extended template information, the corresponding relationship between the interface attribute in the first extended template information and time is locally recorded, for example, recorded in an extended template information table, as shown in table 1, where a, B, C, D, and D in table 1 represent time points, and values thereof may be determined according to actual situations.
TABLE 1
Figure BDA0003103084750000081
On the basis, because the message is forwarded according to the routing table, the interface attribute corresponding to the time matched with the current time in the first extended template information can be marked in the routing table. And when the interface attribute is confirmed to be changed, the first PE device refreshes the local routing table again and marks the corresponding interface attribute into the routing table. Therefore, dynamic adjustment of the interface attribute is realized, the interface has flexibility, different service requirements are met, and the flexibility of flow forwarding is improved.
Optionally, the first EVPN route in this embodiment includes a first MAC route and a first ethernet auto-discovery route, and on this basis, the first PE device may perform step S202 according to the following procedure: when the first EVPN route is the first MAC route, if the leaf tag is a first set value and the lowest bit of the flag bit takes a value of a second set value, it is determined that the ingress interface of the second PE device is configured with an ethernet virtual private tree function; analyzing the first extended template information from the first EVPN route if the value of the designated bit of the flag bits other than the lowest bit is the second set value; when the first EVPN route is a first ethernet auto discovery route, if the value of the leaf tag is not the first set value and the value of the lowest bit of the flag bit is the first set value, it is determined that the ingress interface of the second PE device is configured with an ethernet virtual private tree function; and if the value of the designated bit of the flag bits except the lowest bit is the second set value, parsing the first extended template information from the first EVPN route.
Specifically, the first set value may be, but is not limited to, 0, the second set value may be, but is not limited to, 1, and the first set value is different from the second set value. The specified bits other than the least significant bit may be, but is not limited to, the second last bit of the flag bit, for example, when the flag bits is 8 bits as shown in fig. 1a, the least significant bit is the 8 th bit, and the specified bit may be, but is not limited to, the 7 th bit, and the second PE device indicates that the first EVPN route carries the first extended template information by modifying the value of the specified bit. And the second PE device indicates that the entry interface of the second PE device opens the EVPN-T-Tree function by modifying the value of the Leaf Label in the first extended group attribute and the value of the lowest bit of the flag bits.
Specifically, when the second PE device and the first PE device are used to propagate unicast traffic, the second PE device and the first PE device perform interworking via MAC routing to access the MAC address of the CE device of each device. When the ingress interface of the second PE device opens the EVPN-T-Tree function, based on this, the second PE device may carry, through the first MAC route, a first extended community attribute for characterizing that the EVPN-T-Tree function is opened, for example, the values of Leaf tags in the first extended community attribute are configured to all 0, and then the lowest bit (8 th bit) of flag bits in the first extended community attribute is configured to 1, so as to indicate that the ingress interface of the second PE device opens the EVPN-T-Tree function and is used for propagating unicast traffic. In addition, in order to implement dynamic adjustment of the interface attribute, the second PE device carries the first extended template information in the first MAC route, and simultaneously configures the value of the 7 th bit of the flag bits in the first extended group attribute as 1 to indicate that the second PE device configures the corresponding relationship between the interface attribute and time, and in addition, the values of the 1 st bit to the 6 th bit of the flag bits in the first extended group attribute are all 0, so that after the first PE device receives the first MAC route, it is determined whether the ingress interface of the second PE device opens the EVPN-T-Tree function and carries the first extended template information based on the leaf tag and the flag bits.
On this basis, after the first PE device receives the first MAC route, the leaf tag and the flag bit may be parsed from the first MAC route, and if it is determined that the value of the leaf tag is 0 and the value of the lowest bit of the flag bit is 1, it is determined that the second PE device opens the EVPN-T-Tree function and is used to propagate unicast traffic. And then judging whether the value of the 7 th bit of the flag bit is 1, if the value of the 7 th bit of the flag bit is 1, confirming that the second PE device configures the corresponding relation between the interface attribute of the input interface and the time on the private network side, and at this moment, the first PE device can analyze the first extension template information comprising the corresponding relation between the interface attribute and the time from the first MAC route.
When the second PE device and the first PE device are used to transmit BUM traffic, the second PE device and the first PE device may communicate with each other through an ethernet auto discovery route to access the MAC address of the CE device of each device. When the ingress interface of the second PE device opens the EVPN-T-Tree function, based on this, the second PE device will carry the first extended group attribute used for characterizing the opening of the EVPN-T-Tree function through the first ethernet auto discovery route, then configure the value of the ethernet segment identifier ESI carried by the first ethernet auto discovery route to all 0, that is, fill all the fields where the ESI is located with 0, and then modify the relevant value in the first extended group attribute carried in the first ethernet auto discovery route. For example, the value of the Leaf tag Leaf Label in the first extended community attribute is configured as the actual tag value, and then the lowest bit (8 th bit) of the flag bits in the first extended community attribute is configured as 0, so as to indicate that the ingress interface of the second PE device turns on the EVPN-T-Tree function and is used for propagating BUM traffic. In addition, in order to realize dynamic adjustment of the interface attribute, the second PE device carries the first extended template information in the first ethernet auto discovery route, and simultaneously configures the value of the 7 th bit of the flag bits in the first extended group attribute as 1 to indicate that the second PE device configures the corresponding relationship between the interface attribute and time, and in addition, the values of the 1 st bit to the 6 th bit of the flag bits in the first extended group attribute are all 0, so that after the first PE device receives the first ethernet auto discovery route, it is determined whether the ingress interface of the second PE device opens the EVPN-T-Tree function or not and whether the ingress interface carries the first extended template information or not based on the leaf tag and the flag bits.
On this basis, after the first PE device receives the first ethernet automatic discovery route, the ESI value, the leaf tag, and the flag bit may be analyzed from the first ethernet automatic discovery route, and if it is determined that the ESI values are all 0, the value of the leaf tag is not 0, and the value of the lowest bit (8 th bit) of the flag bit is 0, it is determined that the second PE device opens the EVPN-T-Tree function, and the second PE device is used to propagate the BUM traffic. Then, the first PE device may continue to determine whether the value of the 7 th bit of the flag bit is 1, and if the value of the 7 th bit of the flag bit is 1, it is determined that the interface attribute of the ingress interface of the second PE device is also dynamically adjusted, and at this time, the first PE device may analyze the first extended template information from the first ethernet auto-discovery route, that is, analyze the correspondence between the interface attribute of the ingress interface of the second PE device and time.
This actual tag value may be understood as the Leaf tag value of the CE device accessing the second PE device, also referred to as the actual Leaf tag value.
Optionally, the method for adjusting an interface attribute provided in this embodiment further includes a process shown in fig. 3:
s301, receiving a service message sent by a CE device accessed to a first PE device.
In this step, after the interface attribute is adjusted, the first PE device is used to forward the service packet of the service traffic, and finally, the processing of the service packet is implemented. Based on this, when the CE device generates the service traffic, the CE device accesses the input interface of the first PE device through the service traffic and transmits the service packet of the service traffic to the first PE device, so that the first PE device receives the service packet transmitted by the CE device.
S302, resolving the destination address from the service message.
In this step, the service message carries the destination address of the receiver of the message, and the first PE device may parse the destination address from the service message.
S303, inquiring a local routing table by using the destination address, and determining the interface attribute of the remote access interface at the current time.
And the remote access interface is an access interface of the second PE device.
In this step, after the first PE device parses the destination address, since the destination address and the interface attribute of the remote access interface at the current time are recorded in the routing table, the destination address can be used to query the routing table, so as to query the interface attribute of the access interface (denoted as the remote access interface) of the device corresponding to the destination address at the current time, which is accessed to the second PE device, that is, the interface attribute of the remote access interface.
S304, determining the interface attribute corresponding to the current time when the CE device accesses the interface of the first PE device.
In this step, in order to determine whether the service packet needs to be forwarded, the first PE device also needs to determine an interface attribute of an input interface at the current time when the CE device accesses the first PE device. Specifically, on the basis that the corresponding relationship between the interface attribute of each incoming interface of the first PE device and the time is recorded on the first PE device and introduced later, when a service packet of the CE device is received, the incoming interface of the service packet entering the first PE device may be captured, the corresponding relationship between each incoming interface of the first PE device and the time may then be locally queried, and then the interface attribute of the current time when the service packet enters the incoming interface of the first PE device is confirmed.
S305, forwarding the service message based on the determined interface attribute of the input interface of the first PE device and the interface attribute of the remote input interface.
In this step, after determining, based on steps S303 and S304, that the interface attributes of the remote ingress interface corresponding to the destination address in the service packet and the ingress interface when the service packet enters the first PE device are at the current time, respectively, the forwarding processing of the service packet may be performed.
Optionally, the interface attributes in this embodiment may include, but are not limited to, a Leaf (Leaf) attribute and a Root (Root) attribute. On this basis, step S305 may be performed according to the following procedure: if the interface attribute of the input interface of the first PE device and the interface attribute of the remote input interface are both leaf attributes, discarding the service message; and if at least one of the interface attribute of the input interface of the first PE device and the interface attribute of the remote input interface is not a leaf attribute, forwarding the service message to the second PE device.
Specifically, the model based on EVPN-E-TREE realizes that: the interface of the Leaf attribute can only send the flow with the interface of the Root attribute mutually, and the flow between the interfaces of the Leaf attribute is isolated mutually; the Root attribute interface can be communicated with interfaces of other Root attributes and can also be communicated with interfaces of Leaf attributes. Based on the principle, if the first PE device determines that the interface attribute of the service packet entering the interface of the first PE device at the current time is a Leaf attribute, and the interface attribute of the remote interface at the current time is also a Leaf attribute, the first PE device needs to discard the service packet at this time because the traffic isolation is to be ensured between the interfaces of the Leaf attribute, thereby realizing the mutual isolation of the traffic between the interfaces of the Leaf attribute; if the first PE device determines that the interface attribute of the service packet entering the ingress interface of the first PE device at the current time is Root attribute, the first PE device can forward the service packet no matter the interface attribute of the remote ingress interface at this time is Leaf attribute or Root attribute, so that the traffic intercommunication between the interface of the Root attribute and the traffic intercommunication between the interface of the Root attribute and the interface of the Leaf attribute can be realized. When the first PE device determines that the interface attribute of the service packet entering the interface of the first PE device at the current time is a Leaf attribute, if it determines that the interface attribute of the remote interface is a Root attribute, the first PE device may also forward the service packet, so as to implement traffic intercommunication between the interface of the Leaf attribute and the interface of the Root attribute.
Optionally, the service packet in this embodiment may be a service packet of unicast traffic, or may also be a service packet of BUM traffic.
When the service packet is a service packet of unicast traffic, and the first PE device executes step S305, if it is determined that the ingress interface attribute of the service packet entering the first PE device is a Leaf attribute, and the interface attribute of the remote ingress interface is a Root attribute, which indicates that the service packet can be forwarded, the first PE device directly forwards the service packet to the second PE device, so that the second PE device directly forwards the service packet to the CE device corresponding to the destination address after receiving the service packet. And when the service message is a service message of BUM traffic, and the first PE device executes step S305, if it is determined that the access interface attribute of the service message entering the first PE device is Root attribute, and the interface attribute of the remote access interface is Root attribute, which also indicates that the service message can be forwarded, the first PE device directly forwards the service message to the second PE device, so that, after receiving the service message, the second PE device can encapsulate the actual tag value, which is stored by the second PE device and recorded based on the source address of the service message, into the service message, and then forward the actual tag value to the CE device corresponding to the destination address.
Optionally, based on any of the foregoing embodiments, this embodiment further provides an interface attribute adjusting method, which is applied to the first PE device, and may include the steps shown in fig. 4 a:
s401, after receiving the interface attribute adjusting instruction, acquiring second extended template information to be configured.
The second extended template information includes a correspondence between an interface attribute of the ingress interface of the first PE device and time.
In this step, when the interface attribute of the ingress interface on the first PE device needs to be dynamically adjusted, when the EVPN-E-Tree function is enabled for the ingress interface of the first PE device, the extended template information may be added to the original configuration instruction that enables the function, so that the ingress interface may change from the original fixed attribute to the interface attribute that is dynamically switched over time. The original configuration instruction may be an interface binding virtual switch instance instruction, and then, after adding the extension template information, the modified configuration instruction (i.e., the interface adjustment instruction) is a configuration instruction of the interface binding virtual switch instance-extension configuration module. During specific implementation, the original configuration instruction xcontact vsi-name leaf is modified into xcontact vsi-name leaf template-name, and the modified xcontact vsi-name leaf template-name is the interface adjusting instruction.
Based on this, after receiving the interface adjustment instruction, the first PE device may obtain the second extended template information based on the interface adjustment instruction, and also obtain the corresponding relationship between the interface attribute of the incoming interface to be adjusted and the time.
S402, adding the second expansion template information into the second EVPN route.
In this step, after the second extended template information is obtained, in order to enable the second PE device to obtain the interface attribute of the incoming interface on the first PE device at each time, and further implement the EVPN-E-Tree function, the first PE device may carry the second extended template information in the second EVPN route to the second PE device, so that the second extended template information is analyzed from the second EVPN route by the second PE device, and then the route table recorded on the second PE device is refreshed based on the second extended template information, which may specifically refer to the relevant description of the first PE device shown in fig. 2, and is not described in detail here.
Alternatively, the first extended template information may be set in a TLV extended field in the second EVPN route.
And S403, modifying values of leaf labels and flag bits in a second extended community attribute in a second EVPN route to indicate that the first PE device enables an Ethernet virtual private tree function, and to indicate that the second EVPN route carries second extended template information.
In this step, when the first PE device sends the second EVPN route, it needs to notify the second PE device that it has opened the EVPN-E-Tree through the second EVPN route, and the second EVPN route carries the second expansion template information. Specifically, the first PE device indicates that the first PE device enables an EVPN-E-Tree function and indicates that the second EVPN route carries second extended template information by modifying a Leaf Label (Leaf Label) and a flag bit (Flags) in the second extended community attribute.
Optionally, the second EVPN route includes a second MAC route and a second ethernet auto-discovery route, and on this basis, step S403 may be performed according to the following procedure: when the second EVPN route is a second MAC route, configuring the value of the leaf label in the second MAC route as a third set value; configuring the value of the lowest bit of the flag bits in the second MAC route as a fourth setting value, and configuring the values of the designated bits other than the lowest bit in the flag bits in the second MAC route as the fourth setting value; when the second EVPN route is a second Ethernet automatic discovery route, configuring the value of a leaf label in the second Ethernet automatic discovery route as an actual label value; the value of the lowest bit of the flag bits in the second ethernet auto-discovery route is configured as the third setting value, and the values of the designated bits other than the lowest bit of the flag bits in the second ethernet auto-discovery route are configured as the fourth setting value.
Specifically, the third setting value may be, but is not limited to, 0, the fourth setting value may be, but is not limited to, 1, and the third setting value is different from the fourth setting value. The designated bit other than the lowest bit may be, but is not limited to, the second last bit of the flag bit. Referring to fig. 4b, for example, when the flag bits Flags are 8 bits as shown in fig. 4b, the lowest bit is 8 bits, and the specified bit may be, but is not limited to, 7 bits, such as a bit corresponding to "a" in fig. 4b, and the first PE device indicates that the second EVPN route carries the first extended template information by modifying the value of the specified bit. And the first PE equipment indicates that the input interface of the first PE equipment opens the EVPN-T through modifying the value of the Leaf Label in the second extended group attribute and the value of the lowest bit of the flag bits flag ree And (4) function.
Specifically, when the first PE device and the second PE device are used to propagate unicast traffic, the first PE device and the second PE device perform interworking via MAC routing to access the MAC address of the CE device of each device. When the ingress interface of the first PE device opens the EVPN-T-Tree function, based on this, the first PE device may carry, through the second MAC route, a second extended community attribute for characterizing that the EVPN-T-Tree function is opened, for example, configure the value of the Leaf Label in the second extended community attribute in fig. 4b as all 0, and then configure the lowest bit (8 th bit) of the flag bits in the second extended community attribute as 1, that is, configure the value of "L" shown by the Flags in fig. 4b as 1, to indicate that the ingress interface of the first PE device opens the EVPN-T-Tree function and is used for propagating unicast traffic. In addition, in order to implement dynamic adjustment of the interface attribute, the first PE device also carries the second extended template information in the second MAC route, and configures the value of the 7 th bit of the flag bits in the second extended group attribute as 1, that is, configures the value of "a" shown by the flag bits in fig. 4b as 1, so as to indicate that the first PE device configures the corresponding relationship between the interface attribute and the time; in addition, the values of the 1 st bit to the 6 th bit of the flag bit in the second extended community attribute are all 0, so that after the second PE device receives the second MAC route, whether the EVPN-T-Tree function is turned on by the ingress interface of the first PE device and whether the ingress interface carries second extended template information is determined based on the leaf tag and the flag bit.
When the first PE device and the second PE device are used to transmit BUM traffic, the first PE device and the second PE device may communicate with each other through an ethernet auto discovery route to access the MAC address of the CE device of each device. When the ingress interface of the first PE device opens the EVPN-T-Tree function, based on this, the first PE device will carry a second extended group attribute used for characterizing the opening of the EVPN-T-Tree function through the second ethernet auto discovery route, then configure the value of the ethernet segment identifier ESI carried by the second ethernet auto discovery route to all 0, that is, fill all the fields where the ESI is located with 0, and then modify the relevant value in the second extended group attribute carried in the second ethernet auto discovery route. For example, the value of the Leaf tag Leaf Label in the second extended community attribute is configured as the actual tag value, and then the lowest bit (8 th bit) of the flag in the second extended community attribute shown in fig. 4b is configured as 0, that is, the value of "L" shown in the flag in fig. 4b is configured as 0, so as to indicate that the ingress interface of the first PE device turns on the EVPN-T-Tree function and is used for propagating the BUM traffic. In addition, in order to implement dynamic adjustment of the interface attribute, the first PE device carries the second extended template information in the second ethernet automatic discovery route, and configures the value of the 7 th bit of the flag bits in the second extended group attribute as 1, that is, configures the value of "a" shown by Flags in fig. 4b as 1, so as to indicate that the first PE device configures the corresponding relationship between the interface attribute and time. In addition, the values of the 1 st bit to the 6 th bit of the flag bit in the second extended community attribute are all 0, so that after the second PE device receives the second ethernet auto discovery route, whether the EVPN-T-Tree function is turned on by the ingress interface of the first PE device and whether the second extended template information is carried are judged based on the leaf tag and the flag bit.
It should be noted that, if the value of "a" shown by Flags in fig. 4b is configured to be 0, it indicates that the second EVPN route does not carry the second extended template information, that is, does not carry the corresponding relationship between the interface attribute of the ingress interface of the first PE device and time.
S404, the processed second EVPN route is sent to the second PE device.
Specifically, after the first PE device has processed the second EVPN route, the processed second EVPN route may be sent to the second PE device.
The second EVPN route includes a second MAC route and a second ethernet auto-discovery route. After the second PE device receives the second MAC route, the leaf tag and the flag bit may be analyzed from the second MAC route, and if it is determined that the value of the leaf tag is 0 and the value of the lowest bit of the flag bit is 1, it is determined that the first PE device opens the EVPN-T-Tree function and is used to propagate unicast traffic. And then judging whether the value of the 7 th bit of the flag bit is 1, if the value of the 7 th bit of the flag bit is 1, confirming that the first PE device configures the corresponding relation between the interface attribute of the incoming interface and the time on the private network side, and at this moment, the second PE device can analyze second extended template information comprising the corresponding relation between the interface attribute of the first PE interface and the time from the second MAC route. And then refreshing the routing table locally recorded by the second PE device based on the second extended template information.
And after the second PE device receives the second Ethernet automatic discovery route, the ESI value, the leaf label and the flag bit can be analyzed from the second Ethernet automatic discovery route, if the ESI values are judged to be all 0, the leaf label value is not 0, and the value of the lowest bit (8 th bit) of the flag bit is 0, it is determined that the first PE device starts the EVPN-T-Tree function, and the first PE device is used for transmitting BUM flow. And then, the second PE device may continue to determine whether the value of the 7 th bit of the flag bit is 1, and if the value of the 7 th bit of the flag bit is 1, it is determined that the interface attribute of the ingress interface of the first PE device is also dynamically adjusted, and at this time, the second PE device may analyze the second extended template information from the second ethernet auto-discovery route, that is, analyze the correspondence between the interface attribute of the ingress interface of the first PE device and time.
The actual tag value may be understood as a Leaf tag value, also referred to as an actual Leaf tag value, of the CE device accessing the first PE device.
In this way, the second PE device and the first PE device may both implement dynamic adjustment of the interface attribute, and when the interface attribute needs to be adjusted again, both the first PE device and the second PE device may perform the process again with reference to the flow shown in fig. 4a, and then perform the interface attribute adjustment method shown in fig. 2 again, which is not described in detail herein. By implementing the interface attribute adjusting method provided by the application, not only is the dynamic adjustment of the interface attribute realized, but also the flow isolation between Leaf attribute interfaces can be ensured, and the flexibility of message transmission in the networking is improved.
To better understand the interface attribute adjustment method provided in any embodiment of the present application, an EVPN networking shown in fig. 5 is taken as an example for description, in fig. 5, CE1 and CE2 are CE devices accessing a first PE device PE1, and CE1 and CE2 may be respectively denoted as a first CE device and a second CE device, and similarly, CE3 and CE4 are CE devices accessing a second PE device PE2, and CE3 and CE4 may be respectively denoted as a third CE device and a fourth CE device. For example, CE3 accesses PE2 through ingress interface a of PE2, CE4 accesses PE2 through ingress interface B of PE2, and the MAC address of CE3 is MC3, and the MAC address of CE4 is MAC4.
On this basis, when PE1 and PE2 in fig. 5 are used to propagate unicast traffic, if PE2 receives an interface adjustment instruction, PE2 may obtain first extension template information about an ingress interface a and/or an ingress interface B, where the first extension template information records a correspondence relationship between an interface attribute of an ingress interface (ingress interface a and/or ingress interface B) on PE2 and time; in order to send the first extended template information to the PE1, the first extended template information is carried through the first MAC route, and meanwhile, the value of the Leaf Label in the first extended group attribute in the first MAC route is configured to be all 0, then the value of the 8 th bit of the flag in the first extended group attribute is configured to be 1, and the value of the 7 th bit is configured to be 1; and meanwhile, the value of the 1 st bit to the 6 th bit of the flag bits is configured to be 0, so that the PE2 is characterized to open the EVPN-E-Tree function and the first MAC route carries the first expansion template information. And then the PE2 sends the first MAC route to the PE1, so that the PE1 can analyze the first extended group attribute from the first MAC route after receiving the first MAC route, and if the Leaf Label in the first extended group attribute takes the value of all 0 and the 8 th bit of the flag bit flag takes the value of 1, the PE2 is confirmed to open the EVPN-E-Tree. Then, if it is determined that the value of the 7 th bit of the flag is 1, it indicates that the ingress interface of the PE2 has dynamic adjustment of the interface attribute, at this time, the first extended template information is extracted from the first MAC route, and then the corresponding relationship between the interface attribute of the ingress interface of the PE2 and the time is locally recorded, as shown in reference table 2, that is, the corresponding relationship between the interface attribute of the ingress interface when accessing the PE2 and the time shown at the CE3 and CE4 sides in fig. 5:
TABLE 2
Figure BDA0003103084750000181
Figure BDA0003103084750000191
On this basis, after the PE1 records the first extended template information, it may refresh the locally recorded routing table based on the current time, for example, mark the corresponding mark on the entry corresponding to MAC3/MAC4 in the locally recorded routing table, so as to identify the interface attribute of the ingress interface corresponding to MAC3/MAC4 at the current time. Similarly, when the interface attribute of the ingress interface of the PE1 itself is dynamically adjusted, the PE1 also synchronizes the correspondence between the access attribute of the ingress interface of itself and time to the PE2 in the MAC routing manner according to the above method, and the PE2 side records and refreshes the routing table recorded by itself.
In this way, subsequently, after the PE1 receives the service packet of the unicast traffic sent by the CE1/CE2 from its own ingress interface, the PE1 may parse the destination MAC from the service packet, and use the destination MAC as MAC3, then query the routing table based on the current time, determine the interface attribute of the ingress interface a (remote ingress interface) of the current time (5); except for the situation, the PE1 may forward the service packet to the PE2, and the PE2 forwards the service packet to the CE3, thereby implementing traffic intercommunication between the interface of the Leaf attribute and the interface of the Root attribute.
In addition, when the interface attribute corresponding to the current time of the PE1 is changed, the PE1 will actively refresh the routing table to modify the interface attribute of the remote access interface at the current time.
When PE1 and PE2 in fig. 5 are used to propagate BUM traffic, if PE2 receives an interface adjustment instruction, PE2 also obtains first extension template information about an ingress interface a and/or an ingress interface B, where the first extension template information records a correspondence between an interface attribute of an ingress interface (ingress interface a and/or ingress interface B) on PE2 and time; in order to send the first extended template information to the PE1, the first extended template information is carried by the first ethernet automatic discovery route, and meanwhile, the value of the Leaf tag Label in the first extended group attribute in the first ethernet automatic discovery route is configured as an actual tag value, then the value of the 8 th bit of the flag in the first extended group attribute is configured as 0, and the value of the 7 th bit is configured as 1; and meanwhile, the value of the 1 st bit to the 6 th bit of the flag bit Flags is configured to be 0, so that the PE2 is characterized to open the EVPN-E-Tree function, the first Ethernet automatic route carries the first extended template information, and simultaneously, the ESI value in the first Ethernet automatic discovery route is configured to be all 0. And then the PE2 sends the first Ethernet automatic route to the PE1, so that the PE1 can analyze the ESI value and the first extended group attribute from the first Ethernet automatic route after receiving the first Ethernet automatic route, and if the ESI value is all 0, the Leaf Label in the first extended group attribute takes the value of an actual Label value, and the 8 th bit of the flag takes the value of 0, the PE2 is confirmed to open the EVPN-E-Tree and is used for carrying the actual Label value. Then, if the value of the 7 th bit of the flag is determined to be 1, it indicates that the interface attribute of the ingress interface of the PE2 is dynamically adjusted, and at this time, the first extended template information is extracted from the first ethernet automatic route, and then the corresponding relationship between the interface attribute of the ingress interface of the PE2 and the time is locally recorded, as shown in reference table 3:
TABLE 3
Figure BDA0003103084750000201
On this basis, after the PE1 records the first extended template information, it may refresh the locally recorded routing table based on the current time, for example, mark the entry corresponding to the MAC3/MAC4 in the locally recorded routing table with a corresponding mark, so as to identify the interface attribute of the ingress interface corresponding to the MAC3/MAC4 at the current time. Similarly, when the interface attribute of the ingress interface of the PE1 itself is dynamically adjusted, the PE1 also synchronizes the correspondence between the access attribute of the ingress interface of itself and the time to the PE2 in the MAC routing manner according to the above method, and the PE2 side records and refreshes the routing table recorded by itself.
In this way, subsequently, after the PE1 receives the service packet of the BUM traffic sent by the CE1/CE2 from its own ingress interface, the PE1 can parse the destination MAC from the service packet, and use the destination MAC as MAC4, then query the routing table based on the current time, and can determine that the interface attribute of the ingress interface B (remote ingress interface) where the MAC4 is accessed to the PE2 at the current time (5); if the current time is 13.
In addition, when the interface attribute corresponding to the current time of the PE1 is changed, the PE1 will actively refresh the routing table to modify the interface attribute of the remote access interface at the current time. Therefore, not only the dynamic adjustment of the interface attributes is realized, but also the corresponding isolation or intercommunication of the flow among the interface attributes is realized.
Based on the same inventive concept, the application also provides an interface attribute adjusting device corresponding to the interface attribute adjusting method. The implementation of the interface attribute adjusting apparatus may refer to the above description of the interface attribute adjusting method, which is not discussed herein.
Referring to fig. 6, fig. 6 is an interface attribute adjusting apparatus provided in an exemplary embodiment of the present application, where the apparatus is a first service provider network edge PE device in an ethernet virtual private network EVPN networking system, and the EVPN networking system further includes a second PE device, the apparatus includes:
a first receiving module 601, configured to receive a first EVPN route sent by the second PE device, where the first EVPN route includes a first extended community attribute of an ethernet virtual private tree and first extended template information, the first extended community attribute includes a leaf tag and a flag, and the first extended template information includes a correspondence between an interface attribute of an ingress interface of the second PE device and time;
a first parsing module 602, configured to parse the first extended template information from the first EVPN route if it is determined that an ingress interface of the second PE device is configured with an ethernet virtual private tree function according to the leaf tag and the flag bit;
a refreshing module 603, configured to refresh a local routing table by using a correspondence between the interface attribute in the first extended template information and the time based on the current time.
Optionally, the interface attribute adjusting apparatus provided in this embodiment further includes:
a second receiving module (not shown in the figure), configured to receive a service packet sent by a CE device accessing to the first PE device;
a second parsing module (not shown in the figure) for parsing the destination address from the service message;
a first determining module (not shown in the figure), configured to query a local routing table by using a destination address, and determine an interface attribute of a remote ingress interface at the current time, where the remote ingress interface is an ingress interface of the second PE device;
a second determining module (not shown in the figure), configured to determine an interface attribute corresponding to the current time when the CE device accesses the ingress interface of the first PE device;
and a forwarding processing module (not shown in the figure), configured to forward the service packet based on the determined interface attribute of the incoming interface of the first PE device and the determined interface attribute of the remote incoming interface.
Optionally, based on any one of the foregoing embodiments, the interface attribute adjusting apparatus provided in this embodiment further includes:
an obtaining module (not shown in the figure), configured to obtain second extended template information to be configured after receiving the interface attribute adjustment instruction, where the second extended template information includes a correspondence between an interface attribute of an input interface of the first PE device and time;
an adding module (not shown in the figure) for adding the second spreading template information to the second EVPN route;
a modifying module (not shown in the figure), configured to modify values of a leaf tag and a flag bit in a second extended community attribute in a second EVPN route, so as to indicate that the first PE device enables an ethernet virtual private tree function, and indicate that the second EVPN route carries second extended template information;
and a sending module (not shown in the figure) configured to send the processed second EVPN route to the second PE device.
Optionally, the first parsing module 602 is specifically configured to:
when the first EVPN route is the first MAC route, if the leaf label is a first set value and the lowest bit value of the flag bit is a second set value, confirming that the access interface of the second PE device is configured with the Ethernet virtual private tree function; if the value of the designated bit except the lowest bit in the zone bits is a second set value, analyzing first extended template information from the first EVPN route;
when the first EVPN route is a first Ethernet automatic discovery route, if the value of the leaf label is not a first set value and the value of the lowest bit of the flag bit is the first set value, confirming that the ingress interface of the second PE device is configured with an Ethernet virtual private tree function; and if the value of the designated bit except the lowest bit in the zone bits is a second set value, analyzing the first extended template information from the first EVPN route.
Optionally, the modifying module (not shown in the figure) is specifically configured to:
when the second EVPN route is the second MAC route, configuring the value of the leaf label in the second MAC route as a third set value; configuring the value of the lowest bit of the zone bits in the second MAC route as a fourth set value, and configuring the values of the designated bits except the lowest bit in the zone bits in the second MAC route as the fourth set value;
when the second EVPN route is a second Ethernet automatic discovery route, configuring the value of a leaf label in the second Ethernet automatic discovery route as an actual label value; and configuring the value of the lowest bit of the flag bits in the second Ethernet automatic discovery route as a third set value, and configuring the value of the second designated bit except the lowest bit in the flag bits in the second Ethernet automatic discovery route as a fourth set value.
Optionally, the interface attribute in this embodiment includes a leaf attribute and a root attribute; the forwarding processing module (not shown in the figure) is specifically configured to:
if the interface attribute of the input interface of the first PE device and the interface attribute of the remote input interface are both leaf attributes, discarding the service message;
and if at least one interface attribute in the interface attribute of the input interface of the first PE equipment and the interface attribute of the remote input interface is not a leaf attribute, forwarding the service message to the second PE equipment.
By carrying the first extended community attribute and the first extended template information in the EVPN route, when it is determined based on the first extended community attribute that the second PE device is enabled with the virtual ethernet dedicated tree function, the recorded corresponding relationship between the interface attribute of the ingress interface of the second PE device and time is obtained based on the first extended template information, and then the routing table locally recorded by the first PE device is updated, thereby realizing time-sharing and flexible adjustment of the interface attribute of the ingress interface, and further improving the flexibility of the PE device in the EVPN networking for forwarding traffic to meet different service requirements.
Based on the same inventive concept, embodiments of the present application provide an electronic device, which may be, but is not limited to, the first PE device or the second PE device. As shown in fig. 7, the electronic device includes a processor 701 and a machine-readable storage medium 702, where the machine-readable storage medium 702 stores a computer program capable of being executed by the processor 701, and the processor 701 is caused by the computer program to execute the interface attribute adjusting method provided in any embodiment of the present application. In addition, the electronic device further comprises a communication interface 703 and a communication bus 704, wherein the processor 701, the communication interface 703 and the machine-readable storage medium 702 are in communication with each other via the communication bus 704.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM), a DDR SRAM (Double Data Rate Dynamic Random Access Memory), and a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In addition, the embodiment of the present application provides a machine-readable storage medium, which stores a computer program, and when the computer program is called and executed by a processor, the computer program causes the processor to execute the interface attribute adjusting method provided by the embodiment of the present application.
For the embodiments of the electronic device and the machine-readable storage medium, since the contents of the related methods are substantially similar to those of the foregoing embodiments of the methods, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the embodiments of the methods.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The specific details of the implementation process of the functions and actions of each unit/module in the above device are the implementation processes of the corresponding steps in the above method, and are not described herein again.
For the device embodiment, since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the units/modules described as separate parts may or may not be physically separate, and the parts displayed as units/modules may or may not be physical units/modules, may be located in one place, or may be distributed on a plurality of network units/modules. Some or all of the units/modules can be selected according to actual needs to achieve the purpose of the solution of the present application. One of ordinary skill in the art can understand and implement without inventive effort.
The above description is only a preferred embodiment of the present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (12)

1. An interface attribute adjustment method is applied to a first service provider network edge (PE) device in an Ethernet Virtual Private Network (EVPN) networking, wherein the EVPN networking further comprises a second PE device, and the method comprises the following steps:
receiving a first EVPN route sent by the second PE device, wherein the first EVPN route comprises a first extended community attribute of an Ethernet virtual private tree and first extended template information, the first extended community attribute comprises a leaf tag and a flag bit, and the first extended template information comprises a corresponding relation between an interface attribute of an input interface of the second PE device and time;
according to the leaf label and the flag bit, if the fact that an ingress interface of the second PE device is configured with an Ethernet virtual private tree function is confirmed, the first extended template information is analyzed from the first EVPN route;
and based on the current time, refreshing a local routing table by utilizing the corresponding relation between the interface attribute in the first extended template information and the time.
2. The method of claim 1, further comprising:
receiving a service message sent by a CE device of a user network edge accessed to the first PE device;
analyzing a destination address from the service message;
querying a local routing table by using the destination address, and determining an interface attribute of a remote access interface at the current time, wherein the remote access interface is an access interface of the second PE device;
determining an interface attribute corresponding to the current time of an interface of the CE device accessing the first PE device;
and forwarding the service message based on the determined interface attribute of the input interface of the first PE device and the interface attribute of the remote input interface.
3. The method of claim 1, further comprising:
after receiving an interface attribute adjusting instruction, acquiring second extended template information to be configured, wherein the second extended template information comprises a corresponding relation between interface attributes of an input interface of first PE equipment and time;
adding the second spreading template information to a second EVPN route; and are
Modifying values of leaf tags and flag bits in a second extended community attribute in the second EVPN route to indicate that the first PE device enables an Ethernet virtual private tree function and indicate that the second EVPN route carries the second extended template information;
and sending the processed second EVPN route to the second PE equipment.
4. The method of claim 1,
according to the leaf tag and the flag bit, if it is determined that the ingress interface of the second PE device is configured with an ethernet virtual private tree function, parsing the first extended template information from the first EVPN route, including:
when the first EVPN route is a first MAC route, if the leaf label is a first set value and the value of the lowest bit of the flag bit is a second set value, confirming that the ingress interface of the second PE device is configured with an Ethernet virtual private tree function; if the value of the designated bit except the lowest bit in the zone bits is the second set value, analyzing the first extended template information from the first EVPN route;
when the first EVPN route is a first ethernet auto discovery route, if the value of the leaf tag is not the first set value and the value of the lowest bit of the flag bit is the first set value, determining that an ingress interface of the second PE device is configured with an ethernet virtual private tree function; and if the value of the designated bit except the lowest bit in the zone bits is the second set value, analyzing the first extended template information from the first EVPN route.
5. The method of claim 3,
modifying values of leaf tag fields and flag bits in a second extended community attribute in the second EVPN route, including:
when the second EVPN route is a second MAC route, configuring the value of a leaf label in the second MAC route as a third set value; configuring the value of the lowest bit of the flag bits in the second MAC route as a fourth setting value, and configuring the value of the designated bit except the lowest bit in the flag bits in the second MAC route as the fourth setting value;
when the second EVPN route is a second Ethernet automatic discovery route, configuring the value of a leaf label in the second Ethernet automatic discovery route as an actual label value; configuring a value of a lowest bit of the flag bits in the second ethernet auto-discovery route as the third setting value, and configuring a value of a second designated bit except the lowest bit in the flag bits in the second ethernet auto-discovery route as the fourth setting value.
6. The method of claim 2, wherein the interface attributes comprise a leaf attribute and a root attribute; then
Based on the determined interface attribute of the input interface of the first PE device and the determined interface attribute of the remote input interface, forwarding the service packet, including:
if the interface attribute of the input interface of the first PE device and the interface attribute of the remote input interface are both leaf attributes, discarding the service message;
and if at least one of the interface attribute of the input interface of the first PE equipment and the interface attribute of the remote input interface is not a leaf attribute, forwarding the service message to the second PE equipment.
7. An interface attribute adjusting apparatus, disposed in a first service provider network edge PE device in an ethernet virtual private network EVPN networking, the EVPN networking further including a second PE device, the apparatus comprising:
a first receiving module, configured to receive a first EVPN route sent by the second PE device, where the first EVPN route includes a first extended community attribute of an ethernet virtual private tree and first extended template information, the first extended community attribute includes a leaf tag and a flag bit, and the first extended template information includes a correspondence between an interface attribute of an ingress interface of the second PE device and time;
a first parsing module, configured to parse the first extended template information from the first EVPN route if it is determined that an ingress interface of the second PE device is configured with an ethernet virtual private tree function according to the leaf tag and the flag bit;
and the refreshing module is used for refreshing a local routing table by utilizing the corresponding relation between the interface attribute in the first extended template information and the time based on the current time.
8. The apparatus of claim 7, further comprising:
a second receiving module, configured to receive a service packet sent by a CE device at a user network edge accessing the first PE device;
the second analysis module is used for analyzing a destination address from the service message;
a first determining module, configured to query a local routing table by using the destination address, and determine an interface attribute of a remote ingress interface at a current time, where the remote ingress interface is an ingress interface of the second PE device;
a second determining module, configured to determine an interface attribute corresponding to a current time when the CE device accesses the interface of the first PE device;
and the forwarding processing module is used for forwarding the service message based on the determined interface attribute of the input interface of the first PE device and the determined interface attribute of the remote input interface.
9. The apparatus of claim 7, further comprising:
the acquisition module is used for acquiring second extended template information to be configured after receiving the interface attribute adjustment instruction, wherein the second extended template information comprises a corresponding relation between the interface attribute of the input interface of the first PE device and time;
an adding module, configured to add the second extended template information to a second EVPN route;
a modification module, configured to modify values of a leaf tag and a flag bit in a second extended community attribute in the second EVPN route to indicate that the first PE device enables an ethernet virtual private tree function, and indicate that the second EVPN route carries the second extended template information;
and the sending module is used for sending the processed second EVPN route to the second PE equipment.
10. The apparatus of claim 7, wherein the first parsing module is specifically configured to:
when the first EVPN route is a first MAC route, if the leaf label is a first set value and the value of the lowest bit of the flag bit is a second set value, confirming that the ingress interface of the second PE device is configured with an Ethernet virtual private tree function; if the value of the designated bit except the lowest bit in the zone bits is the second set value, analyzing the first extended template information from the first EVPN route;
when the first EVPN route is a first ethernet auto discovery route, if the value of the leaf tag is not the first set value and the value of the lowest bit of the flag bit is the first set value, determining that an ingress interface of the second PE device is configured with an ethernet virtual private tree function; and if the value of the designated bit except the lowest bit in the zone bits is the second set value, analyzing the first extended template information from the first EVPN route.
11. The apparatus of claim 9, wherein the modification module is specifically configured to:
when the second EVPN route is a second MAC route, configuring the value of a leaf label in the second MAC route as a third set value; configuring the value of the lowest bit of the flag bits in the second MAC route as a fourth setting value, and configuring the value of the designated bit except the lowest bit in the flag bits in the second MAC route as the fourth setting value;
when the second EVPN route is a second Ethernet automatic discovery route, configuring the value of a leaf label in the second Ethernet automatic discovery route as an actual label value; configuring a value of a lowest bit of the flag bits in the second ethernet auto-discovery route as the third setting value, and configuring a value of a second designated bit except the lowest bit in the flag bits in the second ethernet auto-discovery route as the fourth setting value.
12. The apparatus of claim 8, wherein the interface attributes comprise a leaf attribute and a root attribute; the forwarding processing module is specifically configured to:
if the interface attribute of the input interface of the first PE device and the interface attribute of the remote input interface are both leaf attributes, discarding the service message;
and if at least one of the interface attribute of the input interface of the first PE equipment and the interface attribute of the remote input interface is not a leaf attribute, forwarding the service message to the second PE equipment.
CN202110629484.6A 2021-06-07 2021-06-07 Interface attribute adjusting method and device Active CN113542136B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110629484.6A CN113542136B (en) 2021-06-07 2021-06-07 Interface attribute adjusting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110629484.6A CN113542136B (en) 2021-06-07 2021-06-07 Interface attribute adjusting method and device

Publications (2)

Publication Number Publication Date
CN113542136A CN113542136A (en) 2021-10-22
CN113542136B true CN113542136B (en) 2022-11-18

Family

ID=78124592

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110629484.6A Active CN113542136B (en) 2021-06-07 2021-06-07 Interface attribute adjusting method and device

Country Status (1)

Country Link
CN (1) CN113542136B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102136981A (en) * 2010-06-29 2011-07-27 华为技术有限公司 Method for realizing E-Tree (Ethernet tree) service in Ethernet and related device
CN103248548A (en) * 2012-02-08 2013-08-14 中兴通讯股份有限公司 Method for achieving E-tree service based on VPLS and node
CN105939257A (en) * 2015-03-05 2016-09-14 丛林网络公司 Update of mac routes in EVPN single-active topology
CN108259356A (en) * 2017-04-25 2018-07-06 新华三技术有限公司 Route control method and device
CN109474495A (en) * 2018-12-07 2019-03-15 新华三技术有限公司 A kind of tunnel detection method and device
CN110635935A (en) * 2018-06-25 2019-12-31 丛林网络公司 Using multiple EVPN routes for respective service interfaces of a user interface
CN111585899A (en) * 2019-02-19 2020-08-25 华为技术有限公司 EVPN multicast method, device and system
CN111711555A (en) * 2020-05-29 2020-09-25 新华三信息安全技术有限公司 Message processing method and device
US10841216B1 (en) * 2017-03-29 2020-11-17 Juniper Networks, Inc. Local-bias forwarding of L2 multicast, unknown unicast, and broadcast traffic for an ethernet VPN

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9742678B2 (en) * 2014-04-01 2017-08-22 Cisco Technology, Inc. E-tree service with optimal forwarding in EVPN
US9985879B2 (en) * 2015-12-28 2018-05-29 Juniper Networks, Inc. Apparatus, system, and method for preventing multicast traffic drops at egress routers in E-Tree topologies
US10333836B2 (en) * 2017-04-13 2019-06-25 Cisco Technology, Inc. Convergence for EVPN multi-homed networks

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102136981A (en) * 2010-06-29 2011-07-27 华为技术有限公司 Method for realizing E-Tree (Ethernet tree) service in Ethernet and related device
CN103248548A (en) * 2012-02-08 2013-08-14 中兴通讯股份有限公司 Method for achieving E-tree service based on VPLS and node
CN105939257A (en) * 2015-03-05 2016-09-14 丛林网络公司 Update of mac routes in EVPN single-active topology
US10841216B1 (en) * 2017-03-29 2020-11-17 Juniper Networks, Inc. Local-bias forwarding of L2 multicast, unknown unicast, and broadcast traffic for an ethernet VPN
CN108259356A (en) * 2017-04-25 2018-07-06 新华三技术有限公司 Route control method and device
CN110635935A (en) * 2018-06-25 2019-12-31 丛林网络公司 Using multiple EVPN routes for respective service interfaces of a user interface
CN109474495A (en) * 2018-12-07 2019-03-15 新华三技术有限公司 A kind of tunnel detection method and device
CN111585899A (en) * 2019-02-19 2020-08-25 华为技术有限公司 EVPN multicast method, device and system
CN111711555A (en) * 2020-05-29 2020-09-25 新华三信息安全技术有限公司 Message processing method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Ali Sajassi等.E-TREE Support in EVPN amp *
amp ; amp ; PBB-EVPN draft-ietf-bess-evpn-etree-02.《IETF 》.2015, *
Ethernet-Tree (E-Tree) Support in Ethernet VPN (EVPN) and Provider Backbone Bridging EVPN (PBB-EVPN);A. Sajassi等;《IETF rfc8317》;20180131;全文 *

Also Published As

Publication number Publication date
CN113542136A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
WO2021063232A1 (en) Method, apparatus and system for establishing bier forwarding table entry
US9281955B2 (en) Interoperability of data plane based overlays and control plane based overlays in a network environment
US10333845B2 (en) Forwarding data packets
US9825861B2 (en) Packet forwarding method, apparatus, and system
US20050111455A1 (en) VLAN server
RU2005141590A (en) TIRE ABSTRACTION
US8897169B2 (en) Discovery of conventional devices and bridges in hybrid communication networks
CN102316030B (en) Method for realizing two-layer internetworking of data center and device
WO2015165311A1 (en) Method for transmitting data packet and provider edge device
US11736411B2 (en) Method, device, and system for transmitting multicast packet
US20140064272A1 (en) Providing a layer-3 interface
CN100531138C (en) Operator's boundary notes, virtual special LAN service communication method and system
CN104869042A (en) Message forwarding method and message forwarding device
CN103327137B (en) Router domain name access method
CN101098304A (en) Router and address identification information management server
WO2019137355A1 (en) Method and device for transmitting data, and network system
WO2013155959A1 (en) Accessing ip network and edge devices
RU2011154001A (en) METHOD AND ROUTER FOR PERFORMING MIRROR COPYING
WO2017028398A1 (en) Communication processing method and device
CN101217463A (en) Method and device for controlling message forwarding
WO2017186159A1 (en) Packet transmission
CN101877671A (en) Sending method of mirror image message, switch chip and Ethernet router
WO2016197787A2 (en) Access control method and apparatus
CN108199968A (en) Route processing method and device
WO2018171722A1 (en) Mac address synchronization

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant