CN102761425A - Charging method and device - Google Patents

Charging method and device Download PDF

Info

Publication number
CN102761425A
CN102761425A CN2012102521860A CN201210252186A CN102761425A CN 102761425 A CN102761425 A CN 102761425A CN 2012102521860 A CN2012102521860 A CN 2012102521860A CN 201210252186 A CN201210252186 A CN 201210252186A CN 102761425 A CN102761425 A CN 102761425A
Authority
CN
China
Prior art keywords
message
user
type
address
dad
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2012102521860A
Other languages
Chinese (zh)
Other versions
CN102761425B (en
Inventor
翟青涌
赵申
刘成功
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201210252186.0A priority Critical patent/CN102761425B/en
Publication of CN102761425A publication Critical patent/CN102761425A/en
Application granted granted Critical
Publication of CN102761425B publication Critical patent/CN102761425B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a charting method and a charging device. The charging method comprises the following steps: receiving a DAD message sent by a user, wherein the DAD message field includes an expanded protocol type field, and the DAD message bears an IPv6 address; detecting whether the IPv6 address is available; and if so determining the access type of the user according to the protocol type field, wherein corresponding charging operation is carried by the user according to the different access types. Due to the adoption of the method, the problem that router equipment can not distinguish all access types in the prior art is solved, as a result, the various access types can be distinguished, the charging is more targeted, the charging accuracy is improved, and the user experience is also improved.

Description

Charging method and device
Technical Field
The present invention relates to the field of communications, and in particular, to a charging method and apparatus.
Background
Today, the crisis of the V4 address space has been long due to the rapid growth of broadband technologies and broadband users, which is the main driving force for the upgrading of Internet Protocol (IP) technology versions. The Chinese next generation Internet demonstration project (CNGI project) is a national strategic project, and the main objective of the project is to build a next generation Internet test platform by taking Internet protocol version6 (Internet protocol version6, abbreviated as IPv 6) as a core. The start of the target marks that the IPv6 of China enters a substantial development stage. Operators at all levels are also tightening the pace of deploying V6 networks, and V6 broadband access networks have gradually entered the pilot business phase.
The IPv6 basic Protocol is designed based on the idea that a V6 network is expected to be a plug-and-play access network, but for some operators, a stateful (i.e. Dynamic Address allocation) form is required to manage addresses, so that a Dynamic Host Configuration Protocol (DHCPv 6) supporting IPv6 is developed, and thus a Stateless Address automatic Configuration (SLAAC) function in a Neighbor Discovery Protocol (NDP) Protocol coexists with a DHCPv6 Protocol Address allocation function in an existing IPv6 remote broadband access network topology environment.
Today, popular Broadband Remote Access Server (BRAS) router devices provide typical IPv6 Access user types: IPHOST (static leased line) users, DCHPv6 users, and SLAAC users. For the difference of link modes, DHCPv6 users and SLAAC users can be classified into Ethernet link users and Point-to-Point Protocol Over Ethernet (PPPoE) link users.
Particularly in IPv6 networking, multihomed hosts become an increasingly important application scenario. A host may have one or more wireless connections, such as bluetooth and 802.11 protocols, in addition to a wired network connection (e.g., ethernet). A host may be connected to a virtual network or a tunnel network in addition to a physical link. For example, a host may be connected to a tunnel private shared network in addition to being connected directly to the public internet. For IPv6 transition scenarios, it is likely that a tunnel link will be added, for example, hosts may be connected to a 6to4 tunnel (Remote Function Call, RFC 3056) or a configuration tunnel (RFC 2893) network.
In the practical application of BRAS router equipment, three user access types, namely IPHOST static private line, DCHPv6 and SLAAC, can respectively or coexistently perform user network access service for one user. Furthermore, for the BRAS router device, it is necessary to manage a plurality of IPv6 addresses and prefixes allocated to one user (each user has a unique Media Access Control (MAC) address).
Since each user may have multiple IPv6 addresses and prefixes, the IPv6 addresses and prefixes may implement network access by applying different access types provided by the BRAS router device. For example: a home subscriber (the home has a unique MAC address), because its fixed telephone or mobile phone is an important communication means of the home, uses the IPHOST subscriber access mode to access the BRAS router device (i.e. after statically configuring an IPv6 address, requests the BRAS router device for access through the NDP protocol message and accesses successfully); if the carrier operator also provides an Internet Protocol Television (IPTV) service to the home, the IPTV uses a conventional DHCPv6 user access method to access to the same BRAS router device (i.e. the IPTV client performs DHCPv6 Protocol interaction with the BRAS router device, and allocates an IPv6 address or prefix to the IPTV client, and completes user access); for the network service provider, the network service provider needs to provide network service for the family, and in order to facilitate customer experience, the network service provider adopts a plug-and-play SLAAC user access mode on the same BRAS router device, allocates an IPv6 prefix to the family (namely, the SLAAC function in the NDP protocol is used for completing user access), and opens the network service.
In an ethernet network, a user, whether of the IPHOST user access type, DHCPv6 user access type or SLAAC user access type, is assigned one or more IPv6 addresses, or a prefix or prefixes. For all IPv6 clients, regardless of the access method, whether addresses and prefixes are statically configured or dynamically allocated, and regardless of whether IPv6 addresses or IPv6 prefixes are allocated, Duplicate Address Detection (DAD) of IPv6 addresses is performed. If the IPv6 client is allocated with the IPv6 prefix, the IPv6 client generally generates an IPv6 address according to the allocated IPv6 prefix, the specific address generation rule is specified in the IPv6 communication protocol standard, and detailed description is omitted here, and DAD detection is subsequently performed on the generated IPv6 address.
In summary, each network node must perform DAD detection before using an IPv6 address, and after confirming that there are no duplicate addresses within the link, it can use the IPv6 address for network service and data service. The DAD detection is realized through DAD messages, the DAD messages are generally sent for 1 to 6 times (the specific detection times are related to specific equipment), the time interval of each sending is 1 second, after the last DAD message is sent, after 1 second of sending is waited, if the reply message of the reply DAD message is not received, the IPv6 address is considered to be available in the local link range, and if the reply message of the reply DAD message is received, the IPv6 address is considered to be unavailable in the local link range.
The DAD Message and the Neighbor Advertisement (NA) Message are both NDP Protocol messages, and they are both in the encapsulation format of the sixth Version Internet Control information Protocol (Internet Control Message Protocol Version6, abbreviated as ICMPv 6).
Fig. 1 is a schematic diagram of an encapsulation format of a Neighbor Solicitation (NS) message according to the related art, where, as shown in fig. 1, bits 0 to 8 of 32 bits of the NS message are Type, bits 8 to 16 of the bits 135 and 32 are Code (Code), and bits 16 to 32 of the bits 0 and 32 are Checksum (Checksum), that is, Checksum of ICMP; the Reserved field in the NS message is not used, must be initialized to 0 by the sender, and ignored by the receiver; the Target Address in the NS message is the requested Target IP Address, and must not be a multicast Address; the Option in the NS message is the source link layer address Option.
Fig. 2 is a schematic diagram of an encapsulation format of an NA packet according to the related art, and as shown in fig. 2, bits 0 to 8 of 32 bits of the NA packet are Type, bits 136 are generally taken, bits 8 to 16 of the 32 bits are Code (Code), bits 0 and 16 to 32 of the 32 bits are generally taken as Checksum (Checksum), that is, Checksum of ICMP; the R flag in Reserved (Reserved field) in the NA message is the router flag, the S flag is the request flag, the O flag is the override flag, the Reserved (Reserved field) is not used, must be initialized to 0 by the sender, and is ignored by the receiver; target Address in the NA message is the requested Target IP Address, and must not be a multicast Address; option in NA message is target link layer address Option.
If the source address in the IP header of the IPv6 in the NS message is an unspecified IPv6 address (namely:: all zero address), the NS message at the moment is defined as a DAD message. The Target Address field in the DAD message and the NA message is used to store the IPv6 Address content that needs to be repeatedly detected.
The IPv6 base protocol specifies that for a network node, DAD (duplicate address) detection must be performed within the local link if it is known whether the IPv6 address is available within the local link. The DAD message needs to be multicast and sent to all IPv6 nodes within the range of a local link, wherein the DAD message carries an IPv6 address needing to be detected, all IPv6 nodes need to receive and process the message, if the IPv6 address needing to be detected is found to be used on the node, the NA message is multicast and replied to the node sending the DAD message, wherein the NA message carries the detected IPv6 address, and when the node of the DAD message receives the NA message, the node knows that the IPv6 address in the DAD message conflicts within the range of the link and cannot be used. The DAD detection process described above is exemplified below.
Fig. 3 is a network topology networking diagram of a DAD detection process according to the related art, in which, as shown in fig. 3, an a node is a BRAS router device, assuming that IPv6 addresses have been allocated to a B node, a D node, and an E node and no conflict exists. When a node C (PDA computer) is assigned an IPv6 address by any means, it is necessary to send a DAD repeat message to multicast across the entire local link.
Assuming that the C node has an assigned address of 100::4:4:4/128, the C node will send the DAD carrying the 100::4: 4/128 address to A, B, D and E node, respectively. In general, 3 DAD messages are sent, and the time interval of each DAD message is 1 second. Since A, B, D and the IPv6 address of the E node in the local link range do not conflict with the address of the C node, when A, B, D and the E node receive the DAD message sent by the C node, no message is replied. And after the C node delays for 1 second after the last DAD message of the C node is sent, confirming that A, B, D and the NA message replied by the E node are not received, and determining that the address can be used in the range of the local link.
Assuming that the C node has an assigned address of 100::1: 1/128, the C node will send the DAD carrying 100::1: 1/128 addresses to A, B, D and E node, respectively. In general, 3 DAD messages are sent, and the time interval of each DAD message is 1 second. After receiving the DAD message sent by the node C, the node B finds that the detected IPv6 address in the DAD message (i.e., the destination address in the DAD message) is duplicate with the address of the local machine, and then multicast and send the NA message to the node C. When the node C receives the NA message within the time of sending the DAD message and the target address in the NA message is the same as the DAD detection address of the node C, the node C considers that the node in the local link range is repeated with the pre-used IPv6 address, and the node C considers that the address cannot be used in the node C and is a link repeated address.
For the home subscriber mentioned in the above embodiment, it may be that the BRAS router device receives DAD messages of multiple IPv6 addresses within the same period of time, and there is a case that it is impossible to distinguish which access type is the assigned address for the IPv6 address detected in many DAD messages, which causes confusion of address management by the subscriber management module of the BRAS router device. For the user, confusion in address management can lead to confusion in the billing situation for the service. Because each service offered by the user is assigned a different IPv6 address and employs a different access type access. For each service access type and the allocated IPv6 address, the access type and the allocated IPv6 address need to be respectively traced (reported) to an Authentication, Authorization, and Accounting (AAA) server for respective Accounting.
For example, for a family, the telephone communication service adopts an IPHOST user access type to access the BRAS router equipment, the statically configured address is 100: 1:1/128, and three times of DAD detection are needed; the IPTV service adopts DHCPv6 user access type to access the BRAS router equipment, distributes to an IPv6 prefix 100:/32 and generates an IPv6 address 100::2:2:2/128, and the address also carries out three times of DAD detection; the IPTV service adopts an SLAAC user access type to access the BRAS router equipment, allocates an IPv6 prefix 100: 64 and generates an IPv6 address 100: 3:3/128, and the address also carries out three times of DAD detection; if three services are accessed simultaneously, or the time is close, or the network delay and the like occur, the same BRAS router device may receive many disordered DAD messages, and the BRAS router device cannot distinguish which access type is allocated for the three addresses 100: 1:1/128, 100: 2:2:2/128 and 100: 3:3:3/128, so that the AAA server cannot be used for charging according to each access type of each service, and the charging condition for the service is disordered.
Aiming at the problem that router equipment in the related art cannot distinguish various access types, an effective solution is not provided at present.
Disclosure of Invention
The invention provides a charging method and a charging device aiming at the problem that router equipment in the related art cannot distinguish various access types, and at least solves the problem.
According to an aspect of the present invention, there is provided a charging method, including: receiving a DAD message sent by a user; wherein, a protocol type field is expanded in a field of the DAD message, and the DAD message carries an IPv6 address; detecting whether the IPv6 address is available; if the detection result is available, determining the access type of the user according to the protocol type field, and executing corresponding charging operation on the user according to different access types.
The extension of the protocol type field in the field of the DAD packet may include: and expanding the first two bits of the reserved field of the DAD message into the protocol type field.
Determining the access type of the user according to the protocol type field may include: when the value of the protocol type field is 0, determining that the access type of the user is an IPHOST type; when the value of the protocol type field is 1, determining that the access type of the user is an SLACC type; and when the value of the protocol type field is 2 or 3, determining that the access type of the user is a DCHPv6 type.
Detecting whether the IPv6 address is available may include: judging whether the IPv6 address carried in the DAD message is the same as the address of a message interface; if the IPv6 address is the same, determining that the IPv6 address is unavailable; if not, determining that the IPv6 address is available.
After detecting whether the IPv6 address is available, the method may further include: and if the detection result is unavailable, sending an announcement message to the user, wherein the announcement message carries the IPv6 address, and the announcement message is used for indicating the user to be offline.
The notification message may be an NA message.
According to another aspect of the present invention, there is provided a charging apparatus, the apparatus including: the message receiving module is used for receiving a DAD message sent by a user; wherein, a protocol type field is expanded in a field of the DAD message, and the DAD message carries an IPv6 address; the detection module is used for detecting whether the IPv6 address is available; a type determining module, configured to determine, according to the protocol type field, an access type of the user if a detection result of the detecting module is available; and the charging module is used for executing corresponding charging operation on the user according to different access types determined by the type determining module.
The message receiving module may include: and the extension unit is used for extending the first two bits of the reserved field of the DAD message into the protocol type field.
The type determining module may include: a first type determining unit, configured to determine that the access type of the user is an IPHOST type when the value of the protocol type field is 0; a second type determining unit, configured to determine that the access type of the user is an SLACC type when the value of the protocol type field is 1; a third type determining unit, configured to determine that the access type of the user is a DCHPv6 type when the value of the protocol type field is 2 or 3.
The detection module may include: a determining unit, configured to determine whether the IPv6 address carried in the DAD packet is the same as an address of a packet interface; a first determination unit configured to determine that the IPv6 address is not available when the determination result of the determination unit is the same; a second determining unit, configured to determine that the IPv6 address is available when the determination results of the determining unit are different.
The above apparatus may further include: and a message sending module, configured to send an announcement message to the user when a detection result of the detection module is unavailable, where the announcement message carries the IPv6 address, and the announcement message is used to indicate that the user is offline.
The notification message may be an NA message.
According to the invention, the protocol type field is expanded in the field of the DAD message, after the DAD message sent by the user is received, whether the IPv6 address carried in the DAD message is available is detected, if the detection result is available, the access type of the user is determined according to the protocol type field, and corresponding charging operation is executed on the user aiming at different access types, so that the problem that router equipment in the related technology cannot distinguish various access types is solved, thereby distinguishing different access types, enabling the charging operation to be more targeted, improving the charging accuracy and improving the user experience.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic diagram of an encapsulation format of an NS packet according to the related art;
fig. 2 is a schematic diagram of an encapsulation format of an NA packet according to the related art;
fig. 3 is a network topology networking diagram of a DAD detection process according to the related art;
fig. 4 is a flowchart of a charging method according to an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a format of an optimized DAD packet in an NDP protocol according to an embodiment of the present invention;
FIG. 6 is a flow diagram of IPv6 address assignment and subsequent DAD detection according to an embodiment of the invention;
fig. 7 is a block diagram of a charging apparatus according to an embodiment of the present invention;
fig. 8 is a block diagram showing a detailed structure of a charging apparatus according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
For the DAN detection in the related art, the same BRAS router device may receive many disordered DAD messages, and the confusion of the charging process may be caused because the access types cannot be distinguished. Based on this, embodiments of the present invention provide a charging method and apparatus, which are described in detail below by way of embodiments.
The present embodiment provides a charging method, which is generally applied to a router (e.g. BRAS device), and fig. 4 is a flowchart of the charging method according to the embodiment of the present invention, as shown in fig. 4, the method includes the following steps (step S402-step S406):
step S402, BRAS equipment receives a repeated address detection DAD message sent by a user; wherein, a protocol type field is expanded in a field of the DAD message, and the DAD message carries an IPv6 address;
step S404, the BRAS device detects whether the IPv6 address is available;
step S406, if the detection result is available, the BRAS device determines the access type of the user according to the protocol type field, and performs corresponding charging operation on the user according to different access types.
Through the embodiment, the BRAS device expands the protocol type field in the field of the DAD message, detects whether the IPv6 address carried in the DAD message is available after receiving the DAD message sent by the user, if the detection result is available, the BRAS device determines the access type of the user according to the protocol type field, and executes corresponding charging operation on the user according to different access types, so that the problem that the router device cannot distinguish various access types in the related technology is solved, different access types can be distinguished, the charging operation is more targeted, the charging accuracy is improved, and the user experience is improved.
The BRAS device may extend the protocol type field in the field of the DAD packet in a plurality of ways, and this embodiment provides a preferred embodiment, that is, the first two bits of the reserved field of the DAD packet are extended to the protocol type field. Fig. 5 is a schematic diagram of a format of an optimized DAD packet in an NDP protocol according to an embodiment of the present invention, and as shown in fig. 5, the optimized DAD packet is obtained by expanding the first 10 bits in a 32-bit Reserved field (Reserved) in an original packet based on the original NS standard packet format. The first two bits of the reserved field of the original NS packet are extended to a Protocol Type (Protocol Type), the value range of the Protocol Type is 0 to 3, the next following 8 bits are extended to a Prefix length (Prefix length), and the value range of the Prefix length is 1 to 128. The specification and application of protocol type and prefix length are described as follows:
when the protocol type field value is 0, the ip host user (i.e. the DAD message sent when the IPv6 address is statically configured) is indicated, and the prefix length field value is 128.
When the protocol type field value is 1, the message indicates an SLACC user (i.e., a DAD message sent out by an IPv6 address generated by a prefix allocated by an SLAAC function in NDP), and the prefix length field value is 1 to 128. Its prefix length field value must be the same as the SLAAC assigned IPv6 prefix. When the prefix length field value is 0, it represents an invalid value, and the receiver ignores this field.
When the field value of the protocol type is 2, the condition that the DCHPv6 user allocates the address (namely the DHCPv6 protocol allocates the DAD message triggered by the IPv6 address to the user) is shown, and the prefix length field value is 128.
When the protocol type field value is 3, the DCHPv6 indicates that the user allocates a prefix (i.e. a DAD message sent out by an IPv6 address generated by the prefix allocated by the DHCPv 6), and the prefix length field value is 1 to 128. Its prefix length field value must be the same as the IPv6 prefix assigned by the DHCPv 6. When the prefix length field value is 0, it represents an invalid value, and the receiver ignores this field.
Based on the optimized DAD packet format described in fig. 5, this embodiment provides a preferred implementation manner, that is, determining, by the BRAS device, the access type of the user according to the protocol type field includes: when the value of the protocol type field is 0, the BRAS equipment determines that the access type of the user is an IPHOST type; when the value of the protocol type field is 1, the BRAS equipment determines that the access type of the user is the SLACC type; when the value of the protocol type field is 2 or 3, the BRAS equipment determines that the access type of the user is DCHPv6 type. By the method, a foundation is provided for the charging operation according to different access types.
For the detection process of whether the IPv6 address is available, as in the related art, this embodiment provides a preferred implementation manner, that is, the detecting, by the BRAS device, whether the IPv6 address is available includes: the BRAS equipment judges whether the IPv6 address carried in the DAD message is the same as the address of the message interface; if so, determining that the IPv6 address is unavailable; if not, determining that the IPv6 address is available. And when the detection result is unavailable, the BRAS equipment sends an announcement message to the user, wherein the announcement message carries the IPv6 address, and the announcement message is used for indicating that the address of the user on line is repeated with the address in the local link range, so that the user can request or apply for the address again. The notification message may be an NA message.
The implementation of the above embodiments will be described in detail below with reference to the preferred embodiments and the accompanying drawings.
Fig. 6 is a flowchart of IPv6 address assignment and subsequent DAD detection according to an embodiment of the present invention, and as shown in fig. 6, the flowchart includes the following steps (step S602-step S616):
at step S602, the IPv6 home subscriber requests IPv6 network service from the BRAS router device using different protocols or different access types.
Step S604, when the BRAS router equipment receives the online request of the user, according to different access protocols or access types applied by the user client, a plurality of IPv6 addresses are distributed to the user, and different services are provided.
Step S606, the BRAS router device informs the user of successful access, and replies IPv6 address to the user.
Step S608, after the BRAS router device successfully allocates an address or a prefix to the IPv6 home user, the home client performs DAD detection using the address generated by using the allocated address or the allocated prefix. The BRAS router equipment receives a DAD message sent by a user, judges whether a target address in the DAD message of the user is the same as an address of a message receiving interface of the BRAS router, if so, the IPv6 address is considered unavailable, and step S610 is executed, and if not, the IPv6 address is considered available, and step S612 is executed.
Step S610, BRAS router device sends NA message to user, and informs user off-line.
Step S612, the BRAS router device may receive the DAD packet sent by the user, such as DHCPv6, SLAAC, IPHOST, etc., the BRAS device needs to process the DAD packet, and according to the protocol type field in the DAD packet, distinguishes which protocol and access type is used for accessing the received DADs, and needs to check whether the prefix lengths of the DHCPv6 and SLAAC assigned to the user are equal to the prefix length of the DAD packet, if not, it considers that the addresses generated by the prefixes of the non-DHCPv 6 and SLAAC assigned to the user are not equal, and does not need to add to the user management module. Addresses assigned via DHCPv6 and IPHOST do not need to check the prefix length field in the DAD message, only the protocol type field needs to be distinguished. If DAD detection is completed, the IPv6 address distributed to the user by the DHCPv6, the SLAAC, the IPHOST and the like or the generated IPv6 address needs to be added to the user management module.
In step S614, the user management module reports the IPv6 address allocated to the user or the generated IPv6 address to the AAA server using different types, respectively, according to the protocol type. So that the AAA server may charge separately for a particular access type.
Step S616, after determining that the user is offline, notifying the AAA server to stop charging.
Corresponding to the above charging method, the present embodiment provides a charging apparatus, which may be generally disposed on a router (e.g., BRAS device) for implementing the above embodiments. Fig. 7 is a block diagram of a charging apparatus according to an embodiment of the present invention, and as shown in fig. 7, the apparatus includes: the device comprises a message receiving module 10, a detection module 20, a type determining module 30 and a charging module 40. This structure will be explained below.
A message receiving module 10, configured to receive a DAD message sent by a user; wherein, a protocol type field is expanded in a field of the DAD message, and the DAD message carries an IPv6 address;
a detection module 20, connected to the message receiving module 10, for detecting whether the IPv6 address is available;
a type determining module 30, connected to the detecting module 20, for determining the access type of the user according to the protocol type field if the detection result of the detecting module 20 is available;
a charging module 40, connected to the type determining module 30, for performing corresponding charging operations on the user for different access types determined by the type determining module 30.
Through the embodiment, the protocol type field is extended in the field of the DAD message, after the message receiving module 10 receives the DAD message sent by the user, the detecting module 20 detects whether the IPv6 address carried in the DAD message is available, if the detection result is available, the type determining module 30 determines the access type of the user according to the protocol type field, and the charging module 40 performs corresponding charging operations on the user according to different access types, so that the problem that router equipment cannot distinguish various access types in the related art is solved, different access types can be distinguished, the charging operations are more targeted, the charging accuracy is improved, and the user experience is improved.
The message receiving module 10 further includes: and the extension unit is used for extending the first two bits of the reserved field of the DAD message into the protocol type field. The specific expansion manner has been described above, and will not be described herein again.
Therefore, this embodiment provides a preferred implementation manner, fig. 8 is a specific structural block diagram of a charging apparatus according to an embodiment of the present invention, and as shown in fig. 8, the apparatus includes, in addition to the modules in fig. 7, the type determining module 30 further includes: a first type determining unit 32, a second type determining unit 34, and a third type determining unit 36. This structure will be explained below.
A first type determining unit 32, configured to determine that the access type of the user is a static private line IPHOST type when the value of the protocol type field is 0; or,
a second type determining unit 34, configured to determine that the access type of the user is a stateless address auto-configuration SLACC type when the value of the protocol type field is 1; or,
a third type determining unit 36, configured to determine that the access type of the user is a dynamic host configuration protocol DCHPv6 type supporting IPv6 when the value of the protocol type field is 2 or 3.
The detection module 20 for detecting whether the IPv6 address is available may be implemented by the following preferred embodiments, that is, the detection module 20 includes: the judging unit is used for judging whether the IPv6 address carried in the DAD message is the same as the address of the message interface; a first determination unit configured to determine that the IPv6 address is not available when the determination result of the determination unit is the same; a second determining unit, configured to determine that the IPv6 address is available when the determination results of the determining unit are different.
In the case that the detection result of the detection module 20 is unavailable, the apparatus may further include: and a message sending module, configured to send an announcement message to the user when a detection result of the detection module is unavailable, where the announcement message carries the IPv6 address, and the announcement message is used to indicate that an address where the user is online is repeated with an address in a local link range, so that the user requests or applies for an address for use again. The notification message may be an NA message.
It can be seen from the above description that the present invention enables the BRAS device to effectively manage the IPv6 address, and provides a solution for differentiated charging for multiple access types while the user is online. When a plurality of addresses are allocated to a plurality of IPv6 access types and the same IPv6 access type, when DAD detection is performed for a plurality of generated addresses or allocated addresses of users, it is possible to distinguish which access protocol or access method the user is for.
It will be apparent to those skilled in the art that all or part of the steps of the above methods may be implemented by instructing the relevant hardware through a program, and the program may be stored in a computer-readable storage medium, such as a read-only memory, a magnetic or optical disk, and the like. Alternatively, all or part of the steps of the above embodiments may be implemented using one or more integrated circuits. Accordingly, each module/unit in the above embodiments may be implemented in the form of hardware, and may also be implemented in the form of a software functional module.
The modules or steps of the present invention may be implemented in a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and optionally, they may be implemented in program code executable by a computing device, such that they may be stored in a memory device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. A charging method, comprising:
receiving a repeated address detection (DAD) message sent by a user; wherein, a protocol type field is expanded in a field of the DAD message, and the DAD message carries an Internet protocol version 6IPv6 address;
detecting whether the IPv6 address is available;
if the detection result is available, determining the access type of the user according to the protocol type field, and executing corresponding charging operation on the user aiming at different access types.
2. The method of claim 1, wherein the extending of the protocol type field in the field of the DAD packet comprises:
and expanding the first two bits of the reserved field of the DAD message into the protocol type field.
3. The method of claim 1, wherein determining the access type of the user according to the protocol type field comprises:
when the value of the protocol type field is 0, determining that the access type of the user is a static private line IPHOST type;
when the value of the protocol type field is 1, determining that the access type of the user is a stateless address auto-configuration (SLACC) type;
when the value of the protocol type field is 2 or 3, determining that the access type of the user is a dynamic host configuration protocol (DCHPv 6) type supporting IPv 6.
4. The method of claim 1, wherein detecting whether the IPv6 address is available comprises:
judging whether the IPv6 address carried in the DAD message is the same as the address of a message interface;
if so, determining that the IPv6 address is unavailable;
and if not, determining that the IPv6 address is available.
5. The method of claim 1, wherein after detecting whether the IPv6 address is available, the method further comprises:
and if the detection result is unavailable, sending an announcement message to the user, wherein the announcement message carries the IPv6 address, and the announcement message is used for indicating that the user is offline.
6. The method of claim 5, wherein the advertisement message is a Neighbor Advertisement (NA) message.
7. A charging apparatus, comprising:
the message receiving module is used for receiving a repeated address detection DAD message sent by a user; wherein, a protocol type field is expanded in a field of the DAD message, and the DAD message carries an Internet protocol version 6IPv6 address;
a detection module, configured to detect whether the IPv6 address is available;
the type determining module is used for determining the access type of the user according to the protocol type field under the condition that the detection result of the detecting module is available;
and the charging module is used for executing corresponding charging operation on the user aiming at different access types determined by the type determination module.
8. The apparatus of claim 7, wherein the message receiving module comprises:
and the extension unit is used for extending the first two bits of the reserved field of the DAD message into the protocol type field.
9. The apparatus of claim 7, wherein the type determination module comprises:
a first type determining unit, configured to determine that the access type of the user is a static private line IPHOST type when the value of the protocol type field is 0;
a second type determining unit, configured to determine that the access type of the user is a stateless address auto-configuration SLACC type when the value of the protocol type field is 1;
a third type determining unit, configured to determine that the access type of the user is a dynamic host configuration protocol DCHPv6 type supporting IPv6 when the value of the protocol type field is 2 or 3.
10. The apparatus of claim 7, wherein the detection module comprises:
a judging unit, configured to judge whether the IPv6 address carried in the DAD packet is the same as an address of a packet interface;
a first determination unit, configured to determine that the IPv6 address is unavailable when the determination results of the determination units are the same;
a second determining unit, configured to determine that the IPv6 address is available when the determination results of the determining units are different.
11. The apparatus of claim 7, further comprising:
and a message sending module, configured to send an announcement message to the user when a detection result of the detection module is unavailable, where the announcement message carries the IPv6 address, and the announcement message is used to indicate that the user is offline.
12. The apparatus of claim 11, wherein the advertisement message is a Neighbor Advertisement (NA) message.
CN201210252186.0A 2012-07-20 2012-07-20 Charging method and device Active CN102761425B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210252186.0A CN102761425B (en) 2012-07-20 2012-07-20 Charging method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210252186.0A CN102761425B (en) 2012-07-20 2012-07-20 Charging method and device

Publications (2)

Publication Number Publication Date
CN102761425A true CN102761425A (en) 2012-10-31
CN102761425B CN102761425B (en) 2018-06-12

Family

ID=47055752

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210252186.0A Active CN102761425B (en) 2012-07-20 2012-07-20 Charging method and device

Country Status (1)

Country Link
CN (1) CN102761425B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104753793A (en) * 2013-12-26 2015-07-01 联芯科技有限公司 Method for statefull management of access terminal under stateless internet protocol version 6 (IPv6) configuration
CN109327634A (en) * 2017-07-31 2019-02-12 贵州白山云科技股份有限公司 A kind of method and device solving repetition charging
CN110072073A (en) * 2019-03-14 2019-07-30 视联动力信息技术股份有限公司 Terminal calling service control method, device, electronic equipment and storage medium
CN112929284A (en) * 2021-01-29 2021-06-08 烽火通信科技股份有限公司 ND message identification method and system under IPv6VXLAN scene

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050220144A1 (en) * 2004-03-31 2005-10-06 Kabushiki Kaisha Toshiba Communication apparatus, name resolution method and program
CN1692606A (en) * 2003-01-15 2005-11-02 三星电子株式会社 Method of automatically registering an IP address and domain name in IP protocol version 6
CN1901551A (en) * 2005-07-19 2007-01-24 上海贝尔阿尔卡特股份有限公司 Repeat address detecting method and its device for supporting IPv6 two layer access net
WO2007128239A1 (en) * 2006-04-30 2007-11-15 Huawei Technologies Co., Ltd. System for implementing mobile ipv6 and method for establishing user link in the system
CN101127629A (en) * 2006-08-18 2008-02-20 华为技术有限公司 Policy and billing execution device, online billing system and method for communication system
CN101540983A (en) * 2008-03-19 2009-09-23 中兴通讯股份有限公司 Method for charging in mobile network
CN101547383A (en) * 2008-03-26 2009-09-30 华为技术有限公司 Access authentication method, access authentication system and related equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1692606A (en) * 2003-01-15 2005-11-02 三星电子株式会社 Method of automatically registering an IP address and domain name in IP protocol version 6
US20050220144A1 (en) * 2004-03-31 2005-10-06 Kabushiki Kaisha Toshiba Communication apparatus, name resolution method and program
CN1901551A (en) * 2005-07-19 2007-01-24 上海贝尔阿尔卡特股份有限公司 Repeat address detecting method and its device for supporting IPv6 two layer access net
WO2007128239A1 (en) * 2006-04-30 2007-11-15 Huawei Technologies Co., Ltd. System for implementing mobile ipv6 and method for establishing user link in the system
CN101127629A (en) * 2006-08-18 2008-02-20 华为技术有限公司 Policy and billing execution device, online billing system and method for communication system
CN101540983A (en) * 2008-03-19 2009-09-23 中兴通讯股份有限公司 Method for charging in mobile network
CN101547383A (en) * 2008-03-26 2009-09-30 华为技术有限公司 Access authentication method, access authentication system and related equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104753793A (en) * 2013-12-26 2015-07-01 联芯科技有限公司 Method for statefull management of access terminal under stateless internet protocol version 6 (IPv6) configuration
CN104753793B (en) * 2013-12-26 2018-03-30 联芯科技有限公司 The method of stateful management access terminal under stateless IPv6 configurations
CN109327634A (en) * 2017-07-31 2019-02-12 贵州白山云科技股份有限公司 A kind of method and device solving repetition charging
CN110072073A (en) * 2019-03-14 2019-07-30 视联动力信息技术股份有限公司 Terminal calling service control method, device, electronic equipment and storage medium
CN112929284A (en) * 2021-01-29 2021-06-08 烽火通信科技股份有限公司 ND message identification method and system under IPv6VXLAN scene

Also Published As

Publication number Publication date
CN102761425B (en) 2018-06-12

Similar Documents

Publication Publication Date Title
US7760666B2 (en) Method of generating and managing connection identifiers for supporting multicast for each group in IPv6-based wireless network and network interface using the method
EP2267984B1 (en) Address configuring method, apparatus and system
EP2852111B1 (en) Method, mobile device, and system for automatically selecting ipv6 address transmission mode
KR100538223B1 (en) System and method for deleting tunnelling in the connection between mobile node and correspondent node
US20120324063A1 (en) Method, network device, and system for automatically configuring network device in ipv6 network
EP3675466B1 (en) Duplicate address detection for range of link local ip addresses
US20040037242A1 (en) Allocating addresses to mobile stations
CN102984288A (en) Method and system for managing internet protocol version 6 (IPV6) address conflicts automatically
US11606332B1 (en) Duplicate address detection for ranges of global IP addresses
JP2015164287A (en) Network relay device, method for setting operation mode of packet relay processing unit in network relay device, and computer program
US9615246B2 (en) Dynamic allocation of host IP addresses
KR20110039451A (en) Network address assignment
CN103916484A (en) IP-address configuring method and device
CN103384282A (en) Method for obtaining IPV6ND address and broadband remote access server (BARS)
CN102761425B (en) Charging method and device
JP5905722B2 (en) System and method for mobile IP
CN1875573B (en) Method, node and server for providing tunnel service capable of data communication between different types of networks
WO2009120525A1 (en) Unique prefix assignment with automatic address configuration
CN113938427A (en) Communication method and system, and routing node
US7852878B2 (en) Apparatus and method for supporting establishment of network address of communication apparatus
WO2014079235A1 (en) Method, user node and remote access server for releasing address
KR100849128B1 (en) Method and system for allocating address in wireless network
KR101213159B1 (en) Mobile terminal and method for assigning ip address in wireless network
US20150049669A1 (en) Method and system for management of the mobility of a mobile network
EP2568715B1 (en) Mobile node, care of address acquisition method and system thereof, and dhcp server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant