Search

CN-116319556-B - Communication method and device

CN116319556BCN 116319556 BCN116319556 BCN 116319556BCN-116319556-B

Abstract

The application provides a communication method and a communication device, the method comprises the steps of sending a first ORF capability negotiation message to second network equipment, wherein the first ORF capability negotiation message comprises at least one first indication information, each first indication information is used for indicating one supported prefix policy type, receiving a second ORF capability negotiation message sent by the second network equipment, the second ORF capability negotiation message comprises at least one second indication information, each second indication information is used for indicating one supported prefix policy type under each type of address group supported by the second network equipment, negotiating with the second network equipment and determining the commonly supported prefix policy type according to each first indication information and each second indication information, and sending a first ORF prefix policy message to the second network equipment, wherein the first ORF prefix policy message comprises the commonly supported prefix policy corresponding to the prefix policy type.

Inventors

  • ZHU CHAOPENG

Assignees

  • 新华三技术有限公司

Dates

Publication Date
20260505
Application Date
20220909

Claims (12)

  1. 1. A method of communication, the method being applied to a first network device that supports multiple types of address families, each type of address family supporting multiple prefix policy types, the method comprising: Sending a first ORF capability negotiation message to a second network device, wherein the first ORF capability negotiation message comprises at least one first indication information of each type of address group supported by the first network device, and each first indication information is used for indicating one prefix strategy type supported under each type of address group supported by the first network device; Receiving a second ORF capability negotiation message sent by a second network device, wherein the second ORF capability negotiation message comprises at least one piece of second indication information of each type of address group supported by the second network device, and each piece of second indication information is used for indicating one prefix strategy type supported under each type of address group supported by the second network device; Negotiating with the second network equipment according to each first indication information and each second indication information and determining a prefix strategy type commonly supported by each type of address family; and sending a first ORF prefix strategy message to the second network equipment, wherein the first ORF prefix strategy message comprises prefix strategies corresponding to prefix strategy types commonly supported by each type of address family.
  2. 2. The method according to claim 1, wherein negotiating and determining a prefix policy type commonly supported by each address family with the second network device according to each first indication information and each second indication information, specifically includes: If each first indication information is matched with each second indication information, determining that the first network equipment and the second network equipment mutually support all prefix strategy types belonging to the same type address family; And if part of the first indication information in each first indication information is matched with part of the second indication information in each second indication information, determining that the first network equipment and the second network equipment mutually support part of prefix strategy types under the same type address group.
  3. 3. The method of claim 1, wherein the ORF capability co-quotient message further includes a transceiver capability supported by each prefix policy type; Before the first ORF prefix policy message is sent to the second network device, the method further includes: And negotiating with the second network equipment according to the transceiving capability supported by each prefix strategy type, and determining the transceiving capability supported by each prefix strategy type commonly supported by each type of address family.
  4. 4. The method of claim 1, wherein the ORF capability negotiation message comprises a plurality of reserved fields and a plurality of transceiving capability fields; each reserved field is used for bearing one first indication information of each prefix strategy type, and each transceiving capability field is used for bearing the transceiving capability supported by each prefix strategy type.
  5. 5. The method of claim 1, wherein the first ORF prefix policy message includes a plurality of ORF entity fields, each for carrying a prefix policy corresponding to one prefix policy type.
  6. 6. The method of claim 1, wherein the first network device supports multiple types of address families, including an EVPN address family or an address family that can support both an IPv4 prefix policy and an IPv6 prefix policy, and wherein each type of address family supports multiple prefix policy types, including an IPv4 prefix policy and an IPv6 prefix policy.
  7. 7. A communication apparatus, the apparatus being applied to a first network device that supports multiple types of address families, each type of address family supporting multiple prefix policy types, the apparatus comprising: A sending unit, configured to send a first ORF capability negotiation packet to a second network device, where the first ORF capability negotiation packet includes at least one first indication information of each type of address family supported by the first network device, where each first indication information is used to indicate a prefix policy type supported under each type of address family supported by the first network device; A receiving unit, configured to receive a second ORF capability negotiation packet sent by a second network device, where the second ORF capability negotiation packet includes at least one second indication information of each type of address group supported by the second network device, and each second indication information is used to indicate a prefix policy type supported under each type of address group supported by the second network device; A negotiation unit, configured to negotiate with the second network device and determine a prefix policy type commonly supported by each type of address family according to each first indication information and each second indication information; the sending unit is further configured to send a first ORF prefix policy packet to the second network device, where the first ORF prefix policy packet includes a prefix policy corresponding to a prefix policy type commonly supported by the address families of each type.
  8. 8. The apparatus of claim 7, wherein the negotiation unit is specifically configured to determine that the first network device and the second network device mutually support all prefix policy types belonging to a same type address family if each first indication information matches each second indication information; And if part of the first indication information in each first indication information is matched with part of the second indication information in each second indication information, determining that the first network equipment and the second network equipment mutually support part of prefix strategy types under the same type address group.
  9. 9. The apparatus of claim 7, wherein the ORF capability co-quotient message further includes a transceiver capability supported by each prefix policy type; The negotiation unit is further configured to negotiate with the second network device according to the transceiver capability supported by each prefix policy type and determine the transceiver capability supported by each prefix policy type supported by each address family together.
  10. 10. The apparatus of claim 7, wherein the ORF capability negotiation message comprises a plurality of reserved fields and a plurality of transceiving capability fields; each reserved field is used for bearing one first indication information of each prefix strategy type, and each transceiving capability field is used for bearing the transceiving capability supported by each prefix strategy type.
  11. 11. The apparatus of claim 7, wherein the first ORF prefix policy message includes a plurality of ORF entity fields, each for carrying a prefix policy corresponding to one prefix policy type.
  12. 12. The apparatus of claim 7, wherein the first network device supports multiple types of address families, including specifically an EVPN address family or an address family that can support both IPv4 prefix policies and IPv6 prefix policies, and wherein each type of address family supports multiple prefix policy types, including specifically an IPv4 prefix policy and an IPv6 prefix policy.

Description

Communication method and device Technical Field The present application relates to the field of communications technologies, and in particular, to a communications method and apparatus. Background RFC 5291, RFC 5292 specify a border gateway protocol (english: border Gateway Protocol, abbreviated: BGP) prefix-based outbound route filtering (english: outbound Route filtering, abbreviated: ORF) feature that can send prefix-based ingress policies configured by local network devices to BGP neighbors through route refresh (Router-refresh) messages, and BGP neighbors construct their own egress policies according to the received prefix-based ingress policies and local routing policies, filtering the routes when sending them. Thus, the local network equipment is prevented from receiving a large number of useless routes, the CPU utilization rate of the local network equipment is reduced, the configuration work of BGP neighbors is effectively reduced, and the occupancy rate of link bandwidth is reduced. When the local network device hopes that the BGP neighbor only sends the route needed by the local network device, and the BGP neighbor is not willing to maintain different exit strategies for different network devices, the BGP ORF characteristics can be operated at both ends. As shown in fig. 1, fig. 1 is a schematic diagram of BGP ORF characteristics between existing network devices. In fig. 1, router a and router B are direct BGP neighbors. After router a negotiates prefix-based ORF capabilities with router B, router a carries the locally configured prefix-based ingress policy within a route refresh message and sends it to router B. And the router B constructs an outlet strategy according to the prefix-based inlet strategy and the local routing strategy included in the routing refreshing message. According to the exit strategy, when the router B sends the route to the router A, the router A only receives the route needed by the router A, and the router B does not need to maintain the routing strategy, so that the configuration work is reduced. Because when BGP ORF characteristics are formulated, there is no case where one address family neighbor can support multiple prefix types at the same time (for example, support both IPv4 prefix policies and IPv6 prefix policies), in order to save memory, RFC adopts a (length, prefix) manner, and thus uniformly represents an IPv4 prefix or an IPv6 prefix. When the network device analyzes the address prefix, the network device judges whether to analyze according to the IPv4 prefix or IPv6 prefix according to the address family (AFI: ADDRESS FAMILY IDENTIFIER; or SAFI: subsequencent ADDRESS FAMILY IDENTIFIER) filled in the message. A fifth type of routing of the EVPN (Ethernet VPN) address family may be used to carry IPv4 prefix addresses, and may also be used to carry IPv6 prefix addresses. If the current EVPN address family sends the local prefix policy to the opposite end through BGP ORF characteristics, the local network device may only carry one type of prefix policy, that is, only carry the local IPv4 prefix policy, or only carry the local IPv6 prefix policy. And when the types of EVPN prefixes supported by the network segment devices at the two ends by default are the same, the intercommunication is realized. If the current EVPN address family pre-sends the local IPv4 prefix strategy and the IPv6 prefix strategy to the opposite-end network equipment through BGP ORF characteristics, the opposite-end network equipment cannot confirm that the received prefix strategy is the IPv4 prefix strategy and the IPv6 prefix strategy, and the intercommunication cannot be realized. Disclosure of Invention In view of this, the present application provides a communication method and apparatus, which are used to solve the problem that the existing BGP ORF characteristics cannot support multiple types of routing prefixes at the same time, so that the multi-terminal network device cannot implement interworking. In a first aspect, the present application provides a communication method, where the method is applied to a first network device, where the first network device supports multiple types of address families, and multiple prefix policy types are supported under each type of address family, and the method includes: Sending a first ORF capability negotiation message to a second network device, wherein the first ORF capability negotiation message comprises at least one first indication information of each type of address group supported by the first network device, and each first indication information is used for indicating one prefix strategy type supported under each type of address group supported by the first network device; Receiving a second ORF capability negotiation message sent by a second network device, wherein the second ORF capability negotiation message comprises at least one piece of second indication information of each type of address group supported by the second network