WO2021088439A1 - 一种监控对等体的运行状态的方法、装置及存储介质 - Google Patents

一种监控对等体的运行状态的方法、装置及存储介质 Download PDF

Info

Publication number
WO2021088439A1
WO2021088439A1 PCT/CN2020/106484 CN2020106484W WO2021088439A1 WO 2021088439 A1 WO2021088439 A1 WO 2021088439A1 CN 2020106484 W CN2020106484 W CN 2020106484W WO 2021088439 A1 WO2021088439 A1 WO 2021088439A1
Authority
WO
WIPO (PCT)
Prior art keywords
peer
information
address
header
message
Prior art date
Application number
PCT/CN2020/106484
Other languages
English (en)
French (fr)
Inventor
王凤翼
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP20885244.2A priority Critical patent/EP4044530A4/en
Publication of WO2021088439A1 publication Critical patent/WO2021088439A1/zh
Priority to US17/736,462 priority patent/US20220263746A1/en

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
    • 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/30Routing of multiclass traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS
    • H04L45/308Route determination based on user's profile, e.g. premium users
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/70Routing based on monitoring results
    • 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
    • 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/745Address table lookup; Address filtering

Definitions

  • This application relates to the field of electronic technology, and in particular to a method, device and storage medium for monitoring the running status of a peer.
  • Peers Routers running Border Gateway Protocol (BGP) transfer packets to each other. Among them, the routers that transfer messages to each other are called peers.
  • Border Gateway Protocol Border Gateway Protocol
  • the prior art uses the BGP Monitoring Protocol (BGP Monitoring Protocol) technology to monitor the peer status (up/down) of each BGP peer and BGP routing information.
  • BGP Monitoring Protocol BGP Monitoring Protocol
  • the BMP server receives and stores the data, and presents it to the user in the form of a database. In this way, the network administrator can clearly observe the BGP related routing information through the interface.
  • the foregoing BGP routing information includes receiving routing information rib-in (Routing Information Bases in), sending routing information rib-out (Routing Information Bases out), and locally storing routing information local-rib (Local Routing Information Bases).
  • Peer Type 0: Global Instance Peer
  • Peer Type 1: RD Instance Peer
  • Peer Type 2: Local Instance Peer.
  • the above three types of peers only distinguish the types of peers, and do not clearly indicate the address family information to which the reported route (that is, the corresponding peer) belongs.
  • the related technology only distinguishes the peer type.
  • the device reports a peer up message
  • the reported message carries all the address family information of the peer that belongs to the same peer type, and cannot distinguish which peer it is. Since different address family information generally carries different services, this situation cannot provide the administrator with more accurate information.
  • the related technology is to report peer down first, and then report peer up again. This method is prone to produce abnormal neighbor oscillation information, and if the BMP server records the oscillation information and performs data analysis, it will bring certain misleading to users.
  • This application provides a method, device, and storage medium for monitoring the running status of a peer. By carrying the address family information of the corresponding peer in the reported message, the status change information of the independent peer is monitored. More clear.
  • an embodiment of the present application provides a method for monitoring the running status of a peer.
  • the method includes: a routing device obtains the address family information of the first peer and the address information of the first peer; the routing The device sends a notification message to the server, where the notification message carries the address family information of the first peer and the address information of the first peer, so that the server can make the server according to the address family information of the first peer and the first peer.
  • the address information of the peer and the type of the notification message store the running status of the first peer.
  • the peer information monitored by this solution can be made clearer and more reliable; and the processing method for the peer status change of a single address family becomes conventional It is also more convenient.
  • the method before obtaining the address family information of the first peer and the address information of the first peer, the method further includes:
  • the routing device detects that the operating status of the first peer has changed.
  • a change in the operating state may refer to a change in BGP routing. Such as adding a new route, deleting a new route, or updating route attributes.
  • the change in the operating state mentioned above may also refer to the change in the state of the BGP peer.
  • the peer state is set to peer up; or the peer state is set to peer down.
  • different notification message types correspond to different running states of peers.
  • the type of the aforementioned notification message may be a route monitor (route monitor) message, a peer up message, or a peer down message.
  • the routing monitoring message includes the routing information that has changed, and the server is based on the address family information of the first peer, the address information of the first peer, and the The type of notification message storing the operating status of the first peer includes: the server associates and stores the address family information of the first peer, the address information of the first peer, and the changed routing information . .
  • the server stores the first peer according to the address family information of the first peer, the address information of the first peer, and the type of the notification message.
  • the operating status of includes: the server associates and stores the address family information of the first peer, the address information of the first peer, and the operating status peer up of the first peer.
  • the server storing the operating status of the first peer according to the address family information of the first peer, the address information of the first peer, and the type of the notification message includes: server The address family information of the first peer, the address information of the first peer, and the running state peer down of the first peer are associated and stored.
  • the aforementioned routing device may be a router running the BMP protocol.
  • the routing device also runs the BGP protocol.
  • the foregoing first peer may be a router running the BGP protocol.
  • the above notification message may include an extension header, and the address family information of the first peer may be located in the extension header.
  • the peer information monitored by this solution is clearer and the information is more reliable.
  • the extension header may adopt the TLV format.
  • the extension header carries the type information type of the extension header, the length information length of the extension header, and the address family information fields are used to carry the address family information of the first peer.
  • the notification message also includes a first message header and a second message header.
  • the first message header is located at the head of the notification message.
  • Both the second message header and the extension header are located behind the first message header.
  • the first packet header may be a common header
  • the second packet header may be a peer header per peer header.
  • the extension header is located between the first message header and the second message header.
  • the extension header is located between the first message header and the second message header, which is more in line with the logic of message parsing.
  • the address information of the peer is analyzed based on the above-mentioned address family information to improve parsing efficiency.
  • the second packet header includes a flag field
  • the flag field includes at least one or more of the following flag bits:
  • the first flag bit is used to identify the address type of the first peer; the second flag bit, the second flag bit is used to identify the policy processing information of the first peer; the third flag Bit, the third flag bit is used to identify the number of bytes of the AS number of the first peer; the fourth flag bit and the fourth flag bit are used to identify the type of routing information; the fifth flag bit, the fifth flag bit Used to identify the integrity of routing information.
  • the corresponding routing table information can be obtained by parsing the above-mentioned tag field.
  • the notification message includes a first message header and a second message header
  • the first message header is located in the header of the notification message
  • the address family information of the first peer is located in the second packet header.
  • the peer information monitored by this solution can be made clearer and more reliable; and the processing method for the peer state change of a single address family It becomes more routine and more convenient.
  • the address family information of the first peer may be information newly added in the header of the second message. It may also be that the peer type information in the second packet header is replaced with the address family information of the peer. That is, the second packet header does not contain peer type information.
  • the address family information of the first peer includes main address family information and sub-address family information.
  • the main address family information and the sub address family information are two independent fields.
  • the first message header provided by the embodiment of this application contains the first version information, where the first version information is the same as the old one.
  • Some message version information is different, that is, the first version information is extended message version information. That is, when the second message header is updated, the message version information is also updated.
  • the second packet header includes a flag field
  • the flag field includes at least one or more of the following flag bits:
  • the first flag bit is used to identify the address type of the first peer; the second flag bit, the second flag bit is used to identify the policy processing information of the first peer
  • the third flag bit is used to identify the number of bytes of the AS number of the first peer; the fourth flag bit, the fourth flag bit is used to identify the type of routing information; Five flag bits, the fifth flag bit is used to identify the integrity of routing information.
  • an embodiment of the present application provides a method for monitoring the running status of a peer, the method includes: a routing device obtains the address type of the first peer and the address information of the first peer; the routing device Send a notification message to the server, where the notification message carries the address type of the first peer and the address information of the first peer, so that the server can be based on the address type of the first peer and the address of the first peer.
  • the type of information and notification message stores the running status of the first peer;
  • the notification message includes a first message header and a second message header.
  • the first message header is located in the header of the notification message.
  • the address type of the first peer and the address information of the first peer are both located in the second message.
  • the second message header includes a flag field, the flag field includes at least a first flag bit, and the first flag bit is used to identify the address type of the first peer.
  • the address type of the first peer includes IPV4 and IPV6.
  • the above-mentioned flag field further includes one or more of the following flag bits:
  • the second flag bit, the second flag bit is used to identify the policy processing information of the first peer; the third flag bit, the third flag bit is used to identify the AS number of the first peer.
  • the fourth flag bit, the fourth flag bit is used to identify the type of routing information; the fifth flag bit, the fifth flag bit is used to identify the integrity of the routing information.
  • the method further includes: obtaining the address family information of the first peer by the routing device.
  • the address family information of the first peer is located in the second header of the notification message.
  • the address family information of the first peer replaces the type information of the peer.
  • the first message header includes first version information, and the first version information is different from the old version information.
  • the notification message further includes an extension header, and the address family information of the first peer is located in the extension header.
  • the extension header can be in the TLV format.
  • the extension header carries the type information type of the extension header, the length information length of the extension header, and the address family information fields are used to carry the address family information of the first peer.
  • an embodiment of the present application provides a device, including: one or more processors, one or more memories; the one or more memories are coupled with the one or more processors, and the one or more Multiple memories are used to store computer program codes, the computer program codes including computer instructions, when the one or more processors execute the computer instructions, cause the apparatus to execute:
  • the device When the one or more processors execute the computer instructions, the device is caused to perform the following operations:
  • the peer information monitored by this solution can be made clearer and more reliable; and the processing method for the peer status change of a single address family becomes conventional It is also more convenient.
  • the method before obtaining the address family information of the first peer and the address information of the first peer, the method further includes:
  • the routing device detects that the operating status of the first peer has changed.
  • a change in the operating state may refer to a change in BGP routing. Such as adding a new route, deleting a new route, or updating route attributes.
  • the change in the operating state mentioned above may also refer to the change in the state of the BGP peer. For example, the peer state is set to peer up; or the peer state is set to peer down.
  • the type of the aforementioned notification message may be a route monitor (route monitor) message, a peer up message, or a peer down message.
  • the routing monitoring message includes the routing information that has changed, and the server uses the address family information of the first peer, the address information of the first peer, and the type of the notification message.
  • Storing the running state of the first peer includes: the server associates and stores the address family information of the first peer, the address information of the first peer, and the changed routing information.
  • the server stores the operating status of the first peer according to the address family information of the first peer, the address information of the first peer, and the type of the notification message, including: The address family information of the first peer, the address information of the first peer, and the running state peer up of the first peer are stored in association.
  • the server stores the first peer according to the address family information of the first peer, the address information of the first peer, and the type of the notification message.
  • the running status of the peer includes: the server associates and stores the address family information of the first peer, the address information of the first peer, and the peer down of the running status of the first peer.
  • the aforementioned routing device may be a router running the BMP protocol.
  • the routing device also runs the BGP protocol.
  • the foregoing first peer may be a router running the BGP protocol.
  • the above notification message may include an extension header, and the address family information of the first peer may be located in the extension header.
  • the peer information monitored by this solution is clearer and the information is more reliable.
  • the extension header may adopt the TLV format.
  • the extension header carries the type information type of the extension header, the length information length of the extension header, and the address family information fields are used to carry the address family information of the first peer.
  • the notification message also includes a first message header and a second message header.
  • the first message header is located at the head of the notification message.
  • Both the second message header and the extension header are located behind the first message header.
  • the first packet header may be a common header
  • the second packet header may be a peer header per peer header.
  • the extension header is located between the first message header and the second message header.
  • the extension header is located between the first message header and the second message header, which is more in line with the message parsing logic. Based on the above-mentioned address family information, the address information of the peer is analyzed to improve the parsing efficiency.
  • the second packet header includes a flag field
  • the flag field includes at least one or more of the following flag bits:
  • the first flag bit is used to identify the address type of the first peer; the second flag bit, the second flag bit is used to identify the policy processing information of the first peer; the third flag Bit, the third flag bit is used to identify the number of bytes of the AS number of the first peer; the fourth flag bit and the fourth flag bit are used to identify the type of routing information; the fifth flag bit, the fifth flag bit Used to identify the integrity of routing information.
  • the corresponding routing table information can be obtained by parsing the above-mentioned tag field.
  • the notification message includes a first message header and a second message header
  • the first message header is located in the header of the notification message
  • the address family information of the first peer is located in the second packet header.
  • the peer information monitored by this solution can be made clearer and more reliable; and the processing method for the peer state change of a single address family It becomes more routine and more convenient.
  • the address family information of the first peer may be information newly added in the header of the second message. It may also be that the peer type information in the second packet header is replaced with the address family information of the peer. That is, the second packet header does not contain peer type information.
  • the address family information of the first peer includes main address family information and sub-address family information.
  • the main address family information and the sub address family information are two independent fields.
  • the first message header provided by the embodiment of this application contains the first version information, where the first version information is the same as the old one.
  • Some message version information is different, that is, the first version information is extended message version information. That is, when the second message header is updated, the message version information is also updated.
  • the second packet header includes a flag field
  • the flag field includes at least one or more of the following flag bits:
  • the first flag bit is used to identify the address type of the first peer; the second flag bit, the second flag bit is used to identify the policy processing information of the first peer
  • the third flag bit is used to identify the number of bytes of the AS number of the first peer; the fourth flag bit, the fourth flag bit is used to identify the type of routing information; Five flag bits, the fifth flag bit is used to identify the integrity of routing information.
  • an embodiment of the present application provides a device, including: one or more processors, one or more memories; the one or more memories are coupled with the one or more processors, and the one or more Multiple memories are used to store computer program codes, the computer program codes including computer instructions, when the one or more processors execute the computer instructions, cause the apparatus to execute:
  • the device When the one or more processors execute the computer instructions, the device is caused to perform the following operations:
  • the notification message includes a first message header and a second message header, the first message header is located in the header of the notification message, the address type of the first peer and the first pair
  • the address information of the equivalent body is located in the second packet header; the second packet header includes a flag field, the flag field includes at least a first flag bit, and the first flag bit is used to identify the second packet header.
  • the address type of the peer includes IPV4 and IPV6.
  • the above-mentioned flag field further includes one or more of the following flag bits:
  • the second flag bit, the second flag bit is used to identify the policy processing information of the first peer; the third flag bit, the third flag bit is used to identify the AS number of the first peer.
  • the fourth flag bit, the fourth flag bit is used to identify the type of routing information; the fifth flag bit, the fifth flag bit is used to identify the integrity of the routing information.
  • This solution also includes: obtaining the address family information of the first peer.
  • the address family information of the first peer is located in the second header of the notification message.
  • the address family information of the first peer replaces the type information of the peer.
  • the first message header includes first version information, and the first version information is different from the old version information.
  • the notification message further includes an extension header, and the address family information of the first peer is located in the extension header.
  • the extension header can be in the TLV format.
  • the extension header carries the type information type of the extension header, the length information length of the extension header, and the address family information fields are used to carry the address family information of the first peer.
  • an embodiment of the present application also provides a method for monitoring the running status of a peer, and the method includes:
  • the server receives and parses the notification message, where the notification message carries the address family information of the first peer and the address information of the first peer; the server according to the address family information of the first peer, the first pair The address information of the peer and the type of the notification message store the running status of the first peer.
  • the server may be a BMP server.
  • an embodiment of the present application also provides a method for monitoring the running status of a peer, and the method includes:
  • the server receives and parses the notification message, where the notification message carries the address type of the first peer and the address information of the first peer; the server according to the address type of the first peer, the The address information of the first peer and the type of the notification message store the running status of the first peer.
  • the server may be a BMP server.
  • an embodiment of the present application further provides a device, including:
  • An obtaining module configured to obtain the address family information of the first peer and the address information of the first peer
  • the sending module is configured to send a notification message to the server, where the notification message carries the address family information of the first peer and the address information of the first peer, so that the server can make the server according to the first pair
  • the address family information of the peer, the address information of the first peer, and the type of the notification message store the running status of the first peer.
  • an embodiment of the present application further provides a device, including:
  • An obtaining module configured to obtain the address type of the first peer and the address information of the first peer
  • the sending module is configured to send a notification message to the server, where the notification message carries the address type of the first peer and the address information of the first peer, so that the server can make the server according to the first peer
  • the address type of the entity, the address information of the first peer, and the type of the notification message store the operating status of the first peer
  • the notification message includes a first message header and a second message header, the first message header is located in the header of the notification message, the address type of the first peer and the first pair
  • the address information of the equivalent body is located in the second packet header;
  • the second packet header includes a flag field, the flag field includes at least a first flag bit, and the first flag bit is used to identify the second packet header.
  • the address type of the peer is a flag field, the flag field includes at least a first flag bit, and the first flag bit is used to identify the second packet header.
  • an embodiment of the present application also provides a device, including:
  • a receiving module configured to receive and parse a notification message, where the notification message carries the address family information of the first peer and the address information of the first peer;
  • the processing module is configured to store the operating state of the first peer according to the address family information of the first peer and the address information of the first peer.
  • an embodiment of the present application also provides a device, including:
  • a receiving module configured to receive and parse a notification message, where the notification message carries the address type of the first peer and the address information of the first peer;
  • the processing module is configured to store the running state of the first peer according to the address type of the first peer and the address information of the first peer.
  • the present application provides a computer-readable storage medium, including computer instructions, which when the computer instructions run on an electronic device, cause the electronic device to execute any possible implementation manner as in the first aspect And/or any possible implementation manner of the second aspect and/or any possible implementation manner of the fifth aspect and/or any possible implementation manner of the sixth aspect.
  • the embodiments of the present application provide a computer program product.
  • the computer program product runs on a computer, the computer can execute any possible implementation manner of the first aspect and/or any possible implementation of the second aspect. And/or any possible implementation of the fifth aspect and/or any possible implementation of the sixth aspect.
  • the device described in the third aspect, the device described in the fourth aspect, the device described in the seventh aspect, the device described in the eighth aspect, the device described in the ninth aspect, and the tenth aspect are provided above.
  • the device, the computer-readable storage medium of the eleventh aspect, or the computer program product of the twelfth aspect are all used to execute the method provided in any one of the first aspect and any one of the method provided in the second aspect.
  • FIG. 1A and FIG. 1B are schematic diagrams of a scenario for monitoring the running status of a peer provided by an embodiment of the present application;
  • FIG. 2 is a schematic flowchart of a method for monitoring the running status of a peer provided by an embodiment of the present application
  • FIG. 3 is a schematic flowchart of the first method for monitoring the running status of a peer provided by an embodiment of the present application
  • FIG. 4 is a schematic diagram of a part of the structure of a first message provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a second method for monitoring the running status of a peer according to an embodiment of the present application
  • FIG. 6 is a schematic diagram of a part of the structure of a message in the related art.
  • FIG. 7 is a schematic diagram of a partial structure of a second type of message provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a partial structure of a second type of message provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a partial structure of a second type of message provided by an embodiment of the present application.
  • FIG. 10 is a schematic flowchart of a third method for monitoring the running status of a peer provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of a part of the structure of a third message provided by an embodiment of the present application.
  • FIG. 12 is a schematic partial structural diagram of another message provided by an embodiment of the present application.
  • FIG. 13 is a schematic diagram of a source node 1300 in a communication network provided by an embodiment of the present application.
  • FIG. 14 is a schematic diagram of a first node 1400 in a communication network provided by an embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of a device 1500 provided by an embodiment of the present application.
  • the embodiments of the application provide a method, device, and storage medium for monitoring the running status of a peer.
  • the notification message is reported to the server, so that the server monitors the peer more clearly, and helps the server to store the corresponding information of the peer whose operating status has changed based on the above-mentioned address family information.
  • Border Gateway Protocol is a routing protocol across public networks and across autonomous systems, which can learn routes between autonomous systems.
  • the dynamic learning of BGP routes is also based on neighbors, namely peers. BGP can work normally only if the neighbor relationship is normal.
  • Routers running BGP can transmit packets to each other, and they are called peers.
  • the following describes the method for monitoring the running status of a peer provided by an embodiment of the present application.
  • FIG. 1A it is a schematic diagram of a scenario for monitoring the running status of a peer provided in an embodiment of this application.
  • the above-mentioned router runs Border Gateway Protocol BGP.
  • the above-mentioned router also runs the BGP monitoring protocol BMP.
  • the router running the BGP monitoring protocol BMP can be called a BMP client. It can monitor the running status of the local router.
  • the local router may be referred to as a peer of the BMP client.
  • the server may be a BMP server.
  • the BMP client monitors that the operating status of the local router changes, the BMP client obtains the address family information and address information of the router whose operating status has changed. Then the BMP client sends a notification message to the BMP server, so that the BMP server stores the operating state of the router according to the address family information and address information of the router whose operating state has changed. It should be noted that the two terms message and message used in the embodiments of the present application can be used interchangeably.
  • a change in the above-mentioned operating status may refer to a change in BGP routing. Such as adding a new route, deleting a new route, or updating route attributes.
  • the change in the operating state mentioned above may also refer to the change in the state of the BGP peer.
  • the peer state is set to peer up; or the peer state is set to peer down.
  • the notification message may be a route monitor message, a peer up message, or a peer down message.
  • the address family information and address information can help distinguish routers whose operating status has changed.
  • FIG. 1B is a schematic diagram of another scenario for monitoring the running status of a peer provided in an embodiment of this application.
  • it includes a server and at least two routers.
  • at least two of the above-mentioned routers both run Border Gateway Protocol BGP.
  • At least one of the above-mentioned at least two routers also runs the BGP monitoring protocol BMP.
  • the router running the BGP monitoring protocol BMP can be called a BMP client.
  • the above-mentioned routers running Border Gateway Protocol BGP can all be referred to as peers of the BMP client.
  • the server may be a BMP server.
  • the BMP client monitors that the operating status of each router has changed, the BMP client obtains the address family information and address information of the router whose operating status has changed. For example, there are IPV4 unicast address family, VPNV4 address family, or other address families on the peer. Among them, when the route corresponding to the IPv4 unicast address family changes or the state changes to the down state, the address family information carried in the notification message is the IPv4 unicast address family information. Then the BMP client sends a notification message to the BMP server, so that the BMP server stores the operating state of the router according to the address family information and address information of the router whose operating state has changed.
  • FIG. 2 it is a schematic flowchart of a method for monitoring the running status of a peer provided by an embodiment of the present application.
  • the BMP client detects a change in the running status of the peer, it can determine the type of change in the above running status.
  • the above-mentioned operational status changes include BGP routing changes and BGP peer status changes.
  • the BMP client when the change type of the operating state is a BGP route change, the BMP client sends a route monitoring route monitor message to the BMP server.
  • the route monitor message carries the address family information and address information of the router whose operating state has changed.
  • the route monitoring message includes changed route information.
  • the BMP server After receiving the route monitor message, stores the peer information according to the address family information and address information carried in the message, and associates the peer corresponding to the address family information with the corresponding route. For example, the server associates the corresponding address family information, address information, and changed routing information as a record for associated storage.
  • the BMP client judges the peer state. Among them, the peer status includes peer up and peer down.
  • the BMP client sends a peer up message to the BMP server.
  • the peer up message carries the address family information and address information of the router whose operating state has changed.
  • the BMP server After receiving the peer up message, stores the peer information according to the address family information and address information carried in the message, stores the peer state corresponding to the address family information as peer up, and at the same time stores the peer up corresponding to the address family information and the corresponding address family information. Routes are associated.
  • the BMP client When the peer status is peer down, the BMP client sends a peer down message to the BMP server.
  • the peer down message carries the address family information and address information of the router whose operating state has changed.
  • the BMP server After receiving the peer down message, the BMP server stores the peer state corresponding to the address family information as peer down according to the address family information and address information carried in the message, and sets the route associated with the peer corresponding to the address family information to be revoked status.
  • the following describes the method for implementing the monitoring of the running status of the peer on the router side.
  • FIG. 3 it is a schematic flowchart of a method for monitoring the running status of a peer provided by an embodiment of the present application.
  • This method can be executed by the router with the BMP client function in FIG. 1A and FIG. 1B.
  • the method may include steps 301-302, which are specifically as follows:
  • the method may further include: detecting that the operating state of the first peer has changed, triggering step 301.
  • the BMP client pre-stores the address family information and address information of each peer.
  • the BMP client obtains the pre-stored address family information and address information corresponding to the first peer.
  • the aforementioned changes include BGP routing changes. Such as adding a new route, deleting a new route, or updating route attributes.
  • the aforementioned changes also include changes in the BGP peer status. For example, the peer state is set to peer up; or the peer state is set to peer down.
  • the above address family information is used to identify different routing types, such as IPV4 unicast/VPNV4.
  • the above address information refers to the address of the BGP peer, for example, the peer address is 1.1.1.1.
  • the address family information and address information can help distinguish routers whose operating status has changed.
  • the notification message carries the address family information of the first peer and the address information of the first peer, so that the server is based on the information of the first peer.
  • the address family information, the address information of the first peer, and the type of the notification message store the running status of the first peer.
  • the notification message includes an extension header, and the address family information of the first peer is located in the extension header.
  • notification messages include route monitor messages, peer up messages, or peer down messages.
  • the extension header adopts the TLV format.
  • the extension header carries the type information type of the extension header, the length information length of the extension header, and the address family information field for carrying the address family information of the first peer.
  • the address family information field includes the AFI field and the SAFI field.
  • the AFI field is used to carry main address family information.
  • the SAFI field is used to carry sub-address group information. For example, if the address family information is IPV4 unicast or IPV4 VPNV4, the primary address family information can correspond to IPV4.
  • the sub-address group information can correspond to unicast or VPNV4.
  • the notification message may include more than two address family information fields to respectively carry the two or more address family information.
  • the type information of the extension header and the length information of the extension header respectively occupy 8 bits.
  • the main address family information and the sub-address group information occupy 2 bytes respectively.
  • the notification message also includes a first message header and a second message header.
  • the first message header may be a common header.
  • the information it carries includes: message version information version, message length information message length, and message type information message type.
  • the second message header may be a peer header.
  • the information it carries includes: peer type information peer type, flag field peer flags, peer identification information peer distinguisher, peer address information peer address, peer AS number peer as, peer BGP address information peer BGP ID and timestamp information timestamp.
  • the first message header is located in the header of the notification message. Both the second message header and the extension header are located behind the first message header.
  • the extension header may be located behind the second packet header. That is, the structure of the notification message may be: the first message header, the second message header, and the extension header according to the sequence of the front and back. Alternatively, the structure of the notification message may be: a first message header, an extension header, and a second message header in the order of front and back.
  • the extension header is located between the first message header and the second message header.
  • the extension header is located in front of the second message header, which helps the server first obtain the address family information when parsing the message, and then parse the address information according to the address family information, which is more logical.
  • the server parses the notification message to obtain the address family information of the first peer and the address information of the first peer.
  • the server obtains the running status of the first peer according to the type of the notification message. Then, the operating state of the first peer is stored according to the address family information of the first peer and the address information of the first peer.
  • the peer information monitored by this solution can be made clearer and more reliable; and the processing method for the peer status change of a single address family becomes conventional It is also more convenient.
  • the embodiment of the present application also provides a second packet header.
  • the second message header may be a peer header.
  • the second packet header includes the flag field peer flags.
  • the flag field may include one or more of the following flag bits:
  • a first flag bit where the first flag bit is used to identify the address type of the first peer
  • a second flag bit where the second flag bit is used to identify policy processing information of the first peer
  • a third flag bit where the third flag bit is used to identify the number of bytes of the AS number of the first peer
  • the fourth flag bit where the fourth flag bit is used to identify the type of routing information
  • the fifth flag bit, the fifth flag bit is used to identify the integrity of the routing information.
  • the address type of the first peer includes IPV4 and IPV6.
  • the flag field may include a first flag bit; or, the flag field may include a first flag bit and a second flag bit; or, the flag field may include a first flag bit and a third flag bit; Alternatively, the flag field may include the first flag bit and the fourth flag bit; or, the flag field may include the first flag bit and the fifth flag bit; or, the flag field may include the first flag bit and the fourth flag bit.
  • the flag field can include a first flag bit, a second flag bit, and a fourth flag bit; or, the flag field can include the first flag bit, the second flag bit, and The fifth flag bit; or, the flag field may include the first flag bit, the third flag bit, and the fourth flag bit; or, the flag field may include the first flag bit, the third flag bit, and the fifth flag bit. Or, the flag field may include a first flag bit, a fourth flag bit and a fifth flag bit.
  • the above description is only in the form of various combinations including the first flag bit.
  • the flag field in the embodiment of the present application may include the first flag bit, the second flag bit, the third flag bit, the fourth flag bit, and the fifth flag bit. Any one, or any two, or any three, or any four, or five of the include, etc. This solution does not limit the form of the specific tag field.
  • the first flag bit may be a corresponding V flag bit, where, when the field corresponding to the flag bit is set to 1, it means that the address type of the first peer is IPV6; when the field corresponding to the flag bit is set to 1, When set to 0, it indicates that the address type of the first peer is IPV4.
  • the second flag bit may be a corresponding L flag bit, where when the field corresponding to the flag bit is set to 1, it means that the first peer is processed by the policy; when the field corresponding to the flag bit is set to 0 , Indicates that the first peer is before policy processing;
  • the third flag bit may be a corresponding A flag bit, where, when the field corresponding to the flag bit is set to 1, it means that the number of bytes of the AS number of the first peer is 2; when the flag bit corresponds to When the field is set to 0, it indicates that the number of bytes of the AS number of the first peer is 4;
  • the fourth flag bit may be a corresponding O flag bit, where when the field corresponding to the flag bit is set to 1, it means that the information type of each route that can be monitored corresponds to receiving routing information; when the field corresponding to the flag bit is set to 0 When, it means that the information type of each route that can be monitored corresponds to sending out routing information;
  • the fifth flag bit may be a corresponding F flag bit, where when the field corresponding to the flag bit is set to 1, it means that the routing information sent by the client to the server is complete; when the field corresponding to the flag bit is set When 0, it means that the routing information sent by the client to the server is incomplete.
  • the flag field includes a second flag bit L, a third flag bit A, a fourth flag bit O, and a fifth flag bit F.
  • the sequence of the positions of the marker bits is not limited here.
  • Each flag bit can correspond to any position in the above flag field.
  • the server can also parse out the routing table information of the monitored peer through the tag field, which is very convenient.
  • flag field peer flags involved in the second packet header may be an improvement of the flag field in the second packet header on the basis of the embodiment shown in FIG. 3.
  • FIG. 5 it is a schematic flowchart of another method for monitoring the running status of a peer provided by an embodiment of the present application.
  • This method can be executed by the router with the BMP client function in FIG. 1A and FIG. 1B.
  • the method may include steps 501-502, which are specifically as follows:
  • the method may further include: detecting that the operating state of the first peer has changed, triggering step 501.
  • the BMP client pre-stores the address family information and address information of each peer.
  • the BMP client obtains the pre-stored address family information and address information corresponding to the first peer.
  • the notification message carries the address family information of the first peer and the address information of the first peer, so that the server is based on the information of the first peer.
  • the address family information, the address information of the first peer, and the type of the notification message store the running status of the first peer.
  • the notification message includes a first message header and a second message header, the first message header is located in the header of the notification message, the address family information of the first peer and the first message header The address information of the peer is all located in the second packet header.
  • notification messages include route monitor messages, peer up messages, or peer down messages.
  • the first message header may be a common header.
  • the information it carries includes: message version information, message length information, and message type information.
  • the second message header may be a per peer header.
  • the information it carries includes the address family information of the first peer and the address information of the first peer.
  • the second message header is located behind the first message header.
  • the address family information of the first peer is located in the second message header, which may be the replacement of peer type in the second message header in the related art with the address family information of the first peer.
  • FIG. 6 is a schematic diagram of the structure of a second packet header in the related art
  • FIG. 7 is a schematic diagram of the structure of a second packet header provided by an embodiment of the present application.
  • the second packet header of this solution does not include peer type information.
  • the address family information of the first peer is located in the position of the peer type in the original per header. The above-mentioned means are adopted to realize that the address family information of the first peer is located in the second message header.
  • the information carried in the second packet header includes the tag field, the identification information of the first peer, the address information of the first peer, the AS number of the first peer, and the BGP address of the first peer.
  • the information, timestamp information, and address family information fields are used to carry the address family information of the first peer.
  • the address family information field includes the AFI field and the SAFI field.
  • the AFI field is used to carry main address family information.
  • the SAFI field is used to carry sub-address group information. For example, if the address family information is IPV4 unicast or IPV4 VPNV4, the primary address family information can correspond to IPV4.
  • the sub-address group information can correspond to unicast or VPNV4.
  • the notification message may include more than two address family information fields to respectively carry the two or more address family information.
  • the address family information of the first peer includes main address family information and sub-address group information.
  • the main address family information and the sub-address group information occupy 2 bytes respectively.
  • the address family information of the first peer is located in the second packet header, and the address family information of the first peer may be the second packet header Information added in. That is, the address family information of the first peer is newly added to the second packet header of the related art, so as to realize that the address family information of the first peer is located in the second packet header.
  • the address family information of the first peer can be located at any position in the second packet header.
  • the information carried in the second packet header includes the address family information of the first peer, the peer type, the tag field, the identification information of the first peer, and the address information of the first peer. , AS number of the first peer, BGP address information of the first peer, and timestamp information.
  • the above-mentioned message structure of the existing per peer header is changed, in order to avoid the incompatibility problem caused by the inability of the existing message analysis method to analyze the message structure of this solution. Therefore, the corresponding version information in the first message header needs to be changed to new version information.
  • the new version information is different from the old version information. That is, the new version information is the extended message version information.
  • the old version information may be version information corresponding to a message in the prior art that does not adopt this solution and does not change the structure of the message header. If the old version information is 3, the new version information is different from the old version information.
  • the new version information may be 4.
  • the second packet header includes a flag field
  • the flag field may include one or more of the following flag bits:
  • a first flag bit where the first flag bit is used to identify the address type of the first peer
  • a second flag bit where the second flag bit is used to identify policy processing information of the first peer
  • a third flag bit where the third flag bit is used to identify the number of bytes of the AS number of the first peer
  • the fourth flag bit where the fourth flag bit is used to identify the type of routing information
  • the fifth flag bit, the fifth flag bit is used to identify the integrity of the routing information.
  • the flag field may include a first flag bit; or, the flag field may include a first flag bit and a second flag bit; or, the flag field may include a first flag bit and a third flag bit.
  • the flag field may include the first flag bit and the fourth flag bit; or, the flag field may include the first flag bit and the fifth flag bit; or, the flag field may include the first flag bit, The second flag bit and the third flag bit; or, the flag field may include the first flag bit, the second flag bit, and the fourth flag bit; or, the flag field may include the first flag bit, the second flag bit And the fifth flag bit; or, the flag field can include the first flag bit, the third flag bit, and the fourth flag bit; or, the flag field can include the first flag bit, the third flag bit, and the fifth flag bit.
  • Bit or, the flag field may include a first flag bit, a fourth flag bit, and a fifth flag bit.
  • the above description is only in the form of various combinations including the first flag bit.
  • the flag field in the embodiment of the present application may include the first flag bit, the second flag bit, the third flag bit, the fourth flag bit, and the fifth flag bit. Any one, or any two, or any three, or any four, or five of the include, etc. This solution does not limit the form of the specific tag field.
  • the first flag bit may be a corresponding V flag bit, where, when the field corresponding to the flag bit is set to 1, it means that the address type of the first peer is IPV6; when the field corresponding to the flag bit is set to 1, When set to 0, it indicates that the address type of the first peer is IPV4.
  • the second flag bit may be a corresponding L flag bit, where when the field corresponding to the flag bit is set to 1, it means that the first peer is processed by the policy; when the field corresponding to the flag bit is set to 0 , Indicates that the first peer is before policy processing;
  • the third flag bit may be a corresponding A flag bit, where, when the field corresponding to the flag bit is set to 1, it means that the number of bytes of the AS number of the first peer is 2; when the flag bit corresponds to When the field is set to 0, it indicates that the number of bytes of the AS number of the first peer is 4;
  • the fourth flag bit may be a corresponding O flag bit, where when the field corresponding to the flag bit is set to 1, it means that the information type of each route that can be monitored corresponds to receiving routing information; when the field corresponding to the flag bit is set to 0 When, it means that the information type of each route that can be monitored corresponds to sending out routing information;
  • the fifth flag bit may be a corresponding F flag bit, where when the field corresponding to the flag bit is set to 1, it means that the routing information sent by the client to the server is complete; when the field corresponding to the flag bit is set When 0, it means that the routing information sent by the client to the server is incomplete.
  • the flag field includes a second flag bit L, a third flag bit A, a fourth flag bit O, and a fifth flag bit F.
  • the sequence of the positions of the marker bits is not limited here.
  • Each flag bit can correspond to any position in the above flag field.
  • the server parses the above notification message, and when the corresponding version information in the notification message is the old version information such as 3, the analysis process is performed according to the original bmp message format. If the version information corresponding to the notification message is new version information such as 4, the server parses the notification message to obtain the address family information of the first peer and the address information of the first peer. The server obtains the running status of the first peer according to the type of the notification message. Then, the server stores the running state of the first peer according to the address family information of the first peer and the address information of the first peer.
  • the peer address information carried in the local rib message of the local routing in the prior art is a virtual peer, and the address field is filled with all 0s, it is currently impossible to distinguish whether the address type corresponds to IPV4 or IPV6, and thus the peer address cannot be resolved. Because it is currently impossible to distinguish between IPV4 and IPV6, in the case of Virtual Routing Forwarding (VRF), if there are both IPV4 and IPV6 monitoring information under the same VRF instance (the same RD), the server cannot distinguish between IPV4 and IPV6. With IPV6, it is impossible to accurately associate the peer and the route, resulting in the inaccurate reflection of the route status.
  • VRF Virtual Routing Forwarding
  • the embodiments of the present application also provide a method for monitoring the running status of a peer. As shown in FIG. 10, the method may include steps 1001-1002, which are specifically as follows:
  • the notification message carries the address type of the first peer and the address information of the first peer, so that the server can use the address of the first peer
  • the type, the address information of the first peer, and the type of the notification message store the operating status of the first peer;
  • the notification message includes a first message header and a second message header
  • the first message header is located at the head of the notification message
  • the second message header includes a flag field
  • the flag field is at least Contains a first flag bit
  • the first flag bit is used to identify the address type of the first peer.
  • the first flag bit may be a corresponding V flag bit, where, when the field corresponding to the flag bit is set to 1, it means that the address type of the first peer is IPV6; when the field corresponding to the flag bit is set to 1, When set to 0, it indicates that the address type of the first peer is IPV4.
  • flag field further includes one or more of the following flag bits:
  • a second flag bit where the second flag bit is used to identify policy processing information of the first peer
  • a third flag bit where the third flag bit is used to identify the number of bytes of the AS number of the first peer
  • the fourth flag bit where the fourth flag bit is used to identify the type of routing information
  • the fifth flag bit, the fifth flag bit is used to identify the integrity of the routing information.
  • the second flag bit may be a corresponding L flag bit.
  • the field corresponding to the flag bit is set to 1, it means that the first peer is processed by the policy; when the field corresponding to the flag bit is set to 1, When set to 0, it means that the first peer is before the policy processing;
  • the third flag bit may be a corresponding A flag bit, where, when the field corresponding to the flag bit is set to 1, it means that the number of bytes of the AS number of the first peer is 2; when the flag bit corresponds to When the field is set to 0, it indicates that the number of bytes of the AS number of the first peer is 4;
  • the fourth flag bit may be a corresponding O flag bit, where when the field corresponding to the flag bit is set to 1, it means that the information type of each route that can be monitored corresponds to receiving routing information; when the field corresponding to the flag bit is set to 0 When, it means that the information type of each route that can be monitored corresponds to sending out routing information;
  • the fifth flag bit may be a corresponding F flag bit, where when the field corresponding to the flag bit is set to 1, it means that the routing information sent by the client to the server is complete; when the field corresponding to the flag bit is set When 0, it means that the routing information sent by the client to the server is incomplete.
  • the flag field includes a first flag bit V and a fifth flag bit F.
  • the flag field includes a first flag bit V, a second flag bit L, a third flag bit A, a fourth flag bit O, and a fifth flag bit F.
  • the sequence of the positions of the marker bits is not limited here. Each flag bit can correspond to any position in the above flag field.
  • the server parses the above notification message.
  • the server can parse out the address type of the monitored peer through the tag field, so that it can distinguish whether the address type of the first peer is IPV4 or IPV6.
  • the embodiment of the present application may further obtain the address family information of the first peer.
  • the address family information may be carried in the extension header as described in the embodiment of FIG. 3, or may be carried in the second packet header as described in the embodiment of FIG. 5.
  • An embodiment of the present application further provides a device, including: one or more processors, one or more memories; the one or more memories are coupled with the one or more processors, and the one or more memories Used to store computer program code, the computer program code including computer instructions, when the one or more processors execute the computer instructions, cause the apparatus to execute:
  • the device When the one or more processors execute the computer instructions, the device is caused to perform the following operations:
  • the notification message carries the address family information of the first peer and the address information of the first peer, so that the server is based on the address family of the first peer
  • the information, the address information of the first peer and the type of the notification message store the running status of the first peer.
  • the notification message includes an extension header, and the address family information of the first peer is located in the extension header.
  • extension header adopts the TLV format.
  • the notification message further includes a first message header and a second message header, and the first message header is located at the head of the notification message.
  • extension header is located between the first message header and the second message header.
  • the notification message includes a first message header and a second message header
  • the first message header is located in the header of the notification message
  • the address family information of the first peer and the first message header
  • the address information of the peer is all located in the second packet header.
  • the address family information of the first peer replaces the type information of the peer.
  • the first message header includes first version information, and the first version information is different from the old version information.
  • the address family information of the first peer includes main address family information and sub-address family information.
  • the second packet header includes a flag field
  • the flag field includes at least one or more of the following flag bits:
  • a first flag bit where the first flag bit is used to identify the address type of the first peer
  • a second flag bit where the second flag bit is used to identify policy processing information of the first peer
  • a third flag bit where the third flag bit is used to identify the number of bytes of the AS number of the first peer
  • the fourth flag bit where the fourth flag bit is used to identify the type of routing information
  • the fifth flag bit, the fifth flag bit is used to identify the integrity of the routing information.
  • the first message header is a common header.
  • the second packet header is a peer packet header per peer header.
  • the address type of the first peer includes IPV4 and IPV6.
  • the type of the notification message includes a route monitoring message, a peer up message, or a peer down message.
  • the route monitoring message when the type of the notification message is a route monitoring message, the route monitoring message includes changed routing information, and the server uses the address family information of the first peer and the first peer Storing the operating status of the first peer in the address information and the type of the notification message includes: the server changes the address family information of the first peer, the address information of the first peer, and changes The routing information is associated and stored.
  • the server stores the first peer according to the address family information of the first peer, the address information of the first peer, and the type of the notification message.
  • the running state of the peer includes: the server associates and stores the address family information of the first peer, the address information of the first peer, and the peer up of the running state of the first peer.
  • the server stores the first peer according to the address family information of the first peer, the address information of the first peer, and the type of the notification message.
  • the running state of the peer includes: the server associates and stores the address family information of the first peer, the address information of the first peer, and the peer down of the running state of the first peer.
  • an embodiment of the present application further provides a device, including: one or more processors, one or more memories; the one or more memories are coupled with the one or more processors, and the one The or multiple memories are used to store computer program codes, the computer program codes including computer instructions, and when the one or more processors execute the computer instructions, cause the apparatus to execute:
  • the device When the one or more processors execute the computer instructions, the device is caused to perform the following operations:
  • the notification message carries the address type of the first peer and the address information of the first peer, so that the server, according to the address type of the first peer,
  • the address information of the first peer and the type of the notification message store the operating status of the first peer;
  • the notification message includes a first message header and a second message header, the first message header is located in the header of the notification message, the address type of the first peer and the first pair
  • the address information of the equivalent body is located in the second packet header;
  • the second packet header includes a flag field, the flag field includes at least a first flag bit, and the first flag bit is used to identify the second packet header.
  • the address type of the peer is a flag field, the flag field includes at least a first flag bit, and the first flag bit is used to identify the second packet header.
  • a second flag bit where the second flag bit is used to identify policy processing information of the first peer
  • a third flag bit where the third flag bit is used to identify the number of bytes of the AS number of the first peer
  • the fourth flag bit where the fourth flag bit is used to identify the type of routing information
  • the fifth flag bit, the fifth flag bit is used to identify the integrity of the routing information.
  • the address type of the first peer includes IPV4 and IPV6.
  • the address family information of the first peer is located in the second header of the notification message.
  • the address family information of the first peer replaces the type information of the peer.
  • the first message header includes first version information, and the first version information is different from the old version information.
  • the notification message further includes an extension header, and the address family information of the first peer is located in the extension header.
  • extension header adopts the TLV format.
  • the address family information of the first peer includes main address family information and sub-address family information.
  • an embodiment of the present application provides a source node 1300 in a communication network.
  • the source node 1300 may be the BMP client in the embodiment shown in FIG. 1A and FIG. 1B.
  • the communication network includes a source node, one or more intermediate nodes, and a destination node.
  • the source node 1300 includes:
  • the generating module 1301 is configured to generate a notification message including the address family information of the first peer and the address information indication information of the first peer, or generate a notification message including the address type of the first peer and the first peer.
  • the address information of the peer indicates the notification message of the information.
  • the reporting module 1302 is configured to send a notification message to the next hop node of the source node to instruct the next hop node of the source node to execute the method for monitoring the running status of the peer shown in FIGS. 3 to 5.
  • a notification message to the next hop node of the source node to instruct the next hop node of the source node to execute the method for monitoring the running status of the peer shown in FIGS. 3 to 5.
  • the notification message includes an extension header, and the address family information of the first peer is located in the extension header.
  • the extension header adopts a TLV format.
  • the notification message further includes a first message header and a second message header, and the first message header is located at the head of the notification message.
  • the extension header is located between the first packet header and the second packet header.
  • the notification message includes a first message header and a second message header, the first message header is located in the header of the notification message, the address family information of the first peer and the The address information of the first peer is all located in the second packet header.
  • the address family information of the first peer replaces the type information of the peer.
  • the address family information of the first peer includes main address family information and sub-address family information.
  • the first message header includes notification message version information, and the notification message version information is different from the old message version information.
  • the second packet header includes a flag field
  • the flag field includes at least one or more of the following flag bits:
  • a first flag bit where the first flag bit is used to identify the address type of the first peer
  • a second flag bit where the second flag bit is used to identify policy processing information of the first peer
  • a third flag bit where the third flag bit is used to identify the number of bytes of the AS number of the first peer
  • the fourth flag bit where the fourth flag bit is used to identify the type of routing information
  • the fifth flag bit, the fifth flag bit is used to identify the integrity of the routing information.
  • the address type of the first peer includes IPV4 and IPV6.
  • the peer information monitored by this solution can be made clearer and more reliable; and the processing method for the peer status change of a single address family becomes conventional It is also more convenient.
  • an embodiment of the present application provides a first node 1400 in a communication network.
  • the first node 1400 may be the BMP server in the embodiment shown in FIG. 1A and FIG. 1B.
  • the first node may be a router, a switch, or other network equipment that forwards packets.
  • the communication network includes a source node, one or more intermediate nodes, and a destination node.
  • the first node is any one of the one or more intermediate nodes; the first node 1400 includes:
  • the receiving module 1401 is configured to receive and parse notification messages; the notification message carries the address type of the first peer and the address information of the first peer; or the notification message carries the address of the first peer Family information and address information of the first peer.
  • the notification message carries the address type of the first peer and the address information of the first peer; or the notification message carries the address of the first peer Family information and address information of the first peer.
  • the processing module 1402 is configured to store the operating status of the first peer according to the address type of the first peer and the address information of the first peer and the type of the notification message; or according to the The address family information of the first peer, the address information of the first peer, and the type of the notification message store the running status of the first peer.
  • the address family information of the first peer, the address information of the first peer, and the type of the notification message store the running status of the first peer.
  • the peer information monitored by this solution can be made clearer and more reliable; and the processing method for the peer status change of a single address family becomes conventional It is also more convenient.
  • FIG. 15 is a schematic structural diagram of a device 1500 provided by an embodiment of the present application. Both the source node and the intermediate node in the embodiments of FIG. 13 to FIG. 14 may be implemented by the device 1500 shown in FIG. 15.
  • the device 1500 may be a switch, a router, or other network equipment that forwards packets.
  • the device includes at least one processor 1501, a communication bus 1502, a memory 1503, and at least one communication interface 1504.
  • the processor 1501 may be a general-purpose central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling program execution of the solution of this application.
  • the processor is configured to obtain the address family information of the first peer and the address information of the first peer; send a notification message to the server, the notification message carrying the address family information of the first peer and Address information of the first peer, so that the server stores the first peer according to the address family information of the first peer, the address information of the first peer, and the type of the notification message The running status of the peer.
  • the communication bus 1502 may include a path for transferring information between the above-mentioned components.
  • the memory 1503 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types that can store information and instructions
  • the dynamic storage device can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only Memory (CD-ROM) or other optical disc storage, optical disc storage (Including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disks or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and can be accessed by a computer Any other media, but not limited to this.
  • the memory 1503 may exist independently, and is connected to the processor 1501 through a communication bus 1502.
  • the memory 1503 may also be integrated with the processor 1501.
  • the memory 1503 is used to store program codes, which are controlled by the processor 1501 to execute, so as to execute the path detection method provided by any of the above embodiments.
  • the processor 1501 is configured to execute program codes stored in the memory 1503.
  • One or more software modules can be included in the program code. Any node in the communication network can determine the data used to develop the application through one or more software modules in the program code in the processor 1501 and the memory 1503.
  • the communication interface 1504 uses any device such as a transceiver to communicate with other devices or communication networks, such as Ethernet, radio access network RAN, wireless local area networks (WLAN), and so on.
  • a transceiver to communicate with other devices or communication networks, such as Ethernet, radio access network RAN, wireless local area networks (WLAN), and so on.
  • WLAN wireless local area networks
  • the device may include multiple processors.
  • processors can be a single-CPU (single-CPU) processor or a multi-core (multi-CPU) processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).
  • this embodiment may also be based on a virtual first node implemented by a general physical server combined with network function virtualization NFV technology.
  • the first node is a virtual router, and the second, third, and N nodes can be virtualized (according to actual needs).
  • the virtual first node may be a virtual machine (English: Virtual Machine, VM) running a program for providing a message sending function, and the virtual machine is deployed on a hardware device (for example, a physical server).
  • a virtual machine refers to a complete computer system with complete hardware system functions that is simulated by software and runs in a completely isolated environment.
  • Those skilled in the art can combine NFV technology to virtualize multiple first nodes with the above-mentioned functions on a general physical server by reading this application. I won't repeat them here.
  • the present application also provides a computer-readable storage medium, including computer instructions, which, when the computer instructions run on an electronic device, cause the electronic device to execute the method provided by any of the foregoing possible implementation manners.
  • the embodiment of the present application provides a computer program product.
  • the computer program product runs on a computer, the computer is caused to execute the method provided in any of the foregoing possible implementations.
  • the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not correspond to the embodiments of the present application.
  • the implementation process constitutes any limitation.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks and other media that can store program codes. .

Landscapes

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

Abstract

本申请实施例公开了一种监控对等体的运行状态的方法、装置及存储介质,所述方法包括:路由设备获取第一对等体的地址族信息和所述第一对等体的地址信息;所述路由设备向服务器发送通知消息,所述通知消息携带所述第一对等体的地址族信息和所述第一对等体的地址信息,以使得所述服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态。通过将对应对等体的地址族信息置于报文中,可以使得本方案监控的peer信息更加明确,信息更加可靠;且对于单个地址族的peer状态变化处理方式变的常规化,也更加便捷。

Description

一种监控对等体的运行状态的方法、装置及存储介质
本申请要求在2019年11月6日提交中华人民共和国知识产权局、申请号为201911078235.1、申请名称为“一种监控对等体的运行状态的方法、装置及存储介质”的中国专利申请的优先权,这篇中国专利申请的全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子技术领域,尤其涉及一种监控对等体的运行状态的方法、装置及存储介质。
背景技术
对等体:运行边界网关协议BGP(Border Gateway Protocol)的路由器之间相互传递报文。其中,相互之间传递报文的路由器互称为对等体(Peer)。
对于网络的管理者来说,经常需要查看设备上的BGP路由信息。现有技术采用BGP监控协议BMP(BGP Monitoring Protocol)技术来实现监控BGP的各对等体的peer状态(up/down)以及BGP路由信息。其中,设备监测到对等体的运行状态发生变化时,将上述运行状态变化信息上报给BMP服务器。BMP服务器接收并存储数据,并以数据库的形式呈现给用户。这样网络管理者就能够通过界面的方式清晰的观察BGP的相关路由信息。其中,上述BGP路由信息包括接收路由信息rib-in(Routing Information Bases in)、发出路由信息rib-out(Routing Information Bases out)以及本地存储路由信息local-rib(Local Routing Information Bases)。
当前设备向服务器上报的消息中只标记了3种对等体类型peer type。3种peer type分别是Peer Type=0:Global Instance Peer,Peer Type=1:RD Instance Peer,Peer Type=2:Local Instance Peer。上述3种对等体类型仅对对等体的类型进行了区分,并没有明确表明上报路由(即相应对等体)所归属的地址族信息。目前有关技术仅区分peer type,当设备在上报peer up消息时,则上报的消息携带的为该peer的同属于同一peer type的所有地址族信息,并不能区分出是哪一个peer。由于不同地址族信息一般都承载着不同的业务,这种情况则不能给管理者提供更准确的信息。当出现单个对等体的peer状态为peer down时,有关技术是先上报一次peer down,然后再重新上报一次peer up。该手段容易产生异常的邻居震荡信息,且若BMP服务器记录了这些震荡信息并进行数据分析,则会给用户带来一定的误导。
发明内容
本申请提供了一种监控对等体的运行状态的方法、装置及存储介质,通过在上报的报文中携带相应对等体的地址族信息,使得对独立对等体的状态变化信息的监控更加明确。
第一方面,本申请实施例提供了一种监控对等体的运行状态的方法,该方法包括:路由设备获取第一对等体的地址族信息和第一对等体的地址信息;该路由设备向服务器发送通知消息,其中,该通知消息携带上述第一对等体的地址族信息和第一对等体的地址信息,以使得服务器根据该第一对等体的地址族信息、第一对等体的地址信息以及通知消息的类型存储第一对等体的运行状态。
本申请实施例,通过将对应对等体的地址族信息置于通知消息中,可以使得本方案监控的peer信息更加明确,信息更加可靠;且对于单个地址族的peer状态变化处理方式变的常规 化,也更加便捷。
其中,在获取第一对等体的地址族信息和第一对等体的地址信息之前,还包括:
路由设备监测到第一对等体的运行状态发生变化。其中,运行状态发生变化,可以是指BGP路由变化。如为新加入路由或者新删除路由或者路由属性更新等。上述运行状态发生变化,也可以是指BGP peer状态变化。如peer状态置为peer up;或者peer状态置为peer down。其中,不同的通知消息的类型对应不同的对等体的运行状态。相应的,上述通知消息的类型可以为路由监控(route monitor)消息,peer up消息,或peer down消息。当上述通知消息的类型为路由监控消息时,路由监控消息包括发生变化的路由信息,上述服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态包括:所述服务器将所述第一对等体的地址族信息、第一对等体的地址信息以及发生变化的路由信息进行关联存储。。
当上述通知消息的类型为peer up消息时,上述服务器根据第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态包括:服务器将所述第一对等体的地址族信息、第一对等体的地址信息以及所述第一对等体的运行状态peer up进行关联存储。
当上述通知消息的类型为peer down消息时,上述服务器根据第一对等体的地址族信息、第一对等体的地址信息以及通知消息的类型存储第一对等体的运行状态包括:服务器将所述第一对等体的地址族信息、第一对等体的地址信息以及第一对等体的运行状态peer down进行关联存储。
上述路由设备可以是运行BMP协议的路由器。该路由设备还运行BGP协议。上述第一对等体可以为运行BGP协议的路由器。
其中,上述通知消息可包含扩展头,第一对等体的地址族信息可位于该扩展头中。
通过将地址族信息置于扩展头中,使得本方案监控的peer信息更加明确,信息更加可靠。
其中,该扩展头可采用TLV格式。相应的,该扩展头携带有扩展头的类型信息type、扩展头的长度信息length以及地址族信息字段用于携带第一对等体的地址族信息。
其中,该通知消息还包含第一报文头和第二报文头。第一报文头位于通知消息的首部。第二报文头和扩展头均位于第一报文头的后面。其中,第一报文头可以是通用报文头common header,第二报文头可以为对等体报文头per peer header。
可选的,扩展头位于第一报文头和第二报文头之间。其中,扩展头位于第一报文头和第二报文头之间,更加符合报文解析的逻辑,基于上述地址族信息对对等体的地址信息进行解析,提高解析效率。
可选的,第二报文头包含标记字段,该标记字段至少包含以下标记位中的一种或多种:
第一标记位,第一标记位用于标识所述第一对等体的地址类型;第二标记位,第二标记位用于标识所述第一对等体的策略处理信息;第三标记位,第三标记位用于标识所述第一对等体的AS号的字节数;第四标记位,第四标记位用于标识路由的信息类型;第五标记位,第五标记位用于标识路由信息的完整性。通过对上述标记字段进行解析,可获取相应路由表信息。
作为另一种可选的实现方式,其中,通知消息包含第一报文头和第二报文头,第一报文头位于通知消息的首部,第一对等体的地址族信息和第一对等体的地址信息均位于第二报文头中。
本申请实施例,通过将对应对等体的地址族信息置于第二报文头中,可以使得本方案监控的peer信息更加明确,信息更加可靠;且对于单个地址族的peer状态变化处理方式变的常规化,也更加便捷。
其中,第一对等体的地址族信息可以是有关第二报文头中新增的信息。也可以是将有关第二报文头中的对等体的类型信息peer type替换为对等体的地址族信息。即第二报文头不包含对等体的类型信息。
其中,第一对等体的地址族信息包括主地址族信息和子地址族信息。主地址族信息和子地址族信息为独立的两个字段。
由于上述实施例更改了报文结构,为了避免现有报文解析方法无法解析本方案的报文,本申请实施例提供的第一报文头包含第一版本信息,其中第一版本信息与旧有报文版本信息不同,即该第一版本信息为扩展后的报文版本信息。也就是说,在更新第二报文头时,同时更新报文版本信息。
可选的,该第二报文头包含标记字段,所述标记字段至少包含以下标记位中的一种或多种:
第一标记位,所述第一标记位用于标识所述第一对等体的地址类型;第二标记位,所述第二标记位用于标识所述第一对等体的策略处理信息;第三标记位,所述第三标记位用于标识所述第一对等体的AS号的字节数;第四标记位,所述第四标记位用于标识路由的信息类型;第五标记位,所述第五标记位用于标识路由信息的完整性。
第二方面,本申请实施例提供了一种监控对等体的运行状态的方法,该方法包括:路由设备获取第一对等体的地址类型和第一对等体的地址信息;该路由设备向服务器发送通知消息,其中,该通知消息携带第一对等体的地址类型和第一对等体的地址信息,以使得服务器根据第一对等体的地址类型、第一对等体的地址信息以及通知消息的类型存储第一对等体的运行状态;
其中,该通知消息包含第一报文头和第二报文头,第一报文头位于通知消息的首部,第一对等体的地址类型和第一对等体的地址信息均位于第二报文头中;该第二报文头包含标记字段,该标记字段至少包含第一标记位,该第一标记位用于标识所述第一对等体的地址类型。其中,该第一对等体的地址类型包括IPV4、IPV6。
本申请实施例通过获取对等体的地址类型,并将其封装至第二报文头的标记字段中,即可区分不同的地址类型,以解决现有技术无法区分IPV4、IPV6的问题。
可选的,上述标记字段还包含以下标记位中的一种或多种:
第二标记位,所述第二标记位用于标识所述第一对等体的策略处理信息;第三标记位,所述第三标记位用于标识所述第一对等体的AS号的字节数;第四标记位,所述第四标记位用于标识路由的信息类型;第五标记位,所述第五标记位用于标识所述路由信息的完整性。
其中,本申请实施例还可以与上述各实施例进行结合。
具体地,还包括:路由设备获取第一对等体的地址族信息。
其中,该第一对等体的地址族信息位于通知消息的第二报文头中。如第一对等体的地址族信息替换对等体的类型信息。或者在有关第二报文头中新增第一对等体的地址族信息。其中相应的,第一报文头包含第一版本信息,该第一版本信息与旧有版本信息不同。
可替代的,该通知消息还包含扩展头,该第一对等体的地址族信息位于该扩展头中。该扩展头可采用TLV格式。相应的,该扩展头携带有扩展头的类型信息type、扩展头的长度信 息length以及地址族信息字段用于携带第一对等体的地址族信息。
第三方面,本申请实施例提供一种装置,包括:一个或多个处理器、一个或多个存储器;所述一个或多个存储器与所述一个或多个处理器耦合,所述一个或多个存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,使得所述装置执行:
当所述一个或多个处理器执行所述计算机指令时,使得所述装置执行以下操作:
获取第一对等体的地址族信息和所述第一对等体的地址信息;向服务器发送通知消息,该通知消息携带第一对等体的地址族信息和第一对等体的地址信息,以使得服务器根据第一对等体的地址族信息、第一对等体的地址信息以及通知消息的类型存储第一对等体的运行状态。
本申请实施例,通过将对应对等体的地址族信息置于通知消息中,可以使得本方案监控的peer信息更加明确,信息更加可靠;且对于单个地址族的peer状态变化处理方式变的常规化,也更加便捷。
其中,在获取第一对等体的地址族信息和第一对等体的地址信息之前,还包括:
路由设备监测到第一对等体的运行状态发生变化。其中,运行状态发生变化,可以是指BGP路由变化。如为新加入路由或者新删除路由或者路由属性更新等。上述运行状态发生变化,也可以是指BGP peer状态变化。如peer状态置为peer up;或者peer状态置为peer down。
相应的,上述通知消息的类型可以为路由监控(route monitor)消息,peer up消息,或peer down消息。当上述通知消息的类型为路由监控消息时,上述路由监控消息包括发生变化的路由信息,服务器根据第一对等体的地址族信息、第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态包括:服务器将第一对等体的地址族信息、第一对等体的地址信息以及发生变化的路由信息进行关联存储。
当上述通知消息的类型为peer up消息时,服务器根据第一对等体的地址族信息、第一对等体的地址信息以及通知消息的类型存储第一对等体的运行状态包括:服务器将所述第一对等体的地址族信息、第一对等体的地址信息以及所述第一对等体的运行状态peer up进行关联存储。
当上述通知消息的类型为peer down消息时,服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态包括:服务器将第一对等体的地址族信息、第一对等体的地址信息以及第一对等体的运行状态peer down进行关联存储。
上述路由设备可以是运行BMP协议的路由器。该路由设备还运行BGP协议。上述第一对等体可以为运行BGP协议的路由器。
其中,上述通知消息可包含扩展头,第一对等体的地址族信息可位于该扩展头中。
通过将地址族信息置于扩展头中,使得本方案监控的peer信息更加明确,信息更加可靠。
其中,该扩展头可采用TLV格式。相应的,该扩展头携带有扩展头的类型信息type、扩展头的长度信息length以及地址族信息字段用于携带第一对等体的地址族信息。
其中,该通知消息还包含第一报文头和第二报文头。第一报文头位于通知消息的首部。第二报文头和扩展头均位于第一报文头的后面。其中,第一报文头可以是通用报文头common header,第二报文头可以为对等体报文头per peer header。
可选的,扩展头位于第一报文头和第二报文头之间。其中,扩展头位于第一报文头和第二报文头之间,更加符合报文解析的逻辑,基于上述地址族信息对对等体的地址信息进行解 析,提高解析效率。
可选的,第二报文头包含标记字段,该标记字段至少包含以下标记位中的一种或多种:
第一标记位,第一标记位用于标识所述第一对等体的地址类型;第二标记位,第二标记位用于标识所述第一对等体的策略处理信息;第三标记位,第三标记位用于标识所述第一对等体的AS号的字节数;第四标记位,第四标记位用于标识路由的信息类型;第五标记位,第五标记位用于标识路由信息的完整性。通过对上述标记字段进行解析,可获取相应路由表信息。
作为另一种可选的实现方式,其中,通知消息包含第一报文头和第二报文头,第一报文头位于通知消息的首部,第一对等体的地址族信息和第一对等体的地址信息均位于第二报文头中。
本申请实施例,通过将对应对等体的地址族信息置于第二报文头中,可以使得本方案监控的peer信息更加明确,信息更加可靠;且对于单个地址族的peer状态变化处理方式变的常规化,也更加便捷。
其中,第一对等体的地址族信息可以是有关第二报文头中新增的信息。也可以是将有关第二报文头中的对等体的类型信息peer type替换为对等体的地址族信息。即第二报文头不包含对等体的类型信息。
其中,第一对等体的地址族信息包括主地址族信息和子地址族信息。主地址族信息和子地址族信息为独立的两个字段。
由于上述实施例更改了报文结构,为了避免现有报文解析方法无法解析本方案的报文,本申请实施例提供的第一报文头包含第一版本信息,其中第一版本信息与旧有报文版本信息不同,即该第一版本信息为扩展后的报文版本信息。也就是说,在更新第二报文头时,同时更新报文版本信息。
可选的,该第二报文头包含标记字段,所述标记字段至少包含以下标记位中的一种或多种:
第一标记位,所述第一标记位用于标识所述第一对等体的地址类型;第二标记位,所述第二标记位用于标识所述第一对等体的策略处理信息;第三标记位,所述第三标记位用于标识所述第一对等体的AS号的字节数;第四标记位,所述第四标记位用于标识路由的信息类型;第五标记位,所述第五标记位用于标识路由信息的完整性。
第四方面,本申请实施例提供一种装置,包括:一个或多个处理器、一个或多个存储器;所述一个或多个存储器与所述一个或多个处理器耦合,所述一个或多个存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,使得所述装置执行:
当所述一个或多个处理器执行所述计算机指令时,使得所述装置执行以下操作:
获取第一对等体的地址类型和所述第一对等体的地址信息;向服务器发送通知消息,所述通知消息携带所述第一对等体的地址类型和所述第一对等体的地址信息,以使得所述服务器根据所述第一对等体的地址类型、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态;其中,所述通知消息包含第一报文头和第二报文头,所述第一报文头位于所述通知消息的首部,所述第一对等体的地址类型和所述第一对等体的地址信息均位于所述第二报文头中;所述第二报文头包含标记字段,所述标记字段至少包含第一标记位,所述第一标记位用于标识所述第一对等体的地址类型。其中,该第一对等体的地址类 型包括IPV4、IPV6。
本申请实施例通过获取对等体的地址类型,并将其封装至第二报文头的标记字段中,即可区分不同的地址类型,以解决现有技术无法区分IPV4、IPV6的问题。
可选的,上述标记字段还包含以下标记位中的一种或多种:
第二标记位,所述第二标记位用于标识所述第一对等体的策略处理信息;第三标记位,所述第三标记位用于标识所述第一对等体的AS号的字节数;第四标记位,所述第四标记位用于标识路由的信息类型;第五标记位,所述第五标记位用于标识所述路由信息的完整性。
本方案还包括:获取第一对等体的地址族信息。其中,该第一对等体的地址族信息位于通知消息的第二报文头中。如第一对等体的地址族信息替换对等体的类型信息。或者在有关第二报文头中新增第一对等体的地址族信息。其中相应的,第一报文头包含第一版本信息,该第一版本信息与旧有版本信息不同。
可替代的,该通知消息还包含扩展头,该第一对等体的地址族信息位于该扩展头中。该扩展头可采用TLV格式。相应的,该扩展头携带有扩展头的类型信息type、扩展头的长度信息length以及地址族信息字段用于携带第一对等体的地址族信息。
第五方面,本申请实施例还提供一种监控对等体的运行状态的方法,所述方法包括:
服务器接收并解析通知消息,其中,该通知消息携带第一对等体的地址族信息和所述第一对等体的地址信息;该服务器根据第一对等体的地址族信息、第一对等体的地址信息以及通知消息的类型存储第一对等体的运行状态。其中,该服务器可以是BMP服务器。
第六方面,本申请实施例还提供一种监控对等体的运行状态的方法,所述方法包括:
服务器接收并解析通知消息,其中,所述通知消息携带第一对等体的地址类型和所述第一对等体的地址信息;该服务器根据所述第一对等体的地址类型、所述第一对等体的地址信息以及通知消息的类型存储所述第一对等体的运行状态。其中,该服务器可以是BMP服务器。
第七方面,本申请实施例还提供一种装置,包括:
获取模块,用于获取第一对等体的地址族信息和所述第一对等体的地址信息;
发送模块,用于向服务器发送通知消息,所述通知消息携带所述第一对等体的地址族信息和所述第一对等体的地址信息,以使得所述服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态。
第八方面,本申请实施例还提供一种装置,包括:
获取模块,用于获取第一对等体的地址类型和所述第一对等体的地址信息;
发送模块,用于向服务器发送通知消息,所述通知消息携带所述第一对等体的地址类型和所述第一对等体的地址信息,以使得所述服务器根据所述第一对等体的地址类型、所述第一对等体的地址信息和所述通知消息的类型存储所述第一对等体的运行状态;
其中,所述通知消息包含第一报文头和第二报文头,所述第一报文头位于所述通知消息的首部,所述第一对等体的地址类型和所述第一对等体的地址信息均位于所述第二报文头中;所述第二报文头包含标记字段,所述标记字段至少包含第一标记位,所述第一标记位用于标识所述第一对等体的地址类型。
第九方面,本申请实施例还提供一种装置,包括:
接收模块,用于接收并解析通知消息,其中,所述通知消息携带第一对等体的地址族信息和所述第一对等体的地址信息;
处理模块,用于根据所述第一对等体的地址族信息和所述第一对等体的地址信息存储所 述第一对等体的运行状态。
第十方面,本申请实施例还提供一种装置,包括:
接收模块,用于接收并解析通知消息,其中,所述通知消息携带第一对等体的地址类型和所述第一对等体的地址信息;
处理模块,用于根据所述第一对等体的地址类型和所述第一对等体的地址信息存储所述第一对等体的运行状态。
第十一方面,本申请提供了一种计算机可读存储介质,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如第一方面任一种可能的实施方式和/或第二方面任一种可能的实施方式和/或第五方面任一种可能的实施方式和/或第六方面任一种可能的实施方式提供的方法。
第十二方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第一方面任一种可能的实施方式和/或第二方面任一种可能的实施方式和/或第五方面任一种可能的实施方式和/或第六方面任一种可能的实施方式提供的方法。
可以理解地,上述提供的第三方面所述的装置、第四方面所述的装置、第七方面所述的装置、第八方面所述的装置、第九方面所述的装置、第十方面所述的装置、第十一方面所述的计算机可读存储介质或者第十二方面所述的计算机程序产品均用于执行第一方面中任一所提供的方法、第二方面中任一所提供的方法、第五方面任一种可能的实施方式、第六方面任一种可能的实施方式提供的方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。
附图说明
下面对本申请实施例用到的附图进行介绍。
图1A、图1B均是本申请实施例提供的一种监控对等体的运行状态的场景示意图;
图2是本申请实施例提供的一种监控对等体的运行状态的方法的流程示意图;
图3是本申请实施例提供的第一种监控对等体的运行状态的方法的流程示意图;
图4是本申请实施例提供的第一种报文的部分结构示意图;
图5是本申请实施例提供的第二种监控对等体的运行状态的方法的流程示意图;
图6是相关技术的一种报文的部分结构示意图;
图7是本申请实施例提供的第二种报文的部分结构示意图;
图8是本申请实施例提供的第二种报文的部分结构示意图;
图9是本申请实施例提供的第二种报文的部分结构示意图;
图10是本申请实施例提供的第三种监控对等体的运行状态的方法的流程示意图;
图11是本申请实施例提供的第三种报文的部分结构示意图;
图12是本申请实施例提供的又一种报文的部分结构示意图;
图13是本申请实施例提供了一种通信网络中的源节点1300的示意图;
图14是本申请实施例提供了一种通信网络中的第一节点1400的示意图;
图15是本申请实施例提供的一种设备1500的结构示意图。
具体实施方式
下面结合本申请实施例中的附图对本申请实施例进行描述。本申请实施例的实施方式部 分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。
本申请实施例提供了一种监控对等体的运行状态的方法、装置及存储介质,通过在监控到对等体的运行状态发生变化时,将携带相应发生变化的对等体的地址族信息的通知消息上报给服务器,使得服务器对对等体的监控更加明确,有助于服务器基于上述地址族信息对运行状态发生变化的对等体进行相应的信息存储。
其中,边界网关协议BGP(Border Gateway Protocol)是跨公网、跨自治***的路由协议,可以在自治***之间学习路由。BGP的动态学习路由也是基于邻居即对等体peer,只有邻居关系正常,BGP才可以正常工作。
运行BGP的路由器相互之间可传递报文,其互称为对等体Peer。
下面介绍本申请实施例提供的监控对等体的运行状态的方法。
参照图1A所示,为本申请实施例提供的一种监控对等体的运行状态的场景示意图。如图1A所示,其包括服务器和一个路由器。其中,上述路由器运行边界网关协议BGP。上述路由器还运行BGP监控协议BMP。该运行BGP监控协议BMP的路由器可称为BMP客户端。其可监控本地路由器的运行状态。在监控本地路由器的运行状态的情况下,该本地路由器可称为所述BMP客户端的对等体peer。所述服务器可以是BMP服务器。当BMP客户端监控到本地路由器的运行状态发生变化时,BMP客户端获取该运行状态发生变化的路由器的地址族信息以及地址信息。然后BMP客户端向BMP服务器发送通知消息,以使得所述BMP服务器根据该运行状态发生变化的路由器的地址族信息以及地址信息存储该路由器的运行状态。需要说明的是,本申请实施例中使用的消息和报文这两个术语可互换使用。
上述运行状态发生变化,可以是指BGP路由变化。如为新加入路由或者新删除路由或者路由属性更新等。上述运行状态发生变化,也可以是指BGP peer状态变化。如peer状态置为peer up;或者peer状态置为peer down。相应的,该通知消息可以为路由监控(route monitor)消息,peer up消息,或peer down消息。
其中,根据地址族信息以及地址信息可有助于区分运行状态发生变化的路由器。
上述实施例仅以一个路由器为例进行说明。其中,本申请方案并不限制路由器的个数。可选的,参照图1B所示,为本申请实施例提供的另一种监控对等体的运行状态的场景示意图。如图1B所示,其包括服务器和至少两个路由器。其中,上述至少两个路由器均运行边界网关协议BGP。上述至少两个路由器中的其中至少一个路由器还运行BGP监控协议BMP。该运行BGP监控协议BMP的路由器可称为BMP客户端。上述运行边界网关协议BGP的路由器均可称为所述BMP客户端的对等体peer。所述服务器可以是BMP服务器。当BMP客户端监控到各路由器的运行状态发生变化时,BMP客户端获取该运行状态发生变化的路由器的地址族信息以及地址信息。例如peer上有IPV4单播地址族以及VPNV4地址族,或者还有其他地址族等。其中,IPV4单播地址族对应的路由发生变化了或者状态变化为down状态时,则通知消息中携带的地址族信息为IPV4单播地址族信息。然后BMP客户端向BMP服务器发送通知消息,使得所述BMP服务器根据该运行状态发生变化的路由器的地址族信息以及地址信息存储该路由器的运行状态。
参照图2,是本申请实施例提供的一种监控对等体的运行状态的方法的流程示意图。其 中,BMP客户端监测到对等体运行状态发生变化时,可判断上述运行状态的变化类型。上述运行状态的变化类型包括BGP路由变化和BGP peer状态变化。
其中,当所述运行状态的变化类型为BGP路由变化时,BMP客户端向BMP服务器发送路由监控route monitor消息。其中,该路由监控route monitor消息携带该运行状态发生变化的路由器的地址族信息以及地址信息。该路由监控消息包括发生变化的路由信息。BMP服务器接收到该route monitor消息后,根据报文中携带的地址族信息和地址信息,存储peer信息,并将对应地址族信息的peer与对应的路由进行关联存储。例如服务器将对应地址族信息、地址信息以及发生变化的路由信息作为一条记录进行关联存储。
当所述运行状态的变化类型为BGP peer状态变化时,BMP客户端判断peer状态。其中,peer状态包括peer up和peer down。当peer状态为peer up时,BMP客户端向BMP服务器发送peer up消息。该peer up消息携带该运行状态发生变化的路由器的地址族信息以及地址信息。BMP服务器接收到该peer up消息后,根据消息中携带地址族信息以及地址信息,分别存储peer信息,将对应地址族信息的peer状态存储为peer up,同时将对应地址族信息的peer与对应的路由进行关联。
当peer状态为peer down时,BMP客户端向BMP服务器发送peer down消息。该peer down消息携带该运行状态发生变化的路由器的地址族信息以及地址信息。BMP服务器接收到该peer down消息后,根据消息中携带的地址族信息以及地址信息,将对应地址族信息的peer状态存储为peer down,并将对应地址族信息的peer所关联的路由设置为撤销状态。
下面以路由器侧实现该监控对等体的运行状态的方法进行说明。
参照图3,是本申请实施例提供的一种监控对等体的运行状态的方法的流程示意图。该方法可以由图1A和图1B中的具有BMP客户端功能的路由器执行。该方法可包括步骤301-302,具体如下:
301、获取第一对等体的地址族信息和所述第一对等体的地址信息;
其中,在步骤301之前,该方法还可包括:监测到第一对等体的运行状态发生变化,则触发步骤301。
作为一种实现方式,其中BMP客户端预先存储有各peer的地址族信息以及地址信息。当监测到第一对等体的运行状态发生变化时,则BMP客户端获取预先存储的对应第一对等体的地址族信息以及地址信息。
上述变化包括BGP路由变化。如为新加入路由或者新删除路由或者路由属性更新等。上述变化还包括BGP peer状态变化。如peer状态置为peer up;或者peer状态置为peer down。
上述地址族信息用来标识不同的路由类型,如IPV4 unicast/VPNV4。
上述地址信息是指BGP对等体的地址,如peer address为1.1.1.1。
其中,根据地址族信息以及地址信息可有助于区分运行状态发生变化的路由器。
302、向服务器发送通知消息,所述通知消息携带所述第一对等体的地址族信息和所述第一对等体的地址信息,以使得所述服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态。其中,所述通知消息包含扩展头,所述第一对等体的地址族信息位于所述扩展头中。
其中,通知消息的类型包括路由监控(route monitor)消息,peer up消息,或peer down消息。
优选的,该扩展头采用TLV格式。如图4所示,该扩展头携带有扩展头的类型信息type、扩展头的长度信息length以及地址族信息字段用于携带第一对等体的地址族信息。其中,地址族信息字段包括AFI字段以及SAFI字段。AFI字段用于携带主地址族信息。SAFI字段用于携带子地址组信息。如,地址族信息为IPV4 unicast或者IPV4 VPNV4,则主地址族信息可对应为IPV4。子地址组信息可对应为unicast或者VPNV4。如果该通知消息中包括两个以上地址族信息,则可以包括两个以上的地址族信息字段分别用来携带该两个以上的地址族信息。其中,如图4所示,该扩展头的类型信息和扩展头的长度信息分别占据8个比特。主地址族信息和子地址组信息分别占据2个字节。上述仅作为一种实现方式,其中扩展头的类型信息、扩展头的长度信息和地址族信息分别占据的比特大小不做具体限定。
所述通知消息还包含第一报文头和第二报文头。所述第一报文头可以是通用报文头common header。其携带的信息包括:报文版本信息version、报文长度信息message length和报文类型信息message type。所述第二报文头可以是对等体报文头per peer header。其携带的信息包括:对等体类型信息peer type、标记字段peer flags、对等体标识信息peer distinguisher、对等体地址信息peer address、对等体AS号peer as、对等体BGP地址信息peer BGP ID以及时间戳信息timestamp。其中,第一报文头位于通知消息的首部。第二报文头和扩展头均位于第一报文头的后面。
可选的,所述扩展头可位于所述第二报文头的后面。即所述通知消息的结构按照前后顺序可以为:第一报文头、第二报文头、扩展头。或者,所述通知消息的结构按照前后顺序可以为:第一报文头、扩展头、第二报文头。
优选的,所述扩展头位于所述第一报文头和所述第二报文头之间。其中,所述扩展头位于所述第二报文头的前面,有助于服务器在解析报文时先获取地址族信息,再根据地址族信息对地址信息进行解析,更加符合逻辑。
其中,当服务器接收到上述通知消息后,所述服务器对上述通知消息进行解析,得到所述第一对等体的地址族信息和所述第一对等体的地址信息。服务器根据通知消息的类型获取第一对等体的运行状态。然后,根据所述第一对等体的地址族信息和所述第一对等体的地址信息存储所述第一对等体的运行状态。
本申请实施例,通过将对应对等体的地址族信息置于扩展头中,可以使得本方案监控的peer信息更加明确,信息更加可靠;且对于单个地址族的peer状态变化处理方式变的常规化,也更加便捷。
进一步地,本申请实施例还提供一种第二报文头。所述第二报文头可以是对等体报文头per peer header。其中,第二报文头包含标记字段peer flags。所述标记字段可以包含以下标记位中的一种或多种:
第一标记位,所述第一标记位用于标识所述第一对等体的地址类型;
第二标记位,所述第二标记位用于标识所述第一对等体的策略处理信息;
第三标记位,所述第三标记位用于标识所述第一对等体的AS号的字节数;
第四标记位,所述第四标记位用于标识路由的信息类型;
第五标记位,所述第五标记位用于标识所述路由信息的完整性。
其中,所述第一对等体的地址类型包括IPV4、IPV6。
具体地,所述标记字段可以包含第一标记位;或者,所述标记字段可以包含第一标记位和第二标记位;或者,所述标记字段可以包含第一标记位和第三标记位;或者,所述标记字段可以包含第一标记位和第四标记位;或者,所述标记字段可以包含第一标记位和第五标记位;或者,所述标记字段可以包含第一标记位,第二标记位和第三标记位;或者,所述标记字段可以包含第一标记位,第二标记位和第四标记位;或者,所述标记字段可以包含第一标记位,第二标记位和第五标记位;或者,所述标记字段可以包含第一标记位,第三标记位和第四标记位;或者,所述标记字段可以包含第一标记位,第三标记位和第五标记位;或者,所述标记字段可以包含第一标记位,第四标记位和第五标记位。
上述仅以包含第一标记位的各种组合形式进行说明,本申请实施例的标记字段可以包含第一标记位、第二标记位、第三标记位、第四标记位、第五标记位中的任意一种、或者任意两种、或者任意三种、或者任意四种、或者五种均包括等。本方案并不限制具体的标记字段的形式。
具体地,所述第一标记位可以是对应V标记位,其中,当该标记位对应的字段置1时,表示所述第一对等体的地址类型为IPV6;当该标记位对应的字段置0时,表示所述第一对等体的地址类型为IPV4。
所述第二标记位可以是对应L标记位,其中,当该标记位对应的字段置1时,表示所述第一对等体为策略处理后的;当该标记位对应的字段置0时,表示所述第一对等体为策略处理前的;
所述第三标记位可以是对应A标记位,其中,当该标记位对应的字段置1时,表示所述第一对等体的AS号的字节数为2;当该标记位对应的字段置0时,表示所述第一对等体的AS号的字节数为4;
所述第四标记位可以是对应O标记位,其中,当该标记位对应的字段置1时,表示可监控的各路由的信息类型对应为接收路由信息;当该标记位对应的字段置0时,表示可监控的各路由的信息类型对应为发出路由信息;
所述第五标记位可以是对应F标记位,其中,当该标记位对应的字段置1时,表示所述客户端发给服务器的路由的信息是完整的;当该标记位对应的字段置0时,表示客户端发给服务器的路由的信息是不完整的。
可选的,所述标记字段包含第二标记位L、第三标记位A、第四标记位O、第五标记位F。此处并不限制各标记位的位置的先后顺序。各标记位在上述标记字段中对应任意先后位置均可。
本申请实施例,服务器还可通过标记字段解析出监控的对等体的路由表信息,十分方便。
需要说明的是,本申请实施例提供的第二报文头所涉及的标记字段peer flags,可以是在图3所示实施例的基础上改进该第二报文头中的标记字段。
参照图5,是本申请实施例提供的另一种监控对等体的运行状态的方法的流程示意图。该方法可以由图1A和图1B中的具有BMP客户端功能的路由器执行。如图5所示,该方法可包括步骤501-502,具体如下:
501、获取第一对等体的地址族信息和所述第一对等体的地址信息;
其中,在步骤501之前,该方法还可包括:监测到第一对等体的运行状态发生变化,则触发步骤501。
作为一种实现方式,其中BMP客户端预先存储有各peer的地址族信息以及地址信息。当监测到第一对等体的运行状态发生变化时,则BMP客户端获取预先存储的对应第一对等体的地址族信息以及地址信息。
502、向服务器发送通知消息,所述通知消息携带所述第一对等体的地址族信息和所述第一对等体的地址信息,以使得所述服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态。其中,所述通知消息包含第一报文头和第二报文头,所述第一报文头位于所述通知消息的首部,所述第一对等体的地址族信息和所述第一对等体的地址信息均位于所述第二报文头中。
其中,通知消息的类型包括路由监控(route monitor)消息,peer up消息,或peer down消息。
所述第一报文头可以是通用报文头common header。其携带的信息包括:报文版本信息、报文长度信息和报文类型信息。所述第二报文头可以是per peer header。其携带的信息包括第一对等体的地址族信息和所述第一对等体的地址信息。所述第二报文头位于所述第一报文头的后面。
其中,所述第一对等体的地址族信息位于所述第二报文头中,可以是将相关技术中第二报文头中peer type替换为第一对等体的地址族信息。如图6、图7所示,其中,图6是相关技术的第二报文头的结构示意图,图7是本申请实施例提供的第二报文头的结构示意图。也就是说,本方案的第二报文头不包含对等体的类型信息peer type。第一对等体的地址族信息位于原per peer header中peer type的位置。采用上述手段,以实现第一对等体的地址族信息位于所述第二报文头中。其中,该实现方式中,第二报文头携带的信息包括标记字段、第一对等体标识信息、第一对等体地址信息、第一对等体AS号、第一对等体BGP地址信息、时间戳信息以及地址族信息字段用于携带第一对等体的地址族信息。其中,地址族信息字段包括AFI字段以及SAFI字段。AFI字段用于携带主地址族信息。SAFI字段用于携带子地址组信息。如,地址族信息为IPV4 unicast,或者IPV4 VPNV4,则主地址族信息可对应为IPV4。子地址组信息可对应为unicast或者VPNV4。如果该通知消息中包括两个以上地址族信息,则可以包括两个以上的地址族信息字段分别用来携带该两个以上的地址族信息。如图7所示,其中,第一对等体的地址族信息包括主地址族信息和子地址组信息。主地址族信息和子地址组信息分别占据2个字节。
作为另一种可选的实现方式,所述第一对等体的地址族信息位于所述第二报文头中,可以是所述第一对等体的地址族信息为第二报文头中所新增的信息。也就是说,在相关技术的第二报文头中新增加第一对等体的地址族信息,以实现第一对等体的地址族信息位于所述第二报文头中。其中,所述第一对等体的地址族信息可位于所述第二报文头中的任意位置。该实现方式中,第二报文头携带的信息包括第一对等体的地址族信息、对等体的类型peer type、标记字段、第一对等体标识信息、第一对等体地址信息、第一对等体AS号、第一对等体BGP地址信息以及时间戳信息。
如图8所示,其中,上述由于更改了现有per peer header的报文结构,为了避免现有的报文解析方法无法解析本方案的报文结构而导致的不兼容问题。因此,需要将第一报文头中对应的版本信息更改为新的版本信息。该新的版本信息与旧有的版本信息不同。即该新的版本信息为扩展后的报文版本信息。其中,该旧有的版本信息可以是现有技术中未采用本方案、未改变报文头结构的报文对应的版本信息。如旧有的版本信息为3,则该新的版本信息与旧 有版本信息不同。该新的版本信息可为4。
作为其中可选的实现方式,其中,所述第二报文头包含标记字段,所述标记字段可以包含以下标记位中的一种或多种:
第一标记位,所述第一标记位用于标识所述第一对等体的地址类型;
第二标记位,所述第二标记位用于标识所述第一对等体的策略处理信息;
第三标记位,所述第三标记位用于标识所述第一对等体的AS号的字节数;
第四标记位,所述第四标记位用于标识路由的信息类型;
第五标记位,所述第五标记位用于标识所述路由信息的完整性。
具体地,如所述标记字段可以包含第一标记位;或者,所述标记字段可以包含第一标记位和第二标记位;或者,所述标记字段可以包含第一标记位和第三标记位;或者,所述标记字段可以包含第一标记位和第四标记位;或者,所述标记字段可以包含第一标记位和第五标记位;或者,所述标记字段可以包含第一标记位,第二标记位和第三标记位;或者,所述标记字段可以包含第一标记位,第二标记位和第四标记位;或者,所述标记字段可以包含第一标记位,第二标记位和第五标记位;或者,所述标记字段可以包含第一标记位,第三标记位和第四标记位;或者,所述标记字段可以包含第一标记位,第三标记位和第五标记位;或者,所述标记字段可以包含第一标记位,第四标记位和第五标记位。
上述仅以包含第一标记位的各种组合形式进行说明,本申请实施例的标记字段可以包含第一标记位、第二标记位、第三标记位、第四标记位、第五标记位中的任意一种、或者任意两种、或者任意三种、或者任意四种、或者五种均包括等。本方案并不限制具体的标记字段的形式。
具体地,所述第一标记位可以是对应V标记位,其中,当该标记位对应的字段置1时,表示所述第一对等体的地址类型为IPV6;当该标记位对应的字段置0时,表示所述第一对等体的地址类型为IPV4。
所述第二标记位可以是对应L标记位,其中,当该标记位对应的字段置1时,表示所述第一对等体为策略处理后的;当该标记位对应的字段置0时,表示所述第一对等体为策略处理前的;
所述第三标记位可以是对应A标记位,其中,当该标记位对应的字段置1时,表示所述第一对等体的AS号的字节数为2;当该标记位对应的字段置0时,表示所述第一对等体的AS号的字节数为4;
所述第四标记位可以是对应O标记位,其中,当该标记位对应的字段置1时,表示可监控的各路由的信息类型对应为接收路由信息;当该标记位对应的字段置0时,表示可监控的各路由的信息类型对应为发出路由信息;
所述第五标记位可以是对应F标记位,其中,当该标记位对应的字段置1时,表示所述客户端发给服务器的路由的信息是完整的;当该标记位对应的字段置0时,表示客户端发给服务器的路由的信息是不完整的。
优选的,如图9所示,所述标记字段包含第二标记位L、第三标记位A、第四标记位O、第五标记位F。此处并不限制各标记位的位置的先后顺序。各标记位在上述标记字段中对应任意先后位置均可。
其中,当服务器接收到上述通知消息后,服务器解析上述通知消息,当所述通知消息中对应的版本信息为旧有版本信息如3,则按照原有bmp报文格式进行解析处理。若通知消息 对应的版本信息为新的版本信息如4,则服务器对通知消息进行解析,得到第一对等体的地址族信息和所述第一对等体的地址信息。服务器根据通知消息的类型获取第一对等体的运行状态。然后,服务器根据第一对等体的地址族信息和所述第一对等体的地址信息存储所述第一对等体的运行状态。
由于现有技术中本地路由的local rib的报文中携带的peer地址信息是一个虚拟的peer,地址字段全填0,当前无法区分地址类型对应为IPV4还是IPV6,进而无法解析peer地址。由于当前无法区分IPV4、IPV6,导致在虚拟路由转发VRF(Virtual Routing Forwarding)的情况下,如果在同一个VRF实例下(RD相同)同时存在IPV4和IPV6的监控信息,由于服务器无法区分是IPV4还是IPV6,则无法准确的进行peer和路由的关联,导致路由状态无法准确体现。
本申请实施例为了解决上述技术问题,还提供一种监控对等体的运行状态的方法,如图10所示,该方法可包括步骤1001-1002,具体如下:
1001、获取第一对等体的地址类型和所述第一对等体的地址信息;
1002、向服务器发送通知消息,所述通知消息携带所述第一对等体的地址类型和所述第一对等体的地址信息,以使得所述服务器根据所述第一对等体的地址类型、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态;
其中,所述通知消息包含第一报文头和第二报文头,所述第一报文头位于所述通知消息的首部,所述第二报文头包含标记字段,所述标记字段至少包含第一标记位,所述第一标记位用于标识所述第一对等体的地址类型。
具体地,所述第一标记位可以是对应V标记位,其中,当该标记位对应的字段置1时,表示所述第一对等体的地址类型为IPV6;当该标记位对应的字段置0时,表示所述第一对等体的地址类型为IPV4。
进一步地,所述标记字段还包含以下标记位中的一种或多种:
第二标记位,所述第二标记位用于标识所述第一对等体的策略处理信息;
第三标记位,所述第三标记位用于标识所述第一对等体的AS号的字节数;
第四标记位,所述第四标记位用于标识路由的信息类型;
第五标记位,所述第五标记位用于标识所述路由信息的完整性。
具体地,所述第二标记位可以是对应L标记位,其中,当该标记位对应的字段置1时,表示所述第一对等体为策略处理后的;当该标记位对应的字段置0时,表示所述第一对等体为策略处理前的;
所述第三标记位可以是对应A标记位,其中,当该标记位对应的字段置1时,表示所述第一对等体的AS号的字节数为2;当该标记位对应的字段置0时,表示所述第一对等体的AS号的字节数为4;
所述第四标记位可以是对应O标记位,其中,当该标记位对应的字段置1时,表示可监控的各路由的信息类型对应为接收路由信息;当该标记位对应的字段置0时,表示可监控的各路由的信息类型对应为发出路由信息;
所述第五标记位可以是对应F标记位,其中,当该标记位对应的字段置1时,表示所述客户端发给服务器的路由的信息是完整的;当该标记位对应的字段置0时,表示客户端发给服务器的路由的信息是不完整的。
可选的,如图11所示,所述标记字段包含第一标记位V和第五标记位F。
可替代的,如图12所示,所述标记字段包含第一标记位V、第二标记位L、第三标记位A、第四标记位O、第五标记位F。此处并不限制各标记位的位置的先后顺序。各标记位在上述标记字段中对应任意先后位置均可。
其中,当服务器接收到上述通知消息后,服务器解析上述通知消息。服务器可通过标记字段解析出监控的对等体的地址类型,以实现可以区分第一对等体的地址类型为IPV4还是IPV6。
需要说明的是,本申请实施例还可以进一步获取第一对等体的的地址族信息。其中,该地址族信息可以携带在如图3实施例所述的扩展头中,也可以携带在如图5实施例所述的第二报文头中。
本申请实施例还提供一种装置,包括:一个或多个处理器、一个或多个存储器;所述一个或多个存储器与所述一个或多个处理器耦合,所述一个或多个存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,使得所述装置执行:
当所述一个或多个处理器执行所述计算机指令时,使得所述装置执行以下操作:
获取第一对等体的地址族信息和所述第一对等体的地址信息;
向服务器发送通知消息,所述通知消息携带所述第一对等体的地址族信息和所述第一对等体的地址信息,以使得所述服务器根据所述第一对等体的地址族信息和所述第一对等体的地址信息和所述通知消息的类型存储所述第一对等体的运行状态。
其中,所述通知消息包含扩展头,所述第一对等体的地址族信息位于所述扩展头中。
其中,所述扩展头采用TLV格式。
其中,所述通知消息还包含第一报文头和第二报文头,所述第一报文头位于所述通知消息的首部。
其中,所述扩展头位于所述第一报文头和所述第二报文头之间。
其中,所述通知消息包含第一报文头和第二报文头,所述第一报文头位于所述通知消息的首部,所述第一对等体的地址族信息和所述第一对等体的地址信息均位于所述第二报文头中。
其中,所述第一对等体的地址族信息替换对等体的类型信息。
其中,所述第一报文头包含第一版本信息,所述第一版本信息与旧有版本信息不同。
其中,所述第一对等体的地址族信息包括主地址族信息和子地址族信息。
其中,所述第二报文头包含标记字段,所述标记字段至少包含以下标记位中的一种或多种:
第一标记位,所述第一标记位用于标识所述第一对等体的地址类型;
第二标记位,所述第二标记位用于标识所述第一对等体的策略处理信息;
第三标记位,所述第三标记位用于标识所述第一对等体的AS号的字节数;
第四标记位,所述第四标记位用于标识路由的信息类型;
第五标记位,所述第五标记位用于标识路由信息的完整性。
其中,所述第一报文头为通用报文头common header。
其中,所述第二报文头为对等体报文头per peer header。
其中,所述第一对等体的地址类型包括IPV4、IPV6。
其中,所述通知消息的类型包括路由监控消息、peer up消息或peer down消息。
其中,当所述通知消息的类型为路由监控消息时,所述路由监控消息包括发生变化的路由信息,所述服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态包括:所述服务器将所述第一对等体的地址族信息、第一对等体的地址信息以及发生变化的路由信息进行关联存储。
当所述通知消息的类型为peer up消息时,所述服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态包括:所述服务器将所述第一对等体的地址族信息、第一对等体的地址信息以及所述第一对等体的运行状态peer up进行关联存储。
当所述通知消息的类型为peer down消息时,所述服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态包括:所述服务器将所述第一对等体的地址族信息、第一对等体的地址信息以及所述第一对等体的运行状态peer down进行关联存储。
再一方面,本申请实施例还提供一种装置,包括:一个或多个处理器、一个或多个存储器;所述一个或多个存储器与所述一个或多个处理器耦合,所述一个或多个存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,使得所述装置执行:
当所述一个或多个处理器执行所述计算机指令时,使得所述装置执行以下操作:
获取第一对等体的地址类型和所述第一对等体的地址信息;
向服务器发送通知消息,所述通知消息携带所述第一对等体的地址类型和所述第一对等体的地址信息,以使得所述服务器根据所述第一对等体的地址类型、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态;
其中,所述通知消息包含第一报文头和第二报文头,所述第一报文头位于所述通知消息的首部,所述第一对等体的地址类型和所述第一对等体的地址信息均位于所述第二报文头中;所述第二报文头包含标记字段,所述标记字段至少包含第一标记位,所述第一标记位用于标识所述第一对等体的地址类型。
所述标记字段还包含以下标记位中的一种或多种:
第二标记位,所述第二标记位用于标识所述第一对等体的策略处理信息;
第三标记位,所述第三标记位用于标识所述第一对等体的AS号的字节数;
第四标记位,所述第四标记位用于标识路由的信息类型;
第五标记位,所述第五标记位用于标识所述路由信息的完整性。
其中,所述第一对等体的地址类型包括IPV4、IPV6。
其中,还用于执行:获取所述第一对等体的地址族信息。
其中,所述第一对等体的地址族信息位于所述通知消息的第二报文头中。
其中,所述第一对等体的地址族信息替换对等体的类型信息。
其中,所述第一报文头包含第一版本信息,所述第一版本信息与旧有版本信息不同。
其中,所述通知消息还包含扩展头,所述第一对等体的地址族信息位于所述扩展头中。
其中,所述扩展头采用TLV格式。
其中,所述第一对等体的地址族信息包括主地址族信息和子地址族信息。
参见图13,本申请实施例提供了一种通信网络中的源节点1300,该源节点1300可以为上述图1A、图1B所示实施例中的BMP客户端。该通信网络包括源节点、一个或多个中间节点、以及目的节点,源节点1300包括:
生成模块1301,用于生成包括第一对等体的地址族信息和所述第一对等体的地址信息指示信息的通知消息,或者生成包括第一对等体的地址类型和所述第一对等体的地址信息指示信息的通知消息。具体实现过程请参考图3实施例中的步骤301以及图5实施例中的步骤501;或者参考图10实施例中的步骤1001。
上报模块1302,用于向源节点的下一跳节点发送通知消息,以指示源节点的下一跳节点执行图3至图5所示的监控对等体的运行状态的方法。具体实现过程请参考图3实施例中的步骤302以及图5实施例中的步骤502;或者参考图10实施例中的步骤1002。
可选地,所述通知消息包含扩展头,所述第一对等体的地址族信息位于所述扩展头中。
可选地,所述扩展头采用TLV格式。
可选地,所述通知消息还包含第一报文头和第二报文头,所述第一报文头位于所述通知消息的首部。
可选地,所述扩展头位于所述第一报文头和所述第二报文头之间。
可选地,所述通知消息包含第一报文头和第二报文头,所述第一报文头位于所述通知消息的首部,所述第一对等体的地址族信息和所述第一对等体的地址信息均位于所述第二报文头中。
可选地,所述第一对等体的地址族信息替换对等体的类型信息。
可选地,所述第一对等体的地址族信息包括主地址族信息和子地址族信息。
可选地,所述第一报文头包含通知消息版本信息,所述通知消息版本信息与旧有报文版本信息不同。
可选地,所述第二报文头包含标记字段,所述标记字段至少包含以下标记位中的一种或多种:
第一标记位,所述第一标记位用于标识所述第一对等体的地址类型;
第二标记位,所述第二标记位用于标识所述第一对等体的策略处理信息;
第三标记位,所述第三标记位用于标识所述第一对等体的AS号的字节数;
第四标记位,所述第四标记位用于标识路由的信息类型;
第五标记位,所述第五标记位用于标识路由信息的完整性。
可选地,所述第一对等体的地址类型包括IPV4、IPV6。
本申请实施例,通过将对应对等体的地址族信息置于报文中,可以使得本方案监控的peer信息更加明确,信息更加可靠;且对于单个地址族的peer状态变化处理方式变的常规化,也更加便捷。
另一方面,本申请实施例通过获取对等体的地址类型,并将其封装至第二报文头的标记字段中,即可区分不同的地址类型,以解决现有技术无法区分V4、V6的问题。
参见图14,本申请实施例提供了一种通信网络中的第一节点1400,该第一节点1400可 以为上述图1A、图1B所示实施例中的BMP服务器。该第一节点可以是路由器,也可以为交换机,或者其他转发报文的网路设备。该通信网络包括源节点、一个或多个中间节点、以及目的节点,第一节点为一个或多个中间节点中的任一个中间节点;第一节点1400包括:
接收模块1401,用于接收并解析通知消息;所述通知消息携带第一对等体的地址类型和所述第一对等体的地址信息;或者所述通知消息携带第一对等体的地址族信息和所述第一对等体的地址信息。具体实现过程请参考图3实施例或者图5实施例或者图10实施例,这里不再赘述。
处理模块1402,用于根据所述第一对等体的地址类型和所述第一对等体的地址信息和所述通知消息的类型存储所述第一对等体的运行状态;或者根据所述第一对等体的地址族信息和所述第一对等体的地址信息和所述通知消息的类型存储所述第一对等体的运行状态。具体实现过程请参考图3实施例以及图5实施例,或者参考图10实施例,这里不再赘述。
本申请实施例,通过将对应对等体的地址族信息置于报文中,可以使得本方案监控的peer信息更加明确,信息更加可靠;且对于单个地址族的peer状态变化处理方式变的常规化,也更加便捷。
图15是本申请实施例提供的一种设备1500的结构示意图。图13至图14实施例中的源节点、中间节点均可以通过图15所示的设备1500来实现,此时,该设备1500可以为交换机,路由器或者其他转发报文的网路设备。参见图15,该设备包括至少一个处理器1501,通信总线1502、存储器1503以及至少一个通信接口1504。
处理器1501可以是一个通用中央处理器(central processing unit,CPU)、特定应用集成电路(application-specific integrated circuit,ASIC)或一个或多个用于控制本申请方案程序执行的集成电路。所述处理器用于获取第一对等体的地址族信息和所述第一对等体的地址信息;向服务器发送通知消息,所述通知消息携带所述第一对等体的地址族信息和所述第一对等体的地址信息,以使得所述服务器根据所述第一对等体的地址族信息和所述第一对等体的地址信息和所述通知消息的类型存储所述第一对等体的运行状态。具体实现过程请参考图3实施例中的步骤301-302或者图5实施例中的步骤501-502。图3所示实施例中步骤301-302,图5所示实施例中步骤501-502,在此不再赘述。
通信总线1502可包括一通路,在上述组件之间传送信息。
存储器1503可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only Memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘或者其它磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器1503可以是独立存在,通过通信总线1502与处理器1501相连接。存储器1503也可以和处理器1501集成在一起。
其中,存储器1503用于存储程序代码,并由处理器1501来控制执行,以执行上述任一实施例所提供的路径探测方法。处理器1501用于执行存储器1503中存储的程序代码。程序代码中可以包括一个或多个软件模块。通信网路中的任一节点可以通过处理器1501以及存储 器1503中的程序代码中的一个或多个软件模块,来确定用于开发应用的数据。
通信接口1504,使用任何收发器一类的装置,用于与其它设备或通信网络通信,如以太网,无线接入网(radio access networkRAN),无线局域网(wireless local area networks,WLAN)等。
在具体实现中,作为一种实施例,设备可以包括多个处理器。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
可以理解的是,在图15所示设备为上述方法实施例中的第一节点时,本实施例也可以基于通用的物理服务器结合网络功能虚拟化NFV技术实现的虚拟第一节点,所述虚拟第一节点为虚拟路由器,而且可以虚拟出第二,三,N个节点(根据实际需要)。所述虚拟第一节点可以是运行有用于提供发送消息功能的程序的虚拟机(英文:Virtual Machine,VM),所述虚拟机部署在硬件设备上(例如,物理服务器)。虚拟机指通过软件模拟的具有完整硬件***功能的、运行在一个完全隔离环境中的完整计算机***。本领域技术人员通过阅读本申请即可结合NFV技术在通用物理服务器上虚拟出具有上述功能的多个第一节点。此处不再赘述。
本申请还提供了一种计算机可读存储介质,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行上述任一种可能的实施方式提供的方法。
本申请实施例提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述任一种可能的实施方式提供的方法。
应理解,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的***、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本申请实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。
本申请实施例装置中的模块可以根据实际需要进行合并、划分和删减。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (60)

  1. 一种监控对等体的运行状态的方法,其特征在于,所述方法包括:
    路由设备获取第一对等体的地址族信息和所述第一对等体的地址信息;
    所述路由设备向服务器发送通知消息,所述通知消息携带所述第一对等体的地址族信息和所述第一对等体的地址信息,以使得所述服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态。
  2. 根据权利要求1所述的方法,其特征在于,所述通知消息包含扩展头,所述第一对等体的地址族信息位于所述扩展头中。
  3. 根据权利要求2所述的方法,其特征在于,所述扩展头采用TLV格式。
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述通知消息还包含第一报文头和第二报文头,所述第一报文头位于所述通知消息的首部。
  5. 根据权利要求4所述的方法,其特征在于,所述扩展头位于所述第一报文头和所述第二报文头之间。
  6. 根据权利要求1所述的方法,其特征在于,所述通知消息包含第一报文头和第二报文头,所述第一报文头位于所述通知消息的首部,所述第一对等体的地址族信息和所述第一对等体的地址信息均位于所述第二报文头中。
  7. 根据权利要求6所述的方法,其特征在于,所述第一对等体的地址族信息替换对等体的类型信息。
  8. 根据权利要求6或7所述的方法,其特征在于,所述第一报文头包含第一版本信息,所述第一版本信息与旧有版本信息不同。
  9. 根据权利要求1至8任一项所述的方法,其特征在于,所述第一对等体的地址族信息包括主地址族信息和子地址族信息。
  10. 根据权利要求4至8任一项所述的方法,其特征在于,所述第二报文头包含标记字段,所述标记字段至少包含以下标记位中的一种或多种:
    第一标记位,所述第一标记位用于标识所述第一对等体的地址类型;
    第二标记位,所述第二标记位用于标识所述第一对等体的策略处理信息;
    第三标记位,所述第三标记位用于标识所述第一对等体的AS号的字节数;
    第四标记位,所述第四标记位用于标识路由的信息类型;
    第五标记位,所述第五标记位用于标识路由信息的完整性。
  11. 根据权利要求4至8任一项所述的方法,其特征在于,所述第一报文头为通用报文头common header。
  12. 根据权利要求4至8任一项所述的方法,其特征在于,所述第二报文头为对等体报文头per peer header。
  13. 根据权利要求10所述的方法,其特征在于,所述第一对等体的地址类型包括IPV4、IPV6。
  14. 根据权利要求1至13任一项所述的方法,其特征在于,所述通知消息的类型包括路由监控消息、peer up消息或peer down消息。
  15. 根据权利要求14所述的方法,其特征在于,当所述通知消息的类型为路由监控消息 时,所述路由监控消息包括发生变化的路由信息,所述服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态包括:所述服务器将所述第一对等体的地址族信息、第一对等体的地址信息以及发生变化的路由信息进行关联存储。
  16. 根据权利要求14所述的方法,其特征在于,当所述通知消息的类型为peer up消息时,所述服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态包括:所述服务器将所述第一对等体的地址族信息、第一对等体的地址信息以及所述第一对等体的运行状态peer up进行关联存储。
  17. 根据权利要求14所述的方法,其特征在于,当所述通知消息的类型为peer down消息时,所述服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态包括:所述服务器将所述第一对等体的地址族信息、第一对等体的地址信息以及所述第一对等体的运行状态peer down进行关联存储。
  18. 一种监控对等体的运行状态的方法,其特征在于,所述方法包括:
    路由设备获取第一对等体的地址类型和所述第一对等体的地址信息;
    所述路由设备向服务器发送通知消息,所述通知消息携带所述第一对等体的地址类型和所述第一对等体的地址信息,以使得所述服务器根据所述第一对等体的地址类型、所述第一对等体的地址信息和所述通知消息的类型存储所述第一对等体的运行状态;
    其中,所述通知消息包含第一报文头和第二报文头,所述第一报文头位于所述通知消息的首部,所述第一对等体的地址类型和所述第一对等体的地址信息均位于所述第二报文头中;所述第二报文头包含标记字段,所述标记字段至少包含第一标记位,所述第一标记位用于标识所述第一对等体的地址类型。
  19. 根据权利要求18所述的方法,其特征在于,所述标记字段还包含以下标记位中的一种或多种:
    第二标记位,所述第二标记位用于标识所述第一对等体的策略处理信息;
    第三标记位,所述第三标记位用于标识所述第一对等体的AS号的字节数;
    第四标记位,所述第四标记位用于标识路由的信息类型;
    第五标记位,所述第五标记位用于标识所述路由信息的完整性。
  20. 根据权利要求18或19所述的方法,其特征在于,所述第一对等体的地址类型包括IPV4、IPV6。
  21. 根据权利要求18至20任一项所述的方法,其特征在于,所述方法还包括:
    所述路由设备获取所述第一对等体的地址族信息。
  22. 根据权利要求21所述的方法,其特征在于,所述第一对等体的地址族信息位于所述通知消息的第二报文头中。
  23. 根据权利要求22所述的方法,其特征在于,所述第一对等体的地址族信息替换对等体的类型信息。
  24. 根据权利要求22或23所述的方法,其特征在于,所述第一报文头包含第一版本信息,所述第一版本信息与旧有版本信息不同。
  25. 根据权利要求21所述的方法,其特征在于,所述通知消息还包含扩展头,所述第一对等体的地址族信息位于所述扩展头中。
  26. 根据权利要求25所述的方法,其特征在于,所述扩展头采用TLV格式。
  27. 根据权利要求21至26任一项所述的方法,其特征在于,所述第一对等体的地址族信息包括主地址族信息和子地址族信息。
  28. 一种装置,其特征在于,包括:一个或多个处理器、一个或多个存储器;所述一个或多个存储器与所述一个或多个处理器耦合,所述一个或多个存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;
    当所述一个或多个处理器执行所述计算机指令时,使得所述装置执行以下操作:
    获取第一对等体的地址族信息和所述第一对等体的地址信息;
    向服务器发送通知消息,所述通知消息携带所述第一对等体的地址族信息和所述第一对等体的地址信息,以使得所述服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态。
  29. 根据权利要求28所述的装置,其特征在于,所述通知消息包含扩展头,所述第一对等体的地址族信息位于所述扩展头中。
  30. 根据权利要求29所述的装置,其特征在于,所述扩展头采用TLV格式。
  31. 根据权利要求28至30任一项所述的装置,其特征在于,所述通知消息还包含第一报文头和第二报文头,所述第一报文头位于所述通知消息的首部。
  32. 根据权利要求31所述的装置,其特征在于,所述扩展头位于所述第一报文头和所述第二报文头之间。
  33. 根据权利要求28所述的装置,其特征在于,所述通知消息包含第一报文头和第二报文头,所述第一报文头位于所述通知消息的首部,所述第一对等体的地址族信息和所述第一对等体的地址信息均位于所述第二报文头中。
  34. 根据权利要求33所述的装置,其特征在于,所述第一对等体的地址族信息替换对等体的类型信息。
  35. 根据权利要求33或34所述的装置,其特征在于,所述第一报文头包含第一版本信息,所述第一版本信息与旧有版本信息不同。
  36. 根据权利要求28至35任一项所述的装置,其特征在于,所述第一对等体的地址族信息包括主地址族信息和子地址族信息。
  37. 根据权利要求31至35任一项所述的装置,其特征在于,所述第二报文头包含标记字段,所述标记字段至少包含以下标记位中的一种或多种:
    第一标记位,所述第一标记位用于标识所述第一对等体的地址类型;
    第二标记位,所述第二标记位用于标识所述第一对等体的策略处理信息;
    第三标记位,所述第三标记位用于标识所述第一对等体的AS号的字节数;
    第四标记位,所述第四标记位用于标识路由的信息类型;
    第五标记位,所述第五标记位用于标识路由信息的完整性。
  38. 根据权利要求31至35任一项所述的装置,其特征在于,所述第一报文头为通用报文头common header。
  39. 根据权利要求31至35任一项所述的装置,其特征在于,所述第二报文头为对等体报文头per peer header。
  40. 根据权利要求37所述的装置,其特征在于,所述第一对等体的地址类型包括IPV4、 IPV6。
  41. 根据权利要求28至40任一项所述的装置,其特征在于,所述通知消息的类型包括路由监控消息、peer up消息或peer down消息。
  42. 根据权利要求41所述的装置,其特征在于,当所述通知消息的类型为路由监控消息时,所述路由监控消息包括发生变化的路由信息,所述服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态包括:所述服务器将所述第一对等体的地址族信息、第一对等体的地址信息以及发生变化的路由信息进行关联存储。
  43. 根据权利要求41所述的装置,其特征在于,当所述通知消息的类型为peer up消息时,所述服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态包括:所述服务器将所述第一对等体的地址族信息、第一对等体的地址信息以及所述第一对等体的运行状态peer up进行关联存储。
  44. 根据权利要求41所述的装置,其特征在于,当所述通知消息的类型为peer down消息时,所述服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态包括:所述服务器将所述第一对等体的地址族信息、第一对等体的地址信息以及所述第一对等体的运行状态peer down进行关联存储。
  45. 一种装置,其特征在于,包括:一个或多个处理器、一个或多个存储器;所述一个或多个存储器与所述一个或多个处理器耦合,所述一个或多个存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;
    当所述一个或多个处理器执行所述计算机指令时,使得所述装置执行以下操作:
    获取第一对等体的地址类型和所述第一对等体的地址信息;
    向服务器发送通知消息,所述通知消息携带所述第一对等体的地址类型和所述第一对等体的地址信息,以使得所述服务器根据所述第一对等体的地址类型、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态;
    其中,所述通知消息包含第一报文头和第二报文头,所述第一报文头位于所述通知消息的首部,所述第一对等体的地址类型和所述第一对等体的地址信息均位于所述第二报文头中;所述第二报文头包含标记字段,所述标记字段至少包含第一标记位,所述第一标记位用于标识所述第一对等体的地址类型。
  46. 根据权利要求45所述的装置,其特征在于,所述标记字段还包含以下标记位中的一种或多种:
    第二标记位,所述第二标记位用于标识所述第一对等体的策略处理信息;
    第三标记位,所述第三标记位用于标识所述第一对等体的AS号的字节数;
    第四标记位,所述第四标记位用于标识路由的信息类型;
    第五标记位,所述第五标记位用于标识所述路由信息的完整性。
  47. 根据权利要求45或46所述的装置,其特征在于,所述第一对等体的地址类型包括IPV4、IPV6。
  48. 根据权利要求45至47任一项所述的装置,其特征在于,还用于执行:
    获取所述第一对等体的地址族信息。
  49. 根据权利要求48所述的装置,其特征在于,所述第一对等体的地址族信息位于所述 通知消息的第二报文头中。
  50. 根据权利要求49所述的装置,其特征在于,所述第一对等体的地址族信息替换对等体的类型信息。
  51. 根据权利要求49或50所述的装置,其特征在于,所述第一报文头包含第一版本信息,所述第一版本信息与旧有版本信息不同。
  52. 根据权利要求48所述的装置,其特征在于,所述通知消息还包含扩展头,所述第一对等体的地址族信息位于所述扩展头中。
  53. 根据权利要求52所述的装置,其特征在于,所述扩展头采用TLV格式。
  54. 根据权利要求48至53任一项所述的装置,其特征在于,所述第一对等体的地址族信息包括主地址族信息和子地址族信息。
  55. 一种监控对等体的运行状态的方法,其特征在于,所述方法包括:
    服务器接收并解析通知消息,其中,所述通知消息携带第一对等体的地址族信息和所述第一对等体的地址信息;
    所述服务器根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态。
  56. 一种监控对等体的运行状态的方法,其特征在于,所述方法包括:
    服务器接收并解析通知消息,其中,所述通知消息携带第一对等体的地址类型和所述第一对等体的地址信息;
    所述服务器根据所述第一对等体的地址类型、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态。
  57. 一种装置,其特征在于,包括:
    接收模块,用于接收并解析通知消息,其中,所述通知消息携带第一对等体的地址族信息和所述第一对等体的地址信息;
    处理模块,用于根据所述第一对等体的地址族信息、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态。
  58. 一种装置,其特征在于,包括:
    接收模块,用于接收并解析通知消息,其中,所述通知消息携带第一对等体的地址类型和所述第一对等体的地址信息;
    处理模块,用于根据所述第一对等体的地址类型、所述第一对等体的地址信息以及所述通知消息的类型存储所述第一对等体的运行状态。
  59. 一种***,其特征在于,包括权利要求28至44任一项所述的装置和/或权利要求45至54任一项所述的装置,以及权利要求57所述的装置和/或权利要求58所述的装置。
  60. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行以实现权利要求1至17任意一项所述的方法和/或权利要求18至27任意一项所述的方法和/或权利要求55或权利要求56任意一项所述的方法。
PCT/CN2020/106484 2019-11-06 2020-08-01 一种监控对等体的运行状态的方法、装置及存储介质 WO2021088439A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20885244.2A EP4044530A4 (en) 2019-11-06 2020-08-01 METHOD AND DEVICE FOR MONITORING THE RUNNING STATE OF A PEER AND STORAGE MEDIA
US17/736,462 US20220263746A1 (en) 2019-11-06 2022-05-04 Method for monitoring running state of peer, apparatus, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911078235.1 2019-11-06
CN201911078235.1A CN112787930B (zh) 2019-11-06 2019-11-06 一种监控对等体的运行状态的方法、装置及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/736,462 Continuation US20220263746A1 (en) 2019-11-06 2022-05-04 Method for monitoring running state of peer, apparatus, and storage medium

Publications (1)

Publication Number Publication Date
WO2021088439A1 true WO2021088439A1 (zh) 2021-05-14

Family

ID=75747602

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/106484 WO2021088439A1 (zh) 2019-11-06 2020-08-01 一种监控对等体的运行状态的方法、装置及存储介质

Country Status (4)

Country Link
US (1) US20220263746A1 (zh)
EP (1) EP4044530A4 (zh)
CN (1) CN112787930B (zh)
WO (1) WO2021088439A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113794644A (zh) * 2021-10-12 2021-12-14 新华三信息安全技术有限公司 一种路由表项删除方法及装置

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113395179B (zh) * 2021-06-11 2022-04-19 中国科学技术大学 提高ip网络中bgp对等体抖动告警信息可读性的方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101099342A (zh) * 2005-01-27 2008-01-02 思科技术公司 用于边界网关协议中的基于上下文的前缀更新的方法和设备
CN106161256A (zh) * 2016-07-26 2016-11-23 杭州华三通信技术有限公司 一种边界网关协议bgp路由的处理方法及装置
CN108123848A (zh) * 2017-12-19 2018-06-05 新华三技术有限公司 设备监控方法及装置
WO2018121284A1 (zh) * 2016-12-28 2018-07-05 华为技术有限公司 一种处理路由的方法及网络设备
CN109246008A (zh) * 2014-07-23 2019-01-18 华为技术有限公司 网络设备、***和发送bgp信息的方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7688714B2 (en) * 2004-04-28 2010-03-30 Cisco Technology, Inc. Network routing apparatus that performs soft graceful restart
US7633874B1 (en) * 2004-04-28 2009-12-15 Cisco Technology, Inc. Soft notification messaging for a routing protocol
US7590119B2 (en) * 2005-01-27 2009-09-15 Cisco Technology, Inc. Method and apparatus for context-based prefix updates in border gateway protocol
CN102761482B (zh) * 2012-06-29 2016-01-20 杭州华三通信技术有限公司 一种bgp邻居的建立方法和设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101099342A (zh) * 2005-01-27 2008-01-02 思科技术公司 用于边界网关协议中的基于上下文的前缀更新的方法和设备
CN109246008A (zh) * 2014-07-23 2019-01-18 华为技术有限公司 网络设备、***和发送bgp信息的方法
CN106161256A (zh) * 2016-07-26 2016-11-23 杭州华三通信技术有限公司 一种边界网关协议bgp路由的处理方法及装置
WO2018121284A1 (zh) * 2016-12-28 2018-07-05 华为技术有限公司 一种处理路由的方法及网络设备
CN108123848A (zh) * 2017-12-19 2018-06-05 新华三技术有限公司 设备监控方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4044530A4

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113794644A (zh) * 2021-10-12 2021-12-14 新华三信息安全技术有限公司 一种路由表项删除方法及装置

Also Published As

Publication number Publication date
US20220263746A1 (en) 2022-08-18
EP4044530A4 (en) 2022-11-23
EP4044530A1 (en) 2022-08-17
CN112787930B (zh) 2024-04-09
CN112787930A (zh) 2021-05-11

Similar Documents

Publication Publication Date Title
JP7108674B2 (ja) 故障根本原因決定方法及び装置並びにコンピュータ記憶媒体
WO2019223447A1 (zh) 一种生成路由的方法和设备
US9391886B2 (en) Identification of the paths taken through a network of interconnected devices
JP7208008B2 (ja) ネットワークデバイスで使用するためのプログラマブルパケット分類フレームワークを提供するためのシステムおよび方法
US8867402B2 (en) Apparatus and method for generating topology tree
US7912055B1 (en) Method and apparatus for configuration and analysis of network multicast routing protocols
US9544217B2 (en) Identification of paths in a network of mixed routing/switching devices
US9537760B2 (en) Executing loops
WO2015165212A1 (zh) 一种报文处理方法、装置及计算机存储介质
US9559909B2 (en) Identifying an egress port of a device
US9531598B2 (en) Querying a traffic forwarding table
WO2020073685A1 (zh) 转发路径确定方法、装置、***、计算机设备及存储介质
US20220263746A1 (en) Method for monitoring running state of peer, apparatus, and storage medium
WO2021077971A1 (zh) 一种通信方法及装置
US10764214B1 (en) Error source identification in cut-through networks
JP2022095786A (ja) ループ回避通信方法、ループ回避通信デバイスおよびループ回避通信システム
US20230327983A1 (en) Performance measurement in a segment routing network
WO2021027420A1 (zh) 用于数据传输的方法和装置
WO2019001101A1 (zh) 路由路径分析方法及设备
WO2020135445A1 (zh) 对路由震荡的定位
WO2016183732A1 (zh) 一种数据包转发方法和网络设备
US11909650B2 (en) Internet protocol operations and management option
US8249079B2 (en) Method and system for caching IP network topology
CN117544708A (zh) 一种识别udp分片包建立连接跟踪的方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20885244

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020885244

Country of ref document: EP

Effective date: 20220428

NENP Non-entry into the national phase

Ref country code: DE