Patent Description:
The present invention relates to the field of communications, and particularly, to a network device and method for sending BGP information.

The Border Gateway Protocol (Border Gateway Protocol, BGP) is a dynamic routing protocol operating on an autonomous system (Autonomous System, AS) and is typically configured on a network device. The BGP generally can support a number of capabilities, for example, IPv4 unicast (IPv4 Unicast), IPv4 multicast (IPv4 Multicast), IPv6 unicast (IPv6 Unicast), and other multiple-protocol extended capabilities, and quantities and types of capabilities supported by different BGPs may be different. In terms of a network device configured with the BGP, generally not all capabilities supported by the configured BGP are enabled, but currently required BGP capabilities are enabled according to current task requirement.

In order to effectively monitor and manage operating statuses of the BGP configured on each network device in a network, a current method is that a monitoring server (Monitoring Server) acquires BGP information of each network device in the network to centrally monitor and manage the network device configured with the BGP in the network. By way of an example of a flow in which the monitoring server acquires the BGP information, after a BGP connection is established between network devices A and B (or between peers) configured with the BGP, taking the network device A as an example, the network devices A and B negotiate about their own enabled BGP capabilities by using a packet according to a BGP rule, and the network device A further includes a BGP monitoring protocol (BGP Monitoring Protocol, BMP) module capable of establishing a connection with the monitoring server, where the BMP module can acquire the enabled BGP capabilities of the network device A and the enabled BGP capabilities of the network device B according to the negotiated enabled BGP capabilities. Therefore, when the BMP module of the network device A sends the configured BGP information of the network device to the monitoring server by using a peer up notification(Peer Up Notification), the BGP capabilities include only the BGP capabilities enabled on the network device A.

However, sending only deployed or enabled BGP capabilities is not enough. The monitoring server needs to acquire all BGP capabilities supported by the network devices configured with the BGP in the network, namely including enabled and disabled BGP capabilities, so that the monitoring server can know comprehensively real capabilities supported by the entire network, further providing an effective basis for deployment of and decision on the entire network.

<NPL>AND, <NUM> defines an Optional Parameter, called Capabilities, that is expected to facilitate the introduction of new capabilities in the Border Gateway Protocol (BGP) by providing graceful capability advertisement without requiring that BGP peering be terminated.

<NPL>AND, defines a protocol, BMP, which can be used to monitor BGP sessions. BMP is intended to provide a more convenient interface for obtaining route views for research purpose than the screen-scraping approach in common use today. The design goals are to keep BMP simple, useful, easily implemented, and minimally service-affecting. BMP is not suitable for use as a routing protocol.

Embodiments of the invention provide a network device and method for sending BGP information, so that the network device can send all capabilities supported by a configured BGP.

According to a first aspect, an embodiment of the invention provides a network device for sending BGP information, where the network device includes a BGP module and a BMP module, where.

In a first possible implementation manner of the first aspect, the sending to the monitoring server all the BGP capability data and a device identifier of the network device is implemented by sending an initial capability information set message.

With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, all the BGP capability data is encapsulated in an optional parameter field of the initial capability information set message.

With reference to the first or second possible implementation manner of the first aspect, in a third possible implementation manner, the network device further includes:
the monitoring server, configured to acquire the initial capability information set message sent by the BMP module; and acquire, from the initial capability information set message, all the BGP capability data corresponding to the network device.

With reference to the first or second or third possible implementation manner of the first aspect, in a fourth possible implementation manner,
when the network device establishes a BGP connection with another network device, the BMP module is further configured to send a peer up notification targeted at the network device to the monitoring server, where the peer up notification message carries BGP capabilities enabled in the network device.

According to a second aspect, an embodiment of the invention provides a method for sending BGP information, where the method is applicable to a network device, the network device includes a BGP module and a BMP module, and the method includes:.

In a first possible implementation manner of the second aspect, the sending, by the BMP module to the monitoring server, all the BGP capability data and a device identifier of the network device is specifically: sending, by the BMP module to the monitoring server, an initial capability information set message, where the initial capability information set message carries all the BGP capability data and the device identifier of the network device.

With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner, the method further includes:
encapsulating, by an optional parameter field of the initial capability information set message, all the BGP capability data is encapsulated.

With reference to the first or second possible implementation manner of the second aspect, in a third possible implementation manner, the method further includes:.

With reference to the first or second or third possible implementation manner of the second aspect, in a fourth possible implementation manner,
when the network device establishes a BGP connection with another network device, the BMP module sends a peer up notification targeted at the network device to the monitoring server, where the peer up notification message carries BGP capabilities enabled in the network device.

According to a third aspect, an embodiment of the invention provides a network device for sending BGP information, where the network device includes a BGP module and a BMP module, where.

In a first possible implementation manner of the third aspect, the BMP module is further configured to send a second peer up notification targeted at the network device to the monitoring server, where the second peer up notification carries the BGP capabilities enabled in the network device and the device identifier of the network device.

With reference to the third aspect or the first possible implementation manner of the third aspect, in a second possible implementation manner,
the monitoring server is configured to receive the first peer up notification; and acquire, from the first peer up notification, all the BGP capability data corresponding to the network device. According to a fourth aspect, an embodiment of the invention provides a method for sending BGP information, where the method is applicable to a network device, the network device includes a BGP module and a BMP module, and the method includes:.

In a first possible implementation manner of the fourth aspect,
the BMP module sends a second peer up notification targeted at the network device to the monitoring server, where the second peer up notification carries the BGP capabilities enabled in the network device and the device identifier of the network device.

With reference to the fourth aspect or the first possible implementation manner of the fourth aspect, in a second possible implementation manner,.

As can be seen from the technical solutions above, the capability of a network device can be extended so that the network device can acquire all BGP capabilities configured in the network device by means of interaction between a BGP module and a BMP module, and send all the BGP capabilities to the monitoring server by using an extended SMP message, so that the monitoring server can acquire all the BGP capabilities supported by the network device, namely including the enabled and disabled BGP capabilities, so the monitoring server can know comprehensively real capabilities supported by the entire network, further providing an effective basis for deployment of and decision on the entire network.

To describe the technical solutions in the embodiments of the present invention or in the prior art more clearly, the following briefly introduces the accompanying drawings required for describing the embodiments or the prior art. Apparently, the accompanying drawings in the following description show some embodiments of the present invention, and a person of ordinary skill in the art may still derive other drawings from these accompanying drawings.

In the prior art, a network device configured with the BGP typically sends BGP capabilities to a monitoring server by using a peer up notification, and the peer up notification includes not all BGP capabilities but only BGP capabilities enabled in the network device so that the monitoring server can not know comprehensively BGP capabilities of the network device in a network monitored by the monitoring server, and if the monitoring device needs to manage, upgrade, and extend capability of the network device in the network, the BGP capability information acquired by the monitoring server may not be sufficient to provide a valid support and basis. Moreover the network device sends the peer up notification to the monitoring server on the precondition that the network device has established a BGP connection with other network devices so that the network devices for which the BGP connection has been established negotiate with each other for BGP capabilities on each network device, that is, when the network device configured with the BGP has not established any BGP connection with other network devices, then it will be likely for the monitoring server to fail to acquire the BGP capabilities of the network device.

In view of the technical problem that the monitoring server can acquire only the enabled BGP capabilities of the network device which has established the BGP connection with other network devices, according to the embodiments of the invention, capabilities of the network device is extended so that the network device can acquire all the capabilities of the BGP configured in the network device by means of interaction between a BGP module and a BMP module, and sends all the BGP capabilities, for example, initial capability set information (Initiation Capability Information) carrying all the BGP capabilities on the network device to the monitoring server by using an extended BMP message so that the monitoring server can acquire all the BGP capabilities supported by the network device, namely including the enabled and disabled BGP capabilities, and so that the monitoring server can know comprehensively real capabilities supported by the entire network, further providing an effective basis for deployment of and decision on the entire network. It shall be noted that the BGP module and the BMP module of the network device in the embodiments of the invention are merely executive entities of function required in the embodiments of the invention, and the functions in the embodiments of the invention may not necessarily be performed by the BGP module and the BMP module in the invention, but can alternatively be performed by other modules capable of performing the same functions in the network device. Specifically the network device can be a provider edge router (Provider Edge Router, PE) device in some common application scenarios.

The following clearly describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention should fall within the protection scope of the present invention.

<FIG> is a schematic structural diagram of a network device for sending BGP information according to an embodiment of the invention. As illustrated in <FIG>, the network device <NUM> includes a Border Gateway Protocol BGP module <NUM> and a Border Gateway Protocol BMP module <NUM>.

The BMP module <NUM> is configured to establish a BMP connection with a monitoring server, and send to the BGP module a request for acquiring a capability information set.

It shall be noted that the request for acquiring the capability information set is a function performed by the BMP module after extension. The BMP module can act in the network device <NUM> to send the request for acquiring the capability information set to the BGP module, and interaction between the BGP module and the BMP module in the network device can be in the form of a signaling message, or can be in the form of a recalled function interface, which is not limited by the present invention thereto.

The BGP module <NUM> is configured to receive the request for acquiring the capability information set; traverse BGP capability data stored in the BGP module to acquire all BGP capability data configured in the network device <NUM>; and send the acquired all BGP capability data to the BMP module.

It shall be noted herein that the BGP capability data can be stored in the BGP module respectively in storage spaces of units performing corresponding BGP capabilities, or in a BGP capability set, for example, a BGP capability list. Table <NUM> depicts a representation of the BGP capability list.

The BGP module traverses the BGP capability data stored in the BGP module (for example, the BGP capabilities respectively stored in the respective storage spaces, or the list as depicted in Table <NUM>) to acquire all the BGP capability data. It shall be noted that although the BGP module can traverse to acquire all the BGP capability data, the BGP module can not determine, among all the BGP capability data, which BGP capabilities are enabled on the network device, and which BGP capabilities are disabled on the network device.

The BMP module <NUM> is further configured to send to the monitoring server all the BGP capability data and a device identifier of the network device. Specifically, the BMP module <NUM> can carry all the BGP capability data, and a device identifier of the network device in an initial capability information set message (Initiation Capability Information), and send the initial capability information set message to the monitoring server. More specifically, all the BGP capability data and the device identifier of the network device are carried in an optional parameter (Optional Parameters) field of the initial capability information set message.

The initial capability information set message is a BMP message created by extending a BMP rule, and can be used to carry all the BGP capability data, and fields in the initial capability information set message are encapsulated in the same format as the BGP OPEN Message as depicted in Table <NUM>.

All the BGP capability data can be encapsulated in a field of the initial capability information set message. Optionally all the BGP capability data can be encapsulated in the field of optional parameters (Optional Parameters) of the initial capability information set message.

After the BMP module of the network device sends the initial capability information set message to the monitoring server, the monitoring server further processes the initial capability information set message. Based on the embodiment illustrated in <FIG>, reference is made to <FIG> which is a schematic structural diagram of a network device for sending BGP information according to an embodiment of the invention, where:
The monitoring server <NUM> is configured to acquire the initial capability information set message sent by the BMP module; and to acquire all the BGP capability data corresponding to the network device <NUM> from the initial capability information set message.

It shall be noted that although the monitoring server <NUM> can decapsulate the initial capability information set message, and determine all the BGP capability data corresponding to the network device <NUM> according to the device identifier, the monitoring server <NUM> can not determine, among all the BGP capability data, which BGP capabilities are enabled on the network device <NUM>, and which BGP capabilities are disabled on the network device <NUM>. So that it may not be sufficient in accuracy for the monitoring server <NUM> to take the acquired all BGP capability data as a basis for deployment of and decision on the entire network. In view of this, optionally based on the embodiment illustrated in <FIG>, when the network device <NUM> establishes a BGP connection with another network device, the BMP module <NUM> is further configured to send a peer up notification targeted at the network device <NUM> to the monitoring server <NUM>, where the peer up notification message carries BGP capabilities enabled in the network device <NUM>.

In other words, when the network device <NUM> establishes the BGP connection with another network device, they negotiate with each other about their enabled BGP capabilities, so that the peer up notification sent from the BMP module to the monitoring server <NUM> can carry the BGP capabilities enabled in the network device <NUM>. By way of an example, all the BGP capabilities configured in the network device <NUM> include three BGP capabilities in total, which are IPv4 Unicast (IPv4 unicast), IPv4 Multicast (IPv4 multicast), and IPv6 Unicast (IPv6 unicast) respectively, and only one of the BGP capabilities is currently enabled on the network device <NUM>, which is IPv4 Unicast. The monitoring server <NUM> acquires all the three BGP capabilities including IPv4 Unicast, IPv4 Multicast, and IPv6 Unicast from the initial capability information set message sent by the BMP module, but does not know which capabilities are enabled on the network device <NUM>, and which capabilities are disabled on the network device <NUM>; and the monitoring server <NUM> acquires the BGP capability enabled in the network device <NUM>, for example, IPv4 Unicast, from the peer up notification targeted at the network device <NUM> sent by the BMP module, so that the monitoring server <NUM> determines, among all the BGP capabilities of the network device <NUM>, that the enabled BGP capability is IPv4 Unicast, and the disabled BGP capabilities are IPv4 Multicast and IPv6 Unicast.

In other words, the monitoring server <NUM> acquires not only all the BGP capability data of the network device <NUM>, but also the enabled BGP capability of the network device <NUM>, so that the monitoring server <NUM> can distinguish the disabled BGP capabilities from the enabled BGP capability among all the BGP capability data, thereby further improving the knowledge of the monitoring server <NUM> about all the BGP capability data of the network device <NUM>. If there is a need to extend a function of the network, or to deploy network devices in the network again, the monitoring server <NUM> can determine, from the acquired enabled BGP capabilities and disabled BGP capabilities of the network devices, which network devices can enable directly the capability to be extended, without being additionally configured with a protocol, thereby improving the efficiency of extending the capability of the network or deploying again the network devices, and saving resources and operating costs of the network.

As can be seen that, the capability of a network device can be extended so that the network device can acquire all BGP capabilities configured in the network device by means of interaction between a BGP module and a BMP module, and send to the monitoring server all the BGP capability data carried in the initial capability information set message by using an extended BMP message, so that the monitoring server can acquire all the BGP capabilities supported by the network device, namely including the enabled and disabled BGP capabilities, so the monitoring server can know comprehensively real capabilities supported by the entire network, further providing an effective basis for deployment of and decision on the entire network.

<FIG> is a schematic structural diagram of a network device for sending BGP information according to an embodiment of the invention, and as illustrated in <FIG>, the network device <NUM> includes a Border Gateway Protocol BGP module <NUM>, and a Border Gateway Protocol BMP module <NUM>.

The BMP module <NUM> is configured to send to the BGP module a request for acquiring a capability information set.

It shall be noted herein the request for acquiring the capability information set is a function performed by the BMP module after extension. The BMP module can act in the network device <NUM> to send the request for acquiring the capability information set to the BGP module, and interaction between the BGP module and the BMP module in the network device <NUM> can be in the form of a signaling message, or can be in the form of a recalled function interface, which is not limited by the present invention thereto.

The BGP module <NUM> is configured to receive the request for acquiring the capability information set; and traverse BGP capability data stored in the BGP module and to acquire all BGP capability data configured in the network device <NUM>.

The BGP module traverses the BGP capability data stored in the BGP module (for example, the BGP capabilities respectively stored in the respective storage spaces, or the list as depicted in Table <NUM>) and acquires all the BGP capability data. It shall be noted that although the BGP module can traverse to acquire all the BGP capability data, the BGP module can not determine, among all the BGP capability data, which BGP capabilities are enabled on the network device, and which BGP capabilities are disabled on the network device.

The network device <NUM> is configured to create a virtual peer (Virtual Peer) and all the BGP capability data is enabled on the Virtual Peer.

In other words, since all the BGP capability data acquired by the BGP module are enabled on the created virtual peer, the BMP module of the network device can thereby acquire the enabled BGP capabilities of the virtual peer, for example, all the BGP capability data configured in the network device.

It shall be noted here although the network device <NUM> creates the virtual peer, the virtual peer can be created specifically by a functional module in the network device.

The BMP module <NUM> is further configured to send a first peer up notification (Peer Up Notification) targeted at the virtual peer to a monitoring server, where the first peer up notification carries all the BGP capability data enabled in the virtual peer, and location information in the first peer up notification is a device identifier of the network device <NUM>.

The first peer up notification can be encapsulated in the same format as the peer up notification in the prior art as depicted in Table <NUM>. However the location information in the first peer up notification is the device identifier of the network device, where the device identifier can be a router ID, and the like, of the network device. Moreover since the virtual peer does not need to receive an open message of the network device for negotiation, the Received Open Message of the first peer up notification can be null.

It shall be noted that upon reception of the first peer up notification, the monitoring server parses the local positional information and obtains the device identifier of the network device, thereby determines all the BGP capability data corresponding to the network device <NUM>. In other words, based on <FIG> is a schematic structural diagram of a network device for sending BGP information according to an embodiment of the invention, as illustrated in <FIG>.

The monitoring server <NUM> is configured to receive the first peer up notification; and acquire all the BGP capability data corresponding to the network device <NUM> from the first peer up notification. However the monitoring server <NUM> can not distinguish the BGP capabilities enabled on the network device <NUM> from the BGP capabilities disabled on the network device among all the BGP capability data.

Optionally, based on the embodiment illustrated in <FIG>, the BMP module <NUM> is further configured to send a second peer up notification targeted at the network device to the monitoring server, where the second peer up notification carries the BGP capabilities enabled on the network device and the device identifier of the network device.

In other words, when the network device has established a BGP connection with the virtual peer, the BMP module can send the first peer up notification targeted at the virtual peer to the monitoring server, and can also send the second peer up notification targeted at the network device to the monitoring server. The second peer up notification carries the BGP capabilities enabled on the network device, which are acquired by means of negotiation between the network device and the virtual peer about their own enabled BGP capabilities. By way of an example, all the BGP capability data configured in the network device include three BGP capabilities in total, which are IPv4 Unicast (IPv4 unicast), IPv4 Multicast (IPv4 multicast), and IPv6 Unicast (IPv6 unicast), and only one of the BGP capabilities is currently enabled on the network device, which is IPv4 Unicast. The network device creates the virtual peer, and enables all the three BGP capabilities including IPv4 Unicast, IPv4 Multicast, and IPv6 Unicast on the virtual peer, and after negotiating with the virtual peer about their own enabled BGP capabilities, the BMP module sends the first peer up notification to the monitoring server, and the monitoring server acquires all the three BGP capabilities including IPv4 Unicast, IPv4 Multicast, and IPv6 Unicast from the first peer up notification sent by the BMP module, but the monitoring server can not know which capabilities are enabled on the network device, and which capabilities are disabled on the network device. The monitoring server acquires the BGP capability enabled in the network device, for example, IPv4 Unicast, from the second peer up notification targeted at the network device sent by the BMP module, so that the monitoring server determines, among all the BGP capabilities of the network device, that the enabled BGP capability is IPv4 Unicast, and the disabled BGP capabilities are IPv4 Multicast and IPv6 Unicast.

After the monitoring server acquires the first peer up notification and the second peer up notification, the monitoring server can distinguish the disabled BGP capabilities from the enabled BGP capability among all the BGP capability data, thereby further improving the knowledge of the monitoring server about all the BGP capability data of the network device. If there is a need to extend a function of the network, or to deploy network devices in the network again, the monitoring server can determine, from the acquired enabled BGP capabilities and disabled BGP capabilities of the network devices, which network devices can enable directly the capability to be extended, without being additionally configured with a protocol, thereby improving the efficiency of extending the capability of the network or deploying again the network devices, and saving resources and operating costs of the network.

As can be seen that, the capability of a network device can be extended so that the BGP module of the network device can acquire all BGP capabilities configured in the network device by means of interaction between a BGP module and a BMP module, and the network device creates a virtual peer, and enables all the BGP capabilities in the acquired data on the virtual peer; and when the network device and the virtual peer negotiate about their own enabled BGP capabilities, the BMP module will acquire the BGP capabilities enabled on the virtual peer, for example, all the BGP capability data configured in the network device, and the BMP module will send the first peer up notification targeted at the virtual peer to the monitoring server so that the monitoring server can acquire all the BGP capability data of the network device, namely including the enabled and disabled BGP capabilities, so the monitoring server can know comprehensively real capabilities supported by the entire network, further providing an effective basis for deployment of and decision on the entire network.

<FIG> is a flow chart of a method for sending BGP information, where a network device includes a BGP module and a BMP module, and the method includes the following steps.

S501: The BMP module establishes a BMP connection with a monitoring server.

S502: The BMP module sends a request for acquiring a capability information set to the BGP module.

It shall be noted herein that the request for acquiring the capability information set is a function performed by the BMP module after extension. The BMP module can act in the network device <NUM> to send the request for acquiring the capability information set to the BGP module, and interaction between the BGP module and the BMP module in the network device can be in the form of a signaling message, or can be in the form of a recalled function interface, which is not limited by the present invention thereto.

S503: The BGP module receives the request for acquiring the capability information set.

S504: The BGP module traverses BGP capability data stored in the BGP module and acquires all the BGP capability data configured in the network device.

S505: The BGP module sends the acquired all BGP capability data to the BMP module.

It shall be noted herein that the BGP capability data can be stored in the BGP module respectively in storage spaces of units performing corresponding BGP capabilities, or in a BGP capability set, for example, a BGP capability list. Table <NUM> depicts a representation of the BGP capability list. The BGP module traverses the BGP capability data stored in the BGP module (for example, the BGP capabilities respectively stored in the respective storage spaces, or the list as depicted in Table <NUM>) to acquire all the BGP capability data. It shall be noted that although the BGP module can traverse to acquire all the BGP capability data, the BGP module can not determine, among all the BGP capability data, which BGP capabilities are enabled on the network device, and which BGP capabilities are disabled on the network device.

S506: The BMP module sends all the BGP capability data, and a device identifier of the network device to the monitoring server.

Specifically the BMP module <NUM> can carry all the BGP capability data, and the device identifier of the network device in an initial capability information set message (Initiation Capability Information), and further send the initial capability information set message to the monitoring server. More specifically, all the BGP capability data and the device identifier of the network device are carried in an optional parameter (Optional Parameters) field of the initial capability information set message.

The initial capability information set message is a BMP message created by extending a BMP rule, and can be used to carry all the BGP capability data, and fields in the initial capability information set message are encapsulated in the same format as the BGP OPEN Message as depicted in Table <NUM>.

All the BGP capability data may be encapsulated in a field of the initial capability information set message. Optionally, all the BGP capability data may be encapsulated in the field of optional parameters of the initial capability information set message.

After the BMP module of the network device sends the initial capability information set message to the monitoring server, the monitoring server further processes the initial capability information set message. Based on the embodiment illustrated in <FIG>, reference is made to <FIG> which is a flow chart of a method for sending BGP information, where the method includes the following steps.

S601: The monitoring server acquires the initial capability information set message sent by the BMP module.

S602: The monitoring server acquires all the BGP capability data corresponding to the network device from the initial capability information set message.

It shall be noted that although the monitoring server can decapsulate the initial capability information set message, and determine all the BGP capability data corresponding to the network device according to the device identifier, the monitoring server can not determine, among all the BGP capability data, which BGP capabilities are enabled on the network device, and which BGP capabilities are disabled on the network device. So that it may not be sufficient in accuracy for the monitoring server to take the acquired all BGP capability data as a basis for deployment of and decision on the entire network. In view of this, optionally based on the embodiment illustrated in <FIG>, when the network device establishes a BGP connection with another network device, the BMP module is further configured to send a peer up notification targeted at the network device to the monitoring server, where the peer up notification message carries BGP capabilities enabled in the network device.

In other words, when the network device establishes the BGP connection with another network device, they negotiate with each other about their enabled BGP capabilities so that the BMP module sends the peer up notification carrying the BGP capabilities enabled in the network device to the monitoring server. By way of an example, all the BGP capabilities configured in the network device include three BGP capabilities in total, which are IPv4 Unicast (IPv4 unicast), IPv4 Multicast (IPv4 multicast), and IPv6 Unicast (IPv6 unicast), and only one of the BGP capabilities is currently enabled on the network device, which is IPv4 Unicast. The monitoring server acquires all the three BGP capabilities including IPv4 Unicast, IPv4 Multicast, and IPv6 Unicast from the initial capability information set message sent by the BMP module, but does not know which capabilities are enabled on the network device, and which capabilities are disabled on the network device; and the monitoring server acquires the BGP capability enabled in the network device, for example, IPv4 Unicast, from the peer up notification targeted at the network device sent by the BMP module, so that the monitoring server determines, among all the BGP capabilities of the network device, that the enabled BGP capability is IPv4 Unicast, and the disabled BGP capabilities are IPv4 Multicast and IPv6 Unicast.

In other words, the monitoring server acquires not only all the BGP capability data of the network device, but also the enabled BGP capability of the network device, so that the monitoring server can distinguish the disabled BGP capabilities from the enabled BGP capability among all the BGP capability data, thereby further improving the knowledge of the monitoring server about all the BGP capability data of the network device. If there is a need to extend a function of the network, or to deploy network devices in the network again, the monitoring server can determine, from the acquired enabled BGP capabilities and disabled BGP capabilities of the network devices, which network devices can enable directly the capability to be extended, without being additionally configured with a protocol, thereby improving the efficiency of extending the capability of the network or deploying again the network devices, and saving resources and operating costs of the network.

<FIG> is a flow chart of a method for sending BGP information according to an embodiment of the invention, and as illustrated in <FIG>, where a network device includes a BGP module and a BMP module, and the method includes the following steps.

S701: The BMP module sends a request for acquiring a capability information set to the BGP module.

It shall be noted herein that the request for acquiring the capability information set is a function performed by the BMP module after extension. The BMP module can act in the network device to send the request for acquiring the capability information set to the BGP module, and interaction between the BGP module and the BMP module in the network device can be in the form of a signaling message, or can be in the form of a recalled function interface, which is not limited by the present invention thereto.

S702: The BGP module receives the request for acquiring the capability information set.

S703: The BGP module traverses BGP capability data stored in the BGP module to acquire all the BGP capability data configured in the network device.

It shall be noted herein that the BGP capability data can be stored in the BGP module respectively in storage spaces of units performing corresponding BGP capabilities, or in a BGP capability set, for example, a BGP capability list. Table <NUM> depicts a representation of the BGP capability list. The BGP module traverses the BGP capability data stored in the BGP module (for example, the BGP capabilities respectively stored in the respective storage spaces, or the list as depicted in Table <NUM>) to acquire all the BGP capability data. It shall be noted that although the BGP module can traverse to acquire all the BGP capability data, the BGP module can not determine which BGP capabilities are enabled on the network device, and which BGP capabilities are disabled on the network device, among all the BGP capability data.

S704: The network device creates a virtual peer on which all the BGP capability data is enabled.

In other words, since all the BGP capability data acquired by the BGP module are enabled on the created virtual peer, the BMP module of the network device, during negotiating with the virtual peer about their own enabled BGP capabilities, can thereby acquire the enabled BGP capabilities of the virtual peer, for example, all the BGP capability data configured in the network device.

S705: The BMP module sends a first peer up notification targeted at the virtual peer to a monitoring server, where the first peer up notification carries all the BGP capability data enabled in the virtual peer, and location information in the first peer up notification is a device identifier of the network device.

The first peer up notification can be encapsulated in the same format as the peer up notification in the prior art as depicted in Table <NUM>. However the location information in the first peer up notification is the device identifier of the network device, where the device identifier can be a router ID, and the like, of the network device. Moreover since the virtual peer does not need to receive an open message of the network device for negotiation, the Received OPEN Message of the first peer up notification can be null.

It shall be noted that upon reception of the first peer up notification, the monitoring server parses the local positional information for the device identifier of the network device to thereby determine all the BGP capability data corresponding to the network device. In other words, based on <FIG> is a flow chart of a method for sending BGP information according to an embodiment of the invention, as illustrated in <FIG>.

The monitoring server receives the first peer up notification.

S802: The monitoring server acquires, from the first peer up notification, all the BGP capability data corresponding to the network device.

However the monitoring server <NUM> can not distinguish the BGP capabilities enabled on the network device <NUM> from the BGP capabilities disabled on the network device among all the BGP capability data. So that it may not be sufficient in accuracy for the monitoring server to take the acquired all BGP capability data as a basis for deployment of and decision on the entire network. In view of this, optionally based on the embodiment illustrated in <FIG>, the BMP module sends a second peer up notification targeted at the network device to the monitoring server, where the second peer up notification carries the BGP capabilities enabled in the network device and the device identifier of the network device.

In other words, when the network device has established a BGP connection with the virtual peer, the BMP module can send the first peer up notification targeted at the virtual peer to the monitoring server, and can also send the second peer up notification targeted at the network device to the monitoring server. The second peer up notification carries the BGP capabilities enabled on the network device, which are acquired by means of negotiation between the network device and the virtual peer about their own enabled BGP capabilities. By way of an example, all the BGP capability data configured in the network device include three BGP capabilities in total, which are IPv4 Unicast (IPv4 unicast), IPv4 Multicast (IPv4 multicast), and IPv6 Unicast (IPv6 unicast), and only one of the BGP capabilities is currently enabled on the network device, which is IPv4 Unicast. The network device creates the virtual peer, and enables all the three BGP capabilities including IPv4 Unicast, IPv4 Multicast, and IPv6 Unicast on the virtual peer, and after negotiating with the virtual peer about their own enabled BGP capabilities, the BMP module sends the first peer up notification to the monitoring server, and the monitoring server acquires all the three BGP capabilities including IPv4 Unicast, IPv4 Multicast, and IPv6 Unicast from the first peer up notification sent by the BMP module, but can not know which capabilities are enabled on the network device, and which capabilities are disabled on the network device. The monitoring server acquires the BGP capability enabled in the network device, for example, IPv4 Unicast, from the second peer up notification targeted at the network device sent by the BMP module, so that the monitoring server determines that the enabled BGP capability is IPv4 Unicast, and the disabled BGP capabilities are IPv4 Multicast and IPv6 Unicast, among all the BGP capabilities of the network device.

As can be seen that, the capability of a network device can be extended so that the BGP module of the network device can acquire all BGP capabilities configured in the network device by means of interaction between a BGP module and a BMP module, and the network device creates a virtual peer, and enables all the BGP capabilities in the acquired data on the virtual peer; and when the network device and the virtual peer negotiate about their own enabled BGP capabilities, the BMP module acquires the BGP capabilities enabled on the virtual peer, for example, all the BGP capability data configured in the network device, and the BMP module sends the first peer up notification targeted at the virtual peer to the monitoring server so that the monitoring server can acquire all the BGP capability data of the network device, namely including the enabled and disabled BGP capabilities, so the monitoring server can know comprehensively real capabilities supported by the entire network, further providing an effective basis for deployment of and decision on the entire network.

Referring to <FIG> is a schematic structural diagram of hardware of a network device according to an embodiment of the invention, where the network device <NUM> includes a BGP module and a BMP module, and the network device <NUM> includes a memory <NUM>, a receiver <NUM>, and a transmitter <NUM>, and a processor <NUM> coupled respectively with the memory <NUM>, the receiver <NUM> and the transmitter <NUM>; where the memory <NUM> is configured to store a set of program instructions, and the processor <NUM> is configured to invoke the program instructions stored in the memory <NUM> to perform the operations of:.

Optionally the processor <NUM> can be a central processing unit (Central Processing Unit, CPU), the memory <NUM> can be an internal memory of the random access memory (Random Access Memory, RAM) type, and the receiver <NUM> and the transmitter <NUM> can include general physical interfaces, which can be Ethernet (Ethernet) interfaces or asynchronous transfer mode (Asynchronous Transfer Mode, ATM) interfaces. The processor <NUM>, the transmitter <NUM>, the receiver <NUM>, and the memory <NUM> can be integrated into one or more separate circuits or pieces of hardware, for example, application specific integrated circuits (Application Specific Integrated Circuits, ASICs).

Referring to <FIG> is a schematic structural diagram of hardware of a network device according to an embodiment of the invention, where the network device <NUM> includes a BGP module and a BMP module, and the network device <NUM> includes a memory <NUM>, a receiver <NUM>, and a transmitter <NUM>, and a processor <NUM> connected respectively with the memory <NUM>, the receiver <NUM> and the transmitter <NUM>; where the memory <NUM> is configured to store a set of program instructions, and the processor <NUM> is configured to invoke the program instructions stored in the memory <NUM> to perform the operations of.

Optionally the processor <NUM> can be a CPU, the memory <NUM> can be an internal memory of the RAM type, and the receiver <NUM> and the transmitter <NUM> can include general physical interfaces, which can be Ethernet interfaces or ATM interfaces. The processor <NUM>, the transmitter <NUM>, the receiver <NUM>, and the memory <NUM> can be integrated into one or more separate circuits or pieces of hardware, for example, ASIC.

"First" in the first peer up notification as referred to in the embodiments of the invention is merely intended to identify the message in question but not to suggest the first message in order. The same will applicable to "second".

It should be noted that persons of ordinary skill in the art may understand that all or some of the steps of the method embodiments may be implemented by a program instructing relevant hardware. The program may be stored in a computer-readable storage medium. When the program runs, the steps of the method embodiments are performed. The foregoing storage medium includes: any medium that can store program code, such as a magnetic disk, an optical disc, a read-only memory, (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM).

Claim 1:
A method comprising:
creating a virtual peer on a network device (<NUM>, <NUM>), all border gateway protocol, BGP, capabilities configured on the network device (<NUM>, <NUM>) are enabled on the virtual peer, wherein the BGP capabilities configured on the network device (<NUM>, <NUM>) comprise a BGP capability that is not enabled on the network device (<NUM>, <NUM>);
acquiring, by a border gateway protocol monitoring protocol, BMP, module (<NUM>) of the network device (<NUM>, <NUM>), the enabled BGP capabilities from the virtual peer; wherein the BMP module (<NUM>) is configured to send the acquired BGP capabilities to a monitoring server.