WO2019080592A1 - 一种发送报文的方法和设备 - Google Patents

一种发送报文的方法和设备

Info

Publication number
WO2019080592A1
WO2019080592A1 PCT/CN2018/099413 CN2018099413W WO2019080592A1 WO 2019080592 A1 WO2019080592 A1 WO 2019080592A1 CN 2018099413 W CN2018099413 W CN 2018099413W WO 2019080592 A1 WO2019080592 A1 WO 2019080592A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
anycast
target server
server
client device
Prior art date
Application number
PCT/CN2018/099413
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 EP18871473.7A priority Critical patent/EP3694145B1/en
Publication of WO2019080592A1 publication Critical patent/WO2019080592A1/zh
Priority to US16/857,825 priority patent/US11265287B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/1863Arrangements for providing special services to substations for broadcast or conference, e.g. multicast comprising mechanisms for improved reliability, e.g. status reports
    • H04L12/1877Measures taken prior to transmission
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3009Header conversion, routing tables or routing tags
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/659Internet protocol version 6 [IPv6] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5069Address allocation for group communication, multicast communication or broadcast communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method for transmitting a message and a client device.
  • IP Anycast (English: anycast) is a method of network addressing and routing, based on recent, lowest cost, healthiest, least congestion routing or some other distance measurement strategy.
  • a data message of a sender (or client) device is routed to any of several destination nodes (or servers).
  • IP Anycast provides the same specified service address operation in multiple, discrete, autonomous locations.
  • the service address which may be an IPv6 address (referred to as IPv6 anycast at this time), or an IPv4 address (in this case, referred to as IPv4 anycast).
  • IP Anycast is usually used to provide high reliability and load balancing. It has been widely deployed in the live network.
  • IP Domain Name System
  • PIM protocol independent multicast
  • MSDP Multicast Source Discovery Protocol
  • IPv6 Internet Protocol version 6
  • IPv4 Internet Protocol 4th Edition
  • IPv4 IP anycast address
  • the existing IP ping/tracert detection method uses the IP anycast address as the destination address.
  • the IP anycast address reachability of the anycast server specified in the server cluster cannot be accurately detected.
  • the method for sending a message and the client device provided by the embodiment of the present invention can help solve the problem that the IP anycast address reachability of the designated anycast server cannot be accurately detected in the network based on the anycast service. problem.
  • a first aspect of the embodiments of the present invention provides a method for sending a message, which is applied to a network based on anycast service, where the network includes a client device and an anycast server cluster, and the anycast server cluster Include at least two servers, the at least two servers having the same Internet IP anycast address, the method comprising: the client device obtaining an Internet Protocol IP anycast address of the anycast server cluster and the target server The IP unicast address, the client device generates an IP detection packet, and the IP detection packet is used to detect whether the IP anycast address of the target server is reachable, and the IP detection packet includes the IP address. Broadcasting an address and an IP unicast address of the target server, and instructing the target server to replace an IP unicast address of the target server with the IP anycast address; the client device transmitting the IP detection message.
  • the obtaining, by the client device, the IP anycast address of the anycast server cluster and the IP unicast address of the target server includes: the client device obtaining the location through a command line configured by the user Determining an IP anycast address and an IP unicast address of the target server; or the client device receiving a message sent by the control management device, obtaining the IP anycast address and the IP of the target server from the message Unicast address.
  • the IP detection message includes the IP anycast address and an IP unicast address of the target server, and indicates that the target server replaces the target server with the IP anycast address.
  • the IP unicast address includes: the destination IP address field in the IP detection packet carries the IP unicast address of the target server, and the segment list field in the IP segment routing header SRH in the IP detection packet carries The IP anycast address, and the value of the remaining segment number SegLeft field in the IP SRH is 1, and the value of the SegLeft field indicates that the target server replaces the IP unicast address of the target server with the IP anycast address.
  • the IP anycast address is carried by carrying the SRH in the IP detection packet, and the Segleft value is 1 to indicate that the target server replaces the IP unicast address of the target server by using the IP anycast address, so that the accurate implementation can be accurately implemented.
  • the method further includes: the client device further obtaining an IP unicast address of at least one designated intermediate node on a forwarding path from the client device to the target server; The client device obtains an IP unicast address of the at least one designated intermediate node by using a command line configured by the user; or the client device receives a message sent by the control management device, and obtains the at least the message from the message.
  • the IP detection message includes the IP anycast address and an IP unicast address of the target server, and indicates that the target server replaces the target server with the IP anycast address.
  • the IP unicast address includes: the destination IP address field in the IP detection packet carries an IP unicast address of the first designated intermediate node, and the first designated intermediate node is the from the client device to the a first designated intermediate node on the forwarding path of the target server; the segment list field in the IP segment routing header SRH in the IP detection packet carries the IP anycast address, the IP unicast address of the target server, and The at least one IP unicast address of the specified intermediate node, and the value of the remaining number of SegLeft fields in the IP SRH is 1 for the number of the designated intermediate nodes, and the value of the SegLeft field is 1 indicates the The target server replaces the IP unicast address of the target server with the IP anycast address.
  • the IP unicast address of the server can be used to easily forward the IP address of the specified intermediate node and accurately send the IP detection packet to the IP address of a server in the anycast server cluster.
  • the client device if the client device receives the response message sent by the target server within a predetermined time interval, it is confirmed that the IP anycast address of the target server is reachable; The client device confirms that the IP anycast address of the target server is unreachable if the client device does not receive the response packet sent by the target server within a predetermined time interval.
  • the present invention provides a client device for performing the method of the first aspect or any possible implementation of the first aspect.
  • the client device comprises means for performing the method of the first aspect or any of the possible implementations of the first aspect.
  • the present invention provides a client device including: a processor, a transceiver, a random access memory, a read only memory, and a bus.
  • the processor is respectively coupled to the transmitter, the random access memory, and the read only memory through a bus.
  • the booting is performed by the bootloader booting system in the basic input/output system or the embedded system in the read-only memory, and the first network device is booted into a normal running state.
  • the application and operating system are run in a random access memory such that the processor performs the method of the first aspect or any of the possible implementations of the first aspect.
  • a client device in a fourth aspect, includes: a central processing unit, a forwarding entry storage, a physical interface network card, and a network forwarding processor.
  • the first network device is configured to perform the method in any of the possible implementations of the first aspect.
  • the first network device comprises means for performing the method of the first aspect or any possible implementation of the first aspect.
  • the invention provides a computer readable medium comprising instructions which, when executed on a computer, cause the computer to perform the method of the first aspect or any of the possible implementations of the first aspect.
  • FIG. 1 is a schematic diagram of an application scenario of sending a message according to an embodiment of the present invention
  • FIG. 1b is a schematic structural diagram of an SRH packet header according to an embodiment of the present invention.
  • 1c is a schematic diagram of an SRH forwarding process according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a method for sending a message according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a forwarding process without specifying an intermediate node according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a forwarding process with a designated intermediate node according to an embodiment of the present invention
  • FIG. 5a is a schematic structural diagram of a client device according to an embodiment of the present invention.
  • FIG. 5b is a schematic structural diagram of another client device according to an embodiment of the present invention.
  • FIG. 5c is a schematic structural diagram of still another client device according to an embodiment of the present invention.
  • the invention is applied to an Internet Protocol (IP) anycast service network.
  • IP anycast service network includes client devices, anycast server clusters, and routing devices (eg, routers, switches, etc.).
  • the client device accesses the server (English: Server) 1 and Server 2 in the anycast server cluster through the routing network consisting of routers (Router) 1, Router 2, and Router 3.
  • the IP anycast address addr0 is used to identify the anycast server cluster and is shared by Server1 and Server2.
  • the IP unicast address addr1 is used to identify the IP address of a network interface on Server1.
  • the IP unicast address addr2 is used to identify Server2.
  • it may be the IP address of a network interface on Server2.
  • IPv6 anycast address uses the same address space as the IPv6 unicast address.
  • the address itself is not obvious except for the reserved Subnet Anycast Address defined in IETF RFC2526 and the Subnet-Router Anycast Address defined in RFC4291. Characteristics. When a unicast address is simultaneously assigned to multiple interfaces (same or different devices), it must be explicitly configured to specify whether it is an IP anycast address.
  • IPv6 anycast address is usually configured on multiple interfaces to represent a group of servers that provide the same service.
  • the routing device is used to select the "nearest" device for access, thereby realizing distributed services, and has the advantages of load sharing and high reliability.
  • the IPv6 anycast address is essentially an IPv6 unicast address. Therefore, IPv6 ping/tracertIP can be used to detect packets.
  • the method is the same as normal unicast address detection.
  • the client device uses the IPv6 anycast address as the destination IP address, and can detect whether the IPv6 anycast service is reachable. For example, as shown in FIG. 1a, the routing device generates a routing entry with the destination IP being addr0 through a dynamic routing protocol (or static configuration routing), and directs the routing device (Routers 1, 2, 3) to send the IP address sent by the client device.
  • the detection packet is forwarded to Server1. If Server1 works normally, the IPv6 anycast service is reachable. In this case, the routing entries of the destination IP address of the routers 1, 2, and 3 are all pointing to the server 1. If the user wants to detect whether the client device is reachable to the server 2, the fault cannot be implemented.
  • the route After the server 1 is faulty, the route re-converges to re-generate the routing entry with the destination IP address as addr0, and the routing device forwards the IP detection packet sent by the client device to Server2.
  • the server 2 works normally, the IPv6 anycast service can be used. Da. Therefore, as long as one server in the anycast server cluster can work normally, anycast service detected by ping/tracert is reachable, so that anycast service has the advantage of high reliability.
  • the routing entries of the destination IP address of Router 1, 2, and 3 are all directed to Server2 (that is, the packets are forwarded to the outbound interface according to the routing entry), and the packet can eventually reach Server2. It is impossible to achieve from the client device to Server1.
  • the existing ping/tracert detection method uses the IP anycast address as the destination address, and the ping/tracertIP detection packet cannot be sent to the specified server as required. Further, it is also impossible to know whether a specified server in the anycast server cluster is faulty.
  • the client device involved in this application is a device that supports IP anycast.
  • it may be a PC in a broadband access network, a portable device, a PAD, a router in a routing network, a switch, various sensors in an Internet of Things (IoT) network, an IoT gateway, and a base station in a mobile network. , mobile phones, etc.
  • the anycast server cluster involved in the present application may include at least two servers.
  • FIG. 1 only takes two devices as an example, but is not limited thereto.
  • anycast server clusters can also be clusters of other network devices that support IP anycast services, such as routers or switch clusters.
  • the server, the router, and the switch may be physical devices, or virtual devices (such as virtual servers, virtual routers, and virtual switches) implemented based on virtualization technologies.
  • IP forwarding The basic feature of IP forwarding is connectionless and hop-by-hop forwarding.
  • the forwarding path of IP packets is completely dependent on the release and convergence of routes (static routes and/or dynamic routes). Normally, the route calculation system will select the "shortest path". However, in some scenarios, the "shortest path" does not necessarily meet user expectations, and there are some difficulties in implementing Traffic Engineering (TE).
  • IP source routing is proposed. IP source routing supports carrying forwarding path information directly in IP packets.
  • the loose source routing (LSRR) option and the strict source routing option (SSRR) are defined in RFC791.
  • LSRR loose source routing
  • SSRR strict source routing option
  • RFC2460 defines the routing header (Routing Header), and can be defined A new routing type (Routing Type) to add a new source routing mechanism.
  • RFC2460 a routing header with a route type of 0 (type 0) is defined in RFC2460.
  • the Type 0 routing header is basically equivalent to the IPv4 LSRR, but is no longer limited by the 40-byte space of the IPv4 option.
  • the IETF found that the IPv6 type 0 routing header has serious security problems. Therefore, the definition of the type 0 routing header is discarded in RFC5095, but the mechanism of the IPv6 routing header is not discarded.
  • the IPv6 routing header is a loose mode source routing mechanism. With the in-depth development of IP networks, the idea of source routing has received more and more attention. To this end, the IETF established a spring working group to achieve related standardization work. The spring working group called the newly designed source routing mechanism called Segment Routing (SR), and the data plane adopts two methods: MPLS and IPv6. For IPv6 segment routing (called SR IPv6), it is implemented by defining a new IPv6 routing header (called SRH). Reference: draft-ietf-6man-segment-routing-header-07 (The draft is by 6man) Working group definition). As shown in FIG.
  • the SRH extension header includes a Next Header field, a Segment Left field, and a Segment List [n] field.
  • the next header indicates the protocol header carried after the SRH header.
  • the segment list carries the IP addresses of the specified nodes (excluding the source nodes) that need to pass on the forwarding path, and is expressed in the form of an array.
  • the index of the array is from 0 to n, and n is a positive integer.
  • N+1 expresses the number of nodes that need to pass in addition to the source node on the forwarding path.
  • the Segment Left field indicates the subscript of the array.
  • the network node After receiving an IP packet, the network node continues to determine whether the value of the Segment Left field (Segment Left value) is greater than 0 when it determines that the destination IP address carried in the IP packet header is equal to its own local IP address. If the Segment Left value is greater than 0, the Segment Left value is decremented by 1, and the destination IP address in the IP packet header is replaced with the IP address corresponding to the Segment List [Segment Left value minus 1], and the updated destination is used. The IP address looks up the Forwarding Information Base (FIB) table to process the corresponding packets.
  • FIB Forwarding Information Base
  • the network scenario shown in Figure 1c is used as an example to describe the forwarding process of IPv6 packets carrying the SRH header.
  • the source node (the IPv6 address is 2001:7a:78a::1) sends a message to the destination node (the IPv6 address is 2001:7a:78e::41), and the middle passes through three designated intermediate nodes (the node can It is a network switching device for routers, switches, etc.) and several non-designated intermediate nodes.
  • the designated intermediate node refers to a node that must be specified in advance on the path from the source node to the destination node
  • the non-designated intermediate node refers to a path that is not specified in advance on the path from the source node to the destination node.
  • the source node sends the first IPv6 packet carrying the SRH extension header to the first designated intermediate node.
  • the SRH extension header includes Segment Left (referred to as SegLeft and takes a value of 3) and Segment List (SegList for short), wherein the subscript of the SegList array is from 0 to 3, and SegList[3] to SegList[0] sequentially express the forwarding.
  • SegList[3] is the IPv6 address of the first designated intermediate node
  • SegList[2] is the IPv6 address of the second designated intermediate node
  • SegList[1] is the third designation.
  • the IPv6 address of the intermediate node, SegList[0] is the IPv6 address of the final destination node.
  • the second IPv6 packet is generated by using the updated IPv6 address of the second designated intermediate node to obtain a matching entry, and the second IPv6 packet is further sent to the second designated intermediate node according to the matched entry.
  • the SRH extension header includes Segment Left (referred to as SegLeft and takes a value of 2).
  • the third IPv6 packet is sent to the third designated intermediate node for processing (for brevity, no further details herein).
  • the SRH extension header includes a SegLeft value of 1.
  • the third designated intermediate node After the third designated intermediate node receives the third IPv6 packet, it processes with the same method (for brevity, no further details here), and generates a fourth IPv6 packet to continue to send to the final destination node.
  • the SRH extension header includes SegLeft as 0.
  • the final destination node After receiving the fourth IPv6 packet, the final destination node finds that the DA carried in the fourth IPv6 packet is its own IPv6 address, and continues to parse the SegLeft carried in the SRH extension header. Then, if it is judged that SegLeft (is 0) is equal to 0, the processing of SRH is ignored, and the rest of the processing of IPv6 is continued.
  • FIG. 2 is a schematic flowchart of a method for sending a message according to an embodiment of the present invention. The method is applied to an Anycast Service based network, the network comprising a client device and an Anycast Server Cluster, the Anycast Server Cluster comprising a target server.
  • the solution provided by the embodiment of the present invention includes parts 201, 202, 203, 204, 205, 206, and 207, which are respectively described below.
  • the client device obtains an IP anycast address of the anycast server cluster and an IP unicast address of the target server.
  • the IP anycast address of the anycast server cluster and the IP unicast address of the target server may be configured by the network administrator on the client device by using a command line; or the client device may receive other control management devices.
  • a command line of the following form is executed:
  • ⁇ exh ⁇ addr0> is a new optional parameter, which is used to indicate that the extended field is carried in the IP detection packet, and the extension field may also be an extension header, and ⁇ addr0> is an anycast address encapsulated in the extension field.
  • ⁇ server1-addr> is the non-anycast IP address of the server in the detected anycast server cluster (for example, Server1), such as the IP address of an interface on the sever or The sever's management IP address.
  • the client device further obtains an IP unicast address of the at least one designated intermediate node on the forwarding path from the client device to the target server, and then detects the initiating device (the client) On the end device, execute the command line in the following form:
  • the -designate_middlenodes is a new optional parameter that indicates that the IP detection packet needs to pass through the N designated intermediate nodes node1, ..., nodeN, N is a positive integer greater than or equal to 1.
  • -exh is only an example to indicate that an extension field needs to be added in the packet, and no limitation is imposed.
  • the extension field is an SRH extension header, then -exh can be -srh.
  • -designate_middlenode is just an example to indicate that an extension field needs to be added in the message, and no restrictions are imposed.
  • ip in the above command line may be IPv4 or IPv6, which is not limited herein.
  • the client device In the 202 part, the client device generates an IP detection packet, where the IP detection packet is used to detect whether the IP anycast address of the target server is reachable, and the IP detection packet includes the IP anycast address. And an IP unicast address of the target server, and instructing the target server to replace the IP unicast address of the target server with the IP anycast address.
  • the IP detection packet is a packet for performing IP reachability detection, for example, a ping or tracert packet, and the ping or tracert packet is encapsulated in the payload of the IP packet (English: payload).
  • the destination IP address field in the IP detection packet (that is, the IP packet header)
  • the destination IP address field in the middle carries the IP unicast address of the target server.
  • the IP detection packet carries the IP anycast address by using a segment routing header (SRH), and instructs the target server to replace the IP address of the target server with the IP anycast address. Broadcast address.
  • SSH segment routing header
  • the segment list field in the segment routing header SRH in the IP detection packet carries the IP anycast address, and the value of the remaining segment number SegLeft field in the SRH is 1, indicating that the target server is used.
  • the IP anycast address replaces the IP unicast address of the target server.
  • the value of the SegLeft field is set to the number of designated intermediate nodes plus 1. If no intermediate node is specified, the number of designated intermediate nodes is 0, and after adding 1 is 1, therefore, the value of the SegLeft field Is 1.
  • the IP anycast address is carried by carrying the SRH in the IP detection packet, and the Segleft value is 1 to indicate that the target server replaces the IP unicast address of the target server by using the IP anycast address, so that the accurate implementation can be accurately implemented.
  • the value of the SegLeft field in the SRH is the specified number of intermediate nodes. The number is incremented by 1. If the IP detection packet passes through one intermediate node, the SegLeft value is decremented by one, and the IP detection packet reaches the target server. The value of SegLeft is 1 indicating that the target server uses the IP address. The broadcast address replaces the IP unicast address of the target server.
  • the IP unicast address of the server can be used to easily forward the IP address of the specified intermediate node and accurately send the IP detection packet to the IP address of a server in the anycast server cluster.
  • the client device sends the IP detection packet to the target server.
  • the target server receives the IP detection packet, and parses the destination IP address carried in the IP header of the encapsulated IP detection packet as its own local IP unicast address, and according to the IP address.
  • the broadcast address replaces the indication of the IP unicast address of the target server, and the IP unicast address of the target server is replaced with the IP anycast address.
  • the target server continues to perform protocol processing of the IP detection packet to generate a response packet.
  • the target server sends the response message to the client device.
  • step 207 if the client device receives the response message within a predetermined time interval, it is confirmed that the IP anycast address of the target server is reachable.
  • the client device if the client device does not receive the response message within a predetermined time interval, it is confirmed that the IP anycast address of the target server is unreachable, for example, occurs. malfunction.
  • the client device (that is, the initiating device) needs to detect whether the server1 in the anycast server cluster works normally, and then initiates IPv6 ping detection on the client device.
  • IPv6 ping detection There are two ways to detect IPv6 ping. One is to not specify the intermediate node, and the other is to specify the intermediate node.
  • the client device executes the command line in the following form:
  • the -srh ⁇ addr0> is used to indicate that the SRH extension header is carried in the IP detection packet, and the anycast address addr0 is carried in the SegmentList field in the SRH.
  • the value of the Segment Left field is set to 1, and addr0 is carried in the SegmentList[0] field.
  • the destination address field in the header of the IPv6 carries Addr1, which is the non-anycast IP address of Server1 in the detected anycast server cluster.
  • the IGMP protocol is indicated in the next header field of the SRH header. That is, the ping packet can continue to be encapsulated in the IPv6 packet.
  • Add1 is the non-anycast IP unicast address used to identify server1 on Server1 in the detected anycast server cluster.
  • the client device sends the IPv6 packet to server1.
  • the IPv6 packet finds the route forwarding entry corresponding to the destination IP address addr1 and passes through R1 and R2 to reach server1.
  • the server 1 After receiving the IPv6 packet, the server 1 resolves to find that the DA (addr1) carried in the IPv6 packet is its own IPv6 address, and continues to parse the SegLeft carried in the SRH extension header.
  • the IP address corresponding to the IPv6 packet header is replaced with the IP address of the IPv6 packet header, that is, the addr1 in the IPv6 header is replaced with addr0.
  • the server 1 continues to perform the protocol processing of the ping detection packet, and generates a response packet to be sent to the client device. After receiving the response packet, the client device determines that the target server is reachable.
  • the device checks the FIB table forwarding on Router1 and Router2 as the destination address.
  • the ping packet is sent to Server1.
  • the server 1 fails, the server 1 cannot receive and process the IPv6 packet, and the response packet cannot be generated and sent to the client device. Therefore, when the client device is at a certain time interval or period. If the response packet of Server1 is not received, it is confirmed that Server1 is unreachable and a failure may occur.
  • Segment List array can carry addr1 (as shown in Figure 3), or it can carry the same function without carrying addr1.
  • the client device executes the command line in the following form:
  • the -srh ⁇ addr0> is used to indicate that the SRH extension header is carried in the IP detection packet, and the anycast address addr0 is carried in the SegmentList field in the SRH.
  • -designate_nodes ⁇ addr3,addr2> is used to indicate that Ping detection needs to pass through two specified intermediate nodes addr3 (Router1) and addr2 (Router2). For example, as shown in FIG.
  • the value of the Segment Left field is set to 3 (that is, the SRH header needs to carry 4 addresses), in SegmentList[0]
  • the field carries addr0
  • the SegmentList[1] field carries addr1
  • the SegmentList[2] field carries addr2
  • the SegmentList[3] field carries addr3.
  • the destination address field (DA) in the IPv6 header carries addr3, which is the IP address of the first intermediate node Router1.
  • the IGMP protocol is indicated in the next header field of the SRH header. That is, the ping packet can continue to be encapsulated in the IPv6 packet.
  • the first IPv6 packet generated by the client device for the ping detection is sent to the Router1.
  • the Router1 After receiving the SRH, the Router1 performs the SRH forwarding process to generate the second IPv6 packet, and then sends the packet to the second intermediate node Router2, and Router2 performs the SRH.
  • the forwarding process is performed to generate a third IPv6 packet and is sent to the destination node (the destination server server1).
  • the forwarding process of the SRH on Router1 and Router2 is consistent with the forwarding process described in Figure 1c. For the sake of brevity, No longer.
  • the server After receiving the third IPv6 packet, the server detects that the DA (addr1) carried in the third IPv6 packet is its own IPv6 address, and continues to parse the SegLeft carried in the SRH extension header.
  • SegLeft value 1, greater than 0, so means that when the IP address of the target server is addr1, the SRH header will continue to be parsed, and the Segment Left value in the SRH header will be decremented by 1, using the Segment List [Segment Left value after subtracting 1
  • IP addresses appearing in this document refer to IP unicast addresses unless otherwise specified.
  • FIG. 5a shows a possible structural diagram of a client device involved in the above embodiment.
  • the client device 500A is applied to an anycast service based network, the network comprising a client device and an anycast server cluster, the anycast server cluster comprising at least two servers, the at least two servers having the same internet IP Anycast address.
  • the client device 500A includes a main control board 510, an interface board 530, a switching network board 520, and an interface board 540.
  • the main control board 510 is used to complete functions such as system management, device maintenance, and protocol processing.
  • the switching network board 520 is used to complete data exchange between each interface board (also referred to as a line card or a service board).
  • Interface boards 530 and 540 are used to provide various service interfaces (eg, Ethernet interfaces, POS interfaces, etc.) and to implement forwarding of data packets.
  • the main control board 510, the interface boards 530 and 540, and the switching network board 520 are connected to each other through the system bus to implement interworking.
  • the central processing unit 531 on the interface board 530 is used to control and manage the interface board and communicate with the central processing unit 511 on the main control board 510.
  • the central processing unit 511 on the main control board 510 is further configured to obtain an Internet Protocol IP anycast address of the anycast server cluster and an IP unicast address of the target server, and generate an IP detection packet, where the IP detection report is generated.
  • the method is used to detect whether an IP anycast address of the target server is reachable, the IP detection packet includes the IP anycast address and an IP unicast address of the target server, and indicates that the target server uses the The IP anycast address replaces the IP unicast address of the target server.
  • the destination IP address in the IP detection packet carries the target server if the specified intermediate node is not included in the path from the client device to the target server.
  • the IP unicast address, the segment list field in the IP segment routing header SRH in the IP detection packet carries the IP anycast address, and the value of the remaining segment number SegLeft field in the IP SRH is 1, The value of the SegLeft field indicates that the target server replaces the IP unicast address of the target server with the IP anycast address.
  • the central processing unit 511 on the main control board 510 is also obtained from the The IP unicast address of the at least one designated intermediate node on the forwarding path of the client device to the target server.
  • the destination IP address field in the IP detection packet carries an IP unicast address of the first designated intermediate node, where the first designated intermediate node is on the forwarding path from the client device to the target server. The first one specifies an intermediate node.
  • the segment list field in the IP segment routing header SRH in the IP detection packet carries the IP anycast address, the IP unicast address of the target server, and the IP unicast address of the at least one designated intermediate node, and
  • the value of the SegLeft field in the IP SRH is the number of the specified intermediate node plus 2, and the value of the SegLeft field indicates that the target server replaces the IP unicast address of the target server with the IP anycast address. .
  • the central processing unit 511 on the main control board 510 uses the destination IP address of the IP detection packet to query the local routing table, finds the interface board 530 where the interface is located, and then sends the IP detection packet to the central processing unit. 531.
  • the central processing unit 531 performs the internal adaptation processing (for example, the conversion of the interface index) on the IP detection packet by querying the forwarding entry 534, and then sends the IP detection packet to the network processor 532.
  • the internal adaptation processing for example, the conversion of the interface index
  • the network processor 532 sends the IP detection packet from the physical interface card 533 after completing the link layer encapsulation according to the information such as the outbound interface.
  • the physical interface card 533 receives the response message sent by the target server within a predetermined time interval, and sends the response message to the network processor 532.
  • the network processor 532 reports the response according to the result of the lookup forwarding entry 534.
  • the central processing unit 511 confirms that the IP anycast address of the target server is reachable;
  • the central processing unit 511 of the main control board 510 does not receive the response message sent by the target server within a predetermined time interval, the central processing unit 511 confirms that the IP anycast address of the target server is unreachable.
  • the operation on the interface board 540 in the embodiment of the present invention is consistent with the operation of the interface board 530, and is not described again for brevity.
  • the client device 500A of the present embodiment may correspond to the client device in the embodiment corresponding to the foregoing FIG. 1 to FIG. 4, and the main control board 510, the interface board 530, and/or the 540 in the client device 500A.
  • the functions of the client device in the embodiment corresponding to FIG. 1 to FIG. 4 and/or the various steps implemented may be implemented. For brevity, details are not described herein again.
  • the main control board may have one or more blocks. When there are multiple blocks, the main control board and the standby main control board may be included.
  • the interface board may have one or more blocks. The stronger the data processing capability of the forwarding device, the more interface boards are provided.
  • the physical interface card on the interface board can also have one or more blocks.
  • the switching network board may not exist, and there may be one or more blocks. When there are multiple blocks, the load sharing redundant backup can be implemented together. In the centralized forwarding architecture, the forwarding device does not need to exchange the network board, and the interface board assumes the processing function of the service data of the entire system.
  • the forwarding device may have at least one switching network board, and exchange data between multiple interface boards through the switching network board to provide large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of the forwarding device of the distributed architecture are greater than those of the centralized architecture.
  • the forwarding device 500A may be in the form of only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the board, and the central processing unit and the main board on the interface board at this time.
  • the central processing unit on the control board can be combined into a central processing unit on the board to perform the superimposed functions.
  • the data exchange and processing capability of the device is low (for example, low-end switches or routers, etc.) Network equipment). Which architecture is used depends on the specific network deployment scenario, and is not limited here.
  • FIG. 5b shows another possible structural diagram of the client device involved in the above embodiment.
  • the client device 500B is applied to an anycast service based network, the network comprising a client device and an anycast server cluster, the anycast server cluster comprising at least two servers, the at least two servers having the same internet IP Anycast address.
  • the client device 500B includes a processing unit 504B, an obtaining unit 502B, and a transceiving unit 506B.
  • the obtaining unit 502B is configured to obtain an Internet Protocol IP anycast address of the anycast server cluster and an IP unicast address of the target server.
  • the processing unit 504B is configured to generate an IP detection packet, where the IP detection packet is used to detect whether an IP anycast address of the target server is reachable, and the IP detection packet includes the IP anycast address and the target An IP unicast address of the server, and instructing the target server to replace the IP unicast address of the target server with the IP anycast address.
  • the transceiver unit 506B is configured to send the IP detection packet to the target server.
  • the obtaining unit 502B is further configured to obtain the IP by using a command line configured by the user. Anycast address and an IP unicast address of the target server; or the obtaining unit 502B is further configured to receive a message sent by the control management device, obtain the IP anycast address and the target server from the message IP unicast address.
  • the method for carrying the related information by carrying the SRH header in the IP detection packet is consistent with that described in section 202 above. Please refer to related content, and details are not described herein.
  • the obtaining unit 502B is further configured to obtain from the client device to the foregoing, where a specified intermediate node is included on a path from the client device to the target server. At least one IP unicast address of the specified intermediate node on the forwarding path of the target server.
  • the obtaining unit 502B is further configured to obtain an IP unicast address of the at least one designated intermediate node by using a command line configured by the user; or the acquiring unit 502B is further configured to receive a message sent by the control management device, from the message Obtaining an IP unicast address of the at least one designated intermediate node.
  • the method for carrying the related information by carrying the SRH header in the IP detection packet is consistent with that described in section 202 above. Please refer to related content, and details are not described herein.
  • the processing unit 504B confirms that the IP anycast address of the target server is reachable;
  • the processing unit 504B confirms that the IP anycast address of the target server is unreachable.
  • the client device 500B of the embodiment of the present invention may correspond to the client device in the method embodiment for sending a message, and the modules in the client device 500B and the other operations and/or functions described above are respectively implemented in FIG. 1 .
  • the various steps and methods implemented by the client device in the embodiment corresponding to FIG. 4 are not described herein for brevity.
  • FIG. 5c shows a possible structural diagram of the client device involved in the above embodiment.
  • the client device 500C is applied to an anycast service based network, the network comprising a client device and an anycast server cluster, the anycast server cluster comprising at least two servers, the at least two servers having the same internet IP Anycast address.
  • the client device 500C includes a transceiver 510C, a processor 520C, a random access memory 540 C, a read only memory 550 C, and a bus 560 C.
  • the processor 520 C is coupled to the transceiver 510 C, the random access memory 540 C, and the read only memory 550 C via the bus 560 C.
  • the booting device 500 C When the forwarding device 500 C needs to be run, the booting device 500 C is booted by the basic input/output system in the read-only memory 550 C or the bootloader boot system in the embedded system, and the booting device 500 C enters a normal running state. After the forwarding device 500C enters the normal operating state, the application and operating system are run in the random access memory 540C such that:
  • the processor 520 C is configured to obtain an Internet Protocol IP anycast address of the anycast server cluster and an IP unicast address of the target server, and generate an IP detection packet, where the IP detection packet is used to detect the at least Whether the anycast address of the target server in the two servers is reachable, the IP detection message includes the IP anycast address and the IP unicast address of the target server, and indicates that the target server uses the IP address The broadcast address replaces the IP unicast address of the target server.
  • the transceiver 510C is configured to send the IP detection packet to the target server.
  • the forwarding device 500C of the embodiment of the present invention may correspond to the client device in the embodiment corresponding to the foregoing FIG. 1 to FIG. 4, and the processor 520C, the transceiver 510C, and the like in the client device 500C may implement FIG. 1 to The functions of the client device in the embodiment corresponding to FIG. 4 and/or the various steps and methods implemented.
  • the processor 520C is configured to perform all operations of the processing unit 504B and the acquisition unit 502B of the client device of FIG. 5b
  • the transceiver 510C is configured to perform all operations of the transceiver unit 506B of the client device of FIG. 5b.
  • the transceiver unit 506B of the client device of FIG. 5b For the sake of brevity, it will not be repeated here.
  • the embodiment may also be based on a universal physical server combined with a network function virtualization (NFV) technology
  • the client device is a virtual client device (eg, virtual Host, virtual router, or virtual switch).
  • the virtual client device may be a virtual machine (English: Virtual Machine, VM) running a program for transmitting a message function, and the virtual machine is deployed on a hardware device (for example, a physical server).
  • a virtual machine is a complete computer system that runs through a software and has full hardware system functionality running in a fully isolated environment.
  • NFV technology can use the NFV technology to virtualize a plurality of forwarding devices having the above functions on a general physical server by reading the present application. I will not repeat them here.
  • the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be taken to the embodiments of the present invention.
  • the implementation process constitutes any limitation.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • 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, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product.
  • the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • ROM read-only memory
  • RAM random access memory
  • magnetic disk or an optical disk.

Landscapes

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

Abstract

本申请提供一种发送报文的方法,应用于基于任播服务的网络中,所述网络包括客户端设备和任播服务器集群,任播服务器集群包括至少两个服务器,所述至少两个服务器具有相同的互联网IP任播地址,该方法包括:该客户端设备获得该任播服务器集群的互联网协议IP任播地址和该目标服务器的IP单播地址;该客户端设备生成IP检测报文,该IP检测报文用于检测所述目标服务器的IP任播地址是否可达,该IP检测报文包括该IP任播地址和该目标服务器的IP单播地址,并且指示该目标服务器用该IP任播地址替换该目标服务器的IP单播地址;该客户端设备向该目标服务器发送该IP检测报文。有助于准确地实现对指定的任播服务器的IP任播地址可达性进行检测。

Description

一种发送报文的方法和设备
本申请要求于2017年10月27日提交中国专利局、申请号为201711025021.9、申请名称为“一种发送报文的方法和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信技术领域,具体涉及一种用于发送报文的方法和客户端设备。
背景技术
互联网协议(英文:Internet Protocol,IP)任播(英文:anycast)是一种网络寻址和路由的方法,根据最近、成本最低、最健康、拥塞路由最少或者一些其它的距离测量的策略,来自一个发送端(或者客户端)设备的数据报文被路由到几个目的节点(或者服务器)中的任意一个节点。IP任播在多个、离散、自治的位置提供了同一个指定服务地址的操作。这个服务地址,即可以是IPv6地址(此时,称为IPv6任播),也可以是IPv4地址(此时,称为IPv4任播)。IP任播通常用于提供高可靠性和负载平衡,在现网中已经有着较为广泛的部署,例如,域名系统(英文:Domain Name System,DNS)根服务器,协议独立组播(英文:Protocol Independent Multicast,PIM)、组播源发现协议(英文:Multicast Source Discovery Protocol,MSDP)、支持互联网通信协议第6版(英文:Internet Protocol version 6,IPv6)向支持互联网通信协议第4版(英文:Internet Protocol version 4,IPv4)过渡的6to4等网络场景下都使用到了IP任播地址。
然而,由于IP任播地址标识的是一组而非一台服务器,即这一组服务器集群共用一个IP任播地址,因此,现有的IP ping/tracert检测方法用IP任播地址作为目的地址,无法准确地实现对服务器集群中指定的任播服务器的IP任播地址可达性进行检测。
发明内容
本发明实施例提供的发送报文的方法和客户端设备,有助于解决在基于任播服务的网络中,无法准确地实现对指定的任播服务器的IP任播地址可达性进行检测的问题。
为了解决上述问题,本发明实施例第一方面提供一种发送报文的方法,应用于基 于任播服务的网络中,所述网络包括客户端设备和任播服务器集群,所述任播服务器集群包括至少两个服务器,所述至少两个服务器具有相同的互联网IP任播地址,所述方法包括:所述客户端设备获得所述任播服务器集群的互联网协议IP任播地址和所述目标服务器的IP单播地址;所述客户端设备生成IP检测报文,所述IP检测报文用于检测所述目标服务器的IP任播地址是否可达,所述IP检测报文包括所述IP任播地址和所述目标服务器的IP单播地址,并且指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址;所述客户端设备向所述目标服务器发送所述IP检测报文。
通过在IP检测报文中携带IP任播地址和所述目标服务器的IP单播地址,并且指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址,有助于准确地实现对指定的任播服务器的IP任播地址可达性进行检测。
在一种可能的设计中,所述客户端设备获得所述任播服务器集群的IP任播地址和所述目标服务器的IP单播地址包括:所述客户端设备通过用户配置的命令行获得所述IP任播地址和所述目标服务器的IP单播地址;或者所述客户端设备接收控制管理设备发来的消息,从所述消息中获得所述IP任播地址和所述目标服务器的IP单播地址。
通过命令行配置或者接收控制管理设备发来的配置参数,可以灵活、按需的指定任播服务器集群里的待检测的服务器。
在一种可能的设计中,所述IP检测报文包括所述IP任播地址和所述目标服务器的IP单播地址,并且指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址包括:所述IP检测报文中的目的IP地址字段携带所述目标服务器的IP单播地址,所述IP检测报文中的IP段路由头SRH中的段列表字段携带所述IP任播地址,且所述IP SRH中的剩余段数SegLeft字段的值为1,所述SegLeft字段的值指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址。
通过在IP检测报文中携带SRH来携带IP任播地址,并用Segleft值为1指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址,可以简捷地实现准确的发送IP检测报文到任播服务器集群里的某台服务器的IP任播地址。
在一种可能的设计中,所述方法还包括:所述客户端设备还获得从所述客户端设备到所述目标服务器的转发路径上的至少一个指定中间节点的IP单播地址;相应地,所述客户端设备通过用户配置的命令行获得所述至少一个指定中间节点的IP单播地址;或者所述客户端设备接收控制管理设备发来的消息,从所述消息中获得所述至少一个指定中间节点的IP单播地址。
通过命令行配置或者接收控制管理设备发来的配置参数,来指定检测路径上需要经过的中间节点,可以灵活、按需的指定待检测路径需要经过的中间节点以及任播服务器集群里的待检测的服务器。
在一种可能的设计中,所述IP检测报文包括所述IP任播地址和所述目标服务器的IP单播地址,并且指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址包括:所述IP检测报文中的目的IP地址字段携带第一指定中间节点的IP单播地址,所述第一指定中间节点为所述从所述客户端设备到所述目标服务器的转发路径上的第一个指定中间节点;所述IP检测报文中的IP段路由头SRH中的段列表字段携带所述IP任播地址、所述目标服务器的IP单播地址和所述至少一个指定中间节点的IP单播地址,且所述IP SRH中的剩余段数SegLeft字段的值为所述指定中间节点的个数加1,所述SegLeft字段的值为1时指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址。
通过在IP检测报文中携带SRH来携带IP任播地址、指定中间节点和目标服务器的IP单播地址,并用Segleft值为1时指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址,可以利用简捷地实现经过指定的中间节点、并准确发送IP检测报文到任播服务器集群里的某台服务器的IP任播地址。
在一种可能的设计中,在所述客户端设备在预定的时间间隔内收到所述目标服务器发来的响应报文的情况下,确认所述目标服务器的IP任播地址可达;在所述客户端设备在预定的时间间隔内未收到所述目标服务器发来的响应报文的情况下,确认所述目标服务器的IP任播地址不可达。
通过根据在预定的时间间隔内是否能收到IP检测的响应报文,可以准确地确认所述目标服务器的IP任播地址是否可达(例如,是否故障)。
第二方面,本发明提供一种客户端设备,所述客户端设备用于执行第一方面或第一方面的任意可能的实现方式中的方法。具体地,所述客户端设备包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的模块。
第三方面,本发明提供一种客户端设备,所述客户端设备包括:处理器、收发器、随机存取存储器、只读存储器以及总线。其中,处理器通过总线分别耦接发送器、随机存取存储器以及只读存储器。其中,当需要运行第一网络设备时,通过固化在只读存储器中的基本输入输出系统或者嵌入式系统中的bootloader引导系统进行启动,引导第一网络设备进入正常运行状态。在第一网络设备进入正常运行状态后,在随机存取存储器中运行应用程序和操作系统,使得该处理器执行第一方面或第一方面的任意 可能的实现方式中的方法。
第四方面,提供一种客户端设备,所述客户端设备包括:中央处理器、转发表项存储器、物理接口网卡、网络转发处理器。所述第一网络设备用于执行第一方面任意可能的实现方式中的方法。具体地,所述第一网络设备包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的模块。
第五方面,本发明提供一种计算机可读介质,包括指令,当其在计算机上运行时,使得计算机执行第一方面或第一方面的任意可能的实现方式中的方法。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其它的附图。
图1a是本发明实施例一种发送报文的应用场景示意图;
图1b是本发明实施例SRH报文头结构示意图;
图1c是本发明实施例SRH转发流程示意图;
图2是本发明实施例中一种用于发送报文的方法的流程示意图;
图3是本发明实施例中一种没有指定中间节点的转发流程示意图;
图4是本发明实施例中一种有指定中间节点的转发流程示意图;
图5a是本发明实施例一种客户端设备的结构示意图;
图5b是本发明实施例另一种客户端设备的结构示意图;
图5c是本发明实施例又一种客户端设备的结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本发明方案,下面结合附图和实施方式对本发明实施例作进一步的详细说明。显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
在介绍本发明实施例技术方案之前,先对本发明实施例相关的应用场景进行解释说明。本发明应用于互联网协议(英文:Internet Protocol,IP)任播服务网络中。所述IP任播服务网络包括客户端设备、任播服务器集群和路由设备(例如,路由器、 交换机等)。如图1所示,客户端设备通过路由器(英文:Router)1、Router2和Router3构成的路由网络接入到任播服务器集群中的服务器(英文:Server)1、Server2。IP任播地址addr0用于标识所述任播服务器集群,为Server1和Server2共用。IP单播地址addr1用于标识Server1,例如可以是Server1上的一个网络接口的IP地址,IP单播地址addr2用于标识Server2,例如可以是Server2上的一个网络接口的IP地址。
IPv6任播地址使用与IPv6单播地址相同的地址空间。除了在IETF RFC2526中定义的保留的子网任播地址(英文:Reserved Subnet Anycast Address)和在RFC4291中定义的子网路由器任播地址(英文:Subnet-Router Anycast Address)外,地址本身并没有明显的特征。当一个单播地址被同时分配到多个接口(同一台或不同的设备)上时,必须通过显式配置来指定是否为IP任播地址。
IPv6任播地址通常配置在多个接口上,用来表示对外提供相同服务的一组服务器。在将IP任播地址作为目的地址时,通过路由选择算法来选择“最近的”设备进行访问,从而实现了分布式服务,具有负载分担、高可靠性的优势。
对于IPv6任播服务,由于IPv6任播地址本质上为IPv6单播地址,因此,可以使用IPv6 ping/tracertIP检测报文对其进行检测,其方法与普通的单播地址检测完全相同。所述客户端设备使用IPv6任播地址为目的IP地址,可以检测IPv6任播服务是否可达。例如图1a所述,所述路由设备通过动态路由协议(或者静态配置路由)生成目的IP为addr0的路由表项,并指导路由设备(Router1、2、3)将客户端设备发送的所述IP检测报文转发到Server1上,Server1正常工作,则IPv6任播服务可达。此时,由于Router1、2、3上的目的IP为addr0的路由表项都指向Server1,如果用户希望检测从所述客户端设备到Server2是否可达,则无法实现。
当Server1故障后,通过路由重新收敛,重新生成目的IP为addr0的路由表项,并指导路由设备将客户端设备发送的IP检测报文转发到Server2上,Server2正常工作,则IPv6任播服务可达。因此,任播服务器集群中只要有一台服务器还能正常工作,通过ping/tracert检测到的任播服务就是可达的,从而任播服务具有高可靠性的好处。但是此时,由于Router1、2、3上的目的IP为addr0的路由表项都指向Server2(即按照路由表项中的出接口转发报文,该报文可以最终到达Server2),如果用户希望检测从所述客户端设备到Server1是否可达,则无法实现。
所以,现有的ping/tracert检测方法用IP任播地址作为目的地址,无法按需、准确地将ping/tracertIP检测报文发送给指定的服务器。进一步,也无法获知所述任播服务器集群中的某台指定服务器是否故障。
值得说明的是,本申请所涉及到的客户端设备为支持IP任播的设备。例如,可以是宽带接入网络中的PC机、便携机、PAD,路由网络中的路由器、交换机,物联网(Internet of Things,IoT)网络中的各种传感器、IoT网关,移动网络中的基站、手机等。本申请所涉及到的所述任播服务器集群可以包括至少两个服务器,图1仅以2个设备为例,但并不构成限定。当然,任播服务器集群也可以为支持IP任播服务的其它网络设备集群,例如,路由器或交换机集群。所述服务器、路由器、交换机可以是物理设备,也可以是基于虚拟化技术实现的虚拟设备(如,虚拟服务器、虚拟路由器、虚拟交换机)。
上面描述了本发明涉及的可能的应用场景,在对本发明实施例进行详细说明之前,先简单说明一下IP段路由技术。IP转发的基本特点是无连接、逐跳转发。IP报文的转发路径完全依赖于路由(静态路由和/或动态路由)的发布和收敛来获得。通常情况下,路由计算系统会选择“最短路径”。但在某些场景下,“最短路径”并不一定符合用户预期,在实施流量工程(Traffic Engineering,TE)时也会遇到一些困难。为了在一定程度上弥补了IP转发机制的上述局限,提出了IP源路由。IP源路由支持在IP报文中直接携带转发路径信息。
在IPv4中,为了支持源路由,在RFC791中定义了宽松源路由(LSRR)选项和严格源路由选项(SSRR)。但受限于IPv4选项40字节的最大空间限制,实用价值有限。
在IPv6中,为了支持源路由,国际互联网工程任务组(Internet Engineering Task Force,IETF)发布的征求意见(英文:Request For Comments,RFC)RFC2460中定义了路由头(Routing Header),并可以通过定义新的路由类型(Routing Type)来增加新的源路由机制。同时,在RFC2460中定义了路由类型为0(type 0)的路由头。Type 0路由头基本与IPv4的LSRR等同,但不再受IPv4选项的40字节空间的限制。
不过,经过深入分析,IETF发现IPv6的type 0路由头存在严重的安全问题,因此,在RFC5095中废弃了type 0路由头的定义,但并未废弃IPv6路由头的机制。
IPv6路由头是一种宽松模式的源路由机制。随着IP网络的深入发展,源路由思想得到了越来越多的重视。为此,IETF成立了spring工作组来实现相关的标准化工作。spring工作组将全新设计的源路由机制称之为段路由(Segment Routing,SR),数据面采用两种方式:MPLS和IPv6。对于IPv6方式的Segment Routing(称为SR IPv6),是通过定义新的IPv6路由头(称为SRH)来实现的,参考:draft-ietf-6man-segment-routing-header-07(该draft由6man工作组定义)。如 图1b所示,SRH扩展头中包括下一个头(Next Header)字段、剩余段数(Segment Left)字段和段列表(Segment List[n])字段。下一个头指示SRH头之后携带的协议头。段列表携带了转发路径上指定需要经过的各个节点(不包括源节点)的IP地址,以数组的形式表达,数组的下标从0至n取值,n为正整数。n+1表达了所述转发路径上除了源节点以外、指定需要经过的节点个数。Segment Left字段指示了该数组的下标。
下面举例对SRH扩展头的处理流程进行说明。网络节点收到一个IP报文后,在判断IP报文头中携带的目的IP地址等于自己的本机IP地址的情况下,会继续判断Segment Left字段的值(简称Segment Left值)是否大于0,如果Segment Left值大于0,则将Segment Left值减1,并用Segment List[减1后的Segment Left值]对应的IP地址替换该IP报文头中的目的IP地址,并用该更新后的目的IP地址查找转发信息库(Forwarding Information Base,FIB)表来进行相应的报文处理。
以图1c所示的网络场景为例,详细阐述携带SRH头的IPv6报文的转发流程。例如,从源节点(IPv6地址为2001:7a:78a::1)向目的节点(IPv6地址为2001:7a:78e::41)发送报文,中间经过3个指定中间节点(所述节点可以为路由器、交换机等网络路由交换设备)和若干个非指定中间节点。指定中间节点是指在从所述源节点到所述目的节点的路径上预先指定必需要经过的节点,非指定中间节点是指在从所述源节点到所述目的节点的路径上不是预先指定必需要经过的节点,而是根据查找IP路由转发表确定的需要经过的节点,其中,假定该3个指定中间节点的IP地址分别为2001:7a:78b::11(第一指定中间节点)、2001:7a:78c::21(第二指定中间节点)和2001:7a:78d::31(第三指定中间节点)。源节点向第一指定中间节点发送携带SRH扩展头的第一IPv6报文,IPv6报文头中的源地址字段为源节点的IPv6地址(为SA=2001:7a:78a::1),目的地址字段为第一指定中间节点的IPv6地址(为DA=2001:7a:78b::11)。SRH扩展头中包括Segment Left(简称SegLeft,且取值为3)和Segment List(简称SegList),其中SegList数组的下标从0至3,SegList[3]至SegList[0]依次表达了该转发路径上指定需要经过的节点的IPv6地址,SegList[3]为该第一指定中间节点的IPv6地址,SegList[2]为该第二指定中间节点的IPv6地址,SegList[1]为该第三指定中间节点的IPv6地址,SegList[0]为该最终的目的节点的IPv6地址。
当该第一指定节点接收到该第一IPv6报文后,发现该第一IPv6报文中携带的DA为自己的IPv6地址,则继续解析SRH扩展头中携带的SegLeft。然后,判断SegLeft(为3)大于0,则将SegLeft减1(为2),并用SegList[SegLeft]=SegList[2]中的IPv6地址(即第二指定中间节点的IPv6地址)刷新所述DA字段的值。用该刷新后 的第二指定中间节点的IPv6地址查找FIB表获得匹配的表项,还生成第二IPv6报文,并按照该匹配的表项继续向该第二指定中间节点发送,所述第二IPv6报文的IPv6报文头中的源地址字段为源节点的IPv6地址(为SA=2001:7a:78a::1),目的地址字段为第二指定中间节点的IPv6地址(为DA=2001:7a:78c::21)。SRH扩展头中包括Segment Left(简称SegLeft,且取值为2)。
当该第二指定中间节点接收到该第二IPv6报文后,与上同理方法处理(为了简洁,此处不再赘述),生成第三IPv6报文继续向该第三指定中间节点发送,所述第三IPv6报文的IPv6报文头中的源地址字段为源节点的IPv6地址(为SA=2001:7a:78a::1),目的地址字段为第三指定中间节点的IPv6地址(为DA=2001:7a:78d::31)。SRH扩展头中包括SegLeft取值为1。
当该第三指定中间节点接收到该第三IPv6报文后,与上同理方法处理(为了简洁,此处不再赘述),生成第四IPv6报文继续向该最终的目的节点发送,所述第四IPv6报文的IPv6报文头中的源地址字段为源节点的IPv6地址(为SA=2001:7a:78a::1),目的地址字段为该最终的目的节点的IPv6地址(为DA=2001:7a:78e::41)。SRH扩展头中包括SegLeft取值为0。
当该最终的目的节点接收到该第四IPv6报文后,发现该第四IPv6报文中携带的DA为自己的IPv6地址,则继续解析SRH扩展头中携带的SegLeft。然后,判断SegLeft(为0)等于0,则忽略SRH的处理,继续IPv6的其余部分处理。
以上描述了本发明涉及的可能的应用场景和段路由技术,下面将基于此对本发明实施例进一步详细说明。
图2为本发明实施例提供的一种发送报文的方法流程示意图。该方法应用于基于任播服务的网络中,所述网络包括客户端设备和任播服务器集群,所述任播服务器集群包括目标服务器。
本发明实施例提供的方案包括201、202、203、204、205、206和207部分,下面分别说明。
在201部分,所述客户端设备获得所述任播服务器集群的IP任播地址和所述目标服务器的IP单播地址。
所述任播服务器集群的IP任播地址和所述目标服务器的IP单播地址可以是网络管理员通过命令行配置在该客户端设备上的;也可以是该客户端设备接收其它控制管理设备发来的消息,从该消息中获得的。
在一个具体的实施方式中,在检测发起设备(客户端设备)上,执行如下形式的 命令行:
ping ip–exh<addr0><server1-addr>
或者:
tracert ip–exh<addr0><server1-addr>
其中,–exh<addr0>为新增可选参数,用来指示在IP检测报文中携带扩展字段,该扩展字段也可以是一个扩展头,<addr0>为在扩展字段中封装的任播地址。<server1-addr>为被检测的任播服务器集群中的某个server(例如Server1)上的非任播的、用来标识该server的IP地址,如该sever上的某个接口的IP地址或者该sever的管理IP地址。
通过命令行配置或者接收控制管理设备发来的配置参数,可以灵活、按需的指定任播服务器集群里的待检测的服务器。
在另一个具体的实施方式中,所述客户端设备还获得从所述客户端设备到所述目标服务器的转发路径上的至少一个指定中间节点的IP单播地址,则在检测发起设备(客户端设备)上,执行如下形式的命令行:
ping ip–exh<addr0><server1-addr>-designate_middlenodes<node1,…,nodeN>
或者:
tracert ip–exh<addr0><server1-addr>-designate_middlenode<node1,…,nodeN>
其中,-designate_middlenodes为新增可选参数,用来指示IP检测报文需要依次经过N个指定的中间节点node1,…,nodeN,N为大于等于1的正整数。
需要说明的是,-exh只是一个示例,用来表示报文中需要新增一个扩展字段,并不进行任何限定,例如,如果扩展字段是SRH扩展头时,此时-exh可以为–srh。同理,-designate_middlenode也只是一个示例,用来表示报文中需要新增一个扩展字段,并不进行任何限定。
还需要说明的是,上述命令行中的ip可以是IPv4,也可以是IPv6,此处不做限定。
通过命令行配置或者接收控制管理设备发来的配置参数,来指定检测路径上需要经过的中间节点,可以灵活、按需的指定待检测路径需要经过的中间节点以及任播服务器集群里的待检测的服务器。
在202部分,所述客户端设备生成IP检测报文,所述IP检测报文用于检测所述目标服务器的IP任播地址是否可达,所述IP检测报文包括所述IP任播地址和所述目标服务器的IP单播地址,并且指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址。
所述IP检测报文为用于进行IP可达性检测的报文,例如,ping或者tracert报文,ping或者tracert报文封装在IP报文的载荷(英文:payload)部分。
在一个具体的实施方式中,在从所述客户端设备到所述目标服务器的路径上不包括指定中间节点的情况下,所述IP检测报文中的目的IP地址字段(即IP报文头中的目的IP地址字段)携带所述目标服务器的IP单播地址。所述IP检测报文通过携带段路由头(英文:Segment Routing Header,SRH)来携带所述IP任播地址,并且指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址。
具体地,所述IP检测报文中的段路由头SRH中的段列表字段携带所述IP任播地址,且所述SRH中的剩余段数SegLeft字段的值为1,指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址。下文图3部分会举例详细介绍具体的流程。需要说明的是,SegLeft字段的值设置为指定中间节点的个数加1,在没有指定中间节点的情况下,指定中间节点的个数为0,加1后为1,所以,SegLeft字段的值为1。
通过在IP检测报文中携带SRH来携带IP任播地址,并用Segleft值为1指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址,可以简捷地实现准确的发送IP检测报文到任播服务器集群里的某台服务器的IP任播地址。
在另一个具体的实施方式中,在从所述客户端设备到所述目标服务器的路径上包括指定中间节点的情况下,所述SRH中的SegLeft字段的值为所述指定经过中间节点的个数加1,所述IP检测报文每经过1个中间节点,该SegLeft值会减1,IP检测报文到达所述目标服务器是,SegLeft的值为1指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址。下文图4部分会详细介绍具体的流程。
通过在IP检测报文中携带SRH来携带IP任播地址、指定中间节点和目标服务器的IP单播地址,并用Segleft值为1时指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址,可以利用简捷地实现经过指定的中间节点、并准确发送IP检测报文到任播服务器集群里的某台服务器的IP任播地址。
在203部分,所述客户端设备向所述目标服务器发送所述IP检测报文。
通过在IP检测报文中携带IP任播地址和所述目标服务器的IP单播地址,并且 指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址,有助于准确地实现对指定的任播服务器的IP任播地址可达性进行检测。
在204部分,所述目标服务器接收到所述IP检测报文,解析出封装IP检测报文的IP头中携带的目的IP地址为自己的本机IP单播地址,并根据用所述IP任播地址替换所述目标服务器的IP单播地址的指示,执行用所述IP任播地址替换所述目标服务器的IP单播地址。
在205部分,所述目标服务器继续进行IP检测报文的协议处理,生成响应报文。
在206部分,所述目标服务器向所述客户端设备发送所述响应报文。
在207部分,在所述客户端设备在预定的时间间隔内收到所述响应报文的情况下,确认所述目标服务器的IP任播地址可达。
在一种可能的实施例中,在所述客户端设备在预定的时间间隔内未收到所述响应报文的情况下,确认所述目标服务器的IP任播地址不可达,例如,发生了故障。
通过根据在预定的时间间隔内是否能收到IP检测的响应报文,可以准确地确认所述目标服务器的IP任播地址是否可达(例如,是否故障)。
以图1a所示的网络场景为例阐述上面201-207部分。客户端设备(即检测发起设备)需要检测任播服务器集群中的server1是否正常工作,则在客户端设备上发起IPv6 Ping检测。IPv6 Ping检测可以有两种方式,一种是不指定中间节点的方式,另一种是指定中间节点的方式。
首先结合图3详细说明不指定中间节点的报文转发流程。客户端设备执行如下形式的命令行:
ping ipv6–srh<addr0><addr1>
其中,–srh<addr0>用来指示在IP检测报文中携带SRH扩展头,并在SRH中的SegmentList字段中携带任播地址addr0。例如,如图3所示,将Segment Left字段的值设置为1,在SegmentList[0]字段中携带addr0。在IPv6的报文头中的目的地址字段携带Addr1,Add1为被检测的任播服务器集群中的Server1上的非任播的、用来标识server1的IP地址。在SRH头的下一个头字段中指示IGMP协议,即IPv6报文中可以继续封装Ping报文。add1为被检测的任播服务器集群中的Server1上的非任播的、用来标识server1的IP单播地址。
客户端设备生成用于进行ping检测的所述IPv6报文,因为所述IPv6报文中的SRH中的Segment Left值为1,大于0,所以意味着在目标服务器的IP地址为addr1 时,将继续解析SRH头,并将SRH头中的Segment Left值减1,用Segment List[减1后的Segment Left值](=Segment List[0]=addr0)对应的IP地址替换该IPv6报文头中的目的IP地址,也就是用addr0替换IPv6报文头中的addr1。
客户端设备将所述IPv6报文向server1发送。该IPv6报文在R1、R2、R3形成的网络中,通过查找目的IP地址addr1对应的路由转发表项,经过R1和R2,到达server1。
Server1收到所述所述IPv6报文后,解析发现该IPv6报文中携带的DA(addr1)为自己的IPv6地址,则继续解析SRH扩展头中携带的SegLeft。SegLeft值=1,大于0,所以意味着在目标服务器的IP地址为addr1时,将继续解析SRH头,并将SRH头中的Segment Left值减1,用Segment List[减1后的SegmentLeft值](=Segment List[0]=addr0)对应的IP地址替换该IPv6报文头中的目的IP地址,也就是用addr0替换IPv6报文头中的addr1。
Server1继续进行Ping检测报文的协议处理,生成响应报文发送给所述客户端设备。所述客户端设备收到所述响应报文后,确定所述目标服务器可达。
根据addr1作为目的地址在Router1和Router2上查找FIB表转发,会将Ping检测报文,发送到Server1。在Server1故障的情况下,Server1则无法接收并处理所述IPv6报文,则无法生成并向所述客户端设备发送所述响应报文,因此,当所述客户端设备在一定时间间隔或周期内,未能收到Server1的响应报文,则确认Server1不可达,有可能发生了故障。
需要说明的是,Segment List数组中可以携带addr1(如图3所示),也可以不携带addr1,同样能够实现相同的功能。
其次,再结合图4详细说明另一种指定中间节点的报文转发流程。客户端设备执行如下形式的命令行:
ping ipv6–srh<addr0><addr1>-designate_middlenode<addr3,addr2>
其中,–srh<addr0>用来指示在IP检测报文中携带SRH扩展头,并在SRH中的SegmentList字段中携带任播地址addr0。-designate_nodes<addr3,addr2>用来指示Ping检测需要依次经过两个指定的中间节点addr3(Router1)和addr2(Router2)。例如,如图4所示,按照指定中间节点的数量(为2)加1等于3,将Segment Left字段的值设置为3(也就是SRH头中需要携带4个地址),在SegmentList[0]字段中携带addr0,SegmentList[1]字段中携带addr1,SegmentList[2]字段中携带addr2, SegmentList[3]字段中携带addr3。在IPv6的报文头中的目的地址字段(DA)携带addr3,addr3为第一个中间节点Router1的IP地址。在SRH头的下一个头字段中指示IGMP协议,即IPv6报文中可以继续封装Ping报文。
客户端设备生成用于进行ping检测的第一IPv6报文发往所述Router1,Router1收到后,进行SRH转发处理,生成第二IPv6报文,继续发往第二中间节点Router2,Router2进行SRH转发处理,生成第三IPv6报文,继续发往目的节点(目标服务器server1),在Router1、Router2上SRH的转发处理流程,与上述图1c所述的转发流程原理一致,请参见,为了简洁,不再赘述。
Server1收到所述第三IPv6报文后,解析发现该第三IPv6报文中携带的DA(addr1)为自己的IPv6地址,则继续解析SRH扩展头中携带的SegLeft。SegLeft值=1,大于0,所以意味着在目标服务器的IP地址为addr1时,将继续解析SRH头,并将SRH头中的Segment Left值减1,用Segment List[减1后的Segment Left值](=Segment List[0]=addr0)对应的IP地址替换该IPv6报文头中的目的IP地址,也就是用addr0替换IPv6报文头中的addr1。
后续Server1的处理,与上述图3部分一致,请参考,为了简洁,不再赘述。
需要说明的是,本发明中有关SRH扩展报文头的细节,请参考国际互联网工程任务组(Internet Engineering Task Force,IETF)发布的文稿draft-ietf-6man-segment-routing-header-07,该文档与此相关部分的内容好像整体复制一般以引入的方式并入本文本中,此处为了简洁,不再赘述。
还需要说明的是,本文中的出现的IP地址,如无特殊说明,均指IP单播地址。
图5a示出了上述实施例中所涉及的客户端设备的一种可能的结构示意图。客户端设备500A应用于基于任播服务的网络中,所述网络包括客户端设备和任播服务器集群,所述任播服务器集群包括至少两个服务器,所述至少两个服务器具有相同的互联网IP任播地址。客户端设备500A包括:主控板510、接口板530、交换网板520和接口板540。主控板510用于完成系统管理、设备维护、协议处理等功能。交换网板520用于完成各接口板(接口板也称为线卡或业务板)之间的数据交换。接口板530和540用于提供各种业务接口(例如,以太网接口、POS接口等),并实现数据包的转发。主控板510、接口板530和540,以及交换网板520之间通过系统总线与系统背板相连实现互通。接口板530上的中央处理器531用于对接口板进行控制管理并与主控板510上的中央处理器511进行通信。主控板510上的中央处理器511还用于获得所述任播 服务器集群的互联网协议IP任播地址和所述目标服务器的IP单播地址,并生成IP检测报文,所述IP检测报文用于检测所述目标服务器的IP任播地址是否可达,所述IP检测报文包括所述IP任播地址和所述目标服务器的IP单播地址,并且指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址。
在一种可能的实施例中,在从所述客户端设备到所述目标服务器的路径上不包括指定中间节点的情况下,所述IP检测报文中的目的IP地址字段携带所述目标服务器的IP单播地址,所述IP检测报文中的IP段路由头SRH中的段列表字段携带所述IP任播地址,且所述IP SRH中的剩余段数SegLeft字段的值为1,所述SegLeft字段的值指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址。
在另一种可能的实施例中,在从所述客户端设备到所述目标服务器的路径上包括指定中间节点的情况下,所述主控板510上的中央处理器511还获得从所述客户端设备到所述目标服务器的转发路径上的至少一个指定中间节点的IP单播地址。所述IP检测报文中的目的IP地址字段携带第一指定中间节点的IP单播地址,所述第一指定中间节点为所述从所述客户端设备到所述目标服务器的转发路径上的第一个指定中间节点。所述IP检测报文中的IP段路由头SRH中的段列表字段携带所述IP任播地址、所述目标服务器的IP单播地址和所述至少一个指定中间节点的IP单播地址,且所述IP SRH中的SegLeft字段的值为所述指定中间节点的个数加2,所述SegLeft字段的值指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址。
主控板510上的中央处理器511使用所述IP检测报文的所述目的IP地址查询本地路由表,找到出接口所在接口板530,然后将所述IP检测报文下发给中央处理器531。
中央处理器531通过查询转发表项存储器534,对所述IP检测报文进行内部适配处理(例如:接口索引的转换等)后,下发给网络处理器532。
网络处理器532:根据出接口等信息,在完成链路层封装后,将所述IP检测报文从物理接口卡533发送出去。
在物理接口卡533在预定的时间间隔内收到所述目标服务器发来的响应报文,并发送给网络处理器532,网络处理器532根据查找转发表项存储器534的结果,将该响应报文通过中央处理器531上送到主控板510的情况下,中央处理器511确认所述目标服务器的IP任播地址可达;
在主控板510的中央处理器511在预定的时间间隔内未收到所述目标服务器发来的响应报文的情况下,中央处理器511确认所述目标服务器的IP任播地址不可达。
应理解,本发明实施例中接口板540上的操作与所述接口板530的操作一致,为了简洁,不再赘述。应理解,本实施例的客户端设备500A可对应于上述图1至图4所对应的实施例中的客户端设备,该客户端设备500A中的主控板510、接口板530和/或540可以实现图1至图4所对应的实施例中的客户端设备所具有的功能和/或所实施的各种步骤,为了简洁,在此不再赘述。
值得说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,转发设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,转发设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,转发设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的转发设备的数据接入和处理能力要大于集中式架构的设备。可选地,转发设备500A的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态设备的数据交换和处理能力较低(例如,低端交换机或路由器等网络设备)。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。
图5b示出了上述实施例中所涉及的客户端设备的另一种可能的结构示意图。客户端设备500B应用于基于任播服务的网络中,所述网络包括客户端设备和任播服务器集群,所述任播服务器集群包括至少两个服务器,所述至少两个服务器具有相同的互联网IP任播地址。客户端设备500B包括:处理单元504B、获取单元502B和收发单元506B。
获取单元502B用于获得所述任播服务器集群的互联网协议IP任播地址和所述目标服务器的IP单播地址。处理单元504B用于生成IP检测报文,所述IP检测报文用于检测所述目标服务器的IP任播地址是否可达,所述IP检测报文包括所述IP任播地址和所述目标服务器的IP单播地址,并且指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址。收发单元506B用于向所述目标服务器发送所述IP检测报文。
在一个具体的实施方式中,在从所述客户端设备到所述目标服务器的路径上不包括指定中间节点的情况下,所述获取单元502B还用于通过用户配置的命令行获得所述IP任播地址和所述目标服务器的IP单播地址;或者所述获取单元502B还用于接收控 制管理设备发来的消息,从所述消息中获得所述IP任播地址和所述目标服务器的IP单播地址。
相应地,所述IP检测报文通过携带SRH头来携带相关的信息的方法与上文202部分描述的一致,请参考相关内容,不再赘述。
在另一个具体的实施方式中,在从所述客户端设备到所述目标服务器的路径上包括指定中间节点的情况下,所述获取单元502B还用于获得从所述客户端设备到所述目标服务器的转发路径上的至少一个指定中间节点的IP单播地址。所述获取单元502B还用于通过用户配置的命令行获得所述至少一个指定中间节点的IP单播地址;或者所述获取单元502B还用于接收控制管理设备发来的消息,从所述消息中获得所述至少一个指定中间节点的IP单播地址。
相应地,所述IP检测报文通过携带SRH头来携带相关的信息的方法与上文202部分描述的一致,请参考相关内容,不再赘述。
在所述收发单元506B在预定的时间间隔内收到所述目标服务器发来的响应报文的情况下,所述处理单元504B确认所述目标服务器的IP任播地址可达;
在所述收发单元506B在预定的时间间隔内未收到所述目标服务器发来的响应报文的情况下,所述处理单元504B确认所述目标服务器的IP任播地址不可达。
本发明实施例的客户端设备500B可对应于上述发送报文的方法实施例中的客户端设备,并且,该客户端设备500B中的各模块和上述其他操作和/或功能分别为了实现图1至图4所对应的实施例中的客户端设备所实施的各种步骤和方法,为了简洁,在此不再赘述。
图5c示出了上述实施例中所涉及的客户端设备的一种可能的结构示意图。客户端设备500C应用于基于任播服务的网络中,所述网络包括客户端设备和任播服务器集群,所述任播服务器集群包括至少两个服务器,所述至少两个服务器具有相同的互联网IP任播地址。客户端设备500C包括:收发器510C、处理器520C、随机存取存储器540 C、只读存储器550 C以及总线560 C。其中,处理器520 C通过总线560 C分别耦接收发器510 C、随机存取存储器540 C以及只读存储器550 C。其中,当需要运行转发设备500 C时,通过固化在只读存储器550 C中的基本输入输出系统或者嵌入式系统中的bootloader引导系统进行启动,引导转发设备500 C进入正常运行状态。在转发设备500 C进入正常运行状态后,在随机存取存储器540 C中运行应用程序和操 作系统,使得:
处理器520 C用于获得所述任播服务器集群的互联网协议IP任播地址和所述目标服务器的IP单播地址,并生成IP检测报文,所述IP检测报文用于检测所述至少两个服务器中的目标服务器的任播地址是否可达,所述IP检测报文包括所述IP任播地址和所述目标服务器的IP单播地址,并且指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址。收发器510C用于向所述目标服务器发送所述IP检测报文。
本发明实施例的转发设备500C可对应于上述图1至图4所对应的实施例中的客户端设备,并且,该客户端设备500C中的处理器520C、收发器510C等可以实现图1至图4所对应的实施例中的客户端设备所具有的功能和/或所实施的各种步骤和方法。所述处理器520C用于执行图5b所述客户端设备的处理单元504B和获取单元502B的所有操作,所述收发器510C用于执行图5b所述客户端设备的收发单元506B的所有操作。为了简洁,在此不再赘述。
需要说明的是,本实施例也可以基于通用的物理服务器结合网络功能虚拟化(英文:Network Function Virtualization,NFV)技术实现的客户端设备,所述客户端设备为虚拟客户端设备(如,虚拟主机、虚拟路由器或虚拟交换机)。所述虚拟客户端设备可以是运行有用于发送报文功能的程序的虚拟机(英文:Virtual Machine,VM),所述虚拟机部署在硬件设备上(例如,物理服务器)。虚拟机指通过软件模拟的具有完整硬件系统功能的、运行在一个完全隔离环境中的完整计算机系统。本领域技术人员通过阅读本申请即可结合NFV技术在通用物理服务器上虚拟出具有上述功能的多个转发设备。此处不再赘述。
应理解,本领域技术人员在阅读本申请文件的基础上,可以针对本申请实施例中所描述的可选的特征、步骤或方法进行不需要付出创造性的组合,都属于本申请公开的实施例,只是由于描述或行文的简单没有重复赘述不同组合。
应理解,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
应理解,在本发明的各种实施例中,上述各过程的序号的大小并不意味着执行顺 序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。
Figure PCTCN2018099413-appb-000001
Figure PCTCN2018099413-appb-000002
Figure PCTCN2018099413-appb-000003

Claims (3)

  1. 在所述收发单元在预定的时间间隔内收到所述目标服务器发来的响应报文的情况下,所述处理单元确认所述目标服务器的IP任播地址可达;
    在所述收发单元在预定的时间间隔内未收到所述目标服务器发来的响应报文的情况下,所述处理单元确认所述目标服务器的IP任播地址不可达,所述响应报文为针对所述IP检测报文的响应报文。
  2. 一种客户端设备,其特征在于,应用于基于任播服务的网络中,所述网络包括客户端设备和任播服务器集群,所述任播服务器集群包括至少两个服务器,所述至少两个服务器具有相同的互联网IP任播地址,所述客户端设备包括:
    处理器,用于获得所述任播服务器集群的互联网协议IP任播地址和所述至少两个服务器中的目标服务器的IP单播地址;
    所述处理器,还用于生成IP检测报文,所述IP检测报文用于检测所述目标服务器的IP任播地址是否可达,所述IP检测报文包括所述IP任播地址和所述目标服务器的IP单播地址,并且指示所述目标服务器用所述IP任播地址替换所述目标服务器的IP单播地址;
    收发器,用于向所述目标服务器发送所述IP检测报文。
  3. 一种计算机可读介质,包括指令,当其在计算机上运行时,使得计算机执行如权利要求1至6任意一项所述的方法。
PCT/CN2018/099413 2017-10-27 2018-08-08 一种发送报文的方法和设备 WO2019080592A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP18871473.7A EP3694145B1 (en) 2017-10-27 2018-08-08 Method and device for sending messages
US16/857,825 US11265287B2 (en) 2017-10-27 2020-04-24 Packet sending method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711025021.9 2017-10-27
CN201711025021.9A CN109728962B (zh) 2017-10-27 2017-10-27 一种发送报文的方法和设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/857,825 Continuation US11265287B2 (en) 2017-10-27 2020-04-24 Packet sending method and device

Publications (1)

Publication Number Publication Date
WO2019080592A1 true WO2019080592A1 (zh) 2019-05-02

Family

ID=66247164

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/099413 WO2019080592A1 (zh) 2017-10-27 2018-08-08 一种发送报文的方法和设备

Country Status (4)

Country Link
US (1) US11265287B2 (zh)
EP (1) EP3694145B1 (zh)
CN (1) CN109728962B (zh)
WO (1) WO2019080592A1 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111988266B (zh) * 2019-05-24 2022-05-17 华为技术有限公司 一种处理报文的方法
CN112448891B (zh) * 2019-09-02 2022-10-04 中国电信股份有限公司 业务链实现方法和系统、业务分类器和业务功能节点
CN111130930B (zh) * 2019-12-16 2022-11-01 杭州迪普科技股份有限公司 双网卡检测方法和装置
CN111314200B (zh) * 2020-02-29 2023-10-20 新华三技术有限公司 一种报文转发方法及装置
US11502954B1 (en) * 2020-12-04 2022-11-15 Juniper Networks, Inc. Processing segment routing packets with two policy processing instructions in a segment routing domain
CN113438166B (zh) * 2021-06-25 2022-07-22 新华三信息安全技术有限公司 一种任播地址确定方法、装置、网络设备及存储介质
CN116996435A (zh) * 2022-04-25 2023-11-03 华为技术有限公司 一种报文处理方法及装置
CN114979090B (zh) * 2022-05-27 2024-07-05 深圳市领创星通科技有限公司 IPv6数据包处理方法、装置、计算机设备和存储介质
CN116232869B (zh) * 2023-05-10 2023-07-25 明阳时创(北京)科技有限公司 一种跨协议栈网络故障定位方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729307A (zh) * 2008-10-25 2010-06-09 华为技术有限公司 一种故障检测方法、通信设备及网络系统
WO2011044729A1 (zh) * 2009-10-14 2011-04-21 上海贝尔股份有限公司 通信网络中用于检测任意播组配置情况的方法和装置
CN102761618A (zh) * 2012-07-03 2012-10-31 杭州华三通信技术有限公司 实现负载均衡的方法、设备及系统
US20170126569A1 (en) * 2014-06-12 2017-05-04 Convida Wireless, Llc Enhanced neighbor discovery to support load balancing

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7512702B1 (en) * 2002-03-19 2009-03-31 Cisco Technology, Inc. Method and apparatus providing highly scalable server load balancing
US7047315B1 (en) * 2002-03-19 2006-05-16 Cisco Technology, Inc. Method providing server affinity and client stickiness in a server load balancing device without TCP termination and without keeping flow states
JP4019880B2 (ja) 2002-09-26 2007-12-12 株式会社日立製作所 サーバ装置
DE602006004338D1 (de) * 2006-08-04 2009-01-29 Alcatel Lucent Vorrichtung, Modul und Verfahren zur Leitweglenkung für ein Zugangsnetz
US20080123640A1 (en) * 2006-09-20 2008-05-29 Ravideep Bhatia Method for discovering outbound sip proxy server
WO2010014912A2 (en) 2008-07-31 2010-02-04 Tekelec Methods, systems, and computer readable media for providing sedation service in a telecommunications network
US9137202B2 (en) * 2011-06-09 2015-09-15 At&T Intellectual Property I, L.P. System and method for dynamically adapting network delivery modes of content
WO2014205786A1 (zh) * 2013-06-28 2014-12-31 华为技术有限公司 任播服务注册、实现方法及装置、交换设备和系统
US9800497B2 (en) * 2015-05-27 2017-10-24 Cisco Technology, Inc. Operations, administration and management (OAM) in overlay data center environments
US10454758B2 (en) * 2016-08-31 2019-10-22 Nicira, Inc. Edge node cluster network redundancy and fast convergence using an underlay anycast VTEP IP

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729307A (zh) * 2008-10-25 2010-06-09 华为技术有限公司 一种故障检测方法、通信设备及网络系统
WO2011044729A1 (zh) * 2009-10-14 2011-04-21 上海贝尔股份有限公司 通信网络中用于检测任意播组配置情况的方法和装置
CN102761618A (zh) * 2012-07-03 2012-10-31 杭州华三通信技术有限公司 实现负载均衡的方法、设备及系统
US20170126569A1 (en) * 2014-06-12 2017-05-04 Convida Wireless, Llc Enhanced neighbor discovery to support load balancing

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
CN109728962B (zh) 2021-12-21
US20200252366A1 (en) 2020-08-06
EP3694145A1 (en) 2020-08-12
EP3694145B1 (en) 2022-10-19
EP3694145A4 (en) 2020-12-02
CN109728962A (zh) 2019-05-07
US11265287B2 (en) 2022-03-01

Similar Documents

Publication Publication Date Title
WO2019080592A1 (zh) 一种发送报文的方法和设备
CN108574616B (zh) 一种处理路由的方法、设备及系统
JP7209820B2 (ja) SRv6トンネル情報を取得するための方法、デバイスおよびシステム
US10469444B2 (en) System and method for direct connections between previously unconnected network devices across one or more unknown networks
JP5131651B2 (ja) 負荷分散システム、負荷分散方法、及びプログラム
EP3225014B1 (en) Source ip address transparency systems and methods
CN109768908B (zh) 一种vxlan的配置方法、设备及系统
CN112654049B (zh) 用于配置无线通信覆盖扩展系统的方法、系统、节点和介质
CN112671938B (zh) 业务服务提供方法及系统、远端加速网关
WO2017067577A1 (en) Direct replying actions in sdn switches
CN117083843A (zh) 利用多播侦听者发现来发现主机
JP2021534669A (ja) パケット処理方法およびゲートウェイ・デバイス
CN107733930B (zh) 用于在多个wan网络网关处转发互联网协议(ip)数据包的方法和系统
US20080205376A1 (en) Redundant router having load sharing functionality
Wahyudi et al. Performance Analysis of Routing Enhanced Interior Gateway Routing Protocol Load Balancing for IPv6
WO2018112835A1 (zh) 选择网关的方法、设备和系统
JP2024524833A (ja) メッセージ処理方法、装置、ネットワークデバイス及び媒体
CN110545240B (zh) 基于分布式聚合系统的标签转发表的建立及报文转发方法
US10931565B2 (en) Multi-VRF and multi-service insertion on edge gateway virtual machines
WO2022143572A1 (zh) 一种报文处理方法及相关设备
WO2022161061A1 (zh) 一种故障检测方法、网络设备及系统
Hamarsheh Examining the impact of link failures and network performance on a 6to4, 6rd, CHANC and D4across6 tunneling-based networks using various routing protocols
CN114827027A (zh) 一种报文处理方法及相关装置
CN116366593A (zh) 报文转发方法及相关装置
CN116743861A (zh) 一种组播加入方法及相关设备

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: 18871473

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018871473

Country of ref document: EP

Effective date: 20200508