Nothing Special   »   [go: up one dir, main page]

CN110611615B - Routing information transmission method and device - Google Patents

Routing information transmission method and device Download PDF

Info

Publication number
CN110611615B
CN110611615B CN201811430951.7A CN201811430951A CN110611615B CN 110611615 B CN110611615 B CN 110611615B CN 201811430951 A CN201811430951 A CN 201811430951A CN 110611615 B CN110611615 B CN 110611615B
Authority
CN
China
Prior art keywords
network device
bgp
address family
session
message
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
CN201811430951.7A
Other languages
Chinese (zh)
Other versions
CN110611615A (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201811430951.7A priority Critical patent/CN110611615B/en
Publication of CN110611615A publication Critical patent/CN110611615A/en
Application granted granted Critical
Publication of CN110611615B publication Critical patent/CN110611615B/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/02Topology update or discovery
    • H04L45/04Interdomain routing, e.g. hierarchical routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/741Routing in networks with a plurality of addressing schemes, e.g. with both IPv4 and IPv6

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application provides a method and a device for transmitting routing information, wherein the method comprises the following steps: negotiating with a second network device configured with the first address family to establish a BGP session, wherein session information of the BGP session comprises an identifier of the first address family; if the first network equipment configures a second address family, sending a first BGP message to the second network equipment through a BGP session, wherein the first BGP message comprises an identifier of the second address family configured by the first network equipment; if a second BGP message sent by a second network device is received and the second BGP message comprises an identifier of a second address family configured by the second network device, recording the identifier of the second address family to session information of a BGP session; first routing information for the second address family is sent to the second network device over the BGP session. By the technical scheme, repeated sending of routing information is avoided, and occupation of network bandwidth is reduced.

Description

Routing information transmission 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 transmitting routing information.
Background
Border Gateway Protocol (BGP) is an external routing Protocol used to transport routing information between autonomous systems. When two autonomous systems need to exchange routing information, designated network devices in the autonomous systems exchange routing information with each other by establishing BGP sessions. The BGP session may support exchanging routing information corresponding to one or more address families, such as IPv4 unicast routes, IPv6 unicast routes, and so on.
In one example, network device a and network device B have both configured the IPv4 address family. After the BGP session is established, network device a sends the routing information in the local IPv4 routing table to network device B via the BGP message. In the subsequent process, if incremental routing or changed routing exists locally, the network device a sends incremental routing information or changed routing information in the local IPv4 routing table to the network device B through the BGP message, without sending all the routing information, thereby reducing the occupation of network bandwidth.
After the BGP session is established, if network device a is configured with a new address family, such as an IPv6 address family, network device a disconnects the established BGP session and reestablishes another BGP session with network device B. After the other BGP session is reestablished, network device a sends routing information corresponding to each of the IPv4 address family and the IPv6 address family to network device B.
In the above manner, when the network device reconfigures a class of address families, the established BGP session needs to be disconnected and another BGP session needs to be reestablished, which causes repeated sending of routing information corresponding to the exchanged address families, and thus causes waste of system resources and waste of network bandwidth.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for transmitting routing information, which can avoid repeatedly sending routing information on the basis of not disconnecting an established BGP session, and reduce the occupation of network bandwidth.
In a first aspect, the present application provides a routing information transmission method, applied to a first network device, where the first network device has configured a first address family, and the method includes:
negotiating with a second network device configuring the first address family to establish a Border Gateway Protocol (BGP) session, wherein session information of the BGP session comprises an identifier of the first address family;
if the first network device configures a second address family, sending a first BGP message to the second network device through the BGP session, wherein the first BGP message comprises an identifier that the first network device has configured the second address family;
if a second BGP message sent by the second network equipment is received and the second BGP message comprises an identifier of the second address family configured by the second network equipment, recording the identifier of the second address family to session information of the BGP session;
and sending the first routing information of the second address family to the second network equipment through the BGP session.
With reference to the first aspect, in a first possible implementation manner, after the sending the first BGP packet to the second network device, the method further includes:
and if a third BGP message sent by the second network equipment is received and the third BGP message does not include the identifier of the second address family configured by the second network equipment, prohibiting the identifier of the second address family from being recorded in the session information of the BGP session.
With reference to the first aspect and the first possible implementation, in a second possible implementation, after the sending the first BGP message to the second network device, the method further includes:
if the second BGP message or the third BGP message sent by the second network equipment is not received, disconnecting the BGP session;
and negotiating with the second network device again to establish the BGP session, wherein the session information of the reestablished BGP session comprises: an identity of the first address family, or an identity of the first address family and an identity of the second address family.
With reference to the first aspect, in a third possible implementation manner, the method further includes:
receiving second routing information sent by the second network device, where the second routing information is routing information of the second address family configured by the second network device;
and the second routing information is sent after the second network equipment records the identifier of the second address family to the session information of the BGP session.
With reference to the first aspect, in a fourth possible implementation manner, the first BGP message specifically is: update message or refresh message; the first BGP message comprises an extended capability field, the extended capability field comprising an identification that the second address family has been configured;
the second BGP message specifically is: update message or refresh message; the second BGP message includes an extended capability field that includes an identification that the second address family has been configured.
In a second aspect, the present application provides a routing information transmission method, applied to a second network device, where the second network device has configured a first address family, and the method includes:
negotiating with a first network device configuring the first address family to establish a Border Gateway Protocol (BGP) session, wherein session information of the BGP session comprises an identifier of the first address family;
receiving a first BGP message sent by the first network equipment, wherein the first BGP message comprises an identifier of a second address family configured by the first network equipment;
if the second network device has configured the second address family, recording an identifier of the second address family to session information of the BGP session, and sending a second BGP message to the first network device, where the second BGP message includes the identifier of the second address family configured by the second network device;
and sending second routing information of the second address family to the first network device through the BGP session.
With reference to the second aspect, in a first possible implementation manner, after receiving the first BGP message sent by the first network device, the method further includes:
if the second network device does not configure the second address family, sending a third BGP message to the first network device, wherein the third BGP message does not include an identifier that the second network device has configured the second address family; or,
and prohibiting the second BGP message or the third BGP message from being sent to the first network equipment.
With reference to the second aspect, in a second possible implementation manner, the first BGP message specifically is: update message or refresh message; the first BGP message comprises an extended capability field, the extended capability field comprising an identification that the second address family has been configured;
the second BGP message specifically is: update message or refresh message; the second BGP message includes an extended capability field that includes an identification that the second address family has been configured.
In a third aspect, the present application provides a routing information transmission apparatus, applied to a first network device, where the first network device has configured a first address family, and the apparatus includes:
the establishing module is used for negotiating with second network equipment configured with the first address family to establish a Border Gateway Protocol (BGP) session, and session information of the BGP session comprises an identifier of the first address family;
a sending module, configured to send, when the first network device configures a second address family, a first BGP message to the second network device through the BGP session, where the first BGP message includes an identifier that the first network device has configured the second address family;
a processing module, configured to record, when a second BGP message sent by the second network device is received and the second BGP message includes an identifier of the second address family configured by the second network device, the identifier of the second address family to session information of the BGP session;
the sending module is further configured to send the first routing information of the second address family to the second network device through the BGP session.
With reference to the third aspect, in a first possible implementation manner, the processing module is further configured to prohibit recording the identifier of the second address family to the session information of the BGP session when a third BGP message sent by the second network device is received and the third BGP message does not include the identifier of the second address family configured by the second network device.
With reference to the third aspect and the first possible implementation manner, in a second possible implementation manner, the processing module is further configured to disconnect the BGP session when the second BGP message or the third BGP message sent by the second network device is not received;
the establishing module is further configured to negotiate with the second network device again to establish the BGP session after the processing module disconnects the BGP session, where session information of the re-established BGP session includes: an identity of the first address family, or an identity of the first address family and an identity of the second address family.
In a fourth aspect, the present application provides a routing information transmission apparatus applied to a second network device, where the second network device has configured a first address family, the apparatus including:
the establishing module is used for negotiating with first network equipment configured with the first address family to establish a Border Gateway Protocol (BGP) session, and session information of the BGP session comprises an identifier of the first address family;
a receiving module, configured to receive a first BGP message sent by the first network device, where the first BGP message includes an identifier of a second address family configured by the first network device;
a processing module, configured to record an identifier of the second address family to session information of the BGP session when the second network device has configured the second address family;
a sending module, configured to send a second BGP message to the first network device, where the second BGP message includes an identifier that the second network device has configured the second address family;
the sending module is further configured to send, to the first network device, second routing information of the second address family through the BGP session.
With reference to the fourth aspect, in a first possible implementation manner, the sending module is further configured to send, to the first network device, a third BGP message if the second address family is not configured by the second network device, where the third BGP message does not include an identifier that the second network device has configured the second address family; or,
the sending module is further configured to prohibit sending the second BGP message or the third BGP message to the first network device.
In a fifth aspect, the present application provides a first network device, comprising: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; the processor is used for executing machine executable instructions to realize the steps of the routing information transmission method.
In a sixth aspect, the present application provides a second network device, comprising: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; the processor is used for executing machine executable instructions to realize the steps of the routing information transmission method.
In a seventh aspect, the present application provides a machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, may cause the processor to perform the routing information transfer method steps described above.
As can be seen from the foregoing technical solutions, in the embodiments of the present application, after a first network device and a second network device that configure a first address family negotiate and establish a BGP session, if a second address family is configured for the first network device, the first network device and the second network device negotiate through a BGP message through the established BGP session, to determine whether the second address family is both configured. Under the condition that both sides have configured the second address family, the first network equipment only sends the routing information of the second address family to the second network equipment, and the first network equipment does not repeatedly send the routing information of the first address family any more, so that the repeated sending of the routing information can be avoided, the consumption of system resources and the occupation of network bandwidth are reduced, and the interruption of the original service is not caused.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
FIG. 1 is a schematic diagram of an application scenario in an embodiment of the present application;
fig. 2 is a flowchart of a routing information transmission method according to an embodiment of the present application;
FIG. 3 is a flow chart of a method for routing information transfer in one embodiment of the present application;
fig. 4 is a signaling interaction diagram of a routing information transmission method according to an embodiment of the present application;
fig. 5 is a block diagram of a routing information transfer apparatus according to an embodiment of the present application;
FIG. 6 is a hardware block diagram of a first network device in one embodiment of the present application;
fig. 7 is a structural diagram of a routing information transfer apparatus according to another embodiment of the present application;
fig. 8 is a hardware configuration diagram of a second network device in an embodiment of the present application.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the present application. As used in the examples and claims of 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 is meant to encompass any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the embodiments of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
The embodiment of the application provides a routing information transmission method, which is applied to specified network equipment in an autonomous area. Wherein the designated network device is the first network device or the second network device. The first network device may be any device supporting the BGP protocol, such as a border router, a gateway, etc., and the second network device may be any device supporting the BGP protocol, such as a border router, a gateway, etc.
Referring to fig. 1, which is a schematic view of an application scenario of the embodiment of the present application, a network device 101 and a network device 102 are connected, and the network device 101 and the network device 102 have established BGP neighbors. Network device 101 is a first network device and network device 102 is a second network device, or network device 101 is a second network device and network device 102 is a first network device.
Referring to fig. 2, a schematic flow chart of a routing information transmission method is shown, where the method includes:
step 201, negotiating with a second network device configured with a first address family to establish a BGP session, where session information of the BGP session includes an identifier of the first address family.
In one example, a first network device may configure a first address family and a second network device may configure the first address family. Thus, the first network device negotiates with a second network device configured with the first address family to establish a BGP session, and the session information for the BGP session includes an identification of the first address family.
In the negotiation establishment process of the BGP session, the first network device sends an open message 1 to the second network device, wherein the open message 1 carries an identifier of an address family configured by the first network device. And the second network equipment sends an open message 2 to the first network equipment, wherein the open message 2 carries the identifier of the address family configured by the second network equipment. Assuming that a first network device configures an IPv4 address family and a second network device configures an IPv4 address family and a VPNv4 address family, an open message 1 carries an identifier of the IPv4 address family, and an open message 2 carries an identifier of the IPv4 address family and an identifier of the VPNv4 address family.
After receiving the open message 2, the first network device determines that the second network device configures the IPv4 address family and the VPNv4 address family according to the identifier of the address family. The first network device compares the address family configured by the second network device with the address family configured by the first network device, and determines that the first network device and the second network device are configured with the IPv4 address family. At this time, the first network device may record an identifier of the IPv4 address family into session information of the BGP session (it is understood that the IPv4 address family is the first address family), so as to indicate that the network devices at both ends of the BGP session, that is, the first network device and the second network device both support the IPv4 address family.
Similarly, the process executed by the second network device after receiving the open message 1 is the same as the process executed by the first network device, and is not repeated here.
Because the session information of the BGP session includes the identifier of the IPv4 address family, the first network device may send the routing information of the IPv4 unicast routing table to the second network device through the BGP message, and the second network device may send the routing information of the IPv4 unicast routing table to the first network device through the BGP message. Thus, the route switching process between the network devices is realized.
Step 202, if the first network device configures the second address family (i.e. a new address family configured after the BGP session is established), the first network device sends a first BGP message to the second network device through the BGP session, where the first BGP message includes an identifier that the first network device has configured the second address family.
In a conventional manner, after a BGP session is established, if a first network device configures a second address family, the first network device disconnects the BGP session and renegotiates with a second network device to establish the BGP session.
Different from the foregoing manner, in this embodiment of the application, after the BGP session is established, if the first network device configures the second address family, the first network device sends the first BGP message to the second network device.
Wherein the first BGP message includes an identification of the first network device's configured address family of VPNv 4.
By way of example, and not limitation, the second address family may be specifically the VPNv4 address family.
Step 203, if a second BGP message sent by the second network device is received and the second BGP message includes an identifier of the second address family configured by the second network device, the first network device records the identifier of the second address family to session information of the BGP session.
In one example, after receiving the first BGP message, the second network device obtains an identifier of the second address family, e.g., an identifier of the VPNv4 address family, from the first BGP message. If the second network device has configured the VPNv4 address family, the second network device obtains the identifier of the VPNv4 address family, generates a second BGP message, and sends the second BGP message to the first network device.
Wherein the second BGP message includes an identification of the second network device's configured address family of VPNv 4.
After receiving the second BGP message, the first network device obtains an identifier of the second address family, e.g., an identifier of the VPNv4 address family, from the second BGP message. As can be seen from the description of step 202, since the first network device has configured the VPNv4 address family, the first network device records the identity of the VPNv4 address family to the session information of the BGP session, so as to indicate that the network devices at both ends of the BGP session, that is, the first network device and the second network device both support the VPNv4 address family.
It can be understood that, after acquiring the identifier of the second address family from the first BGP message, if the second network device configures the second address family, the second network device records the identifier of the second address family to the session information of the BGP session, so as to represent the network devices at both ends of the BGP session, that is, both the first network device and the second network device support the second address family.
In one implementation, when the second network device negotiates with the first network device to establish the BGP session, the second network device has configured the second address family, but since the first network device has not configured the second address family, the second network device does not record the identifier of the second address family to the session information of the BGP session. And after receiving the first BGP message, the second network equipment determines that the first network equipment is configured with the second address family.
In another implementation, after the second network device negotiates with the first network device to establish the BGP session, the user configures the second address families in the first network device and the second network device, respectively. Based on this, after receiving the first BGP message, the second network device determines that the first network device has configured the second address family.
Step 204, the first network device sends the first routing information of the second address family to the second network device through the BGP session.
In the embodiment of the present invention, according to the descriptions of the foregoing step 201 to step 203, both end devices of the BGP session, i.e., the first network device and the second network device, support the identification of the second address family, e.g., the address family of VPNv 4. Thus, the first network device sends the routing information (i.e., the first routing information) of the VPNv4 unicast routing table to the second network device through the BGP session.
And after receiving the first routing information, the second network equipment synchronizes the routes included in the first routing information into the local VPNv4 unicast routing table.
If the incremental routing information or the changed routing information exists locally in the first network device, the first network device sends the incremental routing information or the changed routing information (i.e., the first routing information) in the VPNv4 unicast routing table to the second network device through the BGP session again.
And after receiving the first routing information, the second network equipment synchronizes the route included in the first routing information to the local VPNv4 unicast routing table.
As can be seen from the foregoing technical solutions, in the embodiments of the present application, after a first network device and a second network device that configure a first address family negotiate and establish a BGP session, if a second address family is configured for the first network device, the first network device and the second network device negotiate through a BGP message through the established BGP session, to determine whether the second address family is both configured. Under the condition that both sides have configured the second address family, the first network equipment only sends the routing information of the second address family to the second network equipment, and the first network equipment does not repeatedly send the routing information of the first address family any more, so that the repeated sending of the routing information can be avoided, the consumption of system resources and the occupation of network bandwidth are reduced, and the interruption of the original service is not caused.
Optionally, in an example, after the first network device and the second network device negotiate to establish the BGP session, the first network device and the second network device may interact with an update (update) message and a refresh (refresh) message, but the first network device and the second network device do not interact with an open message any more.
Based on this, in this embodiment of the present application, in step 202 in the foregoing embodiment, the first BGP message sent by the first network device is an update message or a refresh message. The first BGP message includes an extended capability field, and the extended capability field includes an identification of a configured second address family.
Similarly, the second BGP message is an update message or a refresh message. The second BGP message includes an extended capability field, and the extended capability field includes an identification of a configured second address family.
Since the conventional update message and refresh message do not include the expansion capability field, in this embodiment of the present application, the conventional update message or refresh message is improved, so that the update message or refresh message includes the expansion capability field.
If the update message comprises the extended capability field, the first network device adds the identifier of the second address family to the extended capability field of the update message, and if the refresh message comprises the extended capability field, the first network device adds the identifier of the second address family to the extended capability field of the refresh message.
The expansion capability field (ExtCapability) may be an optional non-delivery routing attribute, that is, the update message or refresh message may or may not carry the expansion capability field. If the update message or the refresh message carries the expansion capability field, the network device supporting the technical scheme of the present application may obtain the identifier of the second address family from the expansion capability field of the update message or the refresh message, but the network device not supporting the technical scheme of the present application may adopt a conventional process.
The format of the update message or the refresh message may be a conventional format, but only the extended capability field is added, which is not limited to this.
Further, the extended capability field is used to carry an identifier of the second address family, and the format of the extended capability field refers to the extended capability field of the conventional open packet, which is not described herein again.
Optionally, in one example, after configuring the first network device with the second address family, the first network device may start a timer a with a timeout configured empirically, for example, 20 seconds, for step 202. And after the timer A is overtime, the first network equipment sends a first BGP message to the second network equipment.
The reason why the first BGP message is sent after the timer a times out is as follows: waiting for the user to complete configuration of the second address family. For example, a user configures a second address family at a first network device and a second network device, and by starting a timer a, the configuration of the second address family is completed at the first network device and the configuration of the second address family is completed at the second network device within the period of time before the timer a times out.
Optionally, in an example, after receiving the first BGP message, the second network device obtains the identifier of the second address family from the first BGP message. And if the second network equipment is not configured with the second address family, prohibiting recording the identifier of the second address family into the session information of the BGP session, and sending a third BGP message to the first network equipment, wherein the third BGP message does not comprise the identifier of the second address family configured by the second network equipment.
The third BGP message may be an update message or a refresh message, and the third BGP message may include an extended capability field, but the extended capability field does not include an identifier of the second address family.
After the first network device sends the first BGP message to the second network device, if a third BGP message sent by the second network device is received and the third BGP message does not include an identifier for which the second address family has been configured by the second network device, the first network device prohibits recording of the identifier for the second address family to session information of the BGP session.
Optionally, in an example, after receiving the first BGP message, if the second network device does not support the technical solution of the present application, the second network device does not obtain an identifier of the second address family from the first BGP message, that is, no matter whether the second network device configures the second address family, the second network device does not send the second BGP message or the third BGP message to the first network device.
After the first network device sends the first BGP message to the second network device, if the second BGP message or the third BGP message sent by the second network device is not received, the first network device disconnects the BGP session. After the first network device disconnects the BGP session, the second network device also disconnects the BGP session due to the BGP session down.
Further, after the BGP session is disconnected, the first network device renegotiates the BGP session with the second network device, where the session information of the reestablished BGP session includes: the identifier of the first address family, or the identifier of the first address family and the identifier of the second address family.
In the negotiation setup process of the BGP session, the first network device sends an open message 1 to the second network device, which is different from step 201 in that the open message 1 carries, in addition to the identifier of the IPv4 address family, the identifier of the second address family (e.g., the identifier of the VPNv4 address family). In addition, the second network device sends an open message 2 to the first network device, and the open message 2 carries the identifier of the IPv4 address family and the identifier of the VPNv4 address family.
Further, after receiving the open packet 2, the first network device may record an identifier of the IPv4 address family (i.e., an identifier of the first address family) and an identifier of the VPNv4 address family (i.e., an identifier of the second address family) in the session information of the BGP session. After receiving the open message 1, the second network device may record the identifier of the IPv4 address family and the identifier of the VPNv4 address family in the session information of the BGP session.
Optionally, in an example, after the first network device sends the first BGP message to the second network device, a timer B may also be started, where the timer B may be configured according to experience, for example, 1 second. Through the timer B, the first network device determines whether the second BGP message or the third BGP message is received within the preset time. And if the BGP message is not received within the preset time, the first network equipment determines that the corresponding BGP message is not received.
Optionally, in an example, after the first network device sends the first BGP message to the second network device, a negotiation waiting flag (e.g., flag) may be further set for the identifier of the second address family to indicate that the first network device and the second network device are negotiating whether to support the second address family.
And if the first network equipment receives a second BGP message or a third BGP message sent by the second network equipment, the negotiation process is finished. Accordingly, the first network device deletes the wait for negotiation flag.
Further, when the first network device receives the second routing information, if the identifier of the second address family sets the waiting negotiation flag, it indicates that the negotiation process is erroneous, and the first network device disconnects the BGP session and negotiates with the second network device again to establish the BGP session. If the identifier of the second address family does not set the waiting negotiation flag, it indicates that the negotiation process is successful, and the first network device may synchronize the route included in the second routing information into the local routing table.
Optionally, in an example, the embodiment of the present invention further includes a step of receiving, by the first network device through the BGP session, the second routing information sent by the second network device, and with this step, the first network device synchronizes a route of the second address family included in the second routing information into the local routing table. The method avoids repeated sending of routing information and reduces occupation of network bandwidth on the basis of not disconnecting the established BGP session.
Specifically, the second network device sends second routing information for the second address family, e.g., the routing information of the VPNv4 unicast routing table, to the first network device through the BGP session. And after receiving the second routing information, the first network equipment synchronizes the route included by the second routing information to the local VPNv4 unicast routing table.
If the incremental routing information or the changed routing information exists locally in the second network device, the second network device sends the incremental routing information or the changed routing information (i.e., the second routing information) in the VPNv4 unicast routing table to the first network device through the BGP session again.
And after receiving the second routing information, the first network equipment synchronizes the route included in the first routing information to the local VPNv4 unicast routing table.
Referring to fig. 3, a schematic flow chart of a routing information transmission method is shown, where an execution subject of the method is a second network device, and the method includes:
step 301, negotiating with a first network device configured with a first address family to establish a BGP session, where session information of the BGP session includes an identifier of the first address family.
Step 302, receiving a first BGP message sent by a first network device, where the first BGP message includes an identifier of a second address family configured by the first network device.
Step 303, if the second network device has configured the second address family, recording the identifier of the second address family to session information of the BGP session, and sending a second BGP message to the first network device, where the second BGP message includes the identifier of the second address family configured by the second network device.
Step 304, sending second routing information of the second address family to the first network device through the BGP session.
It is understood that, in the embodiment of the present invention, the specific processes of the second network device performing steps 301 to 304 are described in the foregoing embodiments, and are not repeated here.
Referring to fig. 4, a signaling interaction diagram of a routing information transmission method is shown, where the method includes:
step 401, the first network device negotiates with the second network device to establish a BGP session.
Step 402, if the first network device configures the second address family (i.e. a new address family configured after the BGP session is established), the first network device sends a first BGP message to the second network device through the BGP session, where the first BGP message includes an identifier that the first network device has configured the second address family.
Step 403, the second network device receives the first BGP message sent by the first network device.
Step 404, if the second network device has configured the second address family, the second network device records the identifier of the second address family to the session information of the BGP session, and sends a second BGP message to the first network device, where the second BGP message includes the identifier of the second address family configured by the second network device.
Step 405, if the first network device receives a second BGP message sent by the second network device, and the second BGP message includes an identifier of a second address family configured by the second network device, the first network device records the identifier of the second address family to session information of a BGP session.
Step 406, the first network device sends the first routing information of the second address family to the second network device through the BGP session, and the second network device receives the first routing information of the second address family.
Step 407, the second network device sends the second routing information of the second address family to the first network device through the BGP session, and the first network device receives the second routing information of the second address family.
It is understood that, in the embodiment of the present invention, the specific processes of the first network device and the second network device performing steps 401 to 407 are described in the foregoing embodiments, and are not repeated here.
Accordingly, based on the same application concept as the method described above, an embodiment of the present application further provides a routing information transmission apparatus, which can be applied to a first network device, where the first network device has configured a first address family, and is a structure diagram of the routing information transmission apparatus, as shown in fig. 5, the apparatus includes:
an establishing module 51, configured to negotiate with a second network device configured with the first address family to establish a BGP session, where session information of the BGP session includes an identifier of the first address family;
a sending module 52, configured to send, when the first network device configures a second address family, a first BGP message to the second network device through the BGP session, where the first BGP message includes an identifier that the first network device has configured the second address family;
a processing module 53, configured to, when a second BGP message sent by the second network device is received and the second BGP message includes an identifier of the second address family configured by the second network device, record the identifier of the second address family to session information of the BGP session;
the sending module 52 is further configured to send the first routing information of the second address family to the second network device through the BGP session.
Optionally, the processing module 53 is further configured to, when a third BGP message sent by the second network device is received and the third BGP message does not include the identifier of the second address family configured by the second network device, prohibit the identifier of the second address family from being recorded in the session information of the BGP session.
Optionally, the processing module 53 is further configured to disconnect the BGP session when the second BGP message or the third BGP message sent by the second network device is not received;
the establishing module 51 is further configured to negotiate again with the second network device to establish a BGP session after the processing module 53 disconnects the BGP session, where session information of the re-established BGP session includes: an identity of the first address family, or an identity of the first address family and an identity of the second address family.
Optionally, the apparatus further comprises:
a receiving module (not shown in the figure), configured to receive second routing information sent by the second network device, where the second routing information is routing information of the second address family configured by the second network device;
and the second routing information is sent after the second network equipment records the identifier of the second address family to the session information of the BGP session.
Optionally, the first BGP message sent by the sending module 52 specifically is: update message or refresh message; the first BGP message comprises an extended capability field, the extended capability field comprising an identification that the second address family has been configured;
the second BGP message sent by the sending module 52 specifically is: update message or refresh message; the second BGP message includes an extended capability field that includes an identification that the second address family has been configured.
As can be seen from the foregoing technical solutions, in the embodiments of the present application, after a first network device and a second network device that configure a first address family negotiate and establish a BGP session, if a second address family is configured for the first network device, the first network device and the second network device negotiate through a BGP message through the established BGP session, to determine whether the second address family is both configured. Under the condition that both sides have configured the second address family, the first network equipment only sends the routing information of the second address family to the second network equipment, and the first network equipment does not repeatedly send the routing information of the first address family any more, so that the repeated sending of the routing information can be avoided, the consumption of system resources and the occupation of network bandwidth are reduced, and the interruption of the original service is not caused.
In terms of hardware, a hardware architecture diagram of the first network device provided in the embodiment of the present application may be shown in fig. 6, and may include: a machine-readable storage medium and a processor, wherein:
a machine-readable storage medium: the instruction code is stored.
A processor: the method comprises the steps of communicating with a machine-readable storage medium, reading and executing instruction codes stored in the machine-readable storage medium, and realizing the routing information transmission operation disclosed in the above example of the application.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
Based on the same application concept as the method described above, an embodiment of the present application further provides a routing information transmission apparatus, which can be applied to a second network device, where the second network device has configured a first address family, and is a structure diagram of the routing information transmission apparatus, as shown in fig. 7, the apparatus includes:
an establishing module 71, configured to negotiate with a first network device configured with the first address family to establish a Border Gateway Protocol (BGP) session, where session information of the BGP session includes an identifier of the first address family;
a receiving module 72, configured to receive a first BGP message sent by the first network device, where the first BGP message includes an identifier of a second address family configured by the first network device;
a processing module 73, configured to, when the second network device has configured the second address family, record an identifier of the second address family to session information of the BGP session;
a sending module 74, configured to send a second BGP message to the first network device, where the second BGP message includes an identifier that the second network device has configured the second address family;
the sending module 74 is further configured to send the second routing information of the second address family to the first network device through the BGP session.
Optionally, the sending module 74 is further configured to send, to the first network device, a third BGP message if the second address family is not configured by the second network device, where the third BGP message does not include an identifier that the second network device has configured the second address family; or,
the sending module 74 is further configured to prohibit sending the second BGP message or the third BGP message to the first network device.
Optionally, the first BGP message received by the receiving module 72 specifically is: update message or refresh message; the first BGP message comprises an extended capability field, the extended capability field comprising an identification that the second address family has been configured;
the second BGP message sent by the sending module 74 specifically is: update message or refresh message; the second BGP message includes an extended capability field that includes an identification that the second address family has been configured.
As can be seen from the foregoing technical solutions, in the embodiments of the present application, after a first network device and a second network device that configure a first address family negotiate and establish a BGP session, if a second address family is configured for the first network device, the first network device and the second network device negotiate through a BGP message through the established BGP session, to determine whether the second address family is both configured. Under the condition that both sides have configured the second address family, the first network equipment only sends the routing information of the second address family to the second network equipment, and the first network equipment does not repeatedly send the routing information of the first address family any more, so that the repeated sending of the routing information can be avoided, the consumption of system resources and the occupation of network bandwidth are reduced, and the interruption of the original service is not caused.
In terms of hardware, a schematic diagram of a hardware architecture of the second network device provided in the embodiment of the present application may be shown in fig. 8, and may include: a machine-readable storage medium and a processor, wherein:
a machine-readable storage medium: the instruction code is stored.
A processor: the method comprises the steps of communicating with a machine-readable storage medium, reading and executing instruction codes stored in the machine-readable storage medium, and realizing the routing information transmission operation disclosed in the above example of the application.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (13)

1. A routing information transmission method applied to a first network device, wherein the first network device has a first address family configured, the method comprising:
negotiating with a second network device configuring the first address family to establish a Border Gateway Protocol (BGP) session, wherein session information of the BGP session comprises an identifier of the first address family;
if the first network device configures a second address family, sending a first BGP message to the second network device through the BGP session, wherein the first BGP message comprises an identifier that the first network device has configured the second address family;
if a second BGP message sent by the second network equipment is received and the second BGP message comprises an identifier of the second address family configured by the second network equipment, recording the identifier of the second address family to session information of the BGP session;
and sending the first routing information of the second address family to the second network equipment through the BGP session.
2. The method of claim 1, wherein after sending the first BGP message to the second network device, the method further comprises:
and if a third BGP message sent by the second network equipment is received and the third BGP message does not include the identifier of the second address family configured by the second network equipment, prohibiting the identifier of the second address family from being recorded in the session information of the BGP session.
3. The method of claim 2, wherein after sending the first BGP message to the second network device, the method further comprises:
if the second BGP message or the third BGP message sent by the second network equipment is not received, disconnecting the BGP session;
and negotiating with the second network device again to establish the BGP session, wherein the session information of the reestablished BGP session comprises: an identity of the first address family, or an identity of the first address family and an identity of the second address family.
4. The method of claim 1, further comprising:
receiving second routing information sent by the second network device, where the second routing information is routing information of the second address family configured by the second network device;
and the second routing information is sent after the second network equipment records the identifier of the second address family to the session information of the BGP session.
5. The method according to claim 1, wherein the first BGP message is specifically: update message or refresh message; the first BGP message comprises an extended capability field, the extended capability field comprising an identification that the second address family has been configured;
the second BGP message specifically is: update message or refresh message; the second BGP message includes an extended capability field that includes an identification that the second address family has been configured.
6. A routing information transmission method applied to a second network device, wherein the second network device has configured a first address family, the method comprising:
negotiating with a first network device configuring the first address family to establish a Border Gateway Protocol (BGP) session, wherein session information of the BGP session comprises an identifier of the first address family;
receiving a first BGP message sent by the first network equipment, wherein the first BGP message comprises an identifier of a second address family configured by the first network equipment;
if the second network device has configured the second address family, recording an identifier of the second address family to session information of the BGP session, and sending a second BGP message to the first network device, where the second BGP message includes the identifier of the second address family configured by the second network device;
and sending second routing information of the second address family to the first network device through the BGP session.
7. The method of claim 6, wherein after receiving the first BGP packet sent by the first network device, the method further comprises:
if the second network device does not configure the second address family, sending a third BGP message to the first network device, wherein the third BGP message does not include an identifier that the second network device has configured the second address family; or,
and prohibiting the second BGP message or the third BGP message from being sent to the first network equipment.
8. The method according to claim 6, wherein the first BGP message is specifically: update message or refresh message; the first BGP message comprises an extended capability field, the extended capability field comprising an identification that the second address family has been configured;
the second BGP message specifically is: update message or refresh message; the second BGP message includes an extended capability field that includes an identification that the second address family has been configured.
9. A routing information transfer apparatus applied to a first network device, the first network device having configured a first address family, the apparatus comprising:
the establishing module is used for negotiating with second network equipment configured with the first address family to establish a Border Gateway Protocol (BGP) session, and session information of the BGP session comprises an identifier of the first address family;
a sending module, configured to send, when the first network device configures a second address family, a first BGP message to the second network device through the BGP session, where the first BGP message includes an identifier that the first network device has configured the second address family;
a processing module, configured to record, when a second BGP message sent by the second network device is received and the second BGP message includes an identifier of the second address family configured by the second network device, the identifier of the second address family to session information of the BGP session;
the sending module is further configured to send the first routing information of the second address family to the second network device through the BGP session.
10. The apparatus of claim 9,
the processing module is further configured to prohibit recording the identifier of the second address family to the session information of the BGP session when a third BGP message sent by the second network device is received and the third BGP message does not include the identifier of the second address family configured by the second network device.
11. The apparatus of claim 10,
the processing module is further configured to disconnect the BGP session when the second BGP message or the third BGP message sent by the second network device is not received;
the establishing module is further configured to negotiate with the second network device again to establish the BGP session after the processing module disconnects the BGP session, where session information of the re-established BGP session includes: an identity of the first address family, or an identity of the first address family and an identity of the second address family.
12. A routing information transfer apparatus applied to a second network device, the second network device having configured a first address family, the apparatus comprising:
the establishing module is used for negotiating with first network equipment configured with the first address family to establish a Border Gateway Protocol (BGP) session, and session information of the BGP session comprises an identifier of the first address family;
a receiving module, configured to receive a first BGP message sent by the first network device, where the first BGP message includes an identifier of a second address family configured by the first network device;
a processing module, configured to record an identifier of the second address family to session information of the BGP session when the second network device has configured the second address family;
a sending module, configured to send a second BGP message to the first network device, where the second BGP message includes an identifier that the second network device has configured the second address family;
the sending module is further configured to send, to the first network device, second routing information of the second address family through the BGP session.
13. The apparatus of claim 12,
the sending module is further configured to send a third BGP message to the first network device if the second address family is not configured by the second network device, where the third BGP message does not include an identifier that the second address family is configured by the second network device; or,
the sending module is further configured to prohibit sending the second BGP message or the third BGP message to the first network device.
CN201811430951.7A 2018-11-28 2018-11-28 Routing information transmission method and device Active CN110611615B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811430951.7A CN110611615B (en) 2018-11-28 2018-11-28 Routing information transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811430951.7A CN110611615B (en) 2018-11-28 2018-11-28 Routing information transmission method and device

Publications (2)

Publication Number Publication Date
CN110611615A CN110611615A (en) 2019-12-24
CN110611615B true CN110611615B (en) 2021-08-24

Family

ID=68888925

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811430951.7A Active CN110611615B (en) 2018-11-28 2018-11-28 Routing information transmission method and device

Country Status (1)

Country Link
CN (1) CN110611615B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113364683B (en) * 2020-03-05 2022-12-30 华为技术有限公司 Route sending method and equipment
CN116389345A (en) * 2020-03-23 2023-07-04 华为技术有限公司 Method and device for transmitting segmented routing strategy and network transmission system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1839586A (en) * 2003-05-06 2006-09-27 思科技术公司 Route based on a pattern of a received packet
CN101610208A (en) * 2008-06-19 2009-12-23 华为技术有限公司 The method of announcing between bgp neighbor, system and router
CN101764737A (en) * 2008-12-25 2010-06-30 华为技术有限公司 Route aging method, device and router based on border gateway protocol
CN102202004A (en) * 2011-07-08 2011-09-28 福建星网锐捷网络有限公司 Routing error processing method and device and routing equipment
CN102761482A (en) * 2012-06-29 2012-10-31 杭州华三通信技术有限公司 Method for building BGP (border gateway protocol) neighbor and equipment therefore
EP2577921A1 (en) * 2010-06-03 2013-04-10 Hangzhou H3C Technologies Co., Ltd. Method, system and router for changing application in bgp session

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10594514B2 (en) * 2017-03-29 2020-03-17 At&T Intellectual Property I, L.P. Method and apparatus for creating border gateway protocol reachability on demand in a multi-protocol label switching network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1839586A (en) * 2003-05-06 2006-09-27 思科技术公司 Route based on a pattern of a received packet
CN101610208A (en) * 2008-06-19 2009-12-23 华为技术有限公司 The method of announcing between bgp neighbor, system and router
CN101764737A (en) * 2008-12-25 2010-06-30 华为技术有限公司 Route aging method, device and router based on border gateway protocol
EP2577921A1 (en) * 2010-06-03 2013-04-10 Hangzhou H3C Technologies Co., Ltd. Method, system and router for changing application in bgp session
CN102202004A (en) * 2011-07-08 2011-09-28 福建星网锐捷网络有限公司 Routing error processing method and device and routing equipment
CN102761482A (en) * 2012-06-29 2012-10-31 杭州华三通信技术有限公司 Method for building BGP (border gateway protocol) neighbor and equipment therefore

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
"BGP4+协议研究与应用";庞超,等;《无线电工程》;20110228;第4-6页 *
"Limiting path exploration in BGP";J. Chandrashekar,等;《Proceedings IEEE 24th Annual Joint Conference of the IEEE Computer and Communications Societies》;20050822;第2337-2348页 *
"MPLS/BGP4 VPN原理与实现";陈涛,等;《电信快报》;20050228;第36-40页 *
"RFC1771";Y. Rekhter,等;《IETF》;19950331;第1-57页 *
"RFC3392";R. Chandra,等;《IETF》;20021130;第1-6页 *
"RFC5512";P. Mohapatra;《IETF》;20090430;第1-13页 *

Also Published As

Publication number Publication date
CN110611615A (en) 2019-12-24

Similar Documents

Publication Publication Date Title
CN110430076B (en) Route management method and device
CN104412646B (en) For the communication path switching of mobile device
CN109819485B (en) Communication method, device and system
CN102348252B (en) A kind of tracking area list updating method and equipment
EP3143735A1 (en) Establishing reliable routes without expensive mesh peering
TW200901797A (en) Method and apparatus for transfer of session reference network controller
CN110831092B (en) Method and equipment for PDU session management, node association and UPF discovery
CN106878072B (en) Message transmission method and device
CN103238345A (en) Communication method, device and system all based on mobile management entity pool (MME Pool)
US9961045B2 (en) Service path changing method and apparatus
CN110611615B (en) Routing information transmission method and device
CN112187495A (en) Communication method and communication system of terminal and server
EP3297338A1 (en) Method for realizing network access, terminal and computer storage medium
CN109150659B (en) Processor and BFD message transmission method
CN109587829A (en) A kind of method, apparatus and terminal that terminal is used as website and hot spot to work simultaneously
CN109089288B (en) Data transmission method and equipment
CN113676959A (en) Service flow forwarding method, device and equipment based on 5G core network
CN102202004A (en) Routing error processing method and device and routing equipment
CN105307217A (en) Method and device for flexibly processing link between network elements
CN107547618B (en) Session dismantling method and device
CN102984813A (en) Data straight-through processing method, equipment and system
CN103813395A (en) Method for moving seamlessly among different networks by terminal user, and wireless local area network optimization gateway (WOG)
WO2017080303A1 (en) Method and apparatus for processing circuit switched fallback (csfb) flow
TWI663884B (en) Method of data communication for a communication device in wireless ad hoc network and a communication device
JP2007181179A (en) Method and apparatus for session setup in dynamic networks

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