WO2013189346A2 - Multicast address conversion method and device - Google Patents

Multicast address conversion method and device Download PDF

Info

Publication number
WO2013189346A2
WO2013189346A2 PCT/CN2013/081651 CN2013081651W WO2013189346A2 WO 2013189346 A2 WO2013189346 A2 WO 2013189346A2 CN 2013081651 W CN2013081651 W CN 2013081651W WO 2013189346 A2 WO2013189346 A2 WO 2013189346A2
Authority
WO
WIPO (PCT)
Prior art keywords
multicast address
ipv4
ipv6
ipv4 multicast
offset position
Prior art date
Application number
PCT/CN2013/081651
Other languages
French (fr)
Chinese (zh)
Other versions
WO2013189346A3 (en
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 中兴通讯股份有限公司
Publication of WO2013189346A2 publication Critical patent/WO2013189346A2/en
Publication of WO2013189346A3 publication Critical patent/WO2013189346A3/en

Links

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and an apparatus for converting a multicast address.
  • IPv4 Internet Protocol version 4
  • IPv6 Internet Protocol version 4
  • IPTV Internet Protocol Television
  • video on demand video on demand
  • video conferencing video conferencing
  • emerging modes such as mobile terminal advertising, online stores, and cloud computing. Therefore, how to solve the multicast application problem in the transition network environment becomes very necessary.
  • the parties use the tunnel and translation technologies to solve the multicast problem in the transition scenario.
  • the conversion relationship between the IPv4 multicast address and the IPv6 multicast address needs to be established. For multicast communication, the conversion of multicast addresses between IPv4 and IPv6 becomes the application basis.
  • the conversion method between the IPv4 multicast address and the IPv6 multicast address in the related art is mainly the conversion method specified in the draft draft-ietf-mboned-64-multicast-address-format.
  • the ASM Any Source Multicast
  • FFXX:8000::/20 the SSM (Source Specific Multicast) prefix FF3X:0:8000::/96 are defined.
  • the address is used as the last 32 bits of the IPv6 multicast address, and is combined with the defined multicast prefix to perform multicast address translation.
  • This method of multicast address translation is simple and easy to implement, but it has certain disadvantages: Because the IPv6 multicast prefix used is fixed, there is a unified prefix for the ASM multicast address and the SSM multicast address, and the IPv4 address is not distinguished. Scope, so all IPv4 SSM multicast addresses are mapped to the same IPv6 SSM multicast prefix. All IPv4 ASM multicast addresses are mapped to the same IPv6 ASM multicast prefix. Take the ASM multicast address as an example. That is, if a fixed IPv6 ASM prefix is used on the device, all IPv4 ASM multicast addresses are translated into a unified multicast address with an IPv6 ASM multicast prefix.
  • IPv6 multicast prefix can be up to 96 bits because at least 32 bits are reserved for IPv4 multicast addresses.
  • the multicast address translation method in the related art cannot make good use of the IPv6 multicast address space, and can not more accurately divide the IPv4 multicast address space and the IPv6 multicast address space, and the application is diverse and flexible. There is a lack of sex and safety.
  • the embodiment of the invention provides a method and a device for converting a multicast address, which can better utilize an IPv6 address space to implement conversion between an IPv4 multicast address and an IPv6 multicast address in the network.
  • An embodiment of the present invention provides a method for converting a multicast address, including:
  • the conversion rule includes a multicast address prefix, an IPv4 multicast address type, and an IPv4 multicast address offset position;
  • the conversion rule when the multicast address to be converted is an Internet Protocol version 4 (IPv4) multicast address, the conversion rule includes an Internet Protocol version 6 (IPv6) multicast address prefix and an IPv4 multicast address prefix;
  • IPv4 Internet Protocol version 4
  • the step of converting the multicast address to the target multicast address according to the conversion rule includes:
  • IPv6 multicast address prefix is placed at the beginning of the IPv6 multicast address
  • IPv4 multicast address suffix is placed at the position indicated by the IPv4 multicast address offset position, and other empty positions are 0, forming a target IPv6 multicast. address.
  • the IPv4 multicast address offset location indicates that the location parameter is offset from the IPv4 multicast address in the IPv6 multicast address.
  • the latter bit of the defined starting offset position begins to place the IPv4 multicast address suffix; and when the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast The address offset location indicates placement of the IPv4 multicast address suffix at the last location of the IPv6 multicast address.
  • the conversion rule when the multicast address to be converted is an IPv4 multicast address, the conversion rule includes an IPv6 multicast address prefix and an IPv4 multicast address prefix.
  • the step of converting the multicast address to the target multicast address according to the conversion rule includes:
  • IPv6 multicast address prefix is placed at the beginning of the IPv6 multicast address
  • IPv4 multicast address is placed at the location indicated by the IPv4 multicast address offset location, and other empty locations are 0, forming the target IPv6 group. Broadcast address.
  • the IPv4 multicast address offset location indicates that the location parameter is offset from the IPv4 multicast address in the IPv6 multicast address.
  • the next bit of the defined starting offset position begins to place the IPv4 multicast address
  • the IPv4 multicast address offset location indicates that the IPv4 multicast address is placed in the last 32 bits of the IPv6 multicast address.
  • the conversion rule when the multicast address to be converted is an IPv6 multicast address, the conversion rule includes an IPv4 multicast address prefix;
  • the step of converting the multicast address to the target multicast address according to the conversion rule includes:
  • the IPv4 multicast address suffix according to the length of the IPv4 multicast address suffix at a location indicated by the IPv6 multicast address offset location;
  • IPv4 multicast address prefix and the IPv4 multicast address suffix are spliced to form a target IPv4 multicast address.
  • the IPv4 multicast address offset location indicates that the IPv4 multicast address offset bit is in the IPv6 multicast address.
  • the next bit of the starting offset position defined by the parameter starts to acquire the IPv4 multicast address suffix; and when the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location Instructing to obtain the IPv4 multicast address suffix at the last location of the IPv6 multicast address.
  • the conversion rule when the multicast address to be converted is an IPv6 multicast address, the conversion rule includes an IPv4 multicast address prefix;
  • the step of converting the multicast address into a target multicast address according to the conversion rule includes: in the IPv6 group In the broadcast address, a 32-bit address is acquired as the target IPv4 multicast address at the location indicated by the IPv6 multicast address offset position.
  • the conversion rule includes an IPv4 multicast address offset location parameter
  • the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter. The next bit of the starting offset position begins to acquire the IPv4 multicast address;
  • the IPv4 multicast address offset location indicates that the IPv4 multicast address is obtained in the last 32 bits of the IPv6 multicast address.
  • the embodiment of the present invention further provides a device for converting a multicast address that implements the foregoing method, including: an obtaining module, configured to: obtain a conversion rule corresponding to a multicast address to be converted, where the conversion rule includes multicast Address prefix, IPv4 multicast address type, and IPv4 multicast address offset location;
  • a conversion module configured to: convert the multicast address to a target multicast address according to the conversion rule.
  • the conversion rule when the multicast address to be converted is an Internet Protocol version 4 (IPv4) multicast address, the conversion rule includes an Internet Protocol version 6 (IPv6) multicast address prefix and an IPv4 multicast address prefix;
  • IPv4 Internet Protocol version 4
  • the converting module converts the multicast address into a target multicast address according to the conversion rule by:
  • IPv6 multicast address prefix is placed at the beginning of the IPv6 multicast address
  • IPv4 multicast address suffix is placed at the position indicated by the IPv4 multicast address offset position, and other empty positions are 0, forming a target IPv6 multicast. address.
  • the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter.
  • the next bit of the initial offset position begins to place the IPv4 multicast address suffix; and when the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication
  • the IPv4 multicast address suffix is placed at the last position of the IPv6 multicast address.
  • the conversion rule when the multicast address to be converted is an IPv4 multicast address, the conversion rule includes an IPv6 multicast address prefix and an IPv4 multicast address prefix;
  • the converting module converts the multicast address into a target multicast address according to the conversion rule by:
  • IPv6 multicast address prefix is placed at the beginning of the IPv6 multicast address
  • IPv4 multicast address is placed at the location indicated by the IPv4 multicast address offset location, and other empty locations are 0, forming the target IPv6 group. Broadcast address.
  • the conversion rule when the conversion rule includes an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter. The next bit of the starting offset position begins to place the IPv4 multicast address;
  • the IPv4 multicast address offset location indicates that the IPv4 multicast address is placed in the last 32 bits of the IPv6 multicast address.
  • the conversion rule when the multicast address to be converted is an IPv6 multicast address, the conversion rule includes an IPv4 multicast address prefix;
  • the converting module converts the multicast address into a target multicast address according to the conversion rule by: Calculating a length of the IPv4 multicast address suffix according to the length of the IPv4 multicast address prefix;
  • the IPv4 multicast address suffix according to the length of the IPv4 multicast address suffix at a location indicated by the IPv6 multicast address offset location;
  • IPv4 multicast address prefix and the IPv4 multicast address suffix are spliced to form a target IPv4 multicast address.
  • the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter.
  • the latter bit of the initial offset position begins to acquire the IPv4 multicast address suffix; and when the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication The last location of the IPv6 multicast address obtains the IPv4 multicast address suffix.
  • the converting module when the multicast address to be converted is an IPv6 multicast address, when the IPv4 multicast address type indicates that the target multicast address is formed based on an IPv4 multicast address, the converting module is configured according to the following manner: The conversion rule converts the multicast address into a target multicast address:
  • IPv6 multicast address a 32-bit address is obtained as the target IPv4 multicast address at the location indicated by the IPv6 multicast address offset position.
  • the conversion rule includes an IPv4 multicast address offset location parameter
  • the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter. The next bit of the starting offset position begins to acquire the IPv4 multicast address;
  • the IPv4 multicast address offset location indicates that the IPv4 multicast address is obtained in the last 32 bits of the IPv6 multicast address.
  • each conversion rule is configured with an address prefix, and multiple conversion rules can be set, so that each area or organization within a network can obtain its own address prefix, which can make By maintaining the address translation process within the specified address range, the multicast address range can be divided more finely within the service scope, enhancing service flexibility and security, and facilitating network management.
  • the support is based on the IPv4 group.
  • the IPv6 multicast address composition method of the broadcast address suffix has no prefix length limitation, and can better utilize the IPv6 multicast address space to implement conversion between the IPv4 multicast address and the IPv6 multicast address in the network.
  • FIG. 1 is a schematic flowchart of a method for converting a multicast address according to an embodiment of the present invention
  • FIG. 2 is a structural block diagram of a multicast address conversion apparatus according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a format of an IPv6 multicast address suffix based on an IPv4 multicast address suffix according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of an IPv6 multicast address composition format based on an IPv4 multicast address according to an embodiment of the present invention
  • FIG. 5 is a schematic flowchart of converting an IPv4 multicast address into an IPv6 multicast address according to an embodiment of the present invention
  • FIG. 6 is a schematic flow chart of converting an IPv6 multicast address into an IPv4 multicast address according to an embodiment of the present invention
  • FIG. 7 is a schematic diagram of a scenario of a device for converting a multicast address according to an embodiment of the present invention
  • FIG. 8 is a schematic diagram of another scenario of a device for converting a multicast address according to an embodiment of the present invention.
  • the embodiments of the present invention are directed to the related art that the multicast address translation method cannot make good use of the IPv6 multicast address space, and can not more accurately divide the IPv4 multicast address space and the IPv6 multicast address space, and the diversity of applications.
  • the problem of insufficient flexibility and security provides a method and device for converting a multicast address, which can better utilize the IPv6 address space to implement conversion between an IPv4 multicast address and an IPv6 multicast address in the network.
  • the conversion method can be implemented by the router.
  • FIG. 1 is a schematic flowchart of a method for converting a multicast address according to an embodiment of the present invention, as shown in FIG. The embodiment includes the following steps:
  • Step 101 Obtain a conversion rule corresponding to the multicast address to be converted, where the conversion rule includes a multicast address prefix, an IPv4 multicast address type, and an IPv4 multicast address offset position.
  • Step 102 Convert the multicast address to a target multicast address according to the conversion rule.
  • one or more conversion rules may be preset, and each conversion rule is defined as follows:
  • rule - ipv6 - m_prefix indicates the IPv6 multicast address prefix in the conversion rule, including the mask length
  • rule - ipv4 - m_prefix indicates the IPv4 multicast address prefix in the conversion rule, including the mask length
  • IPv4 offset is the IPv4 multicast address offset location parameter, which is an optional parameter in the conversion rule. It is used to indicate the IPv4 multicast address or the offset of the IPv4 multicast address suffix in the IPv6 multicast address. That is, the IPv4 multicast address or the IPv4 multicast address suffix is offset from the start bit in the IPv6 multicast address. If the conversion rule does not include this parameter, it means that an IPv4 multicast address or an IPv4 multicast address suffix is placed in the last digit of the IPv6 multicast address.
  • Rule—ipv4—type is an IPv4 multicast address type parameter, which is also an optional parameter in the conversion rule. It is used to indicate whether the IPv6 multicast address contains the IPv4 multicast address suffix (ipv4_m_suffix) or the complete IPv4 multicast.
  • the address ( ipv4_m_addr ) can also be understood as an IPv6 multicast address format based on an IPv4 multicast address or an IPv4 multicast address suffix. If the conversion rule does not include this parameter or if the value of rule_ipv4_type is 0, it means that the IPv6 multicast address is based on the IPv4 multicast address suffix.
  • rule-ipv4_type If the value of rule-ipv4_type is 1, it means IPv6 multicast address format of an IPv4 multicast address.
  • two IPv6 multicast address composition formats are defined, one is an IPv6 multicast address composition format based on an IPv4 multicast address suffix, and the other is an IPv6 multicast address composition format based on an IPv4 multicast address.
  • the conversion rule does not include rule_ipv4_type, the default format is IPv6 multicast address based on the IPv4 multicast address suffix.
  • the IPv6 multicast address In the IPv6 multicast address format based on the suffix of the IPv4 multicast address, the IPv6 multicast address consists of the IPv6 multicast address prefix and the IPv4 multicast address suffix in the conversion rule and the 0 added in the case of a vacancy.
  • the IPv6 multicast address prefix is placed from the start bit of the IPv6 multicast address.
  • the IPv4 multicast address suffix is placed from the last bit of the starting offset defined by the conversion rule. If the conversion rule does not contain rule_ipv4— Offset, the default IPv4 multicast address suffix is placed in the last part of the IPv6 multicast address; the remaining positions are padded with 0.
  • ipv4—m—suffix refers to the remaining part of the IPv4 multicast address to be converted after rule_ipv4_m_prefix is removed, and its length is 32 minus the length of rule—ipv4—m_prefix.
  • Figure 3 is a schematic diagram of a format of an IPv6 multicast address suffix based on an IPv4 multicast address suffix.
  • the n-bit rule-ipv6-m_prefix is included, where n is also It indicates the mask length of rule-ipv6-m_prefix; the offset from the 0 position is rule_ipv4_offset, the IPv4 multicast address suffix ipv4_m_suffix, the suffix occupies m bits; the remaining slots are padded with 0s.
  • ipv4_m_suffix is the remaining part after the rule_ipv4_m_prefix is removed from the IPv4 multicast address, and the length of the ipv4_m_suffix is obtained by subtracting the length of the rule_ipv4_m_prefix from the IPv4 address length 32, that is, the m value.
  • the values of p and q can be 0, that is, it means that there is no such space, which is determined by the determined two-scores rule_ipv6_m_prefix and ipv4-m-suffix and the parameter rule-ipv4-offset.
  • Rule—ipv4—offset is an optional parameter. If the parameter is not included in the conversion rule, then ipv4—m—suffix is placed in the last part of the IPv6 multicast address, that is, the part before the 128th bit. q is 0.
  • the sum of the length n of the IPv6 multicast address prefix and the length m of the IPv4 multicast address suffix in the conversion rule may not exceed 128, that is, n + m 128.
  • the maximum value of n can be 128.
  • m is required to be 0.
  • Such a conversion rule means that a certain IPv6 multicast address corresponds to a certain IPv4 multicast address. If the conversion rule contains rule_ipv4_offset, the value of rule_ipv4_offset cannot be greater than 128-m, that is, it must be reserved for ipv4-m-suffix.
  • an IPv6 multicast address consists of an IPv6 multicast address prefix and a complete IPv4 multicast address and a zero supplement in the case of a vacancy.
  • the IPv6 multicast address prefix is placed from the start bit of the IPv6 multicast address.
  • the complete IPv4 multicast address is placed from the last bit of the start offset defined by the conversion rule. If the conversion rule does not contain rule-ipv4 — offset, by default, the IPv4 multicast address is placed directly in the 32-bit part of the last part of the IPv6 multicast address; the remaining positions are padded with 0.
  • Figure 4 shows the IPv6 multicast address composition format based on the IPv4 multicast address.
  • the n-bit rule-ipv6-m_prefix is included, where n also indicates Rule—ipv6—The mask length of m_prefix; offset from the 0 position to rule-ipv4—offset, placing the complete ipv4—m—addr, occupying 32 bits; the rest of the position is padded with 0s.
  • the portion occupied by p bits and q bits in Fig. 4 is padded with 0.
  • the values of p and q can be 0, that is, there is no such part of the space, which is determined by the determined two parts rule - ipv6 - m_prefix and ipv4_m_addr and the parameter rule - ipv4 - offset.
  • Rule—ipv4—offset is an optional parameter. If the parameter is not included in the conversion rule, then ipv4—m—addr is placed in the last part of the IPv6 multicast address, occupying 32 bits, and q is 0.
  • the sum of the length n of the IPv6 multicast address prefix and the length 32 of the IPv4 multicast address in the conversion rule may not exceed 128, that is, n + 32 128, that is, n 96.
  • IPv4 In the process of converting an IPv4 multicast address to an IPv6 multicast address, IPv4 that needs to be converted The multicast address is matched with the IPv6 multicast address prefix in the conversion rule. After the longest match is matched to the appropriate IPv6 multicast address prefix, a conversion rule is obtained and the appropriate IPv6 multicast address prefix is obtained. If no suitable IPv6 multicast address prefix is matched, no conversion processing is performed.
  • the IPv6 multicast address type parameter based on the IPv4 multicast address suffix or the IPv4 multicast address is selected according to the optional IPv4 multicast address type parameter in the conversion rule.
  • IPv4 multicast address suffix based on the IPv4 multicast address suffix is selected.
  • the IPv4 multicast address offset parameter is used to determine the offset of the IPv4 multicast address or IPv4 multicast address suffix in the IPv6 multicast address.
  • Location If the IPv4 multicast address offset location is not defined in the translation rule, the IPv4 multicast address or IPv4 multicast address suffix is placed in the last position of the IPv6 multicast address by default. Then, the target IPv6 multicast address ( ipv6_m_addr ) is constructed according to the IPv6 multicast address format.
  • IPv6 multicast address suffix is configured based on the IPv4 multicast address suffix.
  • the IPv4 multicast address offset position parameter is used to determine the offset position of the IPv4 multicast address or IPv4 multicast address suffix in the IPv6 multicast address. . If the IPv4 multicast address suffix is used, the length of the IPv4 multicast address suffix is calculated according to the length of the IPv4 multicast address prefix in the conversion rule, and then calculated according to the location specified by the IPv4 multicast address offset location parameter.
  • the broadcast suffix, the IPv4 address prefix in the splicing conversion rule, and the obtained IPv4 multicast address suffix obtain the target IPv4 multicast address. If the IPv6 multicast address is based on the IPv4 multicast address, the complete IPv4 multicast address is obtained directly from the next bit of the offset. If the IPv4 multicast address offset location parameter is not included, the IPv6 group is directly obtained. The last 32 bits of the broadcast address get the full IPv4 multicast address.
  • the embodiment of the present invention further provides a device for converting a multicast address, and the device may be a router. As shown in FIG. 2, the embodiment includes:
  • the obtaining module 20 is configured to: obtain a conversion rule corresponding to the multicast address to be converted, where the conversion rule includes a multicast address prefix, an IPv4 multicast address type, and an IPv4 multicast address offset position;
  • the conversion module 21 is configured to: convert the multicast address into a target multicast address according to the conversion rule.
  • the conversion rule when the multicast address to be converted is an Internet Protocol version 4 (IPv4) multicast address, the conversion rule includes an Internet Protocol version 6 (IPv6) multicast address prefix and an IPv4 multicast address prefix;
  • IPv4 Internet Protocol version 4
  • the converting module 21 converts the multicast address into a target multicast address according to the conversion rule by:
  • IPv6 multicast address prefix is placed at the beginning of the IPv6 multicast address
  • IPv4 multicast address suffix is placed at the position indicated by the IPv4 multicast address offset position, and other empty positions are 0, forming a target IPv6 multicast. address.
  • the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter.
  • the next bit of the initial offset position begins to place the IPv4 multicast address suffix; and when the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication
  • the IPv4 multicast address suffix is placed at the last position of the IPv6 multicast address.
  • the conversion rule when the multicast address to be converted is an IPv4 multicast address, the conversion rule includes an IPv6 multicast address prefix and an IPv4 multicast address prefix;
  • the conversion module 21 converts the multicast address into a target multicast address according to the conversion rule by:
  • IPv6 multicast address prefix is placed at the beginning of the IPv6 multicast address
  • IPv4 multicast address is placed at the location indicated by the IPv4 multicast address offset location, and other empty locations are 0, forming the target IPv6 group. Broadcast address.
  • the conversion rule when the conversion rule includes an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter. The next bit of the starting offset position begins to place the IPv4 multicast address;
  • the IPv4 multicast address offset location indicates that the IPv4 multicast address is placed in the last 32 bits of the IPv6 multicast address.
  • the conversion rule when the multicast address to be converted is an IPv6 multicast address, the conversion rule includes an IPv4 multicast address prefix;
  • the converting module 21 converts the multicast address into a target multicast address according to the conversion rule by:
  • the IPv4 multicast address suffix according to the length of the IPv4 multicast address suffix at a location indicated by the IPv6 multicast address offset location;
  • IPv4 multicast address prefix and the IPv4 multicast address suffix are spliced to form a target IPv4 multicast address.
  • the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter.
  • the latter bit of the initial offset position begins to acquire the IPv4 multicast address suffix; and when the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication The last location of the IPv6 multicast address obtains the IPv4 multicast address suffix.
  • the converting module 21 converts the multicast address into a target multicast address according to the conversion rule by:
  • IPv6 multicast address a 32-bit address is obtained as the target IPv4 multicast address at the location indicated by the IPv6 multicast address offset position.
  • the conversion rule includes an IPv4 multicast address offset location parameter
  • the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter. The next bit of the starting offset position begins to acquire the IPv4 multicast address;
  • the IPv4 multicast address offset location indicates that the IPv4 multicast address is obtained in the last 32 bits of the IPv6 multicast address.
  • the conversion device supports the conversion between the IPv4 multicast address and the IPv6 multicast address, and can obtain an IPv4 multicast address that can be matched to a conversion rule into an IPv6 multicast address after obtaining a defined set of conversion rules.
  • the IPv6 multicast address that can be matched to a conversion rule is converted into an IPv4 multicast address, and the multicast protocol packet and the data packet are forwarded, and the multicast application between the IPv4 network and the IPv6 network is communicated.
  • the conversion rule defined in the embodiment of the present invention can be matched according to the multicast address prefix, and only the address that can match the multicast address prefix is converted, otherwise the conversion is not performed. In a certain range, you only need to obtain services of certain multicast addresses, so that the corresponding address prefixes of these multicast addresses are configured in a conversion rule, and the multicast addresses that do not want to be served cannot be traversed because they cannot match.
  • IPv4 networks and/or IPv6 networks provide better flexibility and security in the use of devices.
  • multiple conversion rules may be set, so that each area or organization within a network can obtain its own address prefix, and the address conversion process is maintained within a specified address range, so that the service can be served.
  • the division of the multicast address range is finer in the scope, which enhances the flexibility and security of the service and is beneficial to network management.
  • the length of the IPv6 multicast address prefix is up to 96, and the IPv6 multicast address composition method based on the IPv4 address suffix is supported in the embodiment of the present invention. Without the limitation of the prefix length, it can even be extended to 128 bits of the IPv6 limit, which can better utilize the IPv6 multicast address space.
  • Embodiment 1 of the method for converting a multicast address according to an embodiment of the present invention is described below with reference to the accompanying drawings and embodiments.
  • the IPv4 multicast address can be translated into an IPv6 multicast address.
  • the embodiment includes the following steps:
  • Step 501 First, a predefined set of conversion rules needs to be obtained, and the set of rules may include one or more conversion rules.
  • Step 502 If the conversion rule is not matched, the end processing is performed; if a conversion rule is matched, the process proceeds to step 3.
  • Step 503 Obtain a matching conversion rule, which includes rule_ipv6-m_prefix and other parameters.
  • Step 504 Determine whether there is a rule-ipv4_type in the conversion rule. If the conversion rule does not include the parameter or the value of the parameter is 0, go to step 5. If the conversion rule includes the parameter and the parameter value is 1, enter the step. 9.
  • Step 505 Calculate ipv4_m_suffix according to rule-ipv4_m_prefix and the input IPv4 multicast address in the conversion rule, including calculating the length of ipv4_m_suffix.
  • Step 506 Determine whether the rule_ipv4_offset parameter exists in the conversion rule. If not, go to step 7. If yes, go to step 8.
  • Step 507 The IPv6 multicast address is in the first place according to rule-ipv6-m_prefix, and ipv4-m-suffix is composed in the last mode, and other slots are filled with 0. To form the target ipv6—m—addr, go to step 12.
  • Step 508 In the IPv6 multicast address, put rule-ipv6-m_prefix at the forefront, and place ipv4-m_suffix from the last digit of the position specified by rule-ipv4-offset, and the remaining slots are filled with 0. Go to step 12.
  • Step 509 Determine whether the rule jpv4_offset parameter exists in the conversion rule, if not, proceed to step 10, and if yes, proceed to step 11.
  • Step 510 The IPv6 multicast address is in front of rule-ipv6 m_prefix, and ipv4_m_addr is composed in the last 32-bit mode, and other slots are filled with 0. To form the target ipv6-m-addr, go to step 12.
  • Step 511 In the IPv6 multicast address, the rule_ipv6_m_prefix is first, and the ipv4_m_addr is placed from the last bit of the position specified by rule-ipv4-offset, and the remaining slots are filled with 0. Go to step 12.
  • Step 512 Output the conversion result, that is, output the target ipv6_m_addr.
  • the above process only shows a process of converting from an IPv4 multicast address to an IPv6 multicast address, wherein the order of the optional parameters rule ipv4_type and rule_ipv4_offset can be changed.
  • the above process is to determine the rule-ipv4-type after determining the rule-ipv4-type, or judge the rule-ipv4-type after determining the rule-ipv4-offset to adjust the process, which involves a slightly different step, in the process.
  • the steps performed can also be easily split or merged without affecting the output.
  • the IPv6 multicast address can be converted into an IPv4 multicast address.
  • the embodiment includes the following steps:
  • Step 601 The precondition is to obtain a predefined set of conversion rules, and the set of rules may include one or more conversion rules.
  • Step 602 If the conversion rule is not matched, the end processing is performed; if a conversion rule is matched, the process proceeds to step 3.
  • Step 603 Obtain a matching conversion rule, which includes rule—ipv4—m_prefix and other parameters.
  • Step 604 Determine whether there is a rule-ipv4_type in the conversion rule. If there is no such parameter in the conversion rule or the value of the parameter is 0, go to step 5. If the parameter exists and the parameter value is 1, go to step 10.
  • Step 605 Calculate the length of ipv4_m_suffix according to rule_ipv4_m_prefix in the conversion rule.
  • Step 606 Determine whether the rule_ipv4_offset parameter exists in the conversion rule. If not, go to step 7. If yes, go to step 8.
  • Step 607 Obtain ipv4_m_suffix according to the length of ipv4_m_suffix at the last part of the input IPv6 multicast address, and go to step 9.
  • Step 608 According to the position specified by rule-ipv4-offset, offset the rule-ipv4-offset bit from the input IPv6 multicast address, and obtain ipv4_m_suffix from the next bit according to the length of ipv4-m_suffix. Go to step 9.
  • Step 609 splicing rule_ipv4_m_prefix and ipv4_m_suffix to get the J target ipv4_m_addr, and proceed to step 13.
  • Step 610 Determine whether the rule_ipv4_offset parameter exists in the conversion rule. If not, go to step 11. If yes, go to step 12.
  • Step 611 Obtain a 32-bit ipv4_m_addr from the last part of the input IPv6 multicast address, and proceed to step 13.
  • Step 612 According to the position specified by rule-ipv4-offset, offset the rule-ipv4-offset bit from the input IPv6 multicast address, and obtain the 32-bit ipv4_m-addr from the next bit, and proceed to step 13.
  • Step 613 outputting the conversion result, that is, outputting the target ipv4_m_addr.
  • the above process only shows a process of converting from an IPv6 multicast address to an IPv4 multicast address, wherein the order of the optional parameters rule ipv4_type and rule_ipv4_offset can be changed.
  • the rule-ipv4_type is judged first and then the rule-ipv4_offset is judged.
  • the rule_ipv4_type can be judged first to determine the rule_ipv4_type to adjust the process, which involves slightly different step details. The steps performed in the process can also be simply split or merged without affecting the output.
  • FIG. 7 is a schematic diagram of an application scenario of a multicast address translation apparatus according to an embodiment of the present invention.
  • the conversion apparatus is connected to an IPv6 network and an IPv4 network.
  • the conversion rules obtained by the conversion device contain two conversion rules:
  • the multicast address of the multicast data that the computer 1 wants to acquire is ffl8:5::6:0; the destination address of the multicast data that the computer 2 needs to send is 235.0.0.6.
  • the computer 1 When the computer 1 makes a data request to the computer 2, the computer 1 sends a report to the multicast address ffl 8: 5:: 6: 0, for example, an MLD (Multicast Listener Discover) report.
  • the message is transmitted to the conversion device via a network multicast protocol.
  • the conversion device uses ffl8:5::6:0 to match the conversion rule, which matches the ffl8:5::/40 of rule-ipv6-m_prefix to get the conversion rule.
  • rule_ipv4_type is 0, which means that the IPv6 multicast address format is based on the IPv4 multicast address suffix.
  • rule rule - ipv4 - m_prefix corresponds to 235.0.0.0/24, then you can know that ipv4 - m - suffix length is 8 bits.
  • rule-ipv4_offset from the conversion rule is 104, you can get 8 bits of data from the 105th bit of ffl8:5::6:0, that is, 0x06, according to the decimal is 6, splicing Rule_ipv4_m_prefix and ipv4—m—suffix can get the IPv4 multicast address 235.0.0.6.
  • the multicast protocol packet passing through the conversion device converts the request multicast address ffl8:5::6:0 used in the IPv6 packet into 235.0.0.6 used in the IPv4 network.
  • the multicast protocol for the 235.0.0.6 sent by the switching device to the IPv4 network is added, and the PIM-SM (Protocol Independent Multicast-Sparse Mode) is added.
  • the message is sent to the first hop multicast routing device connected to the computer 2, and the network forwarding path of the cross-address family is established, and the multicast data of 235.0.0.6 is directed to the conversion device.
  • the multicast data flow arrival conversion device uses 235.0.0.6 to match the conversion rule, which matches the 235.0.0.0/24 of rule-ipv4-m_prefix, and obtains the conversion rule.
  • rule_ipv6_m_prefix is ffl8:5::/40 .
  • the rule-ipv4_type in the conversion rule is 0, which means that the IPv6 multicast address format is based on the IPv4 multicast address suffix.
  • ipv4_m_suffix is 6 and the length is 8 bits.
  • rule_ipv6_m_prefix that is, ffl8:5::/40
  • rule-ipv4_offset in the conversion rule is 104, which is to place ipv4_m_suffix in the 105th position of ipv6_m_addr
  • rule — ipv6—m_prefix and ipv4—m Between suffix and ipv4—m—the vacant bits after suffix are padded with 0, resulting in ffl8:5::6:0.
  • the multicast data stream using 235.0.0.6 in the IPv4 network reaches the IPv6 network and is converted into the multicast data using the ffl8:5::6:0.
  • the multicast forwarding entry established according to the multicast protocol sends the multicast data to the computer 1.
  • FIG. 8 is a schematic diagram of another application scenario of a multicast address translation apparatus according to an embodiment of the present invention.
  • the conversion apparatus 1 is connected to an IPv6 network A and an IPv4 network B
  • the conversion apparatus 2 is connected to an IPv4 network B and an IPv6 network.
  • C In the IPv6 network A, there is a computer 1 that wants to obtain the multicast data sent by the computer 2 in the IPv6 network C through the IPv4 network B.
  • the conversion rules acquired by the conversion device 1 and the conversion device 2 include two conversion rules:
  • the multicast address of the multicast data that the computer 1 wants to acquire is ffl8:5::6:0; the destination address of the multicast data that the computer 2 needs to send is ffl8:5::6:0.
  • the computer 1 sends the multicast request information about ffl8:5::6:0, and reaches the conversion device 1 through network transmission and protocol conversion.
  • the ffl8:5::6:0 is converted according to the conversion rule.
  • the transmission to the conversion device 2 is carried out via the transmission of the network B.
  • 235.0.0.6 is converted into ffl8:5::6:0 according to the conversion rule, and ffl8:5::6:0 is used in the network C.
  • Perform multicast join Establish a network forwarding path across address families.
  • the computer 2 transmits the multicast data of ffl8:5::6:0, and the multicast data converted into 235.0.0.6 after the conversion device 2 continues to propagate in the network B, and then converted into the converted device 1 and converted into The multicast data of ffl8:5::6:0 is sent to the computer 1 in the network A.
  • FIG. 7 and FIG. 8 are only used to describe the usage scenarios of the multicast address conversion apparatus in the embodiment of the present invention.
  • the usage scenarios of the multicast address conversion apparatus in the embodiment of the present invention are not limited to the two scenarios, for example, The scenario in which the IPv4 network obtains the multicast data of the IPv6 network and the IPv4 network obtains the IPv4 network multicast data across the IPv6 network can also be used.
  • the technical solution of the embodiment of the present invention provides a method for converting between an IPv4 multicast address and an IPv6 multicast address, and a conversion device for performing the conversion method, which has a wide application scenario, and can set an existing multicast by using a conversion rule.
  • Address translation technology is compatible.
  • the use of the suffix of the IPv4 multicast address fully releases the length of the IPv6 prefix.
  • the use of the multi-prefix rule can finer the use of the multicast address within the service range, and enhance the flexibility and security of the multicast service. Easier Management.
  • the modules may be implemented in software for execution by various types of processors.
  • an identified executable code module can comprise one or more physical blocks or logical blocks of computer instructions, which can be constructed, for example, as an object, procedure, or function. Nonetheless, the executable code of the identified modules need not be physically located together, but may include different instructions stored on different physical blocks that, when logically combined, constitute the module and implement the provisions of the module purpose.
  • the executable code module can be a single instruction or a number of instructions, and can even be distributed over multiple different code segments, distributed among different programs, and distributed across multiple memory devices.
  • operational data may be identified within the module, implemented in any suitable form, and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed over different locations (including different storage devices), and may in part exist as an electronic signal only on the system or network.
  • the module can be implemented by software, considering the level of the existing hardware process, the module can be implemented in software, and those skilled in the art can construct a hardware circuit to implement the module function without considering the cost.
  • the circuit includes conventional Very Large Scale Integrated (VLSI) circuits, gate arrays, existing semiconductors such as logic chips, transistors, or other discrete components.
  • VLSI Very Large Scale Integrated
  • Modules can also be implemented with programmable hardware devices, such as field programmable gate arrays, programmable array logic, or programmable logic devices.
  • sequence numbers of the steps are not used to limit the sequence of the steps.
  • the steps of the steps are changed without any creative work. It is also within the scope of the invention.
  • the technical solution of the embodiment of the present invention can enhance the flexibility and security of the multicast service, and is beneficial to network management.
  • the IPv6 multicast address space can be better utilized, and the IPv4 multicast address and the network can be implemented in the network. Conversion between IPv6 multicast addresses.

Landscapes

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

Abstract

A multicast address conversion method and device. The multicast address conversion method comprises: obtaining a conversion rule corresponding to a multicast address to be converted, the conversion rule comprising a multicast address prefix, an IPv4 multicast address type and an IPv4 multicast address offset location; and according to the conversion rule, converting the multicast address to a target multicast address.

Description

一种组播地址的转换方法及装置  Method and device for converting multicast address
技术领域 Technical field
本发明涉及通讯领域, 特别涉及一种组播地址的转换方法及装置。  The present invention relates to the field of communications, and in particular, to a method and an apparatus for converting a multicast address.
背景技术 Background technique
随着 IPv4 ( Internet Protocol version 4 ,互联网协议版本 4 )地址池的枯竭, 向 IPv6网络过渡势在必行。但是现有网络完全过渡到 IPv6网络还有相当长的 时间, IPv4网络和 IPv6网络共存的状况会长期存在。 另一方面, 组播技术 广泛应用在 IPTV ( Internet Protocol Television, 互联网协议电视)、 视频点播 和视频会议等传统模式, 以及移动终端广告、 网络商店和云计算等新兴模式 中。 所以, 如何解决在过渡网络环境中的组播应用问题变得非常必要。 目前, 各方在过渡场景中解决组播问题主要使用的是隧道和翻译两种技术, 其中不 可避免的都需要建立 IPv4组播地址和 IPv6组播地址之间的转换关系 ,用来在 网络边缘进行组播的通讯, 组播地址在 IPv4和 IPv6间的转换成为应用基础。  With the depletion of the IPv4 (Internet Protocol version 4) address pool, it is imperative to transition to an IPv6 network. However, there is still a long time for the existing network to fully transition to the IPv6 network. The coexistence of the IPv4 network and the IPv6 network will exist for a long time. On the other hand, multicast technology is widely used in traditional modes such as IPTV (Internet Protocol Television), video on demand, and video conferencing, as well as emerging modes such as mobile terminal advertising, online stores, and cloud computing. Therefore, how to solve the multicast application problem in the transition network environment becomes very necessary. At present, the parties use the tunnel and translation technologies to solve the multicast problem in the transition scenario. Inevitably, the conversion relationship between the IPv4 multicast address and the IPv6 multicast address needs to be established. For multicast communication, the conversion of multicast addresses between IPv4 and IPv6 becomes the application basis.
相关技术中 IPv4 组播地址和 IPv6 组播地址之间的转换方法, 主要是 draft-ietf-mboned-64-multicast-address-format草案中规定的转换方法。 该方法 中定义 ASM( Any Source Multicast,任意源组播)前缀 FFXX:8000::/20和 SSM ( Source Specific Multicast, 特定源组播)前缀 FF3X:0:8000::/96, 把 IPv4组 播地址作为 IPv6组播地址的后 32位, 与定义的组播前缀用拼接的方式组合 起来进行组播地址转换。 这种组播地址转换的方法简单易实现, 但是存在一 定的不足: 由于使用的 IPv6组播前缀是固定的, 针对 ASM组播地址和 SSM 组播地址各有一个统一的前缀,不区分 IPv4地址范围, 因此所有的 IPv4 SSM 组播地址都会映射到同一个 IPv6 SSM组播前缀, 所有的 IPv4 ASM组播地址 都会映射到同一个 IPv6 ASM组播前缀。 拿 ASM组播地址来举例, 也就是, 如果在设备上使用了一个固定的 IPv6 ASM前缀,则所有 IPv4 ASM组播地址 都会转换成统一的具有 IPv6 ASM组播前缀的组播地址。 而所有想要和 IPv4 网络进行互通的组播应用, 也必须使用规定的组播前缀, 这样限制了 IPv6组 播前缀的使用量和灵活性, 也无法对 IPv4组播地址空间进行划分。 另外还存 在的不足在于, 因为至少要留 32位给 IPv4组播地址, 所以 IPv6组播前缀最 长用到 96位。 The conversion method between the IPv4 multicast address and the IPv6 multicast address in the related art is mainly the conversion method specified in the draft draft-ietf-mboned-64-multicast-address-format. In this method, the ASM (Any Source Multicast) prefix FFXX:8000::/20 and the SSM (Source Specific Multicast) prefix FF3X:0:8000::/96 are defined. The address is used as the last 32 bits of the IPv6 multicast address, and is combined with the defined multicast prefix to perform multicast address translation. This method of multicast address translation is simple and easy to implement, but it has certain disadvantages: Because the IPv6 multicast prefix used is fixed, there is a unified prefix for the ASM multicast address and the SSM multicast address, and the IPv4 address is not distinguished. Scope, so all IPv4 SSM multicast addresses are mapped to the same IPv6 SSM multicast prefix. All IPv4 ASM multicast addresses are mapped to the same IPv6 ASM multicast prefix. Take the ASM multicast address as an example. That is, if a fixed IPv6 ASM prefix is used on the device, all IPv4 ASM multicast addresses are translated into a unified multicast address with an IPv6 ASM multicast prefix. All multicast applications that want to communicate with the IPv4 network must also use the specified multicast prefix. This limits the usage and flexibility of the IPv6 multicast prefix and the IPv4 multicast address space. Also survive The disadvantage is that the IPv6 multicast prefix can be up to 96 bits because at least 32 bits are reserved for IPv4 multicast addresses.
综上所述,相关技术中组播地址转换方法不能很好地利用 IPv6组播地址 空间, 也不能对 IPv4组播地址空间和 IPv6组播地址空间进行更精确的划分 , 应用的多样性、 灵活性和安全性存在不足。  In summary, the multicast address translation method in the related art cannot make good use of the IPv6 multicast address space, and can not more accurately divide the IPv4 multicast address space and the IPv6 multicast address space, and the application is diverse and flexible. There is a lack of sex and safety.
发明内容 Summary of the invention
本发明实施例提供一种组播地址的转换方法及装置, 能够更好地利用 IPv6地址空间, 在网络中实现 IPv4组播地址和 IPv6组播地址间的转换。  The embodiment of the invention provides a method and a device for converting a multicast address, which can better utilize an IPv6 address space to implement conversion between an IPv4 multicast address and an IPv6 multicast address in the network.
本发明的实施例提供一种组播地址的转换方法, 包括:  An embodiment of the present invention provides a method for converting a multicast address, including:
获取待转换的组播地址所对应的转换规则, 所述转换规则包括有组播地 址前缀、 IPv4组播地址类型和 IPv4组播地址偏移位置; 以及  Obtaining a conversion rule corresponding to the multicast address to be converted, where the conversion rule includes a multicast address prefix, an IPv4 multicast address type, and an IPv4 multicast address offset position;
根据所述转换规则将所述组播地址转换为目标组播地址。  Converting the multicast address to a target multicast address according to the conversion rule.
可选地, 在所述待转换的组播地址为互联网协议版本 4 ( IPv4 )组播地址 时, 所述转换规则包括互联网协议版本 6 ( IPv6 )组播地址前缀和 IPv4组播 地址前缀;  Optionally, when the multicast address to be converted is an Internet Protocol version 4 (IPv4) multicast address, the conversion rule includes an Internet Protocol version 6 (IPv6) multicast address prefix and an IPv4 multicast address prefix;
在所述 IPv4组播地址类型指示基于 IPv4组播地址后缀形成所述目标组 播地址时, 所述根据所述转换规则将所述组播地址转换为目标组播地址的步 骤包括:  When the IPv4 multicast address type indicates that the target multicast address is formed based on the IPv4 multicast address suffix, the step of converting the multicast address to the target multicast address according to the conversion rule includes:
根据所述 IPv4组播地址前缀和所述 IPv4组播地址计算出所述 IPv4组播 地址后缀; 以及  Calculating the IPv4 multicast address suffix according to the IPv4 multicast address prefix and the IPv4 multicast address;
在 IPv6组播地址的起始位置放置所述 IPv6组播地址前缀, 在所述 IPv4 组播地址偏移位置指示的位置放置所述 IPv4组播地址后缀, 其它空位置 0, 形成目标 IPv6组播地址。  The IPv6 multicast address prefix is placed at the beginning of the IPv6 multicast address, and the IPv4 multicast address suffix is placed at the position indicated by the IPv4 multicast address offset position, and other empty positions are 0, forming a target IPv6 multicast. address.
可选地 ,在所述转换规则包括有 IPv4组播地址偏移位置参数时 ,所述 IPv4 组播地址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位 置参数定义的起始偏移位置的后一位开始放置所述 IPv4组播地址后缀; 以及 在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后位置放置所述 IPv4组播地址 后缀。 Optionally, when the conversion rule includes an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indicates that the location parameter is offset from the IPv4 multicast address in the IPv6 multicast address. The latter bit of the defined starting offset position begins to place the IPv4 multicast address suffix; and when the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast The address offset location indicates placement of the IPv4 multicast address suffix at the last location of the IPv6 multicast address.
可选地, 在所述待转换的组播地址为 IPv4组播地址时, 所述转换规则包 括有 IPv6组播地址前缀和 IPv4组播地址前缀;  Optionally, when the multicast address to be converted is an IPv4 multicast address, the conversion rule includes an IPv6 multicast address prefix and an IPv4 multicast address prefix.
在所述 IPv4组播地址类型指示基于 IPv4组播地址形成所述目标组播地 址时, 所述根据所述转换规则将所述组播地址转换为目标组播地址的步骤包 括:  When the IPv4 multicast address type indicates that the target multicast address is formed based on the IPv4 multicast address, the step of converting the multicast address to the target multicast address according to the conversion rule includes:
在 IPv6组播地址的起始位置放置所述 IPv6组播地址前缀, 在所述 IPv4 组播地址偏移位置指示的位置放置所述 IPv4组播地址, 其它空位置 0, 形成 所述目标 IPv6组播地址。  The IPv6 multicast address prefix is placed at the beginning of the IPv6 multicast address, and the IPv4 multicast address is placed at the location indicated by the IPv4 multicast address offset location, and other empty locations are 0, forming the target IPv6 group. Broadcast address.
可选地 ,在所述转换规则包括有 IPv4组播地址偏移位置参数时 ,所述 IPv4 组播地址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位 置参数定义的起始偏移位置的后一位开始放置所述 IPv4组播地址; 以及  Optionally, when the conversion rule includes an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indicates that the location parameter is offset from the IPv4 multicast address in the IPv6 multicast address. The next bit of the defined starting offset position begins to place the IPv4 multicast address;
在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后 32位放置所述 IPv4组播地址。  When the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indicates that the IPv4 multicast address is placed in the last 32 bits of the IPv6 multicast address.
可选地, 在所述待转换的组播地址为 IPv6组播地址时, 所述转换规则包 括有 IPv4组播地址前缀;  Optionally, when the multicast address to be converted is an IPv6 multicast address, the conversion rule includes an IPv4 multicast address prefix;
在所述 IPv4组播地址类型指示基于 IPv4组播地址后缀形成所述目标组 播地址时, 所述根据所述转换规则将所述组播地址转换为目标组播地址的步 骤包括:  When the IPv4 multicast address type indicates that the target multicast address is formed based on the IPv4 multicast address suffix, the step of converting the multicast address to the target multicast address according to the conversion rule includes:
根据所述 IPv4组播地址前缀的长度计算出所述 IPv4组播地址后缀的长 度;  Calculating a length of the IPv4 multicast address suffix according to the length of the IPv4 multicast address prefix;
在所述 IPv6组播地址中, 在 IPv6组播地址偏移位置指示的位置根据所 述 IPv4组播地址后缀的长度获取所述 IPv4组播地址后缀; 以及  And obtaining, in the IPv6 multicast address, the IPv4 multicast address suffix according to the length of the IPv4 multicast address suffix at a location indicated by the IPv6 multicast address offset location;
拼接所述 IPv4组播地址前缀和所述 IPv4组播地址后缀形成目标 IPv4组 播地址。  The IPv4 multicast address prefix and the IPv4 multicast address suffix are spliced to form a target IPv4 multicast address.
可选地, 在所述转换规则包括 IPv4组播地址偏移位置参数时, 所述 IPv4 组播地址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位 置参数定义的起始偏移位置的后一位开始获取所述 IPv4组播地址后缀; 以及 在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后位置获取所述 IPv4组播地址 后缀。 Optionally, when the conversion rule includes an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indicates that the IPv4 multicast address offset bit is in the IPv6 multicast address. The next bit of the starting offset position defined by the parameter starts to acquire the IPv4 multicast address suffix; and when the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location Instructing to obtain the IPv4 multicast address suffix at the last location of the IPv6 multicast address.
可选地, 在所述待转换的组播地址为 IPv6组播地址时, 所述转换规则包 括有 IPv4组播地址前缀;  Optionally, when the multicast address to be converted is an IPv6 multicast address, the conversion rule includes an IPv4 multicast address prefix;
所述 IPv4组播地址类型指示基于 IPv4组播地址形成所述目标组播地址 时,所述根据所述转换规则将所述组播地址转换为目标组播地址的步骤包括: 在所述 IPv6组播地址中, 在所述 IPv6组播地址偏移位置指示的位置获 取 32位的地址作为所述目标 IPv4组播地址。  When the IPv4 multicast address type indicates that the target multicast address is formed based on the IPv4 multicast address, the step of converting the multicast address into a target multicast address according to the conversion rule includes: in the IPv6 group In the broadcast address, a 32-bit address is acquired as the target IPv4 multicast address at the location indicated by the IPv6 multicast address offset position.
可选地, 在所述转换规则包括 IPv4组播地址偏移位置参数时, 所述 IPv4 组播地址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位 置参数定义的起始偏移位置的后一位开始获取所述 IPv4组播地址; 以及  Optionally, when the conversion rule includes an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter. The next bit of the starting offset position begins to acquire the IPv4 multicast address;
在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后 32位获取所述 IPv4组播地址。  When the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indicates that the IPv4 multicast address is obtained in the last 32 bits of the IPv6 multicast address.
本发明实施例还提供了一种实现上述方法的组播地址的转换装置,包括: 获取模块, 其设置成: 获取待转换的组播地址所对应的转换规则, 所述 转换规则包括有组播地址前缀、 IPv4组播地址类型和 IPv4组播地址偏移位置; 以及  The embodiment of the present invention further provides a device for converting a multicast address that implements the foregoing method, including: an obtaining module, configured to: obtain a conversion rule corresponding to a multicast address to be converted, where the conversion rule includes multicast Address prefix, IPv4 multicast address type, and IPv4 multicast address offset location;
转换模块, 其设置成: 根据所述转换规则将所述组播地址转换为目标组 播地址。  a conversion module, configured to: convert the multicast address to a target multicast address according to the conversion rule.
可选地, 在所述待转换的组播地址为互联网协议版本 4 ( IPv4 )组播地址 时, 所述转换规则包括互联网协议版本 6 ( IPv6 )组播地址前缀和 IPv4组播 地址前缀; 以及  Optionally, when the multicast address to be converted is an Internet Protocol version 4 (IPv4) multicast address, the conversion rule includes an Internet Protocol version 6 (IPv6) multicast address prefix and an IPv4 multicast address prefix;
在所述 IPv4组播地址类型指示基于 IPv4组播地址后缀形成所述目标组 播地址时, 所述转换模块通过如下方式根据所述转换规则将所述组播地址转 换为目标组播地址:  When the IPv4 multicast address type indicates that the target multicast address is formed based on the IPv4 multicast address suffix, the converting module converts the multicast address into a target multicast address according to the conversion rule by:
根据所述 IPv4组播地址前缀和所述 IPv4组播地址计算出所述 IPv4组播 地址后缀; 以及 Calculating the IPv4 multicast according to the IPv4 multicast address prefix and the IPv4 multicast address Address suffix;
在 IPv6组播地址的起始位置放置所述 IPv6组播地址前缀, 在所述 IPv4 组播地址偏移位置指示的位置放置所述 IPv4组播地址后缀, 其它空位置 0, 形成目标 IPv6组播地址。  The IPv6 multicast address prefix is placed at the beginning of the IPv6 multicast address, and the IPv4 multicast address suffix is placed at the position indicated by the IPv4 multicast address offset position, and other empty positions are 0, forming a target IPv6 multicast. address.
可选地, 在所述转换规则包括 IPv4组播地址偏移位置参数时, 所述 IPv4 组播地址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位 置参数定义的起始偏移位置的后一位开始放置所述 IPv4组播地址后缀; 以及 在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后位置放置所述 IPv4组播地址 后缀。  Optionally, when the conversion rule includes an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter. The next bit of the initial offset position begins to place the IPv4 multicast address suffix; and when the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication The IPv4 multicast address suffix is placed at the last position of the IPv6 multicast address.
可选地, 在所述待转换的组播地址为 IPv4组播地址时, 所述转换规则包 括 IPv6组播地址前缀和 IPv4组播地址前缀; 以及  Optionally, when the multicast address to be converted is an IPv4 multicast address, the conversion rule includes an IPv6 multicast address prefix and an IPv4 multicast address prefix;
在所述 IPv4组播地址类型指示基于 IPv4组播地址形成所述目标组播地 址时, 所述转换模块通过如下方式根据所述转换规则将所述组播地址转换为 目标组播地址:  When the IPv4 multicast address type indicates that the target multicast address is formed based on the IPv4 multicast address, the converting module converts the multicast address into a target multicast address according to the conversion rule by:
在 IPv6组播地址的起始位置放置所述 IPv6组播地址前缀, 在所述 IPv4 组播地址偏移位置指示的位置放置所述 IPv4组播地址, 其它空位置 0, 形成 所述目标 IPv6组播地址。  The IPv6 multicast address prefix is placed at the beginning of the IPv6 multicast address, and the IPv4 multicast address is placed at the location indicated by the IPv4 multicast address offset location, and other empty locations are 0, forming the target IPv6 group. Broadcast address.
可选地, 在所述转换规则包括 IPv4组播地址偏移位置参数时, 所述 IPv4 组播地址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位 置参数定义的起始偏移位置的后一位开始放置所述 IPv4组播地址; 以及  Optionally, when the conversion rule includes an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter. The next bit of the starting offset position begins to place the IPv4 multicast address;
在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后 32位放置所述 IPv4组播地址。  When the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indicates that the IPv4 multicast address is placed in the last 32 bits of the IPv6 multicast address.
可选地, 在所述待转换的组播地址为 IPv6组播地址时, 所述转换规则包 括有 IPv4组播地址前缀;  Optionally, when the multicast address to be converted is an IPv6 multicast address, the conversion rule includes an IPv4 multicast address prefix;
在所述 IPv4组播地址类型指示基于 IPv4组播地址后缀形成所述目标组 播地址时, 所述转换模块通过如下方式根据所述转换规则将所述组播地址转 换为目标组播地址: 根据所述 IPv4组播地址前缀的长度计算出所述 IPv4组播地址后缀的长 度; When the IPv4 multicast address type indicates that the target multicast address is formed based on the IPv4 multicast address suffix, the converting module converts the multicast address into a target multicast address according to the conversion rule by: Calculating a length of the IPv4 multicast address suffix according to the length of the IPv4 multicast address prefix;
在所述 IPv6组播地址中, 在 IPv6组播地址偏移位置指示的位置根据所 述 IPv4组播地址后缀的长度获取所述 IPv4组播地址后缀; 以及  And obtaining, in the IPv6 multicast address, the IPv4 multicast address suffix according to the length of the IPv4 multicast address suffix at a location indicated by the IPv6 multicast address offset location;
拼接所述 IPv4组播地址前缀和所述 IPv4组播地址后缀形成目标 IPv4组 播地址。  The IPv4 multicast address prefix and the IPv4 multicast address suffix are spliced to form a target IPv4 multicast address.
可选地, 在所述转换规则包括 IPv4组播地址偏移位置参数时, 所述 IPv4 组播地址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位 置参数定义的起始偏移位置的后一位开始获取所述 IPv4组播地址后缀; 以及 在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后位置获取所述 IPv4组播地址 后缀。  Optionally, when the conversion rule includes an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter. The latter bit of the initial offset position begins to acquire the IPv4 multicast address suffix; and when the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication The last location of the IPv6 multicast address obtains the IPv4 multicast address suffix.
可选地, 在所述待转换的组播地址为 IPv6组播地址时, 所述 IPv4组播 地址类型指示基于 IPv4组播地址形成所述目标组播地址时, 所述转换模块通 过如下方式根据所述转换规则将所述组播地址转换为目标组播地址:  Optionally, when the multicast address to be converted is an IPv6 multicast address, when the IPv4 multicast address type indicates that the target multicast address is formed based on an IPv4 multicast address, the converting module is configured according to the following manner: The conversion rule converts the multicast address into a target multicast address:
在所述 IPv6组播地址中, 在所述 IPv6组播地址偏移位置指示的位置获 取 32位的地址作为所述目标 IPv4组播地址。  In the IPv6 multicast address, a 32-bit address is obtained as the target IPv4 multicast address at the location indicated by the IPv6 multicast address offset position.
可选地, 在所述转换规则包括 IPv4组播地址偏移位置参数时, 所述 IPv4 组播地址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位 置参数定义的起始偏移位置的后一位开始获取所述 IPv4组播地址; 以及  Optionally, when the conversion rule includes an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter. The next bit of the starting offset position begins to acquire the IPv4 multicast address;
在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后 32位获取所述 IPv4组播地址。  When the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indicates that the IPv4 multicast address is obtained in the last 32 bits of the IPv6 multicast address.
釆用本发明的实施例的上述方案, 每条转换规则中配置有地址前缀, 可 以设置多条转换规则, 使一个网络范围内的各个区域或组织都能得到属于自 己的地址前缀, 这样可以使地址转换过程保持在指定的地址范围内, 就可以 在服务范围内更精细地进行组播地址范围的划分, 增强服务的灵活性和安全 性, 有利于网络管理。 另外, 本发明实施例的技术方案中, 支持基于 IPv4组 播地址后缀的 IPv6组播地址组成方式, 没有前缀长度的限制, 能够更好地利 用 IPv6组播地址空间, 在网络中实现 IPv4组播地址和 IPv6组播地址间的转 换。 附图概述 With the above solution of the embodiment of the present invention, each conversion rule is configured with an address prefix, and multiple conversion rules can be set, so that each area or organization within a network can obtain its own address prefix, which can make By maintaining the address translation process within the specified address range, the multicast address range can be divided more finely within the service scope, enhancing service flexibility and security, and facilitating network management. In addition, in the technical solution of the embodiment of the present invention, the support is based on the IPv4 group. The IPv6 multicast address composition method of the broadcast address suffix has no prefix length limitation, and can better utilize the IPv6 multicast address space to implement conversion between the IPv4 multicast address and the IPv6 multicast address in the network. BRIEF abstract
图 1为本发明实施例的组播地址的转换方法的流程示意图;  1 is a schematic flowchart of a method for converting a multicast address according to an embodiment of the present invention;
图 2为本发明实施例的组播地址的转换装置的结构框图;  2 is a structural block diagram of a multicast address conversion apparatus according to an embodiment of the present invention;
图 3为本发明实施例的基于 IPv4组播地址后缀的 IPv6组播地址组成格式 的示意图;  3 is a schematic diagram of a format of an IPv6 multicast address suffix based on an IPv4 multicast address suffix according to an embodiment of the present invention;
图 4为本发明实施例的基于 IPv4组播地址的 IPv6组播地址组成格式的示 意图;  4 is a schematic diagram of an IPv6 multicast address composition format based on an IPv4 multicast address according to an embodiment of the present invention;
图 5为本发明实施例的将 IPv4组播地址转换成 IPv6组播地址的流程示意 图;  FIG. 5 is a schematic flowchart of converting an IPv4 multicast address into an IPv6 multicast address according to an embodiment of the present invention;
图 6为本发明实施例的将 IPv6组播地址转换成 IPv4组播地址的流程示意 图;  6 is a schematic flow chart of converting an IPv6 multicast address into an IPv4 multicast address according to an embodiment of the present invention;
图 7为本发明实施例的使用组播地址的转换装置的场景的示意图; 图 8为本发明实施例的另一使用组播地址的转换装置的场景的示意图。  FIG. 7 is a schematic diagram of a scenario of a device for converting a multicast address according to an embodiment of the present invention; FIG. 8 is a schematic diagram of another scenario of a device for converting a multicast address according to an embodiment of the present invention.
本发明的较佳实施方式 Preferred embodiment of the invention
下面将结合附图对本发明实施例进行详细描述。 需要说明的是, 在不冲 突的情况下, 本申请中的实施例及实施例中的特征可以相互任意组合。  The embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of non-conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
本发明的实施例针对相关技术中组播地址转换方法不能很好地利用 IPv6 组播地址空间,也不能对 IPv4组播地址空间和 IPv6组播地址空间进行更精确 的划分, 以及应用的多样性、 灵活性和安全性存在不足的问题, 提供一种组 播地址的转换方法及装置,能够更好地利用 IPv6地址空间,在网络中实现 IPv4 组播地址和 IPv6组播地址间的转换, 该转换方法可以由路由器来实施完成。  The embodiments of the present invention are directed to the related art that the multicast address translation method cannot make good use of the IPv6 multicast address space, and can not more accurately divide the IPv4 multicast address space and the IPv6 multicast address space, and the diversity of applications. The problem of insufficient flexibility and security provides a method and device for converting a multicast address, which can better utilize the IPv6 address space to implement conversion between an IPv4 multicast address and an IPv6 multicast address in the network. The conversion method can be implemented by the router.
图 1为本发明实施例的组播地址的转换方法的流程示意图,如图 1所示, 本实施例中包括如下步骤: FIG. 1 is a schematic flowchart of a method for converting a multicast address according to an embodiment of the present invention, as shown in FIG. The embodiment includes the following steps:
步骤 101、 获取待转换的组播地址所对应的转换规则, 其中, 所述转换 规则包括有组播地址前缀、 IPv4组播地址类型和 IPv4组播地址偏移位置。  Step 101: Obtain a conversion rule corresponding to the multicast address to be converted, where the conversion rule includes a multicast address prefix, an IPv4 multicast address type, and an IPv4 multicast address offset position.
步骤 102、 根据所述转换规则将所述组播地址转换为目标组播地址。 本发明实施例中可以预先设置一个或多个转换规则, 每个转换规则定义 下:  Step 102: Convert the multicast address to a target multicast address according to the conversion rule. In the embodiment of the present invention, one or more conversion rules may be preset, and each conversion rule is defined as follows:
rule_ipv6_m_prefix , Rule_ipv6_m_prefix ,
rule_ipv4_m_prefix ,  Rule_ipv4_m_prefix ,
< rule— ipv4— offset > ,  < rule — ipv4 — offset > ,
< rule— ipv4— type >  < rule— ipv4— type >
其中, rule— ipv6— m_prefix表示转换规则中的 IPv6组播地址前缀, 包含掩 码长度; rule— ipv4— m_prefix表示转换规则中的 IPv4组播地址前缀, 包含掩码 长度; 这样的一对前缀表示了 IPv6组播地址和 IPv4组播地址的转换关系。 Where rule - ipv6 - m_prefix indicates the IPv6 multicast address prefix in the conversion rule, including the mask length; rule - ipv4 - m_prefix indicates the IPv4 multicast address prefix in the conversion rule, including the mask length; such a pair of prefix representations The conversion relationship between an IPv6 multicast address and an IPv4 multicast address.
rule— ipv4— offset为 IPv4组播地址偏移位置参数, 它是转换规则中可选包 含的参数, 用来表示 IPv4组播地址或是 IPv4组播地址后缀在 IPv6组播地址 中的偏移位置, 也就是, IPv4组播地址或是 IPv4组播地址后缀在 IPv6组播 地址中从起始位偏移的位置。 如果转换规则中不包含这个参数, 表示在 IPv6 组播地址的最后位放置 IPv4组播地址或是 IPv4组播地址后缀。  Rule—ipv4—offset is the IPv4 multicast address offset location parameter, which is an optional parameter in the conversion rule. It is used to indicate the IPv4 multicast address or the offset of the IPv4 multicast address suffix in the IPv6 multicast address. That is, the IPv4 multicast address or the IPv4 multicast address suffix is offset from the start bit in the IPv6 multicast address. If the conversion rule does not include this parameter, it means that an IPv4 multicast address or an IPv4 multicast address suffix is placed in the last digit of the IPv6 multicast address.
rule— ipv4— type为 IPv4组播地址类型参数,它也是转换规则中可选包含的 参数, 用来表示在 IPv6 组播地址中包含的是 IPv4 组播地址后缀 ( ipv4_m_suffix )还是完整的 IPv4组播地址( ipv4_m_addr ) , 也可以理解成 是选用基于 IPv4组播地址或 IPv4组播地址后缀的 IPv6组播地址组成格式。 如果转换规则中不包含这个参数或者 rule— ipv4— type的值为 0 , 则表示是基于 IPv4组播地址后缀的 IPv6组播地址组成格式; 如果 rule— ipv4— type的值为 1 , 则表示基于 IPv4组播地址的 IPv6组播地址组成格式。 本发明实施例中定义了两种 IPv6组播地址组成格式, 一种是基于 IPv4 组播地址后缀的 IPv6组播地址组成格式, 一种是基于 IPv4组播地址的 IPv6 组播地址组成格式。釆用哪种格式,由 rule— ipv4— type来确定,当 rule— ipv4— type 为 0 时, 表示釆用基于 IPv4组播地址后缀的 IPv6组播地址组成格式, 当 rule— ipv4— type为 1时, 表示釆用基于 IPv4组播地址的 IPv6组播地址组成格 式。 在转换规则中不包含 rule— ipv4— type的情况下, 默认釆用基于 IPv4组播 地址后缀的 IPv6组播地址组成格式。 Rule—ipv4—type is an IPv4 multicast address type parameter, which is also an optional parameter in the conversion rule. It is used to indicate whether the IPv6 multicast address contains the IPv4 multicast address suffix (ipv4_m_suffix) or the complete IPv4 multicast. The address ( ipv4_m_addr ) can also be understood as an IPv6 multicast address format based on an IPv4 multicast address or an IPv4 multicast address suffix. If the conversion rule does not include this parameter or if the value of rule_ipv4_type is 0, it means that the IPv6 multicast address is based on the IPv4 multicast address suffix. If the value of rule-ipv4_type is 1, it means IPv6 multicast address format of an IPv4 multicast address. In the embodiment of the present invention, two IPv6 multicast address composition formats are defined, one is an IPv6 multicast address composition format based on an IPv4 multicast address suffix, and the other is an IPv6 multicast address composition format based on an IPv4 multicast address. Which format is used by rule-ipv4-type, when rule-ipv4-type is 0, it means that the IPv6 multicast address based on the IPv4 multicast address suffix is used in the format, when rule-ipv4-type is 1 Indicates that the IPv6 multicast address based on the IPv4 multicast address is used in the format. When the conversion rule does not include rule_ipv4_type, the default format is IPv6 multicast address based on the IPv4 multicast address suffix.
在基于 IPv4组播地址后缀的 IPv6组播地址组成格式中, IPv6组播地址 由转换规则中的 IPv6组播地址前缀和 IPv4组播地址后缀以及在有空位情况 下补充的 0组成。从 IPv6组播地址的起始位起,放置 IPv6组播地址前缀; 从 转换规则定义的起始偏移位置的后一位开始放置 IPv4组播地址后缀, 如果转 换规则中不包含 rule— ipv4— offset, 则默认把 IPv4 组播地址后缀直接放置在 IPv6组播地址的最后部分; 其余位置填充 0。  In the IPv6 multicast address format based on the suffix of the IPv4 multicast address, the IPv6 multicast address consists of the IPv6 multicast address prefix and the IPv4 multicast address suffix in the conversion rule and the 0 added in the case of a vacancy. The IPv6 multicast address prefix is placed from the start bit of the IPv6 multicast address. The IPv4 multicast address suffix is placed from the last bit of the starting offset defined by the conversion rule. If the conversion rule does not contain rule_ipv4— Offset, the default IPv4 multicast address suffix is placed in the last part of the IPv6 multicast address; the remaining positions are padded with 0.
其中, ipv4—m— suffix是指需转换的 IPv4组播地址去掉 rule_ipv4_m_prefix 后剩余的部分, 其长度为 32减去 rule— ipv4— m_prefix的长度。  Where ipv4—m—suffix refers to the remaining part of the IPv4 multicast address to be converted after rule_ipv4_m_prefix is removed, and its length is 32 minus the length of rule—ipv4—m_prefix.
图 3为基于 IPv4组播地址后缀的 IPv6组播地址组成格式的示意图,如图 3所示 ,从 IPv6组播地址的左端 0位置起始 ,包含 n比特的 rule— ipv6— m_prefix, 这里 n 也就表示了 rule— ipv6— m_prefix 的掩码长度; 从 0 位置起始偏移 rule— ipv4— offset, 放置 IPv4组播地址后缀 ipv4—m— suffix, 后缀占用 m比特; 其余空位用 0填充。  Figure 3 is a schematic diagram of a format of an IPv6 multicast address suffix based on an IPv4 multicast address suffix. As shown in Figure 3, starting from the left end 0 of the IPv6 multicast address, the n-bit rule-ipv6-m_prefix is included, where n is also It indicates the mask length of rule-ipv6-m_prefix; the offset from the 0 position is rule_ipv4_offset, the IPv4 multicast address suffix ipv4_m_suffix, the suffix occupies m bits; the remaining slots are padded with 0s.
其中, ipv4—m— suffix是由 IPv4组播地址去除掉 rule_ipv4_m_prefix后剩 余的部分, 由 IPv4 地址长度 32 减去 rule— ipv4— m_prefix掩码长度得到 ipv4—m— suffix 的长度, 也就是, m 的值。 在确定的 rule_ipv6_m_prefix 和 ipv4—m— suffix以外的部分, 也就是, 图 3中的 p比特和 q比特所占部分, 用 0 填充。 这里 p和 q的值可以为 0, 也就是, 表示没有这部分空余, 这要靠确 定的两邵分 rule_ipv6_m_prefix和 ipv4—m— suffix以及参数 rule— ipv4— offset来决 定。 rule— ipv4— offset是可选包含的参数, 如果转换规则中没有包含这个参数, 那么 ipv4—m— suffix是放置在 IPv6组播地址的最后部分, 也就是, 第 128位之 前的部分, 此时 q为 0。 这种地址格式下,转换规则中 IPv6组播地址前缀的长度 n和 IPv4组播地 址后缀的长度 m之和不超过 128即可, 即, n + m 128。 n最大可以是 128, 此时要求 m为 0, 这样的转换规则也就是表示一个确定的 IPv6组播地址对应 一个确定的 IPv4 组播地址。 如果转换规则中包含 rule— ipv4— offset , 则 rule— ipv4— offset的值不能大于 128 - m, 也就是, 必须留给 ipv4—m— suffix足够 的空间。 Where ipv4_m_suffix is the remaining part after the rule_ipv4_m_prefix is removed from the IPv4 multicast address, and the length of the ipv4_m_suffix is obtained by subtracting the length of the rule_ipv4_m_prefix from the IPv4 address length 32, that is, the m value. The portion other than the determined rule_ipv6_m_prefix and ipv4_m_suffix, that is, the portion occupied by the p-bit and the q-bit in Fig. 3, is padded with 0. Here, the values of p and q can be 0, that is, it means that there is no such space, which is determined by the determined two-scores rule_ipv6_m_prefix and ipv4-m-suffix and the parameter rule-ipv4-offset. Rule—ipv4—offset is an optional parameter. If the parameter is not included in the conversion rule, then ipv4—m—suffix is placed in the last part of the IPv6 multicast address, that is, the part before the 128th bit. q is 0. In this address format, the sum of the length n of the IPv6 multicast address prefix and the length m of the IPv4 multicast address suffix in the conversion rule may not exceed 128, that is, n + m 128. The maximum value of n can be 128. In this case, m is required to be 0. Such a conversion rule means that a certain IPv6 multicast address corresponds to a certain IPv4 multicast address. If the conversion rule contains rule_ipv4_offset, the value of rule_ipv4_offset cannot be greater than 128-m, that is, it must be reserved for ipv4-m-suffix.
在基于 IPv4组播地址的 IPv6组播地址组成格式中, IPv6组播地址由 IPv6 组播地址前缀和完整的 IPv4组播地址以及在有空位情况下补充的 0组成。 从 IPv6组播地址的起始位起, 放置 IPv6组播地址前缀; 从转换规则定义的起始 偏移位置的后一位开始放置完整的 IPv4 组播地址, 如果转换规则中不包含 rule— ipv4— offset, 则默认把 IPv4组播地址直接放置在 IPv6组播地址的最后部 分的 32位; 其余位置填充 0。  In an IPv6 multicast address-based IPv6 multicast address format, an IPv6 multicast address consists of an IPv6 multicast address prefix and a complete IPv4 multicast address and a zero supplement in the case of a vacancy. The IPv6 multicast address prefix is placed from the start bit of the IPv6 multicast address. The complete IPv4 multicast address is placed from the last bit of the start offset defined by the conversion rule. If the conversion rule does not contain rule-ipv4 — offset, by default, the IPv4 multicast address is placed directly in the 32-bit part of the last part of the IPv6 multicast address; the remaining positions are padded with 0.
图 4为基于 IPv4组播地址的 IPv6组播地址组成格式, 如图 4所示, 从 IPv6组播地址的左端 0位置起始, 包含 n比特的 rule— ipv6— m_prefix, 这里 n 也就表示了 rule— ipv6— m_prefix 的掩码长度; 从 0 位置起始偏移 rule— ipv4— offset,放置完整的 ipv4— m— addr, 占用 32比特;其余位置用 0填充。  Figure 4 shows the IPv6 multicast address composition format based on the IPv4 multicast address. As shown in Figure 4, starting from the left end 0 of the IPv6 multicast address, the n-bit rule-ipv6-m_prefix is included, where n also indicates Rule—ipv6—The mask length of m_prefix; offset from the 0 position to rule-ipv4—offset, placing the complete ipv4—m—addr, occupying 32 bits; the rest of the position is padded with 0s.
其中,在确定的 rule— ipv6— m_prefix和 ipv4_m_addr以夕卜的部分,也就是, 图 4中的 p比特和 q比特所占部分, 用 0填充。 这里 p和 q的值可以为 0, 也 就是, 表示没有这部分空余, 这要靠确定的两部分 rule— ipv6— m_prefix 和 ipv4_m_addr以及参数 rule— ipv4— offset来决定。 rule— ipv4— offset是可选包含的 参数, 如果转换规则中没有包含这个参数, 那么 ipv4— m— addr是放置在 IPv6 组播地址的最后部分, 占用 32位, 此时 q为 0。  Wherein, in the determined rule - ipv6 - m_prefix and ipv4_m_addr, the portion occupied by p bits and q bits in Fig. 4 is padded with 0. Here, the values of p and q can be 0, that is, there is no such part of the space, which is determined by the determined two parts rule - ipv6 - m_prefix and ipv4_m_addr and the parameter rule - ipv4 - offset. Rule—ipv4—offset is an optional parameter. If the parameter is not included in the conversion rule, then ipv4—m—addr is placed in the last part of the IPv6 multicast address, occupying 32 bits, and q is 0.
这种地址格式下 ,转换规则中 IPv6组播地址前缀的长度 n和 IPv4组播地 址的长度 32之和不超过 128即可, 即 n + 32 128, 也就是, n 96。 另夕卜, 如果包含 rule— ipv4— offset, 则 rule— ipv4— offset值不能大于 128 - 32 = 96 ,也就 是, 必须留给 ipV4— m— addr足够的空间。 In this address format, the sum of the length n of the IPv6 multicast address prefix and the length 32 of the IPv4 multicast address in the conversion rule may not exceed 128, that is, n + 32 128, that is, n 96. In addition, if rule_ipv4_offset is included, the rule_ipv4_offset value cannot be greater than 128 - 32 = 96, that is, it must be reserved for ip V 4 - m - addr.
在进行组播地址间的转换时, 首先在需要进行组播地址转换的设备上获 取需要使用的一组转换规则, 其中可以包含一个或多个转换规则。  When performing the conversion between multicast addresses, first obtain a set of conversion rules to be used on the device that needs to perform multicast address translation, which may include one or more conversion rules.
在 IPv4组播地址向 IPv6组播地址转换的过程中, 将需要被转换的 IPv4 组播地址与转换规则中的 IPv6组播地址前缀进行匹配, 按照最长匹配的方法 匹配到合适的 IPv6组播地址前缀后, 即, 获取到一条转换规则并得到合适的 IPv6组播地址前缀。 如果没有匹配到合适的 IPv6组播地址前缀, 则不作转换 处理。根据该转换规则中可选嵌入的 IPv4组播地址类型参数来选择基于 IPv4 组播地址后缀还是 IPv4组播地址的 IPv6组播地址组成方式 ,如果该转换规则 中没有定义 IPv4组播地址类型参数, 则默认选择基于 IPv4组播地址后缀的 IPv6组播地址组成方式;根据可选的 IPv4组播地址偏移位置参数来确定 IPv4 组播地址或 IPv4组播地址后缀在 IPv6组播地址中的偏移位置,如果该转换规 则中没有定义 IPv4组播地址偏移位置 ,则默认选择在 IPv6组播地址的最后位 置放置 IPv4组播地址或 IPv4组播地址后缀。 然后根据 IPv6组播地址格式, 构建目标 IPv6组播地址( ipv6_m_addr ) 。 In the process of converting an IPv4 multicast address to an IPv6 multicast address, IPv4 that needs to be converted The multicast address is matched with the IPv6 multicast address prefix in the conversion rule. After the longest match is matched to the appropriate IPv6 multicast address prefix, a conversion rule is obtained and the appropriate IPv6 multicast address prefix is obtained. If no suitable IPv6 multicast address prefix is matched, no conversion processing is performed. The IPv6 multicast address type parameter based on the IPv4 multicast address suffix or the IPv4 multicast address is selected according to the optional IPv4 multicast address type parameter in the conversion rule. If the IPv4 multicast address type parameter is not defined in the conversion rule, By default, the IPv6 multicast address suffix based on the IPv4 multicast address suffix is selected. The IPv4 multicast address offset parameter is used to determine the offset of the IPv4 multicast address or IPv4 multicast address suffix in the IPv6 multicast address. Location: If the IPv4 multicast address offset location is not defined in the translation rule, the IPv4 multicast address or IPv4 multicast address suffix is placed in the last position of the IPv6 multicast address by default. Then, the target IPv6 multicast address ( ipv6_m_addr ) is constructed according to the IPv6 multicast address format.
在 IPv6组播地址向 IPv4组播地址转换的过程中, 将需要被转换的 IPv6 组播地址与转换规则中的 IPv4组播地址前缀进行匹配, 按照最长匹配的方法 匹配到合适的 IPv4组播地址前缀后, 即, 获取到一条转换规则并得到合适的 IPv4组播地址前缀。 如果没有匹配到合适的 IPv4组播地址前缀, 则不作转换 处理。 根据转换规则中可选嵌入的 IPv4组播地址类型参数来选择基于 IPv4 组播地址后缀还是 IPv4组播地址的 IPv6组播地址组成方式,如果该转换规则 中没有定义 IPv4组播地址类型参数, 则默认选择基于 IPv4组播地址后缀的 IPv6组播地址组成方式;根据可选的 IPv4组播地址偏移位置参数来确定 IPv4 组播地址或 IPv4组播地址后缀在 IPv6组播地址中的偏移位置。 如果是基于 IPv4组播地址后缀的方式,根据转换规则中 IPv4组播地址前缀的长度来计算 出 IPv4组播地址后缀的长度,然后按照 IPv4组播地址偏移位置参数指定的位 置和计算出的 ιρν4组播地址后缀长度获取到 IPv4组播地址后缀;如果没有包 含 IPv4组播地址偏移位置参数,则直接从 IPv6组播地址最后段按照计算出的 IPv4组播地址后缀长度获取 IPv4组播地址后缀, 拼接转换规则中的 IPv4地 址前缀与获取到的 IPv4组播地址后缀,获取到目标 IPv4组播地址。如果是基 于 IPv4组播地址的 IPv6组播地址组成方式,则直接从偏移位置后一位开始获 取完整的 IPv4组播地址,如果没有包含 IPv4组播地址偏移位置参数,则直接 从 IPv6组播地址最后 32位获取完整的 IPv4组播地址。 本发明实施例还提供了一种组播地址的转换装置,该装置可以是路由器, 如图 2所示, 本实施例包括: During the process of converting an IPv6 multicast address to an IPv4 multicast address, match the IPv6 multicast address to be translated with the IPv4 multicast address prefix in the conversion rule, and match the appropriate IPv4 multicast according to the longest matching method. After the address prefix, that is, a conversion rule is obtained and the appropriate IPv4 multicast address prefix is obtained. If no suitable IPv4 multicast address prefix is matched, no conversion processing is performed. If the IPv4 multicast address type parameter is not specified in the conversion rule, the IPv4 multicast address type parameter is not specified in the conversion rule. By default, the IPv6 multicast address suffix is configured based on the IPv4 multicast address suffix. The IPv4 multicast address offset position parameter is used to determine the offset position of the IPv4 multicast address or IPv4 multicast address suffix in the IPv6 multicast address. . If the IPv4 multicast address suffix is used, the length of the IPv4 multicast address suffix is calculated according to the length of the IPv4 multicast address prefix in the conversion rule, and then calculated according to the location specified by the IPv4 multicast address offset location parameter. ιρ ν 4 multicast address suffix length acquired IPv4 multicast address suffix; IPv4 multicast address in case no offset parameter, the IPv6 multicast address acquired directly from the last stage according to the calculated address of the IPv4 multicast group suffix length IPv4 The broadcast suffix, the IPv4 address prefix in the splicing conversion rule, and the obtained IPv4 multicast address suffix, obtain the target IPv4 multicast address. If the IPv6 multicast address is based on the IPv4 multicast address, the complete IPv4 multicast address is obtained directly from the next bit of the offset. If the IPv4 multicast address offset location parameter is not included, the IPv6 group is directly obtained. The last 32 bits of the broadcast address get the full IPv4 multicast address. The embodiment of the present invention further provides a device for converting a multicast address, and the device may be a router. As shown in FIG. 2, the embodiment includes:
获取模块 20, 其设置成: 获取待转换的组播地址所对应的转换规则, 其 中, 所述转换规则包括有组播地址前缀、 IPv4组播地址类型和 IPv4组播地址 偏移位置; 以及  The obtaining module 20 is configured to: obtain a conversion rule corresponding to the multicast address to be converted, where the conversion rule includes a multicast address prefix, an IPv4 multicast address type, and an IPv4 multicast address offset position;
转换模块 21 , 其设置成: 根据所述转换规则将所述组播地址转换为目标 组播地址。  The conversion module 21 is configured to: convert the multicast address into a target multicast address according to the conversion rule.
可选地, 在所述待转换的组播地址为互联网协议版本 4 ( IPv4 )组播地址 时, 所述转换规则包括互联网协议版本 6 ( IPv6 )组播地址前缀和 IPv4组播 地址前缀; 以及  Optionally, when the multicast address to be converted is an Internet Protocol version 4 (IPv4) multicast address, the conversion rule includes an Internet Protocol version 6 (IPv6) multicast address prefix and an IPv4 multicast address prefix;
在所述 IPv4组播地址类型指示基于 IPv4组播地址后缀形成所述目标组 播地址时,所述转换模块 21通过如下方式根据所述转换规则将所述组播地址 转换为目标组播地址:  When the IPv4 multicast address type indicates that the target multicast address is formed based on the IPv4 multicast address suffix, the converting module 21 converts the multicast address into a target multicast address according to the conversion rule by:
根据所述 IPv4组播地址前缀和所述 IPv4组播地址计算出所述 IPv4组播 地址后缀; 以及  Calculating the IPv4 multicast address suffix according to the IPv4 multicast address prefix and the IPv4 multicast address;
在 IPv6组播地址的起始位置放置所述 IPv6组播地址前缀, 在所述 IPv4 组播地址偏移位置指示的位置放置所述 IPv4组播地址后缀, 其它空位置 0, 形成目标 IPv6组播地址。  The IPv6 multicast address prefix is placed at the beginning of the IPv6 multicast address, and the IPv4 multicast address suffix is placed at the position indicated by the IPv4 multicast address offset position, and other empty positions are 0, forming a target IPv6 multicast. address.
可选地, 在所述转换规则包括 IPv4组播地址偏移位置参数时, 所述 IPv4 组播地址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位 置参数定义的起始偏移位置的后一位开始放置所述 IPv4组播地址后缀; 以及 在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后位置放置所述 IPv4组播地址 后缀。  Optionally, when the conversion rule includes an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter. The next bit of the initial offset position begins to place the IPv4 multicast address suffix; and when the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication The IPv4 multicast address suffix is placed at the last position of the IPv6 multicast address.
可选地, 在所述待转换的组播地址为 IPv4组播地址时, 所述转换规则包 括 IPv6组播地址前缀和 IPv4组播地址前缀; 以及  Optionally, when the multicast address to be converted is an IPv4 multicast address, the conversion rule includes an IPv6 multicast address prefix and an IPv4 multicast address prefix;
在所述 IPv4组播地址类型指示基于 IPv4组播地址形成所述目标组播地 址时,所述转换模块 21通过如下方式根据所述转换规则将所述组播地址转换 为目标组播地址: Forming, at the IPv4 multicast address type, the target multicast location based on an IPv4 multicast address At the time of the address, the conversion module 21 converts the multicast address into a target multicast address according to the conversion rule by:
在 IPv6组播地址的起始位置放置所述 IPv6组播地址前缀, 在所述 IPv4 组播地址偏移位置指示的位置放置所述 IPv4组播地址, 其它空位置 0, 形成 所述目标 IPv6组播地址。  The IPv6 multicast address prefix is placed at the beginning of the IPv6 multicast address, and the IPv4 multicast address is placed at the location indicated by the IPv4 multicast address offset location, and other empty locations are 0, forming the target IPv6 group. Broadcast address.
可选地, 在所述转换规则包括 IPv4组播地址偏移位置参数时, 所述 IPv4 组播地址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位 置参数定义的起始偏移位置的后一位开始放置所述 IPv4组播地址; 以及  Optionally, when the conversion rule includes an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter. The next bit of the starting offset position begins to place the IPv4 multicast address;
在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后 32位放置所述 IPv4组播地址。  When the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indicates that the IPv4 multicast address is placed in the last 32 bits of the IPv6 multicast address.
可选地, 在所述待转换的组播地址为 IPv6组播地址时, 所述转换规则包 括有 IPv4组播地址前缀;  Optionally, when the multicast address to be converted is an IPv6 multicast address, the conversion rule includes an IPv4 multicast address prefix;
在所述 IPv4组播地址类型指示基于 IPv4组播地址后缀形成所述目标组 播地址时,所述转换模块 21通过如下方式根据所述转换规则将所述组播地址 转换为目标组播地址:  When the IPv4 multicast address type indicates that the target multicast address is formed based on the IPv4 multicast address suffix, the converting module 21 converts the multicast address into a target multicast address according to the conversion rule by:
根据所述 IPv4组播地址前缀的长度计算出所述 IPv4组播地址后缀的长 度;  Calculating a length of the IPv4 multicast address suffix according to the length of the IPv4 multicast address prefix;
在所述 IPv6组播地址中, 在 IPv6组播地址偏移位置指示的位置根据所 述 IPv4组播地址后缀的长度获取所述 IPv4组播地址后缀; 以及  And obtaining, in the IPv6 multicast address, the IPv4 multicast address suffix according to the length of the IPv4 multicast address suffix at a location indicated by the IPv6 multicast address offset location;
拼接所述 IPv4组播地址前缀和所述 IPv4组播地址后缀形成目标 IPv4组 播地址。  The IPv4 multicast address prefix and the IPv4 multicast address suffix are spliced to form a target IPv4 multicast address.
可选地, 在所述转换规则包括 IPv4组播地址偏移位置参数时, 所述 IPv4 组播地址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位 置参数定义的起始偏移位置的后一位开始获取所述 IPv4组播地址后缀; 以及 在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后位置获取所述 IPv4组播地址 后缀。  Optionally, when the conversion rule includes an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter. The latter bit of the initial offset position begins to acquire the IPv4 multicast address suffix; and when the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication The last location of the IPv6 multicast address obtains the IPv4 multicast address suffix.
可选地, 在所述待转换的组播地址为 IPv6组播地址时, 所述 IPv4组播 地址类型指示基于 IPv4组播地址形成所述目标组播地址时,所述转换模块 21 通过如下方式根据所述转换规则将所述组播地址转换为目标组播地址: Optionally, when the multicast address to be converted is an IPv6 multicast address, the IPv4 multicast When the address type indicates that the target multicast address is formed based on the IPv4 multicast address, the converting module 21 converts the multicast address into a target multicast address according to the conversion rule by:
在所述 IPv6组播地址中, 在所述 IPv6组播地址偏移位置指示的位置获 取 32位的地址作为所述目标 IPv4组播地址。  In the IPv6 multicast address, a 32-bit address is obtained as the target IPv4 multicast address at the location indicated by the IPv6 multicast address offset position.
可选地, 在所述转换规则包括 IPv4组播地址偏移位置参数时, 所述 IPv4 组播地址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位 置参数定义的起始偏移位置的后一位开始获取所述 IPv4组播地址; 以及  Optionally, when the conversion rule includes an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indication is defined in the IPv6 multicast address from the IPv4 multicast address offset location parameter. The next bit of the starting offset position begins to acquire the IPv4 multicast address;
在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后 32位获取所述 IPv4组播地址。  When the conversion rule does not include an IPv4 multicast address offset location parameter, the IPv4 multicast address offset location indicates that the IPv4 multicast address is obtained in the last 32 bits of the IPv6 multicast address.
该转换装置支持上述 IPv4组播地址和 IPv6组播地址间的转换, 能够在 获取定义的一组转换规则后, 把输入的能够匹配到一条转换规则的 IPv4组播 地址转换成 IPv6组播地址 ,把输入的能够匹配到一条转换规则的 IPv6组播地 址转换成 IPv4组播地址, 实现组播协议报文和数据报文的转发, 沟通 IPv4 网络和 IPv6网络之间的组播应用。 The conversion device supports the conversion between the IPv4 multicast address and the IPv6 multicast address, and can obtain an IPv4 multicast address that can be matched to a conversion rule into an IPv6 multicast address after obtaining a defined set of conversion rules. The IPv6 multicast address that can be matched to a conversion rule is converted into an IPv4 multicast address, and the multicast protocol packet and the data packet are forwarded, and the multicast application between the IPv4 network and the IPv6 network is communicated.
本发明实施例中定义的转换规则, 可以根据组播地址前缀进行匹配, 只 对能够匹配到组播地址前缀的地址进行转换, 否则不进行转换。 在某个范围 内, 只希望获取到某些组播地址的服务, 这样在一条转换规则中就配置这些 组播地址相应的地址前缀, 而不希望得到服务的组播地址由于不能匹配而无 法穿越 IPv4网络和 /或 IPv6网络的边界, 这样在设备使用中有较好的灵活性 和安全性。 本发明实施例的技术方案中可以设置多条转换规则, 使得一个网 络范围内的各个区域或组织都可以得到属于自己的地址前缀, 地址转换过程 保持在指定的地址范围内, 这样就可以在服务范围内更精细地进行组播地址 范围的划分, 增强服务的灵活性和安全性, 有利于网络管理。  The conversion rule defined in the embodiment of the present invention can be matched according to the multicast address prefix, and only the address that can match the multicast address prefix is converted, otherwise the conversion is not performed. In a certain range, you only need to obtain services of certain multicast addresses, so that the corresponding address prefixes of these multicast addresses are configured in a conversion rule, and the multicast addresses that do not want to be served cannot be traversed because they cannot match. The boundaries of IPv4 networks and/or IPv6 networks provide better flexibility and security in the use of devices. In the technical solution of the embodiment of the present invention, multiple conversion rules may be set, so that each area or organization within a network can obtain its own address prefix, and the address conversion process is maintained within a specified address range, so that the service can be served. The division of the multicast address range is finer in the scope, which enhances the flexibility and security of the service and is beneficial to network management.
另外, 相关技术中由于要保证完整 IPv4组播地址的 32位, 因此 IPv6组 播地址前缀的长度最长为 96,而本发明实施例中支持使用基于 IPv4地址后缀 的 IPv6组播地址组成方式,没有前缀长度的限制,甚至可以扩展到 IPv6极限 的 128位, 能够更好地利用 IPv6组播地址空间。 下面结合附图及实施例对本发明实施方式的组播地址的转换方法进行介 实施例一 In addition, in the related art, since the 32-bit of the complete IPv4 multicast address is to be guaranteed, the length of the IPv6 multicast address prefix is up to 96, and the IPv6 multicast address composition method based on the IPv4 address suffix is supported in the embodiment of the present invention. Without the limitation of the prefix length, it can even be extended to 128 bits of the IPv6 limit, which can better utilize the IPv6 multicast address space. Embodiment 1 of the method for converting a multicast address according to an embodiment of the present invention is described below with reference to the accompanying drawings and embodiments.
本实施例能够将 IPv4组播地址转换为 IPv6组播地址,如图 5所示,本实 施例包括以下步骤:  In this embodiment, the IPv4 multicast address can be translated into an IPv6 multicast address. As shown in FIG. 5, the embodiment includes the following steps:
步骤 501、 首先需要获取预先定义的一组转换规则, 这一组规则中可以 包含一条或多条转换规则。  Step 501: First, a predefined set of conversion rules needs to be obtained, and the set of rules may include one or more conversion rules.
输入待转换的 ipv4— m— addr,在该组转换规则中进行匹配,可以按照 IPv4 组4番地址前缀最长匹配的原则进行匹配。  Enter ipv4—m—addr to be converted, and match in the set of conversion rules. You can match according to the principle that the IPv4 group has the longest matching of the address prefixes.
步骤 502、 如果没有匹配到转换规则, 则做结束处理; 如果匹配到一条 转换规则, 进入步骤 3。  Step 502: If the conversion rule is not matched, the end processing is performed; if a conversion rule is matched, the process proceeds to step 3.
步骤 503、 获取匹配的转换规则, 其中包含 rule— ipv6一 m_prefix和其他参 数。  Step 503: Obtain a matching conversion rule, which includes rule_ipv6-m_prefix and other parameters.
步骤 504、 判断转换规则中是否有 rule— ipv4— type, 如果转换规则没有包 含这个参数或是这个参数值为 0, 进入步骤 5 , 如果转换规则包含了这个参数 且参数值为 1, 则进入步骤 9。  Step 504: Determine whether there is a rule-ipv4_type in the conversion rule. If the conversion rule does not include the parameter or the value of the parameter is 0, go to step 5. If the conversion rule includes the parameter and the parameter value is 1, enter the step. 9.
步骤 505、根据转换规则中 rule— ipv4— m_prefix和输入的 IPv4组播地址计 算 ipv4—m— suffix, 包括计算 ipv4—m— suffix的长度。  Step 505: Calculate ipv4_m_suffix according to rule-ipv4_m_prefix and the input IPv4 multicast address in the conversion rule, including calculating the length of ipv4_m_suffix.
步骤 506、 判断转换规则中 rule— ipv4— offset参数是否存在, 如果不存在, 则进入步骤 7 , 如果存在, 则进入步骤 8。  Step 506: Determine whether the rule_ipv4_offset parameter exists in the conversion rule. If not, go to step 7. If yes, go to step 8.
步骤 507、 IPv6组播地址按照 rule— ipv6— m_prefix在最前, ipv4—m— suffix 在最后的方式组成, 其他空位补 0。 组成目标 ipv6— m— addr, 进入步骤 12。  Step 507: The IPv6 multicast address is in the first place according to rule-ipv6-m_prefix, and ipv4-m-suffix is composed in the last mode, and other slots are filled with 0. To form the target ipv6—m—addr, go to step 12.
步骤 508 、 IPv6 组播地址中把 rule— ipv6— m_prefix 在最前, 从 rule— ipv4— offset指定的位置的后一位开始放置 ipv4—m— suffix, 其余空位补 0。 进入步骤 12。  Step 508: In the IPv6 multicast address, put rule-ipv6-m_prefix at the forefront, and place ipv4-m_suffix from the last digit of the position specified by rule-ipv4-offset, and the remaining slots are filled with 0. Go to step 12.
步骤 509、 判断转换规则中 rule jpv4— offset参数是否存在, 如果不存在, 则进入步骤 10, 如果存在, 则进入步骤 11。 步骤 510、 IPv6组播地址按照 rule— ipv6 m_prefix在最前, ipv4_m_addr 在最后的 32位方式组成, 其他空位补 0。 组成目标 ipv6— m— addr, 进入步骤 12。 Step 509: Determine whether the rule jpv4_offset parameter exists in the conversion rule, if not, proceed to step 10, and if yes, proceed to step 11. Step 510: The IPv6 multicast address is in front of rule-ipv6 m_prefix, and ipv4_m_addr is composed in the last 32-bit mode, and other slots are filled with 0. To form the target ipv6-m-addr, go to step 12.
步骤 511 、 IPv6 组播地址中把 rule_ipv6_m_prefix 在最前, 从 rule— ipv4— offset指定的位置的后一位开始放置 ipv4— m— addr, 其余空位补 0。 进入步骤 12。  Step 511: In the IPv6 multicast address, the rule_ipv6_m_prefix is first, and the ipv4_m_addr is placed from the last bit of the position specified by rule-ipv4-offset, and the remaining slots are filled with 0. Go to step 12.
步骤 512、 输出转换结果, 也就是, 输出目标 ipv6— m— addr。  Step 512: Output the conversion result, that is, output the target ipv6_m_addr.
以上流程只是给出一种从 IPv4组播地址向 IPv6组播地址转换的流程, 其中对可选包含的参数 rule一 ipv4— type和 rule— ipv4— offset的先后顺序判断可以 进行改变。 上述流程是先判断 rule— ipv4— type后判断 rule— ipv4— offset, 也可以 先判断 rule— ipv4— offset后判断 rule— ipv4— type以对流程进行调整, 涉及到步骤 细节稍有不同, 流程中执行的步骤也可以进行简单的拆分或合并, 但不影响 输出结果。  The above process only shows a process of converting from an IPv4 multicast address to an IPv6 multicast address, wherein the order of the optional parameters rule ipv4_type and rule_ipv4_offset can be changed. The above process is to determine the rule-ipv4-type after determining the rule-ipv4-type, or judge the rule-ipv4-type after determining the rule-ipv4-offset to adjust the process, which involves a slightly different step, in the process. The steps performed can also be easily split or merged without affecting the output.
实施例二  Embodiment 2
本实施例能够将 IPv6组播地址转换为 IPv4组播地址,如图 6所示,本实 施例中包括以下步骤:  In this embodiment, the IPv6 multicast address can be converted into an IPv4 multicast address. As shown in FIG. 6, the embodiment includes the following steps:
步骤 601、 前置条件是获取预先定义的一组转换规则, 这一组规则中可 以包含一条或多条转换规则。  Step 601: The precondition is to obtain a predefined set of conversion rules, and the set of rules may include one or more conversion rules.
输入待转换的 ipv6—m— addr, 在转换规则中进行匹配, 可以按照 IPv6地 址前缀最长匹配的原则进行匹配。  Enter the ipv6-m-addr to be converted, and match in the conversion rule. You can match according to the principle that the IPv6 address prefix is the longest match.
步骤 602、 如果没有匹配到转换规则, 则做结束处理; 如果匹配到一条 转换规则, 进入步骤 3。  Step 602: If the conversion rule is not matched, the end processing is performed; if a conversion rule is matched, the process proceeds to step 3.
步骤 603、 获取匹配的转换规则 , 其中包含 rule— ipv4— m_prefix和其他参 数。  Step 603: Obtain a matching conversion rule, which includes rule—ipv4—m_prefix and other parameters.
步骤 604、 判断转换规则中是否有 rule— ipv4— type, 如果转换规则中没有 这个参数或是这个参数值为 0,进入步骤 5 ,如果存在这个参数且参数值为 1 , 则进入步骤 10。  Step 604: Determine whether there is a rule-ipv4_type in the conversion rule. If there is no such parameter in the conversion rule or the value of the parameter is 0, go to step 5. If the parameter exists and the parameter value is 1, go to step 10.
步骤 605、根据转换规则中 rule— ipv4— m_prefix计算 ipv4—m一 suffix的长度。 步骤 606、 判断转换规则中 rule— ipv4— offset参数是否存在, 如果不存在, 则进入步骤 7 , 如果存在, 则进入步骤 8。 Step 605: Calculate the length of ipv4_m_suffix according to rule_ipv4_m_prefix in the conversion rule. Step 606: Determine whether the rule_ipv4_offset parameter exists in the conversion rule. If not, go to step 7. If yes, go to step 8.
步骤 607、 根据 ipv4—m— suffix的长度在输入的 IPv6组播地址最后的部分 获取 ipv4—m— suffix , 进入步骤 9。  Step 607: Obtain ipv4_m_suffix according to the length of ipv4_m_suffix at the last part of the input IPv6 multicast address, and go to step 9.
步骤 608、 按 rule— ipv4— offset指定的位置, 从输入的 IPv6组播地址偏移 rule— ipv4— offset 位, 按照 ipv4—m— suffix 的长度从其后一位开始获取 ipv4— m— suffix。 进入步骤 9。  Step 608: According to the position specified by rule-ipv4-offset, offset the rule-ipv4-offset bit from the input IPv6 multicast address, and obtain ipv4_m_suffix from the next bit according to the length of ipv4-m_suffix. Go to step 9.
步骤 609、拼接 rule_ipv4_m_prefix和 ipv4—m— suffix得 J目标 ipv4_m_addr, 进入步骤 13。  Step 609, splicing rule_ipv4_m_prefix and ipv4_m_suffix to get the J target ipv4_m_addr, and proceed to step 13.
步骤 610、 判断转换规则中 rule— ipv4— offset参数是否存在, 如果不存在, 则进入步骤 11 , 如果存在, 则进入步骤 12。  Step 610: Determine whether the rule_ipv4_offset parameter exists in the conversion rule. If not, go to step 11. If yes, go to step 12.
步骤 611、 从输入的 IPv6 组播地址最后段的部分获取 32 位的 ipv4_m_addr, 进入步骤 13。  Step 611: Obtain a 32-bit ipv4_m_addr from the last part of the input IPv6 multicast address, and proceed to step 13.
步骤 612、 按 rule— ipv4— offset指定的位置, 从输入的 IPv6组播地址偏移 rule— ipv4— offset位, 从其后一位开始获取 32位的 ipv4— m— addr , 进入步骤 13。  Step 612: According to the position specified by rule-ipv4-offset, offset the rule-ipv4-offset bit from the input IPv6 multicast address, and obtain the 32-bit ipv4_m-addr from the next bit, and proceed to step 13.
步骤 613、 输出转换结果, 也就是, 输出目标 ipv4— m— addr。  Step 613, outputting the conversion result, that is, outputting the target ipv4_m_addr.
以上流程只是给出一种从 IPv6组播地址向 IPv4组播地址转换的流程, 其中对可选包含的参数 rule— ipv4— type和 rule— ipv4— offset的先后顺序判断可以 进行改变。 上述流程中是先判断 rule— ipv4— type后判断 rule— ipv4— offset, 也可 以先判断 rule— ipv4— offset后判断 rule— ipv4— type以对流程进行调整, 涉及到步 骤细节稍有不同, 流程中执行的步骤也可以进行简单的拆分或合并, 但不影 响输出结果。  The above process only shows a process of converting from an IPv6 multicast address to an IPv4 multicast address, wherein the order of the optional parameters rule ipv4_type and rule_ipv4_offset can be changed. In the above process, the rule-ipv4_type is judged first and then the rule-ipv4_offset is judged. The rule_ipv4_type can be judged first to determine the rule_ipv4_type to adjust the process, which involves slightly different step details. The steps performed in the process can also be simply split or merged without affecting the output.
下面结合应用场景对本发明实施例的组播地址的转换装置进行介绍。 图 7为本发明实施例的组播地址的转换装置的一种应用场景, 在图 7中 转换装置连接 IPv6网络和 IPv4网络。 IPv6网络中有计算机 1 ,想要获取由 IPv4 网络中的计算机 2发出的组播数据。  The device for converting a multicast address according to an embodiment of the present invention is described below in conjunction with an application scenario. FIG. 7 is a schematic diagram of an application scenario of a multicast address translation apparatus according to an embodiment of the present invention. In FIG. 7, the conversion apparatus is connected to an IPv6 network and an IPv4 network. There is a computer 1 in the IPv6 network, which wants to obtain multicast data sent by the computer 2 in the IPv4 network.
转换装置获取的转换规则包含两个转换规则:  The conversion rules obtained by the conversion device contain two conversion rules:
{ ffl8:5::/40, 235.0.0.0/24, 104, 0}; { ffl8:6::/40, 235.1.0.0/24, 96, 1 }; { ffl8:5::/40, 235.0.0.0/24, 104, 0}; { ffl8:6::/40, 235.1.0.0/24, 96, 1 };
假设计算机 1想要获取的组播数据的组播地址是 ffl8:5::6:0; 计算机 2需 要发送的组播数据的目标地址是 235.0.0.6。  Assume that the multicast address of the multicast data that the computer 1 wants to acquire is ffl8:5::6:0; the destination address of the multicast data that the computer 2 needs to send is 235.0.0.6.
在计算机 1 向计算机 2进行数据请求时, 计算机 1 发送针对组播地址 ffl 8: 5:: 6: 0的才艮告才艮文,如, MLD ( Multicast Listener Discover ,组播侦听发现) 报告报文, 经过网络组播协议传输到转换装置。  When the computer 1 makes a data request to the computer 2, the computer 1 sends a report to the multicast address ffl 8: 5:: 6: 0, for example, an MLD (Multicast Listener Discover) report. The message is transmitted to the conversion device via a network multicast protocol.
转换装置用 ffl8:5::6:0去匹配转换规则, 正好匹配到 rule— ipv6— m_prefix 的 ffl8:5::/40, 得到这条转换规则。 该转换规则中 rule— ipv4— type是 0, 表示是 基于 IPv4组播地址后缀的 IPv6组播地址格式。转换规则中 rule— ipv4— m_prefix 对应 235.0.0.0/24, 则可以得知 ipv4—m— suffix长度为 8比特。 再从转换规则中 获取 rule— ipv4— offset是 104, 就可以从 ffl8:5::6:0的第 105位开始获取 8个比 特的数据, 也就是, 0x06 , 按照 10 进制是 6 , 拼接 rule_ipv4_m_prefix和 ipv4—m— suffix就可以得到 IPv4组播地址 235.0.0.6。 这样经过转换装置的组播 协议报文就把在 IPv6报文中使用的请求组播地址 ffl8:5::6:0转换成了在 IPv4 网络中使用的 235.0.0.6。  The conversion device uses ffl8:5::6:0 to match the conversion rule, which matches the ffl8:5::/40 of rule-ipv6-m_prefix to get the conversion rule. In the conversion rule, rule_ipv4_type is 0, which means that the IPv6 multicast address format is based on the IPv4 multicast address suffix. In the conversion rule rule - ipv4 - m_prefix corresponds to 235.0.0.0/24, then you can know that ipv4 - m - suffix length is 8 bits. Then get rule-ipv4_offset from the conversion rule is 104, you can get 8 bits of data from the 105th bit of ffl8:5::6:0, that is, 0x06, according to the decimal is 6, splicing Rule_ipv4_m_prefix and ipv4—m—suffix can get the IPv4 multicast address 235.0.0.6. In this way, the multicast protocol packet passing through the conversion device converts the request multicast address ffl8:5::6:0 used in the IPv6 packet into 235.0.0.6 used in the IPv4 network.
在 IPv4网络部分, 由转换装置向 IPv4网络中发送过来的关于 235.0.0.6 的组播协议才艮文,比 ^口, PIM-SM( Protocol Independent Multicast- Sparse Mode, 稀疏模式独立组播协议)加入报文发送到计算机 2连接的第一跳组播路由设 备上,建立跨地址族的网络转发路径,把 235.0.0.6的组播数据引向转换装置。  In the IPv4 network part, the multicast protocol for the 235.0.0.6 sent by the switching device to the IPv4 network is added, and the PIM-SM (Protocol Independent Multicast-Sparse Mode) is added. The message is sent to the first hop multicast routing device connected to the computer 2, and the network forwarding path of the cross-address family is established, and the multicast data of 235.0.0.6 is directed to the conversion device.
组播数据流到达转换装置用 235.0.0.6 去匹配转换规则, 正好匹配到 rule— ipv4— m_prefix的 235.0.0.0/24, 得到这条转换规则, rule— ipv6— m_prefix是 ffl8:5::/40。 转换规则中 rule— ipv4— type是 0, 表示是基于 IPv4组播地址后缀 的 IPv6组播地址格式。 根据 235.0.0.0/24和 235.0.0.6可以得到 ipv4—m— suffix 为 6, 长度为 8比特。 目标 ipv6_m_addr前面的部分用 rule— ipv6— m_prefix填 充,也就是, ffl8:5::/40,转换规则中 rule— ipv4— offset是 104,就是在 ipv6_m_addr 的第 105位放置 ipv4—m— suffix, rule— ipv6— m_prefix和 ipv4— m— suffix之间以及 ipv4—m— suffix后的空余位补 0, 得到 ffl8:5::6:0。 这样经过转换装置, IPv4网 络中使用 235.0.0.6的组播数据流到达 IPv6网络中就转换成使用 ffl8:5::6:0的 组播数据。 从而根据组播协议建立的组播转发条目发送组播数据到计算机 1。 上述方案仅用于说明地址转换的过程, 而不限制组播协议报文和数据部 分如何转换。 The multicast data flow arrival conversion device uses 235.0.0.6 to match the conversion rule, which matches the 235.0.0.0/24 of rule-ipv4-m_prefix, and obtains the conversion rule. rule_ipv6_m_prefix is ffl8:5::/40 . The rule-ipv4_type in the conversion rule is 0, which means that the IPv6 multicast address format is based on the IPv4 multicast address suffix. According to 235.0.0.0/24 and 235.0.0.6, ipv4_m_suffix is 6 and the length is 8 bits. The part before the target ipv6_m_addr is filled with rule_ipv6_m_prefix, that is, ffl8:5::/40, the rule-ipv4_offset in the conversion rule is 104, which is to place ipv4_m_suffix in the 105th position of ipv6_m_addr, rule — ipv6—m_prefix and ipv4—m—Between suffix and ipv4—m—the vacant bits after suffix are padded with 0, resulting in ffl8:5::6:0. In this way, through the conversion device, the multicast data stream using 235.0.0.6 in the IPv4 network reaches the IPv6 network and is converted into the multicast data using the ffl8:5::6:0. Thereby, the multicast forwarding entry established according to the multicast protocol sends the multicast data to the computer 1. The above solution is only used to explain the process of address translation, and does not limit how the multicast protocol message and data part are converted.
图 8 为本发明实施例的组播地址的转换装置的另一种应用场景的示意 图, 在图 8中, 转换装置 1连接 IPv6网络 A和 IPv4网络 B, 转换装置 2连 接 IPv4网络 B和 IPv6网络 C。 IPv6网络 A中有计算机 1 , 想要通过 IPv4网 络 B来获取 IPv6网络 C中的计算机 2发出的组播数据。  FIG. 8 is a schematic diagram of another application scenario of a multicast address translation apparatus according to an embodiment of the present invention. In FIG. 8, the conversion apparatus 1 is connected to an IPv6 network A and an IPv4 network B, and the conversion apparatus 2 is connected to an IPv4 network B and an IPv6 network. C. In the IPv6 network A, there is a computer 1 that wants to obtain the multicast data sent by the computer 2 in the IPv6 network C through the IPv4 network B.
转换装置 1和转换装置 2获取的转换规则包含两条转换规则:  The conversion rules acquired by the conversion device 1 and the conversion device 2 include two conversion rules:
{ ffl8:5::/40, 235.0.0.0/24, 104, 0};  { ffl8:5::/40, 235.0.0.0/24, 104, 0};
{ ffl8:6::/40, 235.1.0.0/24, 96, 1 };  { ffl8:6::/40, 235.1.0.0/24, 96, 1 };
假设计算机 1想要获取的组播数据的组播地址是 ffl8:5::6:0; 计算机 2需 要发送的组播数据的目标地址是 ffl8:5::6:0。  Assume that the multicast address of the multicast data that the computer 1 wants to acquire is ffl8:5::6:0; the destination address of the multicast data that the computer 2 needs to send is ffl8:5::6:0.
计算机 1发送关于 ffl8:5::6:0的组播请求信息,经过网络传递和协议转换 到达转换装置 1 , 根据图 7说明的转换方式, 依照转换规则把 ffl8:5::6:0转换 成 235.0.0.6, 并发送到网络 B中。 经过网络 B的传送到达转换装置 2, 同样 根据图 7说明的转换方式,依照转换规则把 235.0.0.6转换成 ffl8:5::6:0,在网 络 C中使用 ffl8:5::6:0进行组播加入。 建立跨地址族的网络转发路径。 而网 络 C 中计算机 2则发送 ffl8:5::6:0 的组播数据, 经过转换装置 2后转换成 235.0.0.6 的组播数据在网络 B 中继续传播, 再经过转换装置 1 后转换成 ffl8:5::6:0的组播数据发送到网络 A中的计算机 1。  The computer 1 sends the multicast request information about ffl8:5::6:0, and reaches the conversion device 1 through network transmission and protocol conversion. According to the conversion mode illustrated in FIG. 7, the ffl8:5::6:0 is converted according to the conversion rule. Into 235.0.0.6, and sent to network B. The transmission to the conversion device 2 is carried out via the transmission of the network B. Similarly, according to the conversion method illustrated in Fig. 7, 235.0.0.6 is converted into ffl8:5::6:0 according to the conversion rule, and ffl8:5::6:0 is used in the network C. Perform multicast join. Establish a network forwarding path across address families. On the network C, the computer 2 transmits the multicast data of ffl8:5::6:0, and the multicast data converted into 235.0.0.6 after the conversion device 2 continues to propagate in the network B, and then converted into the converted device 1 and converted into The multicast data of ffl8:5::6:0 is sent to the computer 1 in the network A.
图 7和图 8只是选择两种场景介绍本发明实施例的组播地址的转换装置 的使用场景, 而本发明实施例的组播地址的转换装置的使用场景不限于这两 种场景, 如, IPv4网络获取 IPv6网络的组播数据和 IPv4网络跨 IPv6网络获 取 IPv4网络组播数据的场景同样可以使用。  FIG. 7 and FIG. 8 are only used to describe the usage scenarios of the multicast address conversion apparatus in the embodiment of the present invention. The usage scenarios of the multicast address conversion apparatus in the embodiment of the present invention are not limited to the two scenarios, for example, The scenario in which the IPv4 network obtains the multicast data of the IPv6 network and the IPv4 network obtains the IPv4 network multicast data across the IPv6 network can also be used.
本发明实施例的技术方案中提供了 IPv4组播地址和 IPv6组播地址间的 转换方法, 以及执行这种转换方法的转换装置, 应用场景广泛, 而且可以通 过设置的转换规则对现有组播地址转换技术兼容。 IPv4组播地址后缀的使用, 更充分地释放了 IPv6前缀的长度空间, 多前缀规则的使用可以对服务范围内 组播地址使用进行更精细的划分, 增强组播服务的灵活性和安全性, 更易于 管理。 The technical solution of the embodiment of the present invention provides a method for converting between an IPv4 multicast address and an IPv6 multicast address, and a conversion device for performing the conversion method, which has a wide application scenario, and can set an existing multicast by using a conversion rule. Address translation technology is compatible. The use of the suffix of the IPv4 multicast address fully releases the length of the IPv6 prefix. The use of the multi-prefix rule can finer the use of the multicast address within the service range, and enhance the flexibility and security of the multicast service. Easier Management.
此说明书中所描述的许多功能部件都被称为模块, 以便更加特别地强调 其实现方式的独立性。 Many of the functional components described in this specification are referred to as modules to more particularly emphasize the independence of their implementation.
本发明实施例中,模块可以用软件实现, 以便由各种类型的处理器执行。 举例来说, 一个标识的可执行代码模块可以包括计算机指令的一个或多个物 理块或者逻辑块, 举例来说, 其可以被构建为对象、 过程或函数。 尽管如此, 所标识模块的可执行代码无需物理地位于一起, 而是可以包括存储在不同物 理块上的不同的指令, 当这些指令逻辑上结合在一起时, 其构成模块并且实 现该模块的规定目的。  In an embodiment of the invention, the modules may be implemented in software for execution by various types of processors. For example, an identified executable code module can comprise one or more physical blocks or logical blocks of computer instructions, which can be constructed, for example, as an object, procedure, or function. Nonetheless, the executable code of the identified modules need not be physically located together, but may include different instructions stored on different physical blocks that, when logically combined, constitute the module and implement the provisions of the module purpose.
实际上, 可执行代码模块可以是单条指令或者是许多条指令, 并且甚至 可以分布在多个不同的代码段上, 分布在不同程序当中, 以及跨越多个存储 器设备分布。 同样地, 操作数据可以在模块内被识别, 可以依照任何适当的 形式实现, 并且被组织在任何适当类型的数据结构内。 所述操作数据可以作 为单个数据集被收集, 或者可以分布在不同位置 (包括不同存储设备)上, 并且部分地可以仅作为电子信号存在于系统或网络上。  In fact, the executable code module can be a single instruction or a number of instructions, and can even be distributed over multiple different code segments, distributed among different programs, and distributed across multiple memory devices. Likewise, operational data may be identified within the module, implemented in any suitable form, and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed over different locations (including different storage devices), and may in part exist as an electronic signal only on the system or network.
在模块可以利用软件实现时, 考虑到现有硬件工艺的水平, 所以可以以 软件实现该模块, 在不考虑成本的情况下, 本领域技术人员都可以搭建硬件 电路来实现模块功能, 所述硬件电路包括常规的超大规模集成(VLSI, Very Large Scale Integrated ) 电路、 门阵列、 诸如逻辑芯片、 晶体管之类的现有半 导体或者是其它分立的元件。 模块还可以用可编程硬件设备, 诸如现场可编 程门阵列、 可编程阵列逻辑、 或可编程逻辑设备等实现。  When the module can be implemented by software, considering the level of the existing hardware process, the module can be implemented in software, and those skilled in the art can construct a hardware circuit to implement the module function without considering the cost. The circuit includes conventional Very Large Scale Integrated (VLSI) circuits, gate arrays, existing semiconductors such as logic chips, transistors, or other discrete components. Modules can also be implemented with programmable hardware devices, such as field programmable gate arrays, programmable array logic, or programmable logic devices.
在本发明各方法实施例中, 所述各步骤的序号并不能用于限定各步骤的 先后顺序, 对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 对各步骤的先后变化也在本发明的保护范围之内。  In the method embodiments of the present invention, the sequence numbers of the steps are not used to limit the sequence of the steps. For those skilled in the art, the steps of the steps are changed without any creative work. It is also within the scope of the invention.
以上所述是本发明实施例的优选实施方式, 应当指出, 对于本技术领域 的普通技术人员来说, 在不脱离本发明实施例所述原理的前提下, 还可以对 本发明实施例作出若干改进和润饰, 这些改进和润饰也应视为在本发明的保 护范围之内。 The above is a preferred embodiment of the embodiments of the present invention. It should be noted that those skilled in the art can make some improvements to the embodiments of the present invention without departing from the principles of the embodiments of the present invention. And retouching, these improvements and retouchings should also be considered as Within the scope of protection.
工业实用性 釆用本发明实施例的技术方案, 可以增强组播服务的灵活性和安全性, 有利于网络管理; 能够更好地利用 IPv6组播地址空间, 在网络中实现 IPv4 组播地址和 IPv6组播地址间的转换。 Industrial Applicability The technical solution of the embodiment of the present invention can enhance the flexibility and security of the multicast service, and is beneficial to network management. The IPv6 multicast address space can be better utilized, and the IPv4 multicast address and the network can be implemented in the network. Conversion between IPv6 multicast addresses.

Claims

j . jj -^* j$ j . jj -^* j$
1、 一种组播地址的转换方法, 包括: 1. A multicast address translation method, including:
获取待转换的组播地址所对应的转换规则, 所述转换规則包括有组播地 址前缀、 IPv4组播地址类型和 IPv4组播地址偏移位置; 以及 Obtain the conversion rules corresponding to the multicast address to be converted, the conversion rules include multicast address prefix, IPv4 multicast address type and IPv4 multicast address offset position; and
根据所述转换规则将所述组播地址转换为目标组播地址。 Convert the multicast address into a target multicast address according to the conversion rule.
2、 根据权利要求 1所述的方法, 其中, 2. The method according to claim 1, wherein,
在所述待转换的组播地址为互联网协议版本 4 ( IPv4 )组播地址时, 所述 转换规则包括互联网协议版本 6 ( IPv6 )组播地址前缀和 IPv4组播地址前缀; 以及 When the multicast address to be converted is an Internet Protocol version 4 (IPv4) multicast address, the conversion rules include an Internet Protocol version 6 (IPv6) multicast address prefix and an IPv4 multicast address prefix; and
在所述 IPv4组播地址类型指示基于 IPv 组播地址后缀形成所述目标组 播地址时, 所述根据所述转换规则将所述组播地址转换为目标组播地址的步 骤包括: When the IPv4 multicast address type indicates that the target multicast address is formed based on the IPv multicast address suffix, the step of converting the multicast address into the target multicast address according to the conversion rule includes:
根据所述 IPv 组播地址前缀和所述 IPv4组播地址计算出所述 IPv4组播 地址后缀; 以及 Calculate the IPv4 multicast address suffix based on the IPv multicast address prefix and the IPv4 multicast address; and
在 IPv6组播地址的起始位置放置所述 IPv6组播地址前缀, 在所述 IPv4 组播地址偏移位置指示的位置放置所述 IPv4组播地址后缀, 其它空位置 0, 形成目标 IPv6组播地址 The IPv6 multicast address prefix is placed at the starting position of the IPv6 multicast address, the IPv4 multicast address suffix is placed at the position indicated by the IPv4 multicast address offset position, and other empty positions are 0 to form the target IPv6 multicast address
3、 根据权利要求 2所述的方法, 其中, 3. The method according to claim 2, wherein,
在所述转换规则包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播地 址偏移位置指示在所述 IPv6组播地址中从所述 IPv 组播地址偏移位置参数 定义的起始偏移位置的后一位开始放置所述 IPv4组播地址后缀; 以及 When the conversion rule includes an IPv4 multicast address offset position parameter, the IPv4 multicast address offset position indicates a starting offset defined by the IPv multicast address offset position parameter in the IPv6 multicast address. The IPv4 multicast address suffix is placed starting from the last bit of the shifted position; and
在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后位置放置所述 IPv4组播地址 后缀。 When the conversion rule does not include an IPv4 multicast address offset position parameter, the IPv4 multicast address offset position indication places the IPv4 multicast address suffix at the last position of the IPv6 multicast address.
4、 根据权利要求 1所述的方法, 其中, 4. The method according to claim 1, wherein,
在所述待转换的组播地址为 IPv4组播地址时, 所述转换规则包括 IPv6 组播地址前缀和 IPv4组播地址前缀; 以及 在所述 IPv4组播地址类型指示基于 IPv4组播地址形成所述目标组播地 址时, 所述根据所述转换规则将所述组播地址转换为目标组播地址的步骤包 括: When the multicast address to be converted is an IPv4 multicast address, the conversion rules include an IPv6 multicast address prefix and an IPv4 multicast address prefix; and When the IPv4 multicast address type indicates that the target multicast address is formed based on the IPv4 multicast address, the step of converting the multicast address into the target multicast address according to the conversion rule includes:
在 IPv6组播地址的起始位置放置所述 IPv6组播地址前缀, 在所述 IPv4 组播地址偏移位置指示的位置放置所述 IPv4组播地址, 其它空位置 0, 形成 所述目标 IPv6组播地址。 The IPv6 multicast address prefix is placed at the starting position of the IPv6 multicast address, the IPv4 multicast address is placed at the position indicated by the IPv4 multicast address offset position, and other empty positions are 0 to form the target IPv6 group. broadcast address.
5、 根据权利要求 4所述的方法, 其中, 5. The method according to claim 4, wherein,
在所述转换规则包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播地 址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位置参数 定义的起始偏移位置的后一位开始放置所述 IPv4组播地址; 以及 When the conversion rule includes an IPv4 multicast address offset position parameter, the IPv4 multicast address offset position indicates a starting offset defined by the IPv4 multicast address offset position parameter in the IPv6 multicast address. The IPv4 multicast address is placed starting from the last bit of the shifted position; and
在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后 32位放置所述 IPv4组播地址。 When the conversion rule does not include an IPv4 multicast address offset position parameter, the IPv4 multicast address offset position indication places the IPv4 multicast address in the last 32 bits of the IPv6 multicast address.
6、 根据权利要求 1所述的方法, 其中, 6. The method according to claim 1, wherein,
在所述待转换的组播地址为 IPv6组播地址时,所述转换规则包括有 IPv4 组播地址前缀; When the multicast address to be converted is an IPv6 multicast address, the conversion rule includes an IPv4 multicast address prefix;
在所述 IPv4组播地址类型指示基于 IPv 组播地址后缀形成所述目标组 播地址时, 所述根据所述转换规则将所述组播地址转换为目标组播地址的步 骤包括: When the IPv4 multicast address type indicates that the target multicast address is formed based on the IPv multicast address suffix, the step of converting the multicast address into the target multicast address according to the conversion rule includes:
根据所述 IPv4组播地址前缀的长度计算出所述 IPv4组播地址后缀的长 在所述 IPv6组播地址中, 在 IPv6组播地址偏移位置指示的位置根据所 述 IPv4组播地址后缀的长度获取所述 IPv4组播地址后缀; 以及 The length of the IPv4 multicast address suffix is calculated based on the length of the IPv4 multicast address prefix. In the IPv6 multicast address, the position indicated by the IPv6 multicast address offset position is based on the length of the IPv4 multicast address suffix. The length to obtain the IPv4 multicast address suffix; and
拼接所述 ΙΡΛ 组播地址前缀和所述 IPv4组播地址后缀形成目标 IPv4组 播地址。 The IPv4 multicast address prefix and the IPv4 multicast address suffix are spliced together to form a target IPv4 multicast address.
7 , 根据权利要求 6所述的方法, 其中, 7. The method according to claim 6, wherein,
在所述转换.规则包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播地 址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位置参数 定义的起始偏移位置的后一位开始获取所述 IPv4组播地址后缀; 以及 在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后位置获取所述 IPv4组播地址 后缀。 When the conversion rule includes an IPv4 multicast address offset position parameter, the IPv4 multicast address offset position indicates the starting point defined by the IPv4 multicast address offset position parameter in the IPv6 multicast address. The last bit of the offset position starts to obtain the IPv4 multicast address suffix; and When the conversion rule does not include an IPv4 multicast address offset position parameter, the IPv4 multicast address offset position indication obtains the IPv4 multicast address suffix at the last position of the IPv6 multicast address.
8、 根据权利要求 1所述的方法, 其中, 8. The method according to claim 1, wherein,
在所述待转换的组播地址为 IPv6组播地址时, 所述 IPv4组播地址类型 指示基于 IPv4组播地址形成所述目标组播地址时, 所述根据所述转换规则将 所述组播地址转换为目标组播地址的步骤包括: When the multicast address to be converted is an IPv6 multicast address, and the IPv4 multicast address type indication forms the target multicast address based on the IPv4 multicast address, the multicast address is converted to the multicast address based on the conversion rule. The steps for address translation to a target multicast address include:
在所述 IPv6组播地址中 , 在所述 IPv6组播地址偏移位置指示的位置获 取 32位的地址作为所述目标 IPv 组播地址。 In the IPv6 multicast address, a 32-bit address is obtained at the position indicated by the IPv6 multicast address offset position as the target IPv multicast address.
9、 根据权利要求 8所述的方法, 其中, 9. The method according to claim 8, wherein,
在所述转换规则包括 IPv4组播地址偏移位置参数时, 所述 IPv 组播地 址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位置参数 定义的起始偏移位置的后一位开始获取所述 IPv4组播地址; 以及 When the conversion rule includes an IPv4 multicast address offset position parameter, the IPv multicast address offset position indicates a starting offset defined by the IPv4 multicast address offset position parameter in the IPv6 multicast address. Start obtaining the IPv4 multicast address from the last bit of the shifted position; and
在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv 组播 地址偏移位置指示在所述 IPv6组播地址的最后 32位获取所述 IPv4组播地址。 When the conversion rule does not include the IPv4 multicast address offset position parameter, the IPv multicast address offset position indication is to obtain the IPv4 multicast address from the last 32 bits of the IPv6 multicast address.
10、 一-种组播地址转换装置, 包括: 10. A multicast address translation device, including:
获取模块, 其设置成: 获取待转换的组播地址所对应的转换规则, 所述 转换规则包括有组播地址前缀、 IPv4组播地址类型和 IPv4组播地址偏移位置; 以及 The acquisition module is configured to: acquire the conversion rules corresponding to the multicast address to be converted, where the conversion rules include multicast address prefix, IPv4 multicast address type and IPv4 multicast address offset position; and
转换模块, 其设置成: 根据所述转换规则将所述组播地址转换为目标组 播地址。 A conversion module, which is configured to: convert the multicast address into a target multicast address according to the conversion rule.
11、 根据权利要求 10所述的转换装置, 其中, 11. The conversion device according to claim 10, wherein,
在所述待转换的组播地址为互联网协议版本 4 ( IPv4 )组播地址时, 所述 转换规则包括互联网协议版本 6 ( IPv6 )组播地址前缀和 IPv4组播地址前缀; 以及 When the multicast address to be converted is an Internet Protocol version 4 (IPv4) multicast address, the conversion rules include an Internet Protocol version 6 (IPv6) multicast address prefix and an IPv4 multicast address prefix; and
在所述 IPv4组播地址类型指示基于 IPv4组播地址后缀形成所述目标组 播地址时, 所述转换模块通过如下方式根据所述转换规则将所述组播地址转 换为目标组播地址: 根据所述 IPv 组播地址前缀和所述 IPv4组播地址计算出所述 IPv4组播 地址后缀; 以及 When the IPv4 multicast address type indication forms the target multicast address based on the IPv4 multicast address suffix, the conversion module converts the multicast address into a target multicast address according to the conversion rules in the following manner: Calculate the IPv4 multicast address suffix based on the IPv multicast address prefix and the IPv4 multicast address; and
在 IPv6组播地址的起始位置放置所述 IPv6组播地址前缀, 在所述 IPv4 组播地址偏移位置指示的位置放置所述 IPv4组播地址后缀, 其它空位置 0, 形成目标 IPv6组播地址。 The IPv6 multicast address prefix is placed at the starting position of the IPv6 multicast address, the IPv4 multicast address suffix is placed at the position indicated by the IPv4 multicast address offset position, and other empty positions are set to 0 to form the target IPv6 multicast address.
12、 根据权利要求 11所述的转换装置, 其中, 12. The conversion device according to claim 11, wherein,
在所述转换规则包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播地 址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位置参数 定义的起始偏移位置的后一位开始放置所述 IPv4组播地址后缀; 以及 When the conversion rule includes an IPv4 multicast address offset position parameter, the IPv4 multicast address offset position indicates a starting offset defined by the IPv4 multicast address offset position parameter in the IPv6 multicast address. The IPv4 multicast address suffix is placed starting from the last bit of the shifted position; and
在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后位置放置所述 IPv4组播地址 后缀。 When the conversion rule does not include an IPv4 multicast address offset position parameter, the IPv4 multicast address offset position indication places the IPv4 multicast address suffix at the last position of the IPv6 multicast address.
13、 根据权利要求 10所述的转换装置, 其中, 13. The conversion device according to claim 10, wherein,
在所述待转换的组播地址为 IPv4组播地址时, 所述转换规则包括 IPv6 组播地址前缀和 IPv4组播地址前缀; 以及 When the multicast address to be converted is an IPv4 multicast address, the conversion rules include an IPv6 multicast address prefix and an IPv4 multicast address prefix; and
在所述 IPv4组播地址类型指示基于 IPv4组播地址形成所述目标组播地 址时, 所述转换模块通过如下方式根据所述转换规則将所述组播地址转换为 目标组播地址: When the IPv4 multicast address type indicates that the target multicast address is formed based on the IPv4 multicast address, the conversion module converts the multicast address into a target multicast address according to the conversion rules in the following manner:
在 IPv6组播地址的起始位置放置所述 IPv6组播地址前缀, 在所述 IPv4 组播地址偏移位置指示的位置放置所述 IPv4组播地址, 其它空位置 0, 形成 所述目标 IPv6组播地址。 The IPv6 multicast address prefix is placed at the starting position of the IPv6 multicast address, the IPv4 multicast address is placed at the position indicated by the IPv4 multicast address offset position, and other empty positions are set to 0 to form the target IPv6 group. broadcast address.
14、 根据权利要求 13所述的转换装置, 其中, 14. The conversion device according to claim 13, wherein,
在所述转换规则包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播地 址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位置参数 定义的起始偏移位置的后一位开始放置所述 IPv4组播地址; 以及 When the conversion rule includes an IPv4 multicast address offset position parameter, the IPv4 multicast address offset position indicates a starting offset defined by the IPv4 multicast address offset position parameter in the IPv6 multicast address. The IPv4 multicast address is placed starting from the last bit of the shifted position; and
在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后 32位放置所述 IPv4组播地址。 When the conversion rule does not include the IPv4 multicast address offset position parameter, the IPv4 multicast address offset position indication places the IPv4 multicast address in the last 32 bits of the IPv6 multicast address.
15、 根据权利要求】0所述的转换装置, 其中, 在所述待转换的组播地址为 IPv6组播地址时,所述转换规则包括有 IPv4 组播地址前缀; 15. The conversion device according to claim 0, wherein, When the multicast address to be converted is an IPv6 multicast address, the conversion rule includes an IPv4 multicast address prefix;
在所述 IPv4组播地址类型指示基于 IPv4组播地址后缀形成所述目标组 播地址时, 所述转换模块通过如下方式根据所述转换规則将所述组播地址转 换为目标组播地址: When the IPv4 multicast address type indication forms the target multicast address based on the IPv4 multicast address suffix, the conversion module converts the multicast address into a target multicast address according to the conversion rules in the following manner:
根据所述 IPv4组播地址前缀的长度计算出所述 IPv4组播地址后缀的长 度; Calculate the length of the IPv4 multicast address suffix based on the length of the IPv4 multicast address prefix;
在所述 IPv6组播地址中, 在 IPv6组播地址偏移位置指示的位置根据所 述 IPv4组播地址后缀的长度荻取所述 IPv 组播地址后缀; 以及 In the IPv6 multicast address, the IPv multicast address suffix is obtained according to the length of the IPv4 multicast address suffix at the position indicated by the IPv6 multicast address offset position; and
措接所述 IPv4组播地址前缀和所述 IPv4组播地址后缀形成目标 IPv4组 播地址。 The IPv4 multicast address prefix and the IPv4 multicast address suffix are combined to form a target IPv4 multicast address.
16、 根据权利要求 15所述的转换装置, 其中, 16. The conversion device according to claim 15, wherein,
在所述转换规则包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播地 址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位置参数 定义的起始偏移位置的后一位开始获取所述 IPv4组播地址后缀; 以及 When the conversion rule includes an IPv4 multicast address offset position parameter, the IPv4 multicast address offset position indicates a starting offset defined by the IPv4 multicast address offset position parameter in the IPv6 multicast address. Start obtaining the IPv4 multicast address suffix from the last bit of the shifted position; and
在所述转换规则未包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后位置获取所述 IPv4组播地址 后缀。 When the conversion rule does not include the IPv4 multicast address offset position parameter, the IPv4 multicast address offset position indication obtains the IPv4 multicast address suffix at the last position of the IPv6 multicast address.
17、 根据权利要求 10所述的转换装置, 其中, 17. The conversion device according to claim 10, wherein,
在所述待转换的组播地址为 IPv6组播地址时, 所述 IPv4组播地址类型 指示基于 IPv 组播地址形成所述目标组播地址时, 所述转换模块通过如下方 式根据所述转换规则将所述组播地址转换为目标组播地址: When the multicast address to be converted is an IPv6 multicast address, and the IPv4 multicast address type indication forms the target multicast address based on the IPv multicast address, the conversion module uses the conversion rules in the following manner Convert the multicast address to the target multicast address:
在所述 IPv6组播地址中, 在所述 IPv6组播地址偏移位置指示的位置获 取 32位的地址作为所述目标 IPv4组播地址„ In the IPv6 multicast address, a 32-bit address is obtained as the target IPv4 multicast address at the position indicated by the IPv6 multicast address offset position.
18、 根据权利要求 17所述的转换装置, 其中, 18. The conversion device according to claim 17, wherein,
在所述转换.规则包括 IPv4组播地址偏移位置参数时, 所述 IPv4组播地 址偏移位置指示在所述 IPv6组播地址中从所述 IPv4组播地址偏移位置参数 定义的起始偏移位置的后一位开始获取所述 IPv4组播地址; 以及 When the conversion rule includes an IPv4 multicast address offset position parameter, the IPv4 multicast address offset position indicates the starting point defined by the IPv4 multicast address offset position parameter in the IPv6 multicast address. The last bit of the offset position starts to obtain the IPv4 multicast address; and
在所述转换规则未包括 IPv 组播地址偏移位置参数时, 所述 IPv4组播 地址偏移位置指示在所述 IPv6组播地址的最后 32位获取所述 IPv4组播地址。 When the conversion rule does not include the IPv multicast address offset position parameter, the IPv4 multicast address offset position indication is to obtain the IPv4 multicast address from the last 32 bits of the IPv6 multicast address.
PCT/CN2013/081651 2013-01-08 2013-08-16 Multicast address conversion method and device WO2013189346A2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310005691.XA CN103051744B (en) 2013-01-08 2013-01-08 The conversion method of multicast address and device
CN201310005691.X 2013-01-08

Publications (2)

Publication Number Publication Date
WO2013189346A2 true WO2013189346A2 (en) 2013-12-27
WO2013189346A3 WO2013189346A3 (en) 2014-02-13

Family

ID=48064237

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/081651 WO2013189346A2 (en) 2013-01-08 2013-08-16 Multicast address conversion method and device

Country Status (2)

Country Link
CN (1) CN103051744B (en)
WO (1) WO2013189346A2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051744B (en) * 2013-01-08 2016-03-30 中兴通讯股份有限公司 The conversion method of multicast address and device
CN110198365B (en) * 2019-05-27 2022-12-23 杭州迪普科技股份有限公司 Address translation detection method and system
CN113746944B (en) * 2020-05-29 2024-05-14 台众计算机股份有限公司 IPv6 network point management method and equipment
CN112769973B (en) * 2020-12-25 2021-11-16 清华大学 Method for matching network address and network address conversion rule
CN113014692A (en) * 2021-03-16 2021-06-22 腾讯科技(深圳)有限公司 Network address translation method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1965515A (en) * 2004-06-25 2007-05-16 思科技术公司 Arrangement for reaching IPv4 public network nodes by a node in an IPv4 private network via an IPv6 access network
CN101197858A (en) * 2008-01-07 2008-06-11 杭州华三通信技术有限公司 Address translation method, device and router with the same
CN101227408A (en) * 2008-02-02 2008-07-23 中兴通讯股份有限公司 Method for IPv4 internal private network to visit IPv6 network and router thereof
CN103051744A (en) * 2013-01-08 2013-04-17 中兴通讯股份有限公司 Method and device for converting multicast address

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4045936B2 (en) * 2002-11-26 2008-02-13 株式会社日立製作所 Address translation device
WO2010108431A1 (en) * 2009-03-26 2010-09-30 华为技术有限公司 Method for realizing ipv6 host visting ipv4 host, method for obtaining ipv6 address prefix and translation device
CN101848247A (en) * 2009-03-26 2010-09-29 华为技术有限公司 Method for implementing access of IPv6 host to IPv4 host, method for acquiring IPv6 address prefix and conversion device
CN102025522B (en) * 2010-12-21 2012-09-05 北京星网锐捷网络技术有限公司 Method for realizing multicast between different IP domains and boundary gateway router

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1965515A (en) * 2004-06-25 2007-05-16 思科技术公司 Arrangement for reaching IPv4 public network nodes by a node in an IPv4 private network via an IPv6 access network
CN101197858A (en) * 2008-01-07 2008-06-11 杭州华三通信技术有限公司 Address translation method, device and router with the same
CN101227408A (en) * 2008-02-02 2008-07-23 中兴通讯股份有限公司 Method for IPv4 internal private network to visit IPv6 network and router thereof
CN103051744A (en) * 2013-01-08 2013-04-17 中兴通讯股份有限公司 Method and device for converting multicast address

Also Published As

Publication number Publication date
CN103051744B (en) 2016-03-30
WO2013189346A3 (en) 2014-02-13
CN103051744A (en) 2013-04-17

Similar Documents

Publication Publication Date Title
US7483439B2 (en) VPN services using address translation over an IPv6 network
WO2013189346A2 (en) Multicast address conversion method and device
JP2008079175A (en) Frame transfer system
US9525560B2 (en) Method, device, and system for transmitting multicast packet across layer 2 virtual network
JP2023549797A (en) BIER packet forwarding methods, devices, and systems
CN108028801B (en) SDN-based ARP implementation method and device
CN112134776B (en) Method for generating multicast forwarding table item and access gateway
TW201626765A (en) Method for retransmitting packet, data server using the same, and packet retransmitting system
US9172775B2 (en) Network communication system, device, and method for reducing a network addressing header
WO2012068854A1 (en) Method and apparatus for updating media access control (mac) address
WO2021147357A1 (en) Method, device, and system for distributing routing information
WO2015131380A1 (en) Data processing method and device
JP5310262B2 (en) Server apparatus, transmission system, and GRE encapsulated transfer method used therefor
CN108234325B (en) System based on IP anycast and message forwarding method
WO2022262579A1 (en) Packet transmission method and apparatus
JP5990125B2 (en) Packet transfer device, distribution system, packet transfer method, program, and recording medium
JP2005064570A (en) Network system and internetwork apparatus
CN114006780A (en) Method, equipment and system for forwarding message
WO2014183525A1 (en) Packet processing method and cascade chip
US11902158B2 (en) System and method for forwarding packets in a hierarchical network architecture using variable length addresses
WO2011026406A1 (en) Method and communication device for transmitting data packets, and method for distributing user identifications
US20210144093A1 (en) Address processing method and network device
JP6134571B2 (en) Communication confirmation device, network system, communication confirmation method, and communication confirmation program
KR101619511B1 (en) Device for Packet Transport Network setting network band using LLDP and method for constructing Control Plane Network
JP2008199168A (en) Layer-2 switch device and layer-2 frame transmission method

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

Country of ref document: EP

Kind code of ref document: A2

122 Ep: pct application non-entry in european phase

Ref document number: 13807025

Country of ref document: EP

Kind code of ref document: A2