CN102202106B - Maintenance method of address compression control table in 6LoWPAN protocol - Google Patents

Maintenance method of address compression control table in 6LoWPAN protocol Download PDF

Info

Publication number
CN102202106B
CN102202106B CN2011101305075A CN201110130507A CN102202106B CN 102202106 B CN102202106 B CN 102202106B CN 2011101305075 A CN2011101305075 A CN 2011101305075A CN 201110130507 A CN201110130507 A CN 201110130507A CN 102202106 B CN102202106 B CN 102202106B
Authority
CN
China
Prior art keywords
item
numerical value
weight
control table
ipv6 address
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.)
Expired - Fee Related
Application number
CN2011101305075A
Other languages
Chinese (zh)
Other versions
CN102202106A (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.)
Shenzhen Graduate School Tsinghua University
Original Assignee
Shenzhen Graduate School Tsinghua University
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 Shenzhen Graduate School Tsinghua University filed Critical Shenzhen Graduate School Tsinghua University
Priority to CN2011101305075A priority Critical patent/CN102202106B/en
Publication of CN102202106A publication Critical patent/CN102202106A/en
Application granted granted Critical
Publication of CN102202106B publication Critical patent/CN102202106B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a maintenance method of an address compression control table in a 6LoWPAN protocol. The method comprises the following steps of: generating a control table and an address cache table in a coordinator node; subtracting N1 and N2 from numerical values of weight items corresponding to valid effect items in the address cache table and the control table respectively, and setting the corresponding effect items to be invalid respectively if the numerical values of the weight items in the address cache table and the control table are not greater than threshold values M1 and M2 respectively; judging whether the control table has invalid effect items, if so, finding the weight items with maximum numerical values in the valid effect items of the address cache table, and setting the effect items to be invalid; and filling IPV6 address prefixes corresponding to the weight items with maximum numerical values into IPV6 address prefix items corresponding to the invalid effect items in the control table, setting the corresponding effect items in the control table to be valid, and sending message containing the IPV6 address prefixes and corresponding index numbers CID to the adjacent sub node by the coordinator node.

Description

The maintaining method of address compression control table in a kind of 6LoWPAN agreement
Technical field
The invention belongs to the low-speed wireless network technology field, territory based on IPv6, relate in particular to the maintaining method of address compression control table in a kind of 6LoWPAN agreement.
Background technology
Background technology for a better understanding of the present invention, can be with reference to following technical data:
[1]?RFC?4944,?Transimission?of?IPv6?Packets?over?IEEE802.15.4?Networks
[2]?draft-ietf-6lowpan-hc-07,?Compression?Format?for?IPv6?Datagrams?in?6LoWPAN?Networks
[3]?draft-ietf-6lowpan-nd-09,?Neighbor?Discovery?Optimization?for?Low-power?and?Lossy?Networks
Wireless personal local area network (WPAN) is the connectionless PAN (Personal Area Network) of a kind of employing.In July, 2003, IEEE is that LR-WPAN has released the IEEE802.15.4 technical standard, and this agreement has mainly defined the agreement of physical layer (PHY) and MAC layer (MAC), and main application scenario is automation meter reading, automation control and sensor network.The short-distance wireless that IEEE802.15.4 is absorbed in low rate, low-power consumption connects, and flank speed is only 250kbps, and battery life can reach 6 months to 2 years, is a kind of economical and efficient, low complex degree, low-power consumption, low data rate and radio network technique cheaply.
What propose network layer protocol on IEEE802.15.4 is ZigBee alliance, they have defined data frame format and the interactive mode of network layer and application layer, yet Zigbee protocol can't with existing IP network direct communication, therefore people have proposed again the 6LoWPAN agreement, 6LoWPAN is an agreement that designs in order to make wireless sensor network and IPv6 network interconnection intercommunication, and can be described as IPv6 is to be applied to the simplification version that wireless sensor network environment designs.The potentiality of the low power run that 6LoWPAN has make it be well suited for being applied in equipment from the hand-held set to the instrument, and the support of simultaneously AES-128 being encrypted also provides strong fail safe for wireless network.
In order to transmit the message of IPv6 efficiently on the 802.15.4 link, 6lowpan has introduced adaptation layer between link layer and network layer, reduce in a large number the transport overhead of IPv6 message by adaptation layer.The header compression method of this " pay as you go " formula has been removed redundancy in IP packet header or the unnecessary network information, and IP packet header obtains these network level information from the domain of dependence in link level 802.15.4 packet header when receiving.
The physical layer MTU value of IEEE802.15.4 is 127 bytes, and the Frame control overhead will consume 25 bytes at most, so data link layer only has 102 bytes to use; The data link layer security algorithm will consume 21 bytes (AES-CCM-128 takies 21 bytes, and AES-CCM-64 takies 13 bytes, and AES-CCM-32 takies 9 bytes), and load only has 81 bytes to use for network layer; Consider 40 byte IPv6 packet header and 8 byte UDP packet header, residue 33 bytes are used to application layer again; Therefore simplify IPv6 packet header imperative.
The basic principle of 6lowpan adaptation layer header-compressed is the field in ipv6 packet header to be extracted form new packet header, uses which kind of mode to simplify with follow-up which field of the dispatch field identification of a byte.Under the best circumstances, the packed field that the IPv6 address of 40 bytes can a byte of boil down to and the hop limit field of 1 byte.6lowpan adaptation layer data packet head form as shown in Figures 1 to 3.
In order to realize the compression function in IPv6 packet header, RFC4944 has defined LOWPAN_HC1 header and LOWPAN_BC0 header, the LOWPAN_HC1 header-compressed be the IPv6 message, the compression of LOWPAN_BC0 packet header be broadcasting packet.LOWPAN_HC1 data packet head form as shown in Figure 4, wherein,
SA:IPv6 source address compression control
DA:IPv6 destination address compression control
TF: traffic classes and flow label field are controlled
NH: next header field is controlled
HC2:HC2 compression control (UDP, ICMP, TCP)
IPv6 address, source and purpose IPv6 address have taken altogether 32 bytes in IPv6 packet header of 40 bytes, be maximum a part of expense.LOWPAN_HC1 packet header allows to generate the IPv6 address from link layer address, and concrete grammar is the mac address generation EUI-64 address of using 48bits, then uses the EUI-64 of home link network prefix and generation
Address combination becomes the IPv6 address of link-local.Be only applicable to compress the IPv6 address of link-local due to LOWPAN_HC1, and can't be suitable for for global address, can only comprise complete 32 byte IPv6 addresses in follow-up packet header.Therefore there is the people to propose the LOWPAN_IPHC header, it depends on the CONTEXT table that a whole network is shared, with the index CID of 4bits as list item, to 16 list items should be arranged, 64 prefixes (adopting 64 IPv6 address prefix schemes of fixed length) of one of each list item storage IPv6 address; We just can have 16 indexed networks like this, and the 64bits prefix of each network can replace with the index CID of 4bits, the space, packet header that 60bits has just been saved in an IPv6 address.As shown in Figure 5,6LOWPAN_IPHC header compression form, the code field of LOWPAN_IPHC is as follows: TF: traffic classes and flow label field are controlled; NH: next field is controlled; HLIM: hop count field restriction; The CID:CONTEXT index field is controlled; SAC:IPv6 source address compression control; SAM:IPv6 source address compact model; M: multicast compression control; DAC:IPv6 destination address compression control; DAM:IPv6 destination address compact model.
When CONTEXT table maintenance algorithm draws certain address prefix and is used by the packet high-frequency, need that this prefix is put into CONTEXT and show, coordinator node is upgraded operation with the CONTEXT list item, need to carry out synchronously whole network; Wherein coordinator node will be upgraded list item to each node broadcasting CONTEXT, and its message adopts the CONTEXT choice format in the 6lowpan Neighbor Discovery Protocol, message format as shown in Figure 6, wherein the CID item accounts for the space of 4 bits.
Wireless sensor network based on IPv6 uses the 6lowpan agreement to carry out communication in network internal, for the short frame length Frame that adapts to IEEE802.15.4 and the low power characteristic of wireless sensor network, the 6lowpan agreement has increased an adaptation layer between data link layer and network layer, its main purpose is that the IPv6 packet header of network layer and the header part more than network layer are compressed, remove redundant data, reach the effect of optimization of network traffics.Up-to-date 6LoWPAN agreement adopts makes IPHC packet header compression algorithm, and the core concept of this algorithm makes safeguards a CONTEXT table that the whole network is synchronous, uses this table to compress as packet header and provides support.
The LOWPAN_IPHC header compression adopts CONTEXT to show to assist compressed IP v6 address, yet any node of whole network that makes can correctly be identified the 6lowpan packet after compression, the CONTEXT table must be synchronized in whole network, tend to cause larger time delay.And the original intention that LOWPAN_IPHC adopts CONTEXT to show is in order to replace the IPv6 address prefix with CID, to reduce packet header to reach, reducing the purpose of flow in network.But the introducing of CONTEXT table itself needs again administration overhead, and giving in whole network has so again increased the management data flow.The particularly renewal of CONTEXT list item, each more need to guarantee CONTEXT to upgrade in the node that item can be synchronized to whole network and go in new capital, has therefore caused increasing of network traffics objectively.On the other hand, if CONTEXT entry updating algorithm design is bad, may cause the frequent updating of list item in the network burst flow, thus the emphasis network load.
Summary of the invention
In order to solve the larger technical problem of above-mentioned offered load, the invention provides the maintaining method of address compression control table in a kind of 6LoWPAN agreement, comprise the steps:
A, generate control table and address caching table in coordinator node, described control table is comprised of a plurality of list items, each list item comprises IPV6 address prefix item, effect item and the weight term of manipulative indexing CID, described address caching table is comprised of a plurality of list items, and each list item comprises IPV6 address prefix item, effect item and weight term; Wherein, the effect item has effectively and invalid two states;
B, in described address caching table, the numerical value of weight term that will be corresponding with effective effect item subtracts N1, if the numerical value of weight term is less than or equal to threshold value M1, the effect item of correspondence be set to invalid;
C, in described control table, the numerical value of weight term that will be corresponding with effective effect item subtracts N2, if the numerical value of weight term is less than or equal to threshold value M2, the effect item of correspondence be set to invalid;
D, judge whether there is invalid effect item in described control table, if having in the effective effect item of described address caching table, find out the weight term of numerical value maximum, it is invalid that this effect item is set to;
E, the IPV6 address prefix that the weight term of described numerical value maximum is corresponding are inserted in the IPV6 address prefix item of effect item correspondence invalid in described control table, and effect item corresponding in described control table is set to effectively, the message that coordinator node will comprise the call number CID of described IPV6 address prefix and correspondence sends on adjacent child node;
Wherein, N1, N2, M1 and M2 are positive integers.
Preferably, in step D, if there is not invalid effect item, carry out following steps:
Whether the numerical value of weight limit item in the effective effect item of G, described address caching table is greater than the K numerical value of minimal weight item in the effective effect item of described control table doubly, if execution in step H;
H, the IPV6 address prefix item that the IPV6 address prefix item of described weight limit item correspondence is corresponding with described minimal weight item exchange numerical value; The numerical value of described minimal weight item is set to: the numerical value of a and described weight limit item divided by K and, it is invalid that the effect item of weight limit item correspondence described in described address caching table is set to, and the effect item of the correspondence of minimal weight item described in described control table is set to effectively;
Wherein a and K are positive integers.
Preferably, described coordinator node is carried out following steps after receiving packet:
Steps A 1, described coordinator node be extraction source IPV6 address prefix and purpose IPV6 address prefix in the packet that receives, if packet includes the 6LoWPAN packet header of call number CID, execution in step A2; Otherwise execution in step A3;
Steps A 2, in described control table, the numerical value of the weight term corresponding with call number CID described in steps A 1 is added N3;
Steps A 3, described address caching table is carried out following steps:
If steps A 31 exists described source IPV6 address prefix or purpose IPV6 address prefix, the numerical value with the weight term of correspondence adds N4; Whether existence is invalid effect item otherwise search;
If steps A 32 existences are invalid effect items, described source IPV6 address prefix or purpose IPV6 address prefix are write in the IPV6 address prefix item corresponding with this effect item, and the state of this effect item is set to effectively, and the numerical value of corresponding weight term is set to M3;
If steps A 33 not existence is invalid effect item, in IPV6 address prefix item that will be corresponding with the weight term of numerical value minimum, write described source IPV6 address prefix or purpose IPV6 address prefix, and the numerical value of the weight term of correspondence is set to M3;
Wherein N3, N4 and M3 are positive integers.
Preferably, in described steps A 2, if the numerical value of weight term corresponding to described call number CID is certain numerical value M4, keep this numerical value constant; In described steps A 31, if the numerical value of the weight term of described correspondence is certain numerical value M5, keep this numerical value constant; Wherein M4 and M5 are positive integers.
Preferably, described call number CID length is 4 bits, and described effect item length is 1 bit, and the weight term length of described control table is 6 bits, and the weight term length of described address caching table is 7 bits; Described N1=N2=N3=N4=1, M1=M2=0, K=2, M3=4, M4=63, M5=127.
Pin of the present invention is that on the 6LOWPAN wireless sensor network, the CONTEXT based on LOWPAN_IPHC shows maintenance algorithm.The method has following advantage on the basis of existing LOWPAN_IPHC compressed header packet and CONTEXT design:
1. in CONTEXT table and CONTEXT address caching table, a weight weight term is arranged, preserve with this field the frequency that this IPv6 address prefix occurs in the 6lowpan network, make us can dispatch out high-frequency IPv6 address prefix therein and be kept in the CONTEXT table.
2. for making the weight term that accounts for a small amount of several bit space can represent as much as possible frequency of occurrences value, adopted timer regularly whole weights to be carried out decrement operations in algorithm, and increasing operation when each IPv6 address prefix occurs in packet, such mode can guarantee that active in the recent period IPv6 address prefix can obtain higher weight.
3. the address prefix that will flow through in the packet of telegon node is added up, and obtains the frequency of occurrences of IPv6 address prefix, and is kept in CONTEXT address caching table with the form of frequency weight.
4. first line of a couplet CONTEXT table and second line of a couplet CONTEXT table have been introduced in intermediate node (router node), make the hierarchical synchronization algorithm become possibility, the hierarchical synchronization algorithm makes only synchronous own child node of each node, and the CONTEXT that makes like this 6LowPAN agreement based on IPHC may occur when large scale network is used shows the updating delay problem and effectively slowed down.
5. introduce anti-shake coefficient when upgrading the CONTEXT list item, prevented the close IPv6 address prefix of frequency and the CONTEXT list item frequent updating problem that produces.
To sum up, the network bandwidth resources that the present invention has avoided causing due to frequent updating CONTEXT list item is wasted and energy consumption, guarantees that active in the recent period IPv6 address prefix can obtain higher weight, so that network reaches optimization.Proposed again simultaneously the hierarchical synchronization algorithm of CONTEXT table, the CONTEXT that makes the 6LowPAN agreement based on IPHC may occur when large scale network is used shows the updating delay problem and is effectively slowed down.
Description of drawings
Fig. 1 is general IPV6 data message form;
Fig. 2 is LowPan_HC1 compressed IP V6 data message form;
Fig. 3 is LowPan_HC1 compressed IP V6 data message and passes through L2 layer Mesh mode transformat;
Fig. 4 is 6LOWPAN_HC1 header compression form;
Fig. 5 is 6LOWPAN_IPHC header compression form;
Fig. 6 is that the CONTEXT in the 6LOWPAN Neighbor Discovery Protocol upgrades a form;
Fig. 7 is CONTEXT table hierarchical synchronization algorithm schematic diagram;
Fig. 8 is the flow chart of a kind of specific embodiment of the present invention.
Embodiment
Below with reference to accompanying drawing, specific embodiments of the invention are described in further detail.
In 6LoWPAN agreement of the present invention, a kind of specific embodiment of the maintaining method of address compression control table, comprise the steps:
A, generate control table and address caching table in coordinator node, described control table is comprised of a plurality of list items, each list item comprises IPV6 address prefix item, effect item and the weight term of manipulative indexing CID, described address caching table is comprised of a plurality of list items, and each list item comprises IPV6 address prefix item, effect item and weight term; Wherein, the effect item has effectively and invalid two states;
B, in described address caching table, the numerical value of weight term that will be corresponding with effective effect item subtracts N1, if the numerical value of weight term is less than or equal to threshold value M1, the effect item of correspondence be set to invalid;
C, in described control table, the numerical value of weight term that will be corresponding with effective effect item subtracts N2, if the numerical value of weight term is less than or equal to threshold value M2, the effect item of correspondence be set to invalid;
D, judge whether there is invalid effect item in described control table, if having in the effective effect item of described address caching table, find out the weight term of numerical value maximum, it is invalid that this effect item is set to;
E, the IPV6 address prefix that the weight term of described numerical value maximum is corresponding are inserted in the IPV6 address prefix item of effect item correspondence invalid in described control table, and effect item corresponding in described control table is set to effectively, the message that coordinator node will comprise the call number CID of described IPV6 address prefix and correspondence sends on adjacent child node;
Wherein, N1, N2, M1 and M2 are positive integers.
In 6LoWPAN agreement of the present invention in the more specifically embodiment of the maintaining method of address compression control table, at first generate control table in coordinator node, perhaps be referred to as the CONTEXT table, be used for CID index IPV6 address prefix, in network, each leaf node and root node keep a CONTEXT table, intermediate node keeps 2 parts of CONTEXT tables, be respectively first line of a couplet CONTEXT table (perhaps being called first line of a couplet control table) and second line of a couplet CONTEXT table (perhaps being called second line of a couplet control table), wherein coordinator node belongs to root node; End node belongs to leaf node, can not the forwarding data bag; Intermediate node between end node and coordinator node, can forwarding data bag; Wherein the CONTEXT sheet format is as follows:
IPv6 Prefix (64bits) Valid(1bit) Update(1bit) CID Weight (6bits)
? ? ? ?
IPv6 address prefix item IPv6 Prefix: the IPV6 address prefix of the 64bits of corresponding CID accounts for 64 bits;
Effect item Valid: represent whether this is effective, accounts for 1 bit, 1 expression is effective, and 0 expression is invalid;
Upgrade a Update: represent that this list item whether just in renewal process, accounts for 1 bit, 1 expression is upgraded, and 0 is not upgrading;
Weight term CID Weight: the weights of this list item, account for 6 bits, only effective in the telegon node.
The CONTEXT table only has 16 list items, and each occupies 9 byte of memorys, and total table takies 144 byte of memorys.Call number CID is namely the item number sequence number of CONTEXT table, and for example, the zero list item represents that its corresponding call number CID is 0, is expressed as 0000 with binary system.Certainly, can represent call number CID by extra bit in the CONTEXT table, but can increase like this size of CONTEXT table, upgrade to get up network is caused larger burden.In addition, the CONTEXT that the present invention be directed in the 6lowpan Neighbor Discovery Protocol of showing to compress by CONTEXT upgrades the maintenance algorithm that the CID in a form carries out, thereby the number of bits of call number CID can be adjusted according to the number of bits of CID in this form.Because intermediate node and end node are only paid close attention to IPV6 address prefix and its corresponding call number CID, thereby the CONTEXT of intermediate node and end node table can include only IPv6 address prefix item IPv6 Prefix.
The CONTEXT table is safeguarded by the network coordinator node, sends broadcast packet by the telegon node when entry updating being arranged at every turn, and leaf and router node receive the CONTEXT table copy of after lastest imformation, this locality being preserved and upgrade operation.
Next generate CONTEXT address caching table in coordinator node, be used for the higher IPv6 address prefix of the storage packet frequency of occurrences, CONTEXT address caching sheet format is as follows:
IPv6 Prefix(64bits) Valid(1bit) Weight(7bits)
? ? ?
IPv6 address prefix item IPv6 Prefix: the IPV6 address prefix of the 64bits of corresponding CID;
Effect item Valid: represent whether this is effective, accounts for 1 bit, 1 expression is effective, and 0 expression is invalid;
Weight term CID Weight: the weights of this list item, account for 7 bits, only effective in the telegon node.
The list item number of CONTEXT address caching table is set to 256 (can change item number according to actual conditions), and every takies 9 byte of memorys.Item in the CONTEXT table must come from CONTEXT address caching table, and maintenance algorithm is selected the IPv6 address prefix of high frequency appearance and is updated to according to dispatching algorithm in the CONTEXT table in CONTEXT address caching table.Upgrade in order to reduce the network traffics that the CONTEXT list item brings, for the close IPv6 address prefix of the frequency of occurrences, we tend to keep the IPv6 address prefix that has used in the CONTEXT table, namely reduce its frequent updating by controlling anti-shake coefficient a.
In 6LoWPAN agreement of the present invention, in the another kind of specific embodiment of the maintaining method of address compression control table, the handling process that coordinator node often receives an Intranet 6lowpan packet or outer net IPv6 packet is as follows:
Step 1 extracts respectively source IPv6 address prefix and purpose IPv6 address prefix from packet, if the packet that receives comprises 6lowpan packet header and for carrying the CID compressed header packet, turns step 2; Otherwise (if if not the CID compression is not with in 6lowpan packet header or 6lowpan packet header) turns step 3.
Step 2 is searched corresponding CID in the CONTEXT table, and CID weight is carried out+1 operation, if do not carry out for 63 of maximums+1 operation, the value of keeping CID weight is constant, and this takes turns processing to finish coordinator node;
Step 3 is searched CONTEXT address caching table;
If step 3.1 finds this address prefix in CONTEXT address caching table, if be 127 with this weight term of this weight term Weight value+1(Weight value, do not change)
If step 3.2 does not find this address prefix in CONTEXT address caching table, search the list item of valid=0.
If step 3.3 finds the list item of valid=0, this source IPv6 address prefix or purpose IPv6 address prefix are inserted this list item, and valid is put 1, weight=4 is set;
If step 3.4 does not find the list item of valid=0, this source IPv6 address prefix and purpose IPv6 address prefix are inserted in the IPv6 address prefix item of the minimum list item of weight value in the address caching table, and weight=4 is set;
In a kind of specific embodiment of maintaining method of address compression control table in 6LoWPAN agreement of the present invention, the Timer Controlling of coordinator node is regularly carried out, and the address prefix whether inspection has high-frequency to occur need to be put into the CONTEXT table.
Step 4 (aging mechanism) traversal CONTEXT address caching list item operates the weight value-1 of the list item of each valid=1, and to put this valid value be 0 if-1 rear weight value is 0;
Step 5 traversal CONTEXT list item carries out-1 to the CID weight value of the list item of each valid=1 and operates, and to put this valid value be 0 if-1 rear CID weight value is 0;
Step 6 judges in the CONTEXT table whether the list item of valid=0 is arranged, if execution in step 7 is arranged, otherwise execution in step 8;
Step 7 item is found out the weight value (valid=1) in max{CONTEXT address caching list item }, namely in the address caching table, find out the IPv6 address prefix item of the maximum list item of valid=1 and weight value, carry out the operation of CONTEXT entry updating, adopt the hierarchical synchronization flow process of CONTEXT table to upgrade (being step 10-14), and effect item valid corresponding in the CONREXT buffer list entry is set to 0; In practice, also can adopt in prior art, directly with the address of the maximum correspondence of weight value in CONTEXT address caching list item, the IPv6 Prefix that in the CONTEXT list item, valid=0 is corresponding is upgraded, then send to by coordinator node the node that directly is connected with it, and be not the method that adopts the hierarchical synchronization of CONTEXT table; Repeating step 6;
Step 8 judges the weight value (valid=1) in max{CONTEXT address caching list item } whether greater than the CID weight value (valid=1) in the min{CONTEXT list item of 2 times }; Namely judge the maximum weight value in the CONTEXT address caching list item of valid=1, whether greater than the minimum CID weight value in the CONTEXT list item of the valid=1 of 2 times, if, continuing step 9, this takes turns operation otherwise finish coordinator node;
Step 9 is with the weight value in max{CONTEXT address caching list item } CONTEXT address caching list item and the CID weight value in the min{CONTEXT list item the CONTEXT list item, namely to the IPv6 address prefix item of the maximum correspondence of the weight value in the CONTEXT address caching list item of valid=1, and the IPv6 address prefix item of the correspondence of the minimum of the CID weight value in the CONTEXT list item of valid=1, carry out CONTEXT entry updating operation (being step 15-17).In practice, also can adopt in prior art, directly with the address of the maximum correspondence of weight value in CONTEXT address caching list item, the IPv6 Prefix that in the CONTEXT list item, valid=0 is corresponding is upgraded, then by coordinator node, the CONTEXT list item that upgrades is sent to the node that directly is connected with it, and be not the method that adopts the hierarchical synchronization of CONTEXT table; Repeating step 8;
In a kind of specific embodiment of maintaining method of address compression control table in 6LoWPAN agreement of the present invention, the hierarchical synchronization flow process of CONTEXT table.
When CONTEXT table maintenance algorithm draws certain address prefix and used by the packet high-frequency, need this prefix is put into the CONTEXT table, and this moment, CONTEXT still had the list item of valid=0 in showing; Coordinator node is upgraded operation with the CONTEXT list item, need to carry out synchronously whole network, adopt the mode of hierarchical synchronization can reduce the latency issue that massive wireless sensor synchronously causes, this algorithm is applicable to tree-like network topology structure of wireless sensor, as shown in Figure 7.T1 is coordinator node, and T2, T4 and T6 are intermediate nodes, and T3, T5, T7, T8 and T9 are end nodes.T1, T2, T3 and T4 were in same synchronizing cycle 1, and T2, T5, T6 are in synchronizing cycle 2 together, and T4, T7 are in synchronizing cycle 3 together, and T6, T8, T9 are in synchronizing cycle 4 together.
Its concrete steps following (got CONTEXT list item to be filled out this moment and need to be updated to the CONTEXT address caching list item of this CONTEXT list item to be filled out):
Step 10 will be to be inserted the update item of CONTEXT list item be made as 1, represent that this list item upgrades, do not revise other values in this this moment.
The broadcasting of step 11 telegon node comprises call number CID and the renewal item message to being somebody's turn to do in requisition for the IPV6 address prefix from CONTEXT address caching list item of inserting this list item of this list item, be that CONTEXT upgrades item, wait for each child node (comprising the intermediate node that is connected with coordinator node and the end node that is connected with coordinator node) response; During this step, child node or telegon node do not use this CID as 6lowpan adaptation layer address compression parameter; If receive the 6lowpan packet that carries this CID during this step, still process by original CONTEXT contents in table;
Step 12 is after all child nodes return to confirmation, coordinator node is inserted the IPv6 prefix of CONTEXT address caching list item in the CONTEXT list item, the valid of CONTEXT list item is made as 1, update is set to 0, CID weight is made as weight/2+a and (is 63 to the maximum, wherein a is anti-shake coefficient, is integer, can choose as the case may be); After this step, the telegon node can normally use this CID to communicate;
Step 13 intermediate node (perhaps router node) receives CONTEXT that father node sends upgrade after, use this entry updating local first line of a couplet CONTEXT list item identical with the call number CID of this renewal item, return to confirmation to father node, represent first line of a couplet CONTEXT table to be upgraded, the child node broadcasting CONTEXT to oneself upgrades item simultaneously; This moment, first line of a couplet CONTEXT table and the second line of a couplet CONTEXT list item of this router node were in the imbalance stage, adopt first line of a couplet CONTEXT to resolve 6LowPAN packet header with the father node communication at imbalance stage intermediate node, show to resolve 6LowPAN packet header with the child node communication with second line of a couplet CONTEXT;
The packet that forwards for needs, (namely this CID just comes from the father node renewal if this 6LowPAN packet header CID field is inconsistent in first line of a couplet CONTEXT table and second line of a couplet CONTEXT table, not yet be updated in the child node of this node and go), after needing call number CID to initial data packet header to be replaced with in the second line of a couplet CONTEXT table call number CID corresponding with the IPv6 address of this packet, then be forwarded to child node.
Step 14 is upgraded second line of a couplet CONTEXT list item after child node returns to confirmation, and after this this intermediate node can normally use this CID to communicate, and namely can communicate by the first line of a couplet or second line of a couplet CONTEXT list item.
In a kind of specific embodiment of maintaining method of address compression control table in 6LoWPAN agreement of the present invention,
When CONTEXT table maintenance algorithm draws certain address prefix and used by the packet high-frequency, need this prefix is put into the CONTEXT table, and this moment, CONTEXT did not have the list item of valid=0 in showing; Coordinator node is upgraded operation with the CONTEXT list item, need to carry out synchronously to whole network its concrete steps following (the IPv6 address prefix item of the CONTEXT address caching list item of the IPv6 address prefix item that has remained the CONTEXT list item filled out this moment and need to be updated to this CONTEXT list item to be filled out):
Step 15 repeating step 10-11;
Step 16 is after all child nodes return to confirmation, the value of the IPv6 prefix of CONTEXT address caching list item and IPv6 prefix corresponding to CONTEXT list item is exchanged, the valid of CONTEXT list item is made as 1, the corresponding valid of CONTEXT address caching list item is made as 0, update is set to 0, CID weight is made as weight/2+a (be 63 to the maximum, wherein a is anti-shake coefficient); Can normally use this CID to communicate after this step;
Step 17 repeating step 13-14;
The present invention has used for reference the thought of the cache management in operating system, comprise access frequency weights, address caching, more newer field, anti-shake coefficient, LFU dispatching algorithm etc., the network bandwidth resources of having avoided causing due to frequent updating CONTEXT list item is wasted and energy consumption, guarantee that active in the recent period IPv6 address prefix can obtain higher weight, so that network reaches optimization.Proposed again simultaneously the hierarchical synchronization algorithm of CONTEXT table, the CONTEXT that makes the 6LowPAN agreement based on IPHC may occur when large scale network is used shows the updating delay problem and is effectively slowed down.Taken into full account the burden of maintenance algorithm to network, and the update mechanism of CONTEXT table during burst flow, made list item stable, the characteristics such as extensibility is better impel network to reach the optimization of flow.

Claims (6)

1. the maintaining method of address compression control table in a 6LoWPAN agreement, is characterized in that, comprises the steps:
A, generate control table and address caching table in coordinator node, described control table is comprised of a plurality of list items, each list item comprises IPV6 address prefix item, effect item and the weight term of manipulative indexing CID, described address caching table is comprised of a plurality of list items, and each list item comprises IPV6 address prefix item, effect item and weight term; Wherein, the effect item has effectively and invalid two states;
B, in described address caching table, the numerical value of weight term that will be corresponding with effective effect item subtracts N1, if the numerical value of weight term is less than or equal to threshold value M1, the effect item of correspondence be set to invalid;
C, in described control table, the numerical value of weight term that will be corresponding with effective effect item subtracts N2, if the numerical value of weight term is less than or equal to threshold value M2, the effect item of correspondence be set to invalid;
D, judge whether there is invalid effect item in described control table, if having in the effective effect item of described address caching table, find out the weight term of numerical value maximum, it is invalid that this effect item is set to;
E, the IPV6 address prefix that the weight term of described numerical value maximum is corresponding are inserted in the IPV6 address prefix item of effect item correspondence invalid in described control table, and effect item corresponding in described control table is set to effectively, the message that coordinator node will comprise the call number CID of described IPV6 address prefix and correspondence sends on adjacent child node;
Wherein, N1, N2, M1 and M2 are positive integers.
2. the maintaining method of address compression control table in 6LoWPAN agreement as claimed in claim 1 is characterized in that:
In step D, if there is not invalid effect item, carry out following steps:
Whether the numerical value of weight limit item in the effective effect item of G, the described address caching table of judgement is greater than the K numerical value of minimal weight item in the effective effect item of described control table doubly, if execution in step H;
H, the IPV6 address prefix item that the IPV6 address prefix item of described weight limit item correspondence is corresponding with described minimal weight item exchange numerical value; The numerical value of described minimal weight item is set to: the numerical value of a and described weight limit item divided by K and, it is invalid that the effect item of weight limit item correspondence described in described address caching table is set to, and the effect item of the correspondence of minimal weight item described in described control table is set to effectively;
Wherein a and K are positive integers.
3. the maintaining method of address compression control table in 6LoWPAN agreement as claimed in claim 1, is characterized in that, described coordinator node is carried out following steps after receiving packet:
Steps A 1, described coordinator node be extraction source IPV6 address prefix and purpose IPV6 address prefix in the packet that receives, if packet includes the 6LoWPAN packet header of call number CID, execution in step A2; Otherwise execution in step A3;
Steps A 2, in described control table, the numerical value of the weight term corresponding with call number CID described in steps A 1 is added N3;
Steps A 3, described address caching table is carried out following steps:
If steps A 31 exists described source IPV6 address prefix or purpose IPV6 address prefix, the numerical value with the weight term of correspondence adds N4; Whether existence is invalid effect item otherwise search;
If steps A 32 existences are invalid effect items, described source IPV6 address prefix or purpose IPV6 address prefix are write in the IPV6 address prefix item corresponding with this effect item, and the state of this effect item is set to effectively, and the numerical value of corresponding weight term is set to M3;
If steps A 33 not existence is invalid effect item, in IPV6 address prefix item that will be corresponding with the weight term of numerical value minimum, write described source IPV6 address prefix or purpose IPV6 address prefix, and the numerical value of the weight term of correspondence is set to M3;
Wherein N3, N4 and M3 are positive integers.
4. the maintaining method of address compression control table in 6LoWPAN agreement as claimed in claim 3 is characterized in that: in described steps A 2, if the numerical value of weight term corresponding to described call number CID is certain numerical value M4, keep this numerical value constant; In described steps A 31, if the numerical value of the weight term of described correspondence is certain numerical value M5, keep this numerical value constant; Wherein M4 and M5 are positive integers.
5. the maintaining method of address compression control table in 6LoWPAN agreement as claimed in claim 4, it is characterized in that: described call number CID length is 4 bits, described effect item length is 1 bit, and the weight term length of described control table is 6 bits, and the weight term length of described address caching table is 7 bits; Described N1=N2=N3=N4=1, M1=M2=0, M3=4, M4=63, M5=127.
6. the maintaining method of address compression control table in 6LoWPAN agreement as claimed in claim 2, it is characterized in that: described call number CID length is 4 bits, described effect item length is 1 bit, and the weight term length of described control table is 6 bits, and the weight term length of described address caching table is 7 bits; Described K=2.
CN2011101305075A 2011-05-19 2011-05-19 Maintenance method of address compression control table in 6LoWPAN protocol Expired - Fee Related CN102202106B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011101305075A CN102202106B (en) 2011-05-19 2011-05-19 Maintenance method of address compression control table in 6LoWPAN protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011101305075A CN102202106B (en) 2011-05-19 2011-05-19 Maintenance method of address compression control table in 6LoWPAN protocol

Publications (2)

Publication Number Publication Date
CN102202106A CN102202106A (en) 2011-09-28
CN102202106B true CN102202106B (en) 2013-05-08

Family

ID=44662494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011101305075A Expired - Fee Related CN102202106B (en) 2011-05-19 2011-05-19 Maintenance method of address compression control table in 6LoWPAN protocol

Country Status (1)

Country Link
CN (1) CN102202106B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103812776B (en) * 2012-11-14 2017-03-15 中兴通讯股份有限公司 The information processing method in extension 6LoWPAN domains and system
CN104426892A (en) * 2013-09-09 2015-03-18 中国电信股份有限公司 Method and system for compressing external IPv6 (Internet protocol version 6) address passing in and out of Internet of things
CN111277679B (en) * 2020-04-02 2021-03-23 安徽农业大学 Wireless sensor network communication method based on LoRaWAN and IPv6 protocol

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101417744B1 (en) * 2008-01-17 2014-07-09 경희대학교 산학협력단 Method and Apparatus for compressing a mobility header in a low power wireless network based on an IPv6
CN102045882B (en) * 2009-10-19 2015-01-21 华为技术有限公司 Method, device and system of external communication of 6LoWPAN (internet protocol 6 over low power wireless personal area network) intra-network device and outside
CN102056152B (en) * 2011-01-06 2013-03-06 常熟理工学院 Implementation method of automatic configuration for network addresses of wireless sensors based on Internet protocol version 6 over low power wireless personal area network (6LoWPAN)

Also Published As

Publication number Publication date
CN102202106A (en) 2011-09-28

Similar Documents

Publication Publication Date Title
CN102196058B (en) Method for maintaining address compression control table in 6LoWPAN (lowpan) protocol
US11109269B2 (en) Packet forwarding method and apparatus
US20090161581A1 (en) ADDRESS AUTOCONFIGURATION METHOD AND SYSTEM FOR IPv6-BASED LOW-POWER WIRELESS PERSONAL AREA NETWORK
CN100366031C (en) Method for implementing support to paralel transmission of compression packet in IPv6 sensor network
Wang et al. Transmitting IPv6 packets over Bluetooth low energy based on BlueZ
CN102769869B (en) Message rapid forwarding system of control and provisioning of wireless access point
WO2013143137A1 (en) Content centric m2m system
CN102769885B (en) Method for realizing routing in sensor network and sensor network
CN103491590B (en) A kind of implementation method of wireless sensor network route of future generation
CN102148756A (en) IPv6 over low power wireless personal area network (6LoWPAN) neighbor discovery-based tree routing method
CN104836737A (en) Internet of things communication method taking named data as center
CN103841621B (en) A kind of redundancy method for routing based on 6LoWPAN tree networks
CN102946450B (en) Address assignment method for resource-constrained nodes in tree-shaped ubiquitous network
KR20140034951A (en) Method for managing context table for compress the ipv6 header based on context in wireless mesh networks
CN102421162A (en) Hybrid router supporting IPv6 (Internet Protocol version 6) wireless sensor network
CN102202106B (en) Maintenance method of address compression control table in 6LoWPAN protocol
CN100563210C (en) The method of header compression, compressor reducer and transmission system
CN105991555A (en) 6LoWPAN-based network connection method and system
CN104202268A (en) IPv6 (internet protocol version 6) routing protocol message fragment reassembly method for wireless sensor network
CN113055942B (en) Method for data aggregation in 6tisch network
CN101252410A (en) Method for reducing IP routing protocol band-width occupy
CN101022419A (en) Path maximum transmission unit item establishing method and message transmitting method and device
CN105072043A (en) Method for optimizing client declaration process in MESH network routing protocol
CN103458067A (en) Method and system for masquerading of WLAN and MAC address
CN101815278A (en) Maintenance method for neighborhood information of wireless Mesh network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130508

Termination date: 20160519

CF01 Termination of patent right due to non-payment of annual fee