CN101557349A - Method and system for processing Internet data message - Google Patents

Method and system for processing Internet data message Download PDF

Info

Publication number
CN101557349A
CN101557349A CNA2009101437611A CN200910143761A CN101557349A CN 101557349 A CN101557349 A CN 101557349A CN A2009101437611 A CNA2009101437611 A CN A2009101437611A CN 200910143761 A CN200910143761 A CN 200910143761A CN 101557349 A CN101557349 A CN 101557349A
Authority
CN
China
Prior art keywords
address
ipv4
field
datagram
option
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
CNA2009101437611A
Other languages
Chinese (zh)
Other versions
CN101557349B (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN2009101437611A priority Critical patent/CN101557349B/en
Publication of CN101557349A publication Critical patent/CN101557349A/en
Application granted granted Critical
Publication of CN101557349B publication Critical patent/CN101557349B/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 method for processing Internet data message, and a system thereof, wherein a special mark field in the header of an IPv4 data message is examined to determine whether address extension information exists; if the mark field of the address extension information exists, a 32-bit source address field and/or a 32-bit target address field in the header of the IPv4 data message is bonded with the data bit of another field in the header of the IPv4 data message to form a source address or a target address more than 32 bits; the mark field is a special address extension option, and the option type code of the address extension option is an unused option type code value reserved in the IPv4 data message, with the total length up to 40 bytes. The technical proposal can realize a data message processing technology and an IP address proposal which remains fully compatible with the IPv4, uses length variable addresses and has 20 address extension levels. According to the invention, the existing IPv4 address as a 'zero-level extension address' is permanently effective, and the allocated and used IPv4 network and system can be continuously used for a long time, while the upgrade of the address is just to introduce a new and longer extension address. The invention adopts a mode of extending the address level by level and concurrently using multilevel addresses, thus coping with the worldwide IPv4 address exhaust in a better way and various changes encountered by the upgrade of Ipv4 technology.

Description

Handle the method and system of internet data message
Technical field
The present invention relates to internet data message (internet datagram) treatment technology in the Internet technical field, relate to particularly that head in datagram is provided with address information and according to this information method of communicating datagrams and system between network node.
Background technology
With the Internet (Internet) is that the network interconnection (internetworking) the technology order of representative is positioned between the node (computer or all kinds of digital device) of heterogeneous networks mutually that Data transmission becomes possibility.Be distributed in computer among a large amount of local area network (LAN)s in the whole world by using standardized internetworking agreement, can realize bidirectional data communication rapidly and efficiently, no matter which kind of different physical characteristics or electronic communication is these local area network (LAN)s in fact used.As everyone knows, the employed internetworking agreement in the Internet is referred to as TCP/IP, and it is one group and aims at the network interconnection agreement that the datagram that realizes a plurality of networks of leap is stored and transmitted and designs and develops.TCP/IP has passed through 30 years of development and perfect since the eighties of last century later stage seventies proposes, become the solid technical foundation that supports Global Internet operation and daily use.The included variety of protocol of TCP/IP can be divided into three big levels by its function: one group of agreement that (1) is positioned at bottom is a network layer protocol, with IP (Internet Protocol) is core, realized transmitting with the datagram of the irrelevant node-to-node of physical network, mainly comprise basic functions such as network layer address distribution, route (routing, the path is selected automatically), auto plate separation and reorganization; (2) be one group of transport layer protocol on IP, comprise TCP and UDP, they further provide the functions such as multiplexed port, connection and state-maintenance, error control, confirmation of receipt and repeating transmission between the end-point addresses on the basic function of IP layer; (3) on TCP and UDP, be various application layer protocols, comprise various Routing Information Exchange agreements (for example RIP, BGP etc.), DNS, DHCP, SNMP, and HTTP, FTP, SMTP, POP3, NFS or the like, the application protocol on these the 3rd layer has been realized become increasingly abundant colorful internet applications and service just.
The internetworking function that TCP/IP had is realized by IP.As the interconnection technique between the multiple network, the importance of IP is embodied in following two aspects: the one, for upper-layer protocol and application program provide a level of abstraction of having hidden lower floor's network ardware feature and communication details, promptly provide the transparency of the network hardware; Another aspect is the details for upper-layer protocol and application hides datagram route and burst and reorganization, and the transparency of datagram transmittance process promptly is provided.IP is the function that realizes these two aspects by its unique datagram addressing method.IP is provided with a logical address (being the IP address) for each network node, IP addresses of nodes in same (son) network must have identical mobile network identification number (NetID, be certain prefix of IP address), and router (or being called IP gateway) node is set realizes that the datagram between the adjacent networks transmits.By this addressing method, IP-based upper-layer protocol and application program can be fully without route and the burst details of deal with data newspaper in crossing over the heterogeneous networks process, the whole the Internet that comprises numerous different type network similarly is the single network of billions of node-to-nodes of a full UNICOM on the IP layer, and the route details of datagram is hidden among the Configuration Manager of ip router fully.User and application program only need provide the IP address of destination node, just can between source address and destination address, carry out the transmission of datagram, need not be concerned about and understand how network hardware addresses shines upon fully, how connect, how to choose bottom details such as datagram bang path between the network.Therefore, the IP datagram addressing method has been realized the hardware independence of IP network, the transparency of internet interconnected and route, this has guaranteed the independence and the portability of IP-based upper-layer protocol effectively, and has simplified the exploitation of across a network compunication application program to greatest extent and popularize.
Therefore, for TCP/IP for the final many datagram passing service that realize, be this a whole set of machine-processed precondition by the IP address of network layer protocol definition.In order to make datagram cross over different physics (son) networks, network layer protocol need give each node that is connected on the network be provided with abstract, with the irrelevant logical address of bottom hardware technology, or be called network layer address.Come to this a kind of logical address of hardware independent of IP address.For upper-layer protocol and application program, the network layer protocol most important function is datagram addressing (addressing), the address at communication two ends is determined in the transmission that is datagram, and finish the route of datagram thus, just between source address and destination address, select a suitable bang path.Therefore, the IP address is a core mechanism of realizing the internet data message addressing, we can say IP network be a kind of be the network (being different from) of core with the logical address to be exchanged for the conventional telecommunication network at center.
Particularly, IP realizes the addressing of datagram by embed source address and destination address in the IP datagram head (IP datagram header) of network layer.The network node that participates in the datagram transmission is finished route according to the address information of datagram head fully, and need not to understand, the history or the state information of service data newspaper.Each is chosen as the network node of transmitting IP datagram can receive this datagram, then according to the Information Selection bang path that destination address comprised in its head, this information is the common high-order binary data bit (being called address " prefix " prefix) of " subnet identifier " (Subnet ID) or one group of Subnet ID, can from the routing table of this node, select the IP address of only next-hop node with this information, utilize ARP(Address Resolution Protocol) can obtain the physical address (for example 48 bit MAC Address of ethernet network interface card) of next jumping again.IP datagram is able to forwarded hop-by-hop between the gateway type node main frame (being router) that connects heterogeneous networks thus, realizes striding the datagram transmission of LAN.The network layer of TCP/IP is core protocol (also comprising auxiliary agreements such as ICMP, IGMP) with IP, its existing normalized version comprises two kinds of IPv4 (Internet Protocol Version4) and IPv6 (Internet Protocol Version 6), and the two all is to utilize in the network layer data header to embed source address and destination address and realize addressing in the manner described above.But, IPv6 has used the address field and different, incompatible datagram head form longer than IPv4.
As everyone knows, IPv4 uses the address of 32 bits to come the node on each (son) network on the Internet is unified numbering and addressing.About the information of IPv4 address, datagram head formal definition and addressing aspect can (be seen network address referring to document RFC 791 Http:// www.ietf.org/rfc/rfc0791.txt). therefore, the interstitial content that IPv4 can connect can not surpass 2 32 powers (nearly 4,300,000,000).In the Internet in the early time, this address space is considered to enough big.But along with the development very fast of internet, applications, billions of servers, personal computer and other digitlization terminal equipment are connected on the Internet, and the number of network node purpose increases the trend that also has continuation to quicken.At present, the most addresses in 32 bit address space of IPv4 are applied and distribute.According to the prediction of separate sources, distributable IPv4 address will exhaust in the time limit in following about 2 to 4 years.In the writing of this specification, also remaining about 484,720,000 of the IPv4 address that is not assigned with as yet.If by present mean allocation speed, can estimate these vacant IPv4 address number and will in about 750 days time, be applied and finish (referring to network address Http:// inetcore.com/project/ipv4ec/).This means in foreseeable very short time, some newly-built subnets will can not directly insert the Internet because applying for globally unique IP address, may be forced to adopt in a large number the asymmetric access way of privately owned subnet address and Network address port translation (NAPT).
IPv6 is in order to tackle the once comparatively early stage trial of IPv4 address space deficiency, and its technical standard was promptly finished in eighties of last century the mid-90, and had experienced some adjustment.The fundamental norms of IPv6 are referring to RFC 2460 (network address Http:// www.ietf.org/rfc/rfc2460.txt) .IPv6 has used 128 fixed length address, is 4 times of IPv4 address size, can fundamentally solve the too small problem of IPv4 address space.Yet IPv6 has but used a kind of brand-new datagram head form for this reason, thus become one with complete incompatible, the separate irrelevant network layer protocol of IPv4.A consequence of its key is: the IPv4 datagram can not directly be transmitted in the IPv6 network, thereby existing all IPv4 equipment all must be upgraded with software and could be connected the IPv6 network; All agreements based on IPv4, application program all must be write again and install and could be moved in the IPv6 system, and if some IPv4 software and hardware can't be done upgrading or rewrite, then must be abrogated.This obviously is a very high cost, and this technical transform cost is not fully estimated and paid attention in the early stage design process of IPv6.Propose over and done with 15 years from the IPv6 technical standard, problem that can't back compatible IPv4 is the remarkable obstacle that IPv6 is difficult to be widely used always.The fact for many years shows that the IPv6 promoters can't allow whole Internet industry circle promptly abandon and abrogate large number quipments and the application software that grows up on IPv4.Though such as IPv6-IPv4 dual stack (dual-stack) system configuration, 6-4 address transition (NAT 6-4, promptly at the inner IPv6 of use of private network, externally network uses IPv4) and the bridge technology of other tunneling technique various complexity such as (IP6 over IP4) has been suggested or still in continuous test, but IPv6 is essence (because the datagram format of the two is different) with the incompatibility of IPv4, is difficult to obtain the adequate solution scheme in a short time.Therefore, can estimate that IPv4 remains a permanent process to the upgrading of IPv6.
Obviously, when current distributable IPv4 address day by day exhausts, design and develop an internet data message addressing technique that can keep compatible fully with IPv4, have the network layer address scope bigger than 32 IPv4 address spaces simultaneously again will have the urgency and the significant practical value of its reality.IT industry circle can be applied to this technology among the software and hardware product as early as possible, the most preferentially solve one of technical barrier that IP available v4 address is about to exhaust this of maximum beginning of this century, using with remaining valid, can not have any impact to existing IPv4 system and user in the existing IPv4 address that keeps again simultaneously having distributed, and greatly prolongs the service time of IPv4 software and hardware.But, at present such technical scheme does not occur as yet.
Summary of the invention
An object of the present invention is to propose a kind of improved internet data message processing method and system, under the precondition of not changing IPv4 datagram head form, address field in the IPv4 datagram head is expanded, the address that ratio of components 32 bit address are longer, thereby on the basis of back compatible IPv4 system, can carry out addressing, can also keep simultaneously the IPv4 address of using effective lastingly wider logical address space.
Another object of the present invention is to propose a kind of internet data message processing method that has than the bigger address realm of IPv4, its not only compatible IPv4, and can also directly support to comprise and need not the transport layer protocol of UDP and TCP their protocol specification and realization are changed based on IPv4.
A further object of the present invention is to propose a kind of internet data message processing method that has than the bigger address realm of IPv4, it supports the application program based on IPv4 Socket API (socket application programming interface), makes these existing application programs mode compatible with source code and the binary code compatibility normally to move on the internet data message treatment system after the improvement.
For achieving the above object, the present invention adopts following technical scheme:
A kind of method of handling internet data message, the address information Data transmission message between network node by among the datagram head (100) that uses the IPv4 form is characterized in that comprising the steps:
Inspection is positioned at the specific attribute field (210) among the IPv4 datagram head, and deal with data is reported in the following manner:
If this attribute field of ■ (210) does not exist, then use 32 potential source address fields (120) in the IPv4 datagram head and 32 destination address field (DAF)s (130) respectively as source address and destination address;
If this attribute field of ■ (210) exists, then 32 potential source address fields (120) in the IPv4 datagram head or among 32 destination address field (DAF)s (130) at least one are combined 32 longer source addresses of ratio of components or destination address with data bit among another field (230) that the datagram head is comprised.
Wherein, described attribute field (210) is included in the specific fields (200) of datagram head, as a part (210) of this field (200), and another field of described source address field (120) that is used for the growth data header or destination address field (DAF) (130) is the one other component (230) of this field (200); Described specific fields is the datagram head option (200) of a special use, and the data bit that is used for extended source address field (120) or destination address field (DAF) (130) is included among the described option data field (230); The length of the data bit that is used for extended source address field (120) or destination address field (DAF) (130) that a part of data bit (213) indication of described option type field (210) is comprised among described option data field (230); Described option type field (210) comprises an option type sign indicating number (212), and its numerical value is for keeping the not option type sign indicating number of usefulness, i.e. binary number 01 or 11 in IPv4; The minimum length of described option (200) is 2 bytes, and maximum length is the maximum length of IPv4 datagram Option Field (140), i.e. 40 bytes.In addition, described source address extended field (231) and destination address extended field (232) be respectively the expansion after the potential source address and the seniority top digit of destination address; The verification of calculating the IP upper-layer protocol and the time, ignore described extended address field (200), only use the not 32 potential source address fields (120) and the destination address field (DAF) (130) of the IPv4 datagram head of expansion.Simultaneously, realize that the system of this method has comprised operating means or the equipment of carrying out the command sequence of above-mentioned steps, this command sequence is comprised among the module of processing internet data message of computer operating system kernel.
Be compared with the prior art, technical scheme of the present invention possesses following advantage:
Significant advantage is the complete compatibility that has kept with IPv4, and this shows as 3 aspects: (1) method and system of the present invention can continue process IP v4 datagram, and effect and existing IPv4 system are just the same; (2) upper-layer protocol (transport layer protocol TCP, UDP and application layer variety of protocol) based on IPv4 need not to revise or only need very few modifications, just can use in new system; (3) existing application program based on Socket API need not to revise, its binary code can use as before, IPv4 Socket API itself only needs the modification of a small amount of address structure just can support new datagram addressing method simultaneously, thereby existing a large amount of application program based on IPv4 Socket API can be with mode normally operation in system of the present invention of source code compatibility and binary code compatibility.
Another good effect of the present invention has provided address extension step by step, variable-length, possesses the nearly extended capability of 19 grades (19 byte address length), promptly,, have 19 extended address set to the IP address of a longest 19+4=23 byte from the IP address of a minimum 1+4=5 byte.And to can be used as the expansion rank be 0 IP address in existing IPv4 address, with these 19 other extended address of level, forms a very huge address space of totally 20 grades.The union of these 20 other address sets of level is more much bigger than the address space of IPv6, is a kind of IP address structure with bigger address extended capability.
Another outstanding characteristic of the present invention is: having between the network node of extended address of different stage can direct communication, and promptly the source address of datagram can be different expansion ranks with destination address.Datagram can be transmitted between any address of 0 grade of (do not have expansion) address, 1 to 19 grade of extended address mutually, and therefore when introducing the extended address of higher level, original more rudimentary address of having distributed is still available, need not change.Particularly, it is effectively permanent that the IPv4 address can keep, and existing IPv4 address assignment and system configuration need not to be abrogated or carry out any change.This is an outstanding advantage of comparing with IPv6: existing IPv4 address can be with the mutual two-way transfer of data newspaper of any single-level address among other 19 grades of extended address as 0 grade of extended address, therefore be address in full force and effect, pretending is that the IPv4 address of 0 grade of extended address is effectively permanent in technical scheme of the present invention.The IPv4 address of having distributed and having used can for good and all be used down.And this class fixed length address extension scheme of IPv6 requires for good and all discarded IPv4 address that has disposed of all node main frames.Therefore, this expansion step by step of the present invention, multilevel address and deposit shared mode can tackle better global ip address upgrading the various challenges that must face.
Another advantage of the present invention is that its realization and installation are disposed fairly simple, can directly be added in the code of existing operating system nucleus or device driver, its complexity is much smaller than realizing and dispose the such brand-new datagram addressing treatment system of similar IPv6.
Therefore, technical scheme of the present invention kept with IPv4 fully compatible in, can solve the technical barrier that the IPv4 address is about to exhaust quickly and efficiently.In actual applications, the technical program is expected to obtain the better technique effect of existing IPv4 improvement technology than comprising IPv6.
Description of drawings
This specification comprises 12 accompanying drawings.
Fig. 1 is the header format schematic diagram of the IPv4 datagram of routine.
Fig. 2 is employed address extension attribute field and an address extension a kind of concrete form partly as IPv4 datagram head option of the embodiment of the invention.
Fig. 3 is the IPv4 datagram format that has the employed address extension information of the embodiment of the invention.
Fig. 4 realizes a kind of flow chart of checking the method that whether has address extension information as shown in Figures 2 and 3 in IPv4 datagram head.
Fig. 5 is that the expansion rank of employed source address of the embodiment of the invention and destination address is 1 datagram.
Fig. 6 is that the expansion rank of the employed source address of the embodiment of the invention is 2, the expansion rank of destination address is 4 datagram.
Fig. 7 is a kind of datagram that has address extension sign option of the embodiment of the invention, and wherein source address is the IPv4 address as 0 grade of extended address, and the expansion rank of destination address is 1.Such datagram represents that source node has the extended address disposal ability, but is just using 0 grade of address configuration at present.
Fig. 8 is the datagram that another kind has the address extension information of the embodiment of the invention, and wherein the expansion level of source address and destination address all is not 0 (the IPv4 address of promptly not having expansion).
Fig. 9 is the flow chart of the internet data message addressing method of the embodiment of the invention.
Figure 10 is the memory pattern of the socket addresses data structure sockaddr_in{} of the employed standard of IPv4Socket API.
Figure 11 represents the improvement situation of the present invention to the socket addresses data structure sockaddr_in{} of IPv4Socket API, has wherein increased address extension information.
Figure 12 be to use the present invention the C language codes sample of a TCP client application of improved Socket API socket addresses data structure sockaddr_in{}.
Embodiment
Below in conjunction with drawings and Examples technique scheme is further described.
Embodiments of the invention are realized by revising a computer operating system kernel of supporting the IPv4 datagram to handle.Except continuing the transmitting-receiving of support, can also support datagram processing, i.e. this method back compatible IPv4 through this improved operating system based on the use extended address of the present invention's proposition based on the IPv4 datagram of 32 bit address.For sake of convenience, this specification has thisly used the extended address longer than 32 bit address, has kept simultaneously and the datagram treatment technology scheme of IPv4 compatibility abbreviates the IPv4++ technology as with what the lower part proposed the present invention under suitable linguistic context.As need not to distinguish, term " IP " is used to censure or modify the public characteristic of IPv4 and IPv4++ in this specification is used.
Compatible completely for realizing, datagram processing method based on the IPv4++ extended address proposed by the invention is based on IPv4 datagram addressing method, all parts that relate to the IP address process are improved supporting longer IP address with the latter, and other is handled the part that has nothing to do with the network address and then remains unchanged or keep original result.
■ IPv4 datagram addressing method
As everyone knows, the addressing of internet data message is determined by the IP agreement fully.IPv4 has provided the datagram addressing method on 32 network addresss.Core content of the present invention is the addressing method that improves IPv4, enables further to be supported in the datagram addressing than on the bigger network address of 32 bit address.
The addressing method of IPv4 comprises the content of following several respects: the form and the allocation plan of network (logic) address, the form of datagram, and the method for datagram being carried out route.Internet data message treatment technology scheme proposed by the invention is exactly that these several aspects to the IPv4 addressing method expand, make it can handle bigger logic network address, simultaneously other all then do not do any change with the part that the IP address has nothing to do as far as possible, can obtain again and the on all four result of the processing method of IPv4 when making it be 32 in the network address.
The IPv4 address format:
As stated in the Background Art, IP network is that a kind of logical address with hardware independent is the network of core.As abstract, the Internet upper layer application protocol and application program can be independent of the physical connection characteristic and the communication details of bottom with logical address, and how interconnected and routing the subnet that need not worry about between any two addresses is.Even network configuration changes, application program still can be worked.IP address as the network layer logical address is to realize all primary preconditions of mechanism of TCP/IP.
The IPv4 address is 32 integers, uses dotted decimal notation (dotted decimal) form to be expressed as a.b.c.d usually, promptly represents 4 bytes (byte order is the big-endian mode) of an IPv4 address respectively with the decimal number between 0~255.The IPv4 address has a kind of form of uniqueness, so that realize the function that subnet is divided.The most characteristic part of IP address is that it is one two a tuple structure, rather than simple 32 integer sequence numbers, and promptly to be actually by two fields be two tuples { NetID, the HostID} that network number and host number are formed in each IP address.All hosts node in the same network segment (subnet) must have identical NetID and different HostID, only on the network that configures like this, just can carry out the addressing and the transmitting-receiving of IP datagram between the main frame: have between the identical NetID address of host datagram is done direct transmission (direct delivery), the target NetID not datagram in this network segment then transfers to router and carries out indirect transfer, i.e. hop-by-hop routing (hop-by-hop routing).How 32 integers of an IP address are divided into two fields, and { NetID, HostID} need to use subnet mask (Subnet Mask) to determine, thereby the All hosts in the same network segment all are configured to have identical subnet mask.For example, if the subnet mask of certain network segment is set to binary one 11,111,111,111 1,111 1,111 0,000 0,000 0000 (write a Chinese character in simplified form usually/20), then these preceding 20 of indicating all interior IP addresses of this network segment are NetID, if 12 of backs are dispensed in this network segment for address 162.105.63.90 of HostID., then can determine its NetID=162.105.48.0, HostID=0.0.15.90.Utilize NetID and subnet mask, can be designated as the whole address realms in this network segment 162.105.48.0/20 (is the CIDR mark, represent that preceding 20 bits fix, as NetID), it is corresponding to an address block that comprises 2048 addresses altogether (wherein HostID is that complete 0 and complete 1 address is left special purpose).
How for certain network segment is provided with subnet mask, this is that concrete configuration by network management is determined.Utilize this mechanism in IP address configuration network and main frame neatly, and improve the utilance of address realm.Notice that the IP datagram head only need comprise that the IP address gets final product, and need not to comprise the subnet mask of source address or destination address.Like this, no matter how the network segment at destination address place is divided and the configured topology structure, and its local router can upgrade the subnet mask of the corresponding network segment at any time, thereby guarantees that the datagram that correctly will originate arbitrarily is delivered to the pairing host network card of target ip address.In addition, according to the address allocation pattern of IPv4, the IPv4 address is had by the applicant.If certain mechanism has had an IPv4 address prefix a.b.c.d/n (i.e. address block), then this mechanism must dispose at least one router, be connected with the router of other mechanism, and by certain Routing Protocol of operation, the configuration information of its routing table is automatically propagated to adjacent router, finally converged among the routing table of the Internet backbone router.
The IPv4 datagram format:
Document RFC 791 ( Http:// www.ietf.org/rfc/rfc0791.txt) defined the form of IPv4 datagram head, as shown in Figure 1.This datagram head 100 has comprised 13 fields altogether.The information that preceding 10 fields are preserved is respectively: the type of version, head length, required service, datagram total length, 3 fields relevant with datagram burst (fragmentation), the verification and 110 of employed upper-layer protocol and whole head in transferable node number, the load data farthest; Two fields subsequently are respectively the IP addresses 130 of destination node of IP address 120, the datagram of the source node that sends datagram; Also has an optional Option Field (Options field) 140 at last.As is generally known the length of two IP address fields of this of IPv4 datagram head 120,130 all is 4 bytes (promptly 32).
In 13 fields of IPv4 datagram head, the length of preceding 12 fields is fixed as 20 bytes, and the length of last Option Field is variable-length, is 0 to 40 byte.Exactly because the existence of Option Field, the length of IPv4 datagram head is variable length between 20 to 60 bytes.Source node can be provided with one or more option in Option Field when sending datagram, each option has fixing data format and implication.Option Field mainly is used in network test or debugging.The early stage purpose of introducing Option Field mainly is that promptly the router that datagram experienced for information about for the traffic information that allows on the destination node awareness network path.But these options of IP datagram head seldom are used, and one of subject matter is that Option Field length (40 byte) is too little, is not enough to write down the information of a large amount of routers on the current internet typical path.More most important reason is a lot of routers for the general Treatment Options field not of the configuration of secure context, perhaps ignores whole Option Field, does not perhaps carry out the major part instruction that source node provides at Option Field.
Hereinafter described following, the embodiment of the invention is used for part or all byte of IPv4 Option Field 140 extended use of source address field or destination address field (DAF).
The method for routing of IPv4 datagram:
As everyone knows, IPv4 realizes the hop-by-hop routing of datagram bang path by embed source address and destination address in datagram head (datagram header).The network node that participates in the datagram transmission is finished routing procedure according to the address information of datagram head fully, and need not to understand, any history or the state information of service data newspaper.Each is chosen as the network node (being commonly referred to router) of transmitting IP datagram can receive this datagram, then according to the Information Selection bang path that destination address comprised in its head, this information is the common high-order binary data bit (being called address " prefix " prefix) of " subnet identifier " (Subnet ID) or one group of SubnetID, can from the routing table of this node, select the IP address of only next-hop node with this information, utilize ARP(Address Resolution Protocol) can obtain the physical address (for example 48 bit MAC Address of ethernet network interface card) of next jumping again.IP datagram is able to forwarded hop-by-hop between the gateway type node main frame (being router) that connects heterogeneous networks or subnet section thus, realizes striding the datagram transmission of LAN.
On implementation, each host node on the IP network all must possess a routing table, each routing table entry has wherein provided an address prefix (similar 162.105.48.0/20, comprise an initial address and a subnet mask) information of pairing next-hop node, the IP address of the local network interface card that comprise the IP address of next jumping, sends datagram toward next jumping and certain metric (metric) of representing the distance (or priority) of this next-hop node.When comprising the clauses and subclauses of a plurality of different next-hop nodes in the routing table, distance metric helps to select the shortest or only path.
■ has the processing of the IPv4 datagram of extended address
The general principle that the present invention enlarges the IPv4 addressing range is to keep and the IPv4 compatibility as far as possible, does not promptly change the existing technical scheme of IPv4, all improve only be the network layer address expanded range some.The present invention realizes the expansion to the IPv4 addressing technique under this compatible constraint principle.According to this thinking, technical scheme of the present invention at first requires IPv4 datagram head form as shown in Figure 1 intactly to be kept, under this prerequisite condition, consider unique substantial improvements again, promptly how two 32 IP address field in the datagram head is expanded into bigger address field, simultaneously under the indication of (whether existing or value) of certain special sign, can remove the expansion that is increased again, get back to 32 potential source address and the destination address field (DAF)s of IPv4.
The unique way that realizes this invention thinking is to introduce certain flag information within IPv4 datagram head, when being in IPv4 compatibility state, this sign does not exist or its value does not cause any incompatibility, and when the address is expanded, this attribute field can significantly and uniquely be discerned, and has indicated the field location and the length thereof at source address and/or the pairing expansion of destination address place.
According to the preferred embodiments of the invention, a kind of new datagram head option 200 is introduced into, and is specifically designed in the indication IPv4 datagram head source address field or whether destination address field (DAF) is expanded and the data bit length of institute's expansion.The present invention claims this datagram head option to be " address extension option ", it has the data format of the IPv4 option of standard, but being to use the option type sign indicating number all different (Option type code) with the defined Total Options of existing IPv4. this option not only is easy to identification and computing, and possesses huge address extension scope.The present invention uses this embodiment to realize that one can keep address, the network layer address scheme with 20 grades of address extension levels and datagram addressing technique compatible completely, that use variable-length with IPv4.The present invention selects this address extension scheme as most preferred embodiment.Corresponding with the situation of IPv4, the ins and outs of this scheme comprise: new extended address form, address extension information the set-up mode of IPv4 datagram head, have the method for routing etc. of IPv4 datagram of extended address several aspect, details are as follows.
The form of IPv4++ extended address:
" address extension " of the present invention is meant that the front (high data bit) in the IPv4 address increases new address bit, and " grading extension " is meant that each expansion only increases a upper byte (one 8 hyte octet), and promptly each newly-increased HI address byte is represented an address extension rank.In the back of IPv4 address (low level) extended address data bit also is effect feasible, that can obtain equivalence, and the route processing different with IPv4 need be introduced in the new address that is this mode.
According to embodiments of the invention, 32 bit address field in the IPv4 datagram head can be extended to the longest 19 ranks, and wherein each expansion rank is the high address field that increased a byte before the maximum data position of original address.(why the largest extension rank is " IPv4++ datagram " the header format explanation that sees below of 19 grades reason.)
This address extension that the embodiment of the invention provided is the longest 19 bytes (152 bit) that reach partly, thereby can form the IP address of the longest 23 bytes (184 bit).Employing is similar to the dotted decimal notation method for expressing of IPv4 address, can be each byte representation of the longest this 23 byte addresses decimal number between one 0 to 255, and from the lowest order byte, per 4 bytes are divided into one group, couple together with '-' character between each group, be expressed as following form:
x 19.x 18.x 17-x 16.x 15.x 14.x 13-x 12.x 11.x 10.x 9-x 8.x 7.x 6.x 5-x 4.x 3.x 2.x 1-a.b.c.d
Other address of different expansion levels has different length, but arbitrary grade extended address all comprises 4 minimum one group byte a.b.c.d at least, corresponding not 32 IPv4 addresses of expansion.High-order each address extension byte x that constantly increases 32 IPv4 addresses 1Up to x 19, form " extended address " at different levels.From x 1To x 19Any one-level x before j(j=0..19) the address high order field x that is formed 1... x j" address extension part " for expansion rank j.Wherein, the extended address of expansion rank j=0 is exactly 32 IPv4 addresses not expanding; The extended address set of expansion rank j=1 is one 40 a address space; The extended address set of expansion rank j=2 is one 48 a address space, or the like; And the extended address set of expansion rank j=19 is one 184 a address space.
Different with the IP address scheme of fixed length, the formed IP of each rank address of above-mentioned 20 other extended address of level of the present invention (comprising that the expansion rank is 0 32 bit address) all is effective address, can be assigned to network node and be used for IP datagram addressing (promptly being applied among the address field of IP datagram head).Like this, total the IP address space that the embodiment of the invention provided be exactly by 0 grade, 1 grade, 2 grades ... the union of 20 sub spaces that 18 grades and 19 grades of extended address form respectively.Obviously, this address space is more much bigger than the IPv6 address space of 16 bytes, is enough to tackle the demand of internet development in following period very remote.
According to IPv4 address assignment rule, network number (NetID) is that the network number of (maybe wouldn't be concerned about) is represented not to be provided with as yet in 0 address, is preserved for specific purposes such as dynamic address configuration, can not distribute to host node.Therefore, other address extension byte of 19 levels of all of similar following form is that 0 extended address also all is a reserved address, and wherein the numeral of the expansion rank in all subscripts is just as the information of being convenient to read:
0 19.0 18.0 17-0 16.0 15.0 14.0 13-0 12.0 11.0 10.0 9-0 8.0 7.0 6.0 5-0 4.0 3.0 2.0 1-162.105.63.90
0 18.0 17-0 16.0 15.0 14.0 13-0 12.0 11.0 10.0 9-0 8.0 7.0 6.0 5-0 4.0 3.0 2.0 1-162.105.63.90
.........
0 2.0 1-162.105.63.90
0 1-162.105.63.90
Noticing that (1 grade of expansion) belongs to different other address spaces of expansion level respectively to 0.0-162.105.63.90 (2 grades of expansions) with 0-162.105.63.90, is two different addresses therefore.Equally, the address extension byte is that 255 following extended address also is the broadcasting reserved address: 255 19.255 18.255 17-...-... .-...-255 4.255 3.255 2.255 1-162.105.63.0.
Consistent with the form of IPv4 address, IPv4++ extended address inside also is made up of two parts: the address high-order portion is a network address (network number NetID), the unique id number of expression local network (perhaps subnet section) on whole the Internet; The low portion of address is a host number (or more accurately, being network interface number Interface-ID), is illustrated in unique logical address of a main frame (network interface card) in the local network.And those data bit are that network number is by subnet mask (as the configuration parameter of network management) decision in IP address.The difference of extended address of the present invention and IPv4 address is that bigger subnet mask is provided with scope, and more network layer tissue can be provided.These networks (subnet section) of dividing in interior laminate layer have identical NetID prefix, and therefore can be converged in routing table becomes a route table items.
Simultaneously, the CIDR mark of IPv4 also can be used for extended address equally, for example 68-162.105.80.0/8+24 is that 68-162.105.63.0/32 represents an address block that comprises 256 continuous extended address, its initial address is 68-162.105.80.0, and terminal address is 68-162.105.80.255.
The IPv4 datagram format and the address process thereof that have the IPv4++ extended address:
According to the embodiment of the invention, the address extension byte of the variable-length of above-mentioned classification is to join among the datagram header by a kind of new datagram head option.This option has the IPv4 choice format of standard, but has been to use the option type sign indicating number all different with the defined Total Options of existing IPv4, thereby can be distinguished and quick identification by no ambiguity ground in the datagram head.The present invention claims this datagram head option to be " address extension option ", whether it has indicated which or the two among source address field in the IPv4 datagram head or the destination address field (DAF) to be expanded clearly, and the byte number of the expansion of source address or destination address (promptly expanding rank).
Accompanying drawing 2 has provided the concrete form of this " address extension option " 200.This is a kind of standard I Pv4 choice format of having used so-called TLV coding (Type-Length-Value encoding), and promptly this option is made up of the option data field 230 of an option type byte 210, option byte (byte number of whole option) 220 and designated length.According to the IPv4 option rule, the option type byte inner is divided into 3 fields again: the option number (Option number) 213 of the option type sign indicating number of the copy flag of 1 bit (Copyflag) 211,2 bits (Option type/class code) 212 and remaining 5 bits.
" option type " byte 210 of embodiment of the invention address extension option is set to binary system " 111x xxxx ", and wherein x represents the binary data bit of a numerical value variable (0 or 1).3 fields of this byte that situation is set is as described below:
At first, the highest order of option type byte is a copy flag, among the head of each the less datagram whether indication copies to burst to whole option (TLV three parts) when the datagram burst takes place after: copy flag is that 1 expression needs this duplicating, be 0 then expression only this option is copied in first datagram behind the burst.Obviously, the address extension option of the embodiment of the invention has comprised the expansion IP address of source node and/or destination node, could form correct extended address among must being copied to the datagram head after all bursts, so the copy flag position must be made as 1.
Secondly, the 2nd and the 3rd of an option type byte high position " option type sign indicating number " field of forming one 2 bit.IPv4 has only defined two option type code values at present: 00 (option is used for the network control purpose) and 10 (option is used to debug purposes).01,11 of two other code values are retained not to be used.In existing IPv4 option, have this two types of sign indicating numbers without any an option.The option type code value of the embodiment of the invention can be chosen for 11.Certainly, getting the option type code value is 10 also to have on all four technique effect.
At last, 5 bits of the remainder of option type byte (promptly " 111x xxxx " back 5) are option number, are certain integer-valued fields of expression, and the concrete implication of this integer depends on the value of option type sign indicating number.The embodiment of the invention is counted n with the extended byte of the source address that this Field Definition is comprised for the option data of " address extension option " part s(being the expansion rank of source address).Certainly, be that the extended byte of destination address is counted n with this Field Definition d(being the expansion rank of destination address) also is equivalent.
According to above-mentioned setting, the numerical value of the option byte 220 of " address extension option " is 2+n s+ n d, n wherein s, n dIt is respectively the expansion rank of source address and destination address.And the option data part 230 of " address extension option " is connected in series with the expansion 232 of destination address by the expansion 231 of source address and forms, and the byte number of these two parts is respectively n sAnd n dAccompanying drawing 2 has conclusivelyed show above-mentioned 2 points.According to the embodiment of the invention, the expansion rank n of source address sWith destination address n dSpan all be between 0 to 19, indicate source address and destination address 20 expansion ranks respectively.At n s, n dAll be 0 situation (0 grade of address extension), " address extension option " reaches its minimum length, i.e. 2 bytes, and this moment, its option data part can not occur in this option.
By using above-mentioned this " address extension option ", 19 grades of IPv4 address extension parts of the embodiment of the invention just can be by succinct, compact and be not incorporated in the Option Field of IPv4 datagram head with having ambiguity.
Accompanying drawing 3 is the forms of IPv4 datagram that have the address extension information of the employed 19 grades of variable lengths of the embodiment of the invention.By in the Option Field of IPv4 datagram head, placing above-mentioned " address extension option " 200,32 IPv4 source addresses or destination address or both address extension partly are added in the IPv4 datagram head, promptly in the option data field 230 of " address extension option ".
Therefore, the first byte of address extension option (being the option type byte) is used as a specific attribute field.When this attribute field exists, data bit among the option data field of the source address field in the datagram head or at least one among the destination address field (DAF) and address extension option combines, 32 longer addresses of ratio of components, i.e. the IPv4++ address of the variable-length of above-mentioned grading extension.And when this option type byte did not exist, the 32 potential source address fields and the destination address field (DAF) of IPv4 datagram head all were not expanded.For ease of describing, the IPv4 datagram that will have the IPv4++ extended address in this specification suitable linguistic context hereinafter abbreviates " IPv4++ datagram " as.
According to the IPv4 standard, the maximum length of datagram head Option Field is 40 bytes, and therefore the total length of " address extension option " satisfies 2+n s+ n d≤ 40. because the longest extended address must be able to be used in any two ends node of datagram transmitting-receiving, so the maximum length n of source address expansion S-maxMaximum length n with the destination address expansion D-maxShould equate, so n S-max=n D-max=19.The largest extension rank of the extended address of the embodiment of the invention that Here it is (byte number of address extension part) is 19 grades a reason.As shown in Figure 3, when the expansion of source address and destination address all reached 19 bytes, IPv4++ datagram head Option Field was all occupied by " address extension option " 200, and this moment, the datagram head length reached 60 the longest bytes.
Above-mentioned this utilization " address extension option " has possessed the advantage that the present invention expected in the method that the datagram head is provided with the elongated IP address of gradable expansion: it has not only realized the address extension (one of purpose of the present invention) of back compatible IPv4, and can not impact (purpose of the present invention two) to the transport layer protocol on the IP layer (UDP and TCP).This specification further part can illustrate that also this address extension method also supports the SocketAPI address extension scheme of the compatible IPv4 of a kind of advantages of simplicity and high efficiency (purpose of the present invention three).Simultaneously, this address extension option not only possesses huge address extension scope, and is highly susceptible to identification and computing.
Accompanying drawing 4 has provided a kind of operational flowchart that whether has above-mentioned " address extension option " and extract expansion complete IP address afterwards of checking in IPv4 datagram head.The network interface of network node (network interface card) promptly starts a predefined interruption routine (being generally the software interrupt mode of lower priority) after receiving an IPv4 datagram.The method that accompanying drawing 4 provides can be placed in this interruption routine and use.The step of this method is as follows:
■ at first, whether step 410 checks the numerical value of 4 bits " head length " field of IPv4 datagram greater than 5, otherwise does not have the head Option Field, changes and finishes.This head length is a unit with 4 bytes, thus header length field greater than 5 the expression heads have 24 bytes at least, promptly comprise the Option Field of at least one 4 byte;
■ then, step 420 is searched the address extension attribute field of the embodiment of the invention in the head Option Field, i.e. byte that numerical value is " 111x xxxx ", it is the first byte 210 (option type byte) of address extension option;
■ step 430 judges whether this byte exists.If there is no, then change end; If partly found this significant byte at the head option, the option data form of determining according to accompanying drawing 2 in step 440 then, the byte number n that back 5 bits of getting this byte are the source address expansion s, and the total length of this option deducted the 2 byte number n that deduct the source address expansion again sObtain the byte number n of destination address expansion afterwards d
■ then, step 450 obtains the source address expansion 231 and the destination address expansion 232 of respective byte number respectively from the data field 230 of option 200, be combined into longer extended address with 32 IPv4 source address and destination address field (DAF) respectively.
The network interface card interruption routine is handled after " the address extension option " 200 in the IPv4 datagram as stated above, i.e. IPv4 protocol process module in the call operation system kernel carries out to datagram that route is handled and the processing of IP upper-layer protocol.This specification how hereinafter to further illustrate the IPv4 protocol process module of retouching operation system, the extended address that uses the embodiment of the invention to provide is provided.
Therefore, identification and extraction extended address are advantages of simplicity and high efficiency processes from the IPv4 datagram that has address extension information.The accompanying drawing 5 to 8 of this specification has provided several typical address extension samples, and has provided 3 fields concrete value condition in all cases of " address extension option " therein.
Accompanying drawing 5 is that the expansion rank of employed source address of the embodiment of the invention and destination address is 1 IPv4 datagram.The value of the first byte of " address extension option " (being the option type byte) is binary system " 1,110 0001 " (16 hex value is 0xE1), and 5 option number value is 1 thereafter, and the extension length of expression source address is 1 byte; The length of whole option is 4 bytes, so second byte value of option is binary system " 0,000 0100 "; The option data field is two bytes, is respectively the expansion of 1 byte of IPv4 source address field and destination address field (DAF), has formed two 40 extended address.
Accompanying drawing 6 is that the expansion rank of the employed source address of the embodiment of the invention is 2, the expansion rank of destination address is 4 IPv4 datagram.The total length of " address extension option " is 8 bytes, its 3 fields are respectively: " 1,110 0010 ", " 00001000 ", and the destination address expansion of the source address expansion of 2 bytes and 4 bytes are formed 48 source extended address and 64 purpose extended address respectively.
According to the embodiment of the invention, if the datagram that source node sends has been used the IPv4 address that does not have expansion, but be provided with " address extension option " at the datagram head, represent that then the datagram treatment system of source node is upgraded, still be configured as simultaneously and only use the IPv4 address.Here, the address extension partial-length is that the extended address (i.e. 0 grade of extended address) of 0 byte shows as conventional IPv4 address.
Accompanying drawing 7 is a kind of datagram heads that have address extension sign option of the embodiment of the invention, and wherein source address is the IPv4 address as 0 grade of extended address, and the expansion rank of destination address is 1.The total length of " address extension option " is 3 bytes, and is adding a byte (Option Field end mark) of complete 0 as 4 byte length polishings thereafter.Its 3 fields are respectively: " 1,110 0000 ", wherein there are not the extended byte (0 grade of expansion) of source address in " 0,000 0011 ", and the destination address expansion of 1 byte in the option data field.Such IP datagram represents that the operating system of source node has possessed the extended address disposal ability, but is just using 0 grade of address configuration (for example former IPv4 address of distributing of this node) at present.
Accompanying drawing 8 is datagram heads that another kind has the address extension information of the embodiment of the invention, and wherein the expansion level of source address and destination address all is not 0 (the IPv4 address of promptly not having expansion).The total length of " address extension option " is 2 bytes, is 0 byte having added two values thereafter, and wherein previous byte is as the Option Field end mark, and a back byte is that the IPv4 head is filled (padding) byte.Two fields of address extension option are respectively: " 1,110 0000 ", " 0000010 ", wherein the option data field length is 0, thereby does not appear in this option.Such IP datagram represents that the operating system of source node has all possessed the extended address disposal ability, but the same with destination node still in the IPv4 address configuration of using as 0 grade of extended address.
By above-mentioned example as seen, the minimum length of the head of IPv4++ datagram is 24 bytes, and this comprises 3 kinds of situations shown in accompanying drawing 5,7,8.And minimum address extension option is 2 bytes, the datagram of being received and dispatched between the IPv4++ node of two use IPv4 addresses shown in the respective figure 8.
The datagram route that has the IPv4++ extended address is handled:
Based on the identical network address internal form and the compatibility of datagram format, the IPv4 datagram (IPv4++ datagram) that has the IPv4++ extended address is carried out the method for route and IPv4 datagram method for routing mentioned above is in full accord.Because address size increases, have in various degree decline with the speed of IPv4++ address search routing table entry.But according to the hierarchical level feature of IPv4++ address, the tissue of routing table and the mode of searching can obtain certain optimization.Because corresponding relatively independent IP address space of each expansion rank of IPv4++ address can be concentrated tissue to other routing iinformation of each address level, is beneficial to search fast.
Converging of routing address is that public extracting section the IP address prefix of the different clauses and subclauses of routing table is come out, and searches as single routing table entry, reduces the scale of routing table, the efficient that improves route querying and the transmission speed of IP datagram thus.The address extension part of extended address can constitute relatively independent address prefix, itself is exactly a kind of routing address aggregation scheme.19 extended address ranks of IPv4++ can be supported converging of this address prefix, and the extended address of each grade can be as a level identifier that converges (Layer ID).Like this, the extended address of each grade as one independently address space can be gathered together, thereby dwindle the scale and the seek scope of routing table.
According to embodiments of the invention, routing table lookup and cache module are all set up a routing table separately for each address extension rank, then use the algorithm (LC-trie search algorithm) identical with IPv4 routing table lookup algorithm for the address in each rank.Utilize the route assemblage of above-mentioned layering, and based on this routing table division methods, can be close to the search efficiency of the next hop information of extended address with the treatment effeciency of IPv4 address.
In addition, accompanying drawing 5 to 8 has also further embodied technical scheme of the present invention to carry out route to the IPv4++ datagram and handles a special function being had: have between the node of different stage extended address directly communicating datagrams, and need not by indirect modes such as any similar IP-in-IP tunnel, address translation.Although the length difference of IP address, method of the present invention is unified to the route processing mode of the extended address of different stage.And this characteristic has special meaning for the existing huge IPv4 network of upgrading.
In the practical application of extended address, the expansion of address is to begin progressively to increase address size from lowermost level, and only after low-level extended address exhausted, higher leveled extended address just can be introduced into and distribute.This feature of direct communication function that keeps between the extended address of different stage provided by the invention has huge using value, that is: the long extended address of introduction and use can't make and before distribute the address than short with using to lose effect,---particularly, as other IPv4 address of minimum (0 grade) expansion level is effectively permanent in technical scheme of the present invention, there is no need fully to be abrogated; Only, make it to support address extension method of the present invention to get final product as long as the current employed internet data message process software of IPv4 node module is done once upgrading (replacement of the Dynamic Link Libraries file of similar operations system).But multistage extended address equality and this technical characterictic of depositing are other, and various fixed length address schemes (for example IPv6) of expanding IPv4 can't be supported.For IPv6, if use the network address longer, just must abrogate and all distribute and IPv4 address just in use, and will abandon (upgrading or discarded) all IPv4 system and equipment than IPv4.
That the present invention has realized different length IP address by the variable length IP address scheme that uses byte-by-byte (classification) expansion and deposit and unified application.Utilize this characteristic, the address assignment present situation of existing huge IPv4 network itself need not change or upgrading.On the contrary, each IPv4 address of having distributed all needn't be abandoned, can for good and all be used down; The just IP address processing module of network host operating system that needs upgrading.Therefore, existing all kinds of computers and various network device all can be kept and use current IPv4 address configuration, and the upgrading of whole the Internet can be taked the mode of node smooth upgrade one by one.This technical characteristic of the present invention also is the present invention's " killer's level " advantage with respect to this class fixed length address technology of IPv6 for the upgrading of Global Internet address space provides a kind of near minimum destructive technology migration pattern.
From coding principle, the hierarchical address extended mode of the embodiment of the invention and the UTF-8 character set encoding of variable length code form (referring to RFC 3629) have similar part.In UTF-8, comprise than the UTF-8 character of multibyte and the UTF-8 character that comprises less byte and coexist coequally and use, and their processing method is in full accord,---particularly, 7 bit ASCII character codes are intactly kept as the shortest UTF-8 character code, thereby make and can both continue use based on a large amount of existing text of ASCII, data resource, software and hardware system etc. in the UTF-8 system.Status and ASCII character the status among UTF-8s of 32 IPv4 addresses in extended address of the present invention is very similar, is taken as the shortest (0 grade) extended address.The IPv4 address is the status of the similar x86 microprocessor instruction set of person in the x86-64 instruction set also, promptly not only remained fully by compatible ground, and keep effectively permanent, thus making that original software based on the x86 instruction set can be continued to use with binary mode, can not be forced to abrogate.Simultaneously, the allocation strategy of IPv4++ address also can be similar to the character-coded expansion strategy of Unicode character set and UTF-8, i.e. distribution according to need, expansion step by step.
On the other hand, address extension method of the present invention also has an interesting characteristic, be that existing IPv4 network also can transmit the datagram that has the present invention's " extended address option ", just can not discern and explain address extension information wherein, but still only use lowest order 4 bytes (being IPv4 source address and destination address field (DAF)) of extended address to come the deal with data newspaper.Therefore, if a collection of special " compatible address " suitably is set on source contact or destination node, the new datagrams that then has the IPv4++ extended address can be transmitted by old IPv4 network correct ground.For example, can the byte of address extension part all be 0 or all be each other extended address of level of 255 as this compatible address, comprise 0 19.0 18.0 17-...-...-...-...-a.b.c.d or 255 19.255 18.255 17-...-...-...-...-a.b.c.d and each more rudimentary extended address thereof, wherein 4 of low level bytes all are legal IPv4 addresses.After the node with extended address processing capacity is set to this compatible address, even there is the not IPv4 subnet section of upgrading between these nodes, the IPv4++ datagram that has an address extension still can be between these nodes normal delivery.
In sum, the datagram treatment technology of the embodiment of the invention comprises step as shown in Figure 9, its function is that the IPv4 datagram that has the IPv4++ extended address is handled, and has realized the internet data message processing method with bigger address realm of a compatible IPv4 thus.Its step is as described below:
■ at first, the datagram format on the step 910 pair node is differentiated, the datagram of this method process IP v4 form is then changeed end if not the IPv4 datagram;
■ step 920 is checked the address extension attribute field of IPv4 datagram head, promptly searches the option type byte 210 of a numerical value for " 111x xxxx " in Option Field 140;
■ step 930 judges whether this significant byte 210 exists, and as not existing, then by step 940 source address field in the datagram head 120 and destination address field (DAF) 130 all is used as 32 address;
If this attribute field 210 of ■ exists, then find out all the other two fields 220,230 of complete " address extension option " 200 by step 950, therefrom extract source address expansion 231 and destination address expansion 232, then the source address field in the datagram head 120 or destination address field (DAF) 130 are combined with data bit 231,232 among the corresponding address extension part 230,32 longer extended address of ratio of components are as new source address or destination address.
■ is last, and step 960 utilizes the above-mentioned address information that obtains among the datagram head datagram to be carried out route is handled and other upper-layer protocol is handled.
Simultaneously, positive technique effect and the advantage that this method realized is listed in " summary of the invention " part.
■ increases extended address in operating system nucleus and Socket API handles
Computer operating system realizes network communicating function by the procotol processing module.The procotol processing module realizes in operating system nucleus that usually the Code Design of this module is the center with " socket " structure (C linguistic variable name is generally structsocket{}) and " socket addresses " structure (the C linguistic variable is called struct sockaddr{}).Each procotol all has a special socket addresses structure and a socket structure, they form a unified application call interface, promptly general socket DLL (dynamic link library) (Socket API) by the socket addresses structure struct sockaddr{} of universal class.Be used to realize that the socket addresses structure of IPv4 agreement and socket structure are respectively structsockaddr_in{} and struct inet_sock{}.
Have benefited from IPv4 compatibility completely, the above-mentioned address extension technical scheme that the embodiment of the invention provided can be added in the IPv4 protocol process module code of existing operating system very simply, increases the function that the IPv4++ datagram that has the grading extension address is handled for it.This is that existing IPv4 code is relatively simply revised in essence, promptly the C language codes relevant with the address field of process IP v4 datagram is made the alternate form modification of primary systemization, and need not be write new protocol process module.As long as data structure that relates to 32 IPv4 addresses and function are revised as 20 grades of extendible elongated address structures that use the embodiment of the invention, can realize the processing capacity of IPv4++ datagram.Relatively, because the IPv6 address can't keep compatible with the socket addresses structure of IPv4, and the IPv6 datagram format redefines, and increases IPv6 datagram processing capacity and must write and the independently irrelevant protocol processes kernel module of IPv4 module in operating system.
The center object of IPv4 protocol process module and IPv4 Socket API is a standardized the Internet (INET) socket addresses structure struct sockaddr_in{}.Accompanying drawing 10 is memory patterns of this data structure.The length of this structure is 16 bytes, is 0 byte of padding but back 8 bytes are values, so that the length of this structure is identical with the length of general socket addresses structure struct sockaddr{}.As shown in Figure 10, except that filling field, this structure has 3 fields: one 16 bit field sin_family (value AF_INET) indicates this address family (address family) to be IPv4, another 16 bit field sin_port is the port numbers (port number) that the host-host protocol (being TCP or UDP) on IP upper strata will use, and the 3rd field sin_addr{} i.e. 32 IPv4 address.The same with the byte order of IPv4 datagram head field, these 3 fields all are so-called major part byte order (big-endian byte order), the high-order portion that promptly comprises the numeral of a plurality of bytes must leave in the lower byte in address, the just preferential upper byte that transmits numeral.
Above-mentioned address extension scheme according to the embodiment of the invention, we become the extend type shown in the accompanying drawing 11 to the IPv4 socket addresses architecture advances shown in the accompanying drawing 10, comprising 5 fields: the structure of preceding 3 fields and IPv4 is identical, thereby has kept compatibility; In the space of 80 original value bytes filling fields, two new fields have been set up, be the byte arrays ext_addr[of address extension rank ext_level and address extension part], array ext_addr[wherein] physical length be exactly address extension rank ext_level.Therefore, ext_level field value is 0 to be exactly the implication of " 0 grade of address extension ", this moment array ext_addr[] length be 0, promptly do not have the address extension part.This is the desired value of IPv4 socket addresses structure just, i.e. ext_addr[0] be 0.So the socket addresses structure of the expansion shown in the accompanying drawing 11 is just to get back to the IPv4 socket addresses structure shown in the accompanying drawing 10 at 0 o'clock at ext_level.
In the space of 16 bytes of original IPv4 socket addresses structure, address extension byte arrays ext_addr[] maximum length be 7 (comprise ext_addr[0] to ext_addr[6] 7 bytes), promptly address extension rank ext_level is 7 grades to the maximum.In actual applications, after all 7 grades all run out with the set of interior extended address, the packing space (be byte ext_addr[7] to ext_addr[18]) of 12 bytes can be after original IPv4 socket addresses structure, added, 19 grades address extension rank ext_level can be realized being to the maximum.
Write for ease of description code, use new combination of address data structure ip4pp_addr{} of C language definition:
typedef?struct?ip4pp_addr{
uint32_t?v4_addr;
uint8_t?ext_level;
uint8_t?ext_addr[19];}ip4pp_addr_t;
It is the address extension byte arrays field ext_addr[of 19 bytes that this structure comprises an IPv4 address field v4_addr, address extension level field ext_level and one the longest], this just forms a data structure to three among the amended socket addresses structure struct sockaddr_in{} fields about extended address separately.
Utilize as shown in Figure 11 amended socket addresses structure struct sockaddr_in{} and combinations thereof address structure struct ip4pp_addr{}, can in the code of the IPv4 protocol process module that has operating system now, increase the extended address processing capacity of the embodiment of the invention as follows:
■ is the combination of address structure " ip4pp_addr_t address " that the 4 byte IPv4 address variable declarations of each similar " uint32_t address " all change into 24 bytes the variable of type;
■ has the function of IPv4 address parameter to all
f(uint32_t?address,...)
All change into
f(ip4pp_addr_t*address_ptr,...)
Wherein address_ptr is the pointer that points to an already present variable i p4pp_addr_t address;
■ changes the program module of using 32 IPv4 address process datagram routes into and uses combination of address structure structip4pp_addr{} to organize and search routing table, and divide and the method for route assemblage is optimized according to previously described layering routing table, improve the operational efficiency that the extended address variable that uses struct ip4pp_addr{} type is searched next jumping routing table entry.
According to the above-mentioned way of relatively simply improving, by every variable that relates to 4 byte IP addresses and subnet mask in the IPv4 block code all being replaced the combination of address that becomes above-mentioned 24 bytes and combination mask variable, can in existing operating system, increase processing to the IP datagram of the extended address that has the embodiment of the invention.Related specific code partly has: the data structure of socket object in kernel represented, the routing table structure, the function relevant with the routing table operation with socket, the handling part of relevant IP address, subnet mask, Option Field grades in the IPv4 datagram handling process.Simultaneously, according to the IP protocol process module of this method improvement to not identical with the result of the IPv4 datagram of address extension option and original result.
Aspect application program, be by using socket addresses structure struct sockaddr_in{} and the one group of various datagram processing capacity that specific built-in function comes the IPv4 protocol process module in the call operation system kernel shown in the accompanying drawing 10 based on the application program of IPv4SocketAPI.As long as socket addresses structure struct sockaddr_in{} is improved to as shown in Figure 11 the socket addresses structure that has address extension rank and extended address array, application program can use the one group built-in function identical with IPv4 Socket API to come the function of the IPv4 protocol process module of the above-mentioned code revision of process in the call operation system kernel, and transmitting-receiving has the IPv4++ datagram of extended address.Therefore, the SocketAPI of IPv4 just can support the processing of IPv4++ datagram through the expansion of very simple socket addresses structure.
In order to call the SocketAPI with grading extension address process function in maintenance and IPv4 Socket API compatibility, application program need be followed an address setting rule: need not in program certain rank is the extended address x of j j.x J-1. ... .x 1-a.b.c.d is converted into a big integer address (the perhaps array of j+4 byte), and always its extended address part x j.x J-1. ... .x 1A.b.c.d handles respectively with the base address part, thus the socket addresses structure after the setting improvement as shown in Figure 11 correctly.
Accompanying drawing 12 has provided a sample program of using the Socket API after improving, it is a TCP client application with the C language compilation, connects a Web server (using tcp port 80) with 1 grade of extended address " 68-162.105.80.123 " by improved socket addresses data structure is set.Also listed the definition of improved socket addresses struct sockaddr_in{} in the program.This program at first is provided with new sockaddr_in{} structure with the address and the port of server, use the Socket api function of standard to set up TCP then and be connected, after successful connection, can have the IPv4++ datagram of " address extension option " to the server transmission with server.
Attention is in accompanying drawing 12, except two line codes, address extension level field ext_level in the sockaddr_in{} structure (the 45th row) and address extension byte arrays ext_addr[promptly are set] in element (the 46th is capable), the remainder of this program principal function and IPv4 Socket api routine are identical.That is to say that after this two line code was removed, function had just been got back to conventional Socket api routine, thereby only uses the datagram of IPv4 form to communicate.And if be provided with the address extension level field ext_level of non-0 numerical value, then transmit sockaddr_in{} address structure parameter to the protocol process module of kernel by same Socket API built-in function, operating system nucleus just uses the extended address of rank as ext_level, in the Option Field of IPv4 datagram head, be provided with " address extension option ", thereby send the IPv4++ datagram to the purpose computer.Therefore, technical scheme of the present invention enables to use in bigger IP address range by existing IPv4 Socket API is carried out the function that very little correction can promote several network applications.
On the other hand, keeping this with another significant technique effect IPv4 socket addresses structure compatible is: IPv4 Socket API application program then can need not any modification and just can normally operate on the IPv4 protocol module with IPv4++ address process function with the binary value code means if use dynamic link (dynamic linking) mode to call the API built-in function.The operating system of current main-stream all provides API built-in function in the mode of dynamic link library, shared library or dynamic handling module.Therefore, can directly support existing a large amount of IPv4 application software and system, realize the back compatible of binary mode, can make their continue operation, effectively lasting based on the Socket API of address extension method of the present invention.Simultaneously, the existing operating system of upgrading makes it to support that address extension technology of the present invention is also fairly simple, only needs to change corresponding dynamic link function library file and gets final product.This binary compatibility also is the significant advantage of method and system of the present invention with respect to other IPv4 improvement technology.
Above-mentioned this technique effect is that IPv6 can't realize.IPv6 does not only provide the compatibility of binary code mode, not with the compatible existing IPv4 Socket API application program of source code mode yet.In addition, it is to be in juxtaposition with the IPv4 agreement that present IPv6 agreement realizes, forms what is called " two IP stack " (dual IP stack) system.In operating system nucleus, the two is two fully independently protocol process module, each self-operating of irrelevant ground.This provisional compatible system tends to bring a large amount of complexity to application program.For example, because the socket data structure in the kernel can only be bundled on the protocol address structure, if a server application wishes that can accept IPv4 simultaneously is connected with IPv6, it just must be respectively IPv4 socket addresses struct sockaddr_in{} and IPv6 socket addresses struct sockaddr_in6{} respectively creates a socket, and bind two kinds of different socket addresses respectively, so that can receive and dispatch IPv4 and IPv6 datagram independently.These two sockets can not be used exception with, and require good the two data buffering character, the concurrent connection control, synchronously or challenges such as asynchronous I/O mode, thread synchronization of application program management.
Socket API application program based on the embodiment of the invention does not then have this shortcoming based on two IP stack systems, because have only an IPv4 protocol stack in the system, has promptly possessed the IPv4 protocol process module of extended address datagram processing capacity through improving.Because the complete compatible IPv4 socket addresses of socket addresses of expansion, the socket structure in operating system nucleus is actually and is bundled on the same socket addresses structure struct sockaddr_in{}.In this structure, application program both can be provided with old IPv4 address, and new grading extension address also can be set, and system kernel can be handled the corresponding IP address type automatically according to the setting (value of field ext_level) of application program.Like this, application program only need use single socket can receive and dispatch IPv4 datagram or IPv4++ datagram simultaneously.This has greatly simplified the exploitation and the maintenance of IP application system.
In addition, as long as operating system has been used suitable " compatible address " IP address as local network interface card, new application program can also be with existing (not upgrading as yet) IPv4 main-machine communication, and promptly sending with " 0 grade of extended address " is the IPv4++ datagram of destination address.
The address extension method of all the other agreements of ■ TCP/IP and application layer protocol
The address extension method of the embodiment of the invention has realized the grading extension to the IPv4 network layer address, has increased the addressable scope of IPv4 datagram effectively.For making technical scheme performance best-of-breed technology effect of the present invention, also be necessary to carry out certain improvement or adjustment, make and to use address extension technology of the present invention based on the whole the Internet of TCP/IP to handling other relevant agreement with IPv4 address and IP datagram in the ICP/IP protocol set.This specification is done a summary to this in this section, relates generally to how to allow the main IPv4 related protocol of three levels such as agreement, transport layer protocol and part base application agreement of assisting of IPv4 can use the 20 grades of functions that can expand the IP address of the present invention.
The embodiment of the invention is by introduce the addressing range of the IP datagram that a kind of " address extension option " enlarged at IPv4 datagram head.If allow whole apparatus for network node (for example personal computer, server, ip router, IP switch or the like) can make good use of this extended address scheme, then not only to itself provide the IP datagram address extension information processing function for the IPv4 module, but also to expand the used IP address range of other basic agreement relevant with IPv4, finally allow whole ICP/IP protocol set can both adapt to IPv4 datagram addressing range and enlarge the positive technique effect that brings.
With an IPv4 router is example, after the IPv4 processing module in its operating system nucleus has obtained the transmitting-receiving and route processing capacity of IPv4++ datagram through above-mentioned code revision, also needs further to increase following function in its IP layer:
-its ARP (address resolution protocol) processing module can be supported the IP address of gradable expansion, promptly can inquire certain expansion pairing mac-layer address in IP address (for example 48 Ethernet card addresses) in this subnet, and the MAC Address on the enough own network interface cards of energy is answered the ARP inquiry at the expansion IP address of its binding;
-its ICMP (internet control message protocol) module can be supported to expand the IP address, comprises 0 grade of extended address;
-its IGMP (the Internet group messaging protocol) module can be supported to expand the IP address, comprises 0 grade of extended address.
Simultaneously, the Routing Protocol (for example RIP, BGP etc.) of the application layer of the transport layer protocol of this system (being TCP and UDP), current operation and the some and closely-related application layer protocol in IP address (for example DNS, DHCP etc.) all should be able to adapt to the hierarchical address expanded function of this IP layer, still can handle (compatibility) IPv4 address simultaneously.
Similar with the situation of the kernel module of process IP v4 datagram, above-mentioned address realm is revised the protocol process module (IP layer, transport layer, application layer) of three levels in the TCP/IP module that relates to network node system.Relevant with the IP address in principle data structure and function all need to revise, and previously described substituend amending method is suitable fully.But, through specific design, IPv4 datagram processing method based on extended address of the present invention can avoid changing a part of agreement, make the agreement relevant with IPv4 as much as possible not be subjected to the influence of IPv4 address extension fully, wherein most important parts is: transport layer protocol UDP and TCP can not be subjected to the influence of IP datagram address extension.The improvement of each layer related protocol or the situation of adjustment division are as follows.
The IP layer:
The network layer protocol directly related with IPv4 comprises the auxiliary agreement of IPv4, be ARP, RARP, ICMP and IGMP, some mainly comprises IPsec (IP layer security protocol), VPN (virtual private networks based on privately owned address and IP-in-IP tunnel is used), Mobile IP (the mobile environment application protocol of IPv4) etc. directly based on the relevant network layer protocol of the application of IPv4 in addition.
At first be with network layer address to physical address map relevant agreement ARP and RARP (latter is replaced by DHCP at present).ARP and RARP are general protocol address resolution agreements, and itself is promptly applicable to the mapping of any network layer address to physical address.Therefore the two itself need not to revise, and only need to get final product wherein carrying out small amount of supplemental about the setting of IP address length field in map addresses request and the response message and IP address field: for the IPv4 address, this address length field value is 4 (individual bytes); And for extended address, this address length field value is 24, and the content of former IPv4 address field changes the combination of address data structure by defined 24 bytes of above-mentioned struct ip4pp_addr{} into.
ICMP and IGMP are based on the upper layer message of IP agreement respectively and transmit agreement, auxiliary respectively IPv4 realization datagram transmission error reporting and control, multicast (multicast) member management.When the support that increases IPv4++ extended address of the present invention, every ICMP and IGMP message that does not relate to the IP address does not need to revise; Every message that relates to IP address and subnet mask, then the node of all transmitting-receiving IPv4++ datagrams all uses extended address to get final product, and whether receiving node can use IPv4++ address extension option to determine whether the address in ICMP and the IGMP message is extended format by the IP head.The form of all extended address fields equally all is the combination of address structure of defined 24 byte lengths of above-mentioned struct ip4pp_addr{}.
Carry out similar modification based on the datagram of IPsec, the VPN of IPv4 and Mobile IPv4 and can support extended address, datagram head and all IP address fields in the IP upper layer message of being about to them are revised as the extended address that rank is j>0, and its form is struct ip4pp_addr{}; And when j=0, then keep original 32 integers as IP address field.
Transport layer:
The agreement of internet transmission layer comprises UDP and TCP.They have realized the IP address multiplex based on port numbers, and itself datagram structure and processing procedure are all relatively independent with network layer.The information relevant with IP datagram is mainly reflected in the two employed pseudo-head, promptly UDP and TCP all need separately to use a pseudo-IP head calculation check and, comprising source address in the IPv4 head and destination address.The present IP address that all is to use 32 based on UDP and the TCP of IPv4.
When IPv4 datagram head has used grading extension of the present invention address, existing TCP and udp protocol handle code and driver module can by as next simple rule avoid any modification: promptly ignore the present invention fully and be arranged on address extension information in the IPv4 datagram head option, this is promptly when calculating the checksum field of TCP or UDP header, only use the original 32 potential source addresses of IPv4 datagram head and 32 destination address field (DAF)s to form pseudo-IP head, and ignore the expansion of all source addresses or destination address.This is equivalent to existing TCP and the UDP processing module is known nothing the address extension of IP layer, thereby no matter whether has address extension option of the present invention, the address field that they always use IPv4 datagram head Central Plains to have as before.Ignore UDP or the TCP check that the address extension option calculated and still be reliably, because nodes of all transmitting-receiving IPv4 datagrams all are the checksum fields that transport layer is set in such a manner at present.
Application layer:
Application layer protocol can only use UDP or TCP, also can directly use IP (based on so-called raw socket).If the request of these upper-layer protocols and response message directly do not relate to IPv4 address (for example HTTP, SMTP, POP3, RPC, NFS etc.), then need not any modification and get final product (in the binary compatible mode) and operate on the host computer system of having used extended address of the present invention.For with the closely-related application layer protocol in IP address (for example DNS, DHCP etc.), then by with the similar address field extended mode of above-mentioned modification, all can adapt to grading extension of the present invention address, and keep the original function of process IP v4 address.The required address extension of brief description DNS, DHCP and part Routing Protocol is revised.
Support the DNS of IPv4 address search can support expansion IP of the present invention address through the change of following two aspects.At first, in the record of DNS, increase new " resource record types " numbering, be used to indicate the DNS resource record that has grading extension of the present invention address.This new type number title can be made as A24, and the type that expression has comprised 24 bytes is the IP address structure of struct ip4pp_addr{}.For example, the DNS of 5 bytes of representing with 10 systems (1 grade of expansion) address is recorded as
A24 IN 68-162.105.80.123
1 grade of extended address " 68-162.105.80.123 " in this record will be converted into a type to be the variable of structip4pp addr{} and to be stored in the disk file.Secondly, in the response message of DNS regulation, one 16 address length field must be arranged in the integer-valued byte sequence front, IP address of listing certain domain name.There is following dual mode extended address of the present invention can be applied in the DNS response message: 1, to be the extended address of j for rank, this field is set to 4+j+1 and gets final product, and data thereafter are exactly preceding 4+j+1 byte of the defined combination of address structure of struct ip4pp_addr{}; 2, with original 32 for the IPv4 address field replaces with the structip4pp_addr{} address structure of 24 bytes, 4+1+j byte before wherein only using, thereby kept the individual not byte of usefulness of 24-(4+j+1)=19-j.
In addition, DNS API also can support the IP address expanded through simple modification.The data structure of the IPv4 address of expression domain name is struct hostent{}, comprising the pointer that points to IPv4 address struct in_addr{}.As long as the data type that this pointer is pointed changes combination of address struct ip4pp_addr{} into by struct in_addr{}.Existing DNS api function based on struct hostent{} can call in the binary compatible mode revises DNS api function storehouse afterwards.Simultaneously, the newer DNS API based on struct addrinfo{} then need not to revise and can support grading extension of the present invention address, because these API are by using socket addresses struct sockaddr_in{} as shown in Figure 10 to preserve the IP address, and (see SocketAPI expand part) as mentioned before, this data structure can by be interpreted as shown in Figure 11 data structure and access grading extension of the present invention address.
DHCP is used to realize the automatic configuration of information such as the IP address, mask, router to the client computer in certain network segment.The DHCP client computer when starting when UNICOM (perhaps its network interface card again) to local network segment broadcast configuration request message, and if there is Dynamic Host Configuration Protocol server in Home Network, the configuration response message that then can obtain to return.The head of dhcp message comprises " Unused " field of one 7, must value be 0 all by its all bits of present agreement.Can be from wherein distributing a bit as an address extension flag bit (flag bit), for example use its lowest order position as a token of, and agreement: if this flag bit is 1, then all IPv4 address fields (comprising the IPv4 address field in the DHCP option field " options ") all are expanded into grading extension of the present invention address, the i.e. defined combination of address of struct ip4pp_addr{}.By introducing so less change, can allow DHCP support the automatic configuration of grading extension IP of the present invention address.
Routing Protocol (Routing protocols) is by using UDP or TCP or IP (Raw datagram) to transmit the application layer protocol of routing table information separately mutually between the router.Improve similar to the address extension of above-mentioned application layer messages, all change all fields that relate to the IPv4 address among the message of these Routing Protocols into form, can make it to transmit routing table entry based on grading extension IP of the present invention address by the defined combination of address structure of struct ip4pp_addr{}.For example, the inner employed rip routing protocol based on UDP of autonomous system uses 32 IPv4 addresses to preserve the address and the subnet mask of all-router in its message.When the router operation system upgrade is handled for support IPv4++ datagram, all these 32 bit address field in the RIP message of its transmission are revised as struct ip4pp_addr{} combination of address form, can transmit the new routing table information of having used extended address.
In addition, for systematically realizing the support of upper-layer protocol to grading extension of the present invention address, can introduce last the next relevant (Context dependent) rule of a datagram: if the IP datagram processing module has received the IPv4++ datagram that has address extension information, then all other protocol modules of IP-based upper strata all are apprised of this point (for example by the indexed variable of an overall situation is set).Can avoid so all introducing the attribute field whether an expression has used the address extension function at the message header of each application layer protocol.
The alternate manner of ■ expansion IPv4 address
The above embodiment of the present invention has been used a kind of elongated IP address scheme that can expand step by step, but does not get rid of the address scheme that uses fixed length.In above-mentioned 19 other extended address of level, the combination of each grade extended address and 32 low order address all is a kind of fixed length address, therefore in fact the foregoing description has comprised 19 kinds of fixed length address schemes, promptly length be respectively 4+1,4+2 ..., the new IP address of a 4+19 byte.In addition, the 12nd grade of address extension (address extension of 12 bytes partly adds 4 byte low order address) among the fixed length address scheme has 128 address space, can hold the designed address allocation plan of IPv6.This that is to say that the address space structure of IPv6 can be contained in the address space of the present invention fully.
The above embodiment of the present invention is come IP address field in the growth data header by using a kind of special IPv4 datagram head option.But technical scheme of the present invention is not limited to this mode.Whether feature of the present invention is to introduce certain flag information to indicate address field to expand and how to expand within IPv4 datagram head.In fact also the execution mode that has other call address extension flag.For example, exist at present unique field of not using (reservation) as yet in IPv4 datagram head, it only comprises a data bit, promptly the 49th (high order bits in the 3 bit sliced tag fields).It is 0 that IPv4 standard [RFC 971] requires the numerical value of this bit of all IPv4 datagram heads.This data bit can't be used as the address extension field, but can be as the sign position (flag bit) of an address extension, its value is that source address and the destination address field (DAF) in the 1 expression datagram is expanded, the field that has the address extension part in the field of datagram head other parts, this moment, this datagram was not the IPv4 datagram of 32 bit address of routine.For example, can be further 16 bit checks of IPv4 datagram head and (Checksum) field be re-interpreted as two 8 address extension field, perhaps indicate after the datagram head, insert new field before the load data, perhaps indicate the expansion that has comprised source address and destination address at datagram head option partial memory in the field of certain special form as extended address field.These methods can both keep the compatibility of IPv4.Compare with previous embodiments of the present invention, the address extension ability of Huo Deing lower (address only increases a byte) like this, perhaps the new datagram of Xing Chenging no longer is the IPv4 form of standard, perhaps might destroy the host-host protocol on IP upper strata.So these address extension modes can be used under given conditions.
Above-mentioned first kind of address extension mode, present still untapped the 49th bit that is about to IPv4 datagram head 100 is set to 1,16 bit checks and field 110 is interpreted as two 8 the source address and the extended byte of destination address, has the characteristics of IP datagram head for minimum (20 byte) that keep.This helps optimizing the performance of ip router or switch processes IP datagram, simultaneously 32 IP address is enlarged.Along with improving constantly of performance of network equipments and reliability, verification and importance reduce because transmission in most cases all is a zero defect, this makes IPv4 header check and field no longer play a role.And with its as the address extension field after, router and main frame do not need to calculate again header check and, thereby improve the datagram treatment effeciency.Simultaneously, keeping the datagram head is that 20 byte fixed sizes help the network hardware to accelerate the speed of deal with data newspaper, helps to improve the performance of whole network equally.This address extension mode can form the source address and the destination address of 40 bit lengths, and its addressing range has reached 256 times of IPv4 address space, and total nearly 1.1 trillion addresses can be used as a kind of 1 grade of special extended address and use.
In addition, in this extended address system, existing TCP and UDP module also can be moved as usual in any modification, that is: when calculating the Checksum of TCP or UDP header, can only use the 32-bit source address and the destination address of IPv4 datagram head to form pseudo-head, and ignore the extended address byte and get final product.Therefore, this address extension mode has also kept extraordinary compatibility with IPv4, makes the IPv4 address space become its subclass.IPv4 protocol driver (or dynamic link library) in the active computer operating system is upgraded to after this extended address treatment system, and original IPv4 application program still can be used as usual.This upgrading can be reduced to the replacement of function library file, and need not to use the needed dual stack of similar IPv6 compatible system, address transition (NAT) or various tunnel complicated poor efficiency and expensive technology such as (for example IP6 over IP4).
The above embodiment of the present invention realizes as the kernel module of computer operating system.Computer described here and operating system thereof all are to understand as the term of broad sense, be not limited only to personal desktop's computer or portable computer, also comprise various types of server systems, router and switch, and the embedded computer system of other type, possess all kinds of digital devices of IP address or IP datagram processing capacity.No matter specifically the presenting form which kind of otherness is arranged of application system, the method for its inter-process IP address and IP datagram all is consistent, thereby all is applicable to technical scheme proposed by the invention.
The above embodiment of the present invention has been used some specific data structure and treatment step, and realizes based on specific application system.But any personnel that are familiar with this area background technology know clearly that the scope of application of the present invention is not limited to the ad hoc fashion with these.Technical scheme of the present invention also can be applied to other multiple different embodiment.Claims of the present invention have been contained many distortion and the replacement to each key element of this technical scheme.

Claims (10)

1. method of handling internet data message, the address information Data transmission message between network node by among the datagram head (100) that uses the IPv4 form is characterized in that comprising the steps:
Inspection is positioned at the specific attribute field (210) among the IPv4 datagram head, and deal with data is reported in the following manner:
If this attribute field (210) does not exist, then use 32 potential source address fields (120) in the IPv4 datagram head and 32 destination address field (DAF)s (130) respectively as source address and destination address;
If this attribute field (210) exists, then 32 potential source address fields (120) in the IPv4 datagram head or among 32 destination address field (DAF)s (130) at least one are combined 32 longer source addresses of ratio of components or destination address with data bit among another field (230) that the datagram head is comprised.
2. the method for processing internet data message according to claim 1, it is characterized in that: described attribute field (210) is included in the specific fields (200) of datagram head, as a part (210) of this field (200), and another field of described source address field (120) that is used for the growth data header or destination address field (DAF) (130) is the one other component (230) of this field (200).
3. the method for processing internet data message according to claim 2, it is characterized in that: described specific fields is the datagram head option (200) of a special use, comprise an option type field (210), an option (220) and an option data field (230), be used for the source address field (120) of growth data header or the data bit of destination address field (DAF) (130) and be included among the described option data field (230).
4. the method for processing internet data message according to claim 3 is characterized in that: the length of the data bit that is used for growth data header source address field (120) or destination address field (DAF) (130) that a part of data bit (213) indication of described option type field (210) is comprised among described option data field (230).
5. according to claim 3 is the internet data message method for addressing, it is characterized in that: described option type field (210) comprises an option type sign indicating number (212), its numerical value is for keeping the not option type sign indicating number of usefulness, i.e. binary number 01 or 11 in IPv4.
6. according to claim 3 is the internet data message method for addressing, it is characterized in that: the minimum length of described option (200) is 2 bytes, and maximum length is the maximum length of IPv4 datagram Option Field (140), i.e. 40 bytes.
7. the method for processing internet data message according to claim 1 is characterized in that: described source address extended field (231) and destination address extended field (232) be respectively the expansion after the potential source address and the seniority top digit of destination address.
8. the method for processing internet data message according to claim 1, it is characterized in that: the verification of calculating the IP upper-layer protocol and the time, ignore described extended address field (200), only use the not 32 potential source address fields (120) and the destination address field (DAF) (130) of the IPv4 datagram head of expansion.
9. system that handles internet data message by using the address information Data transmission message between network node in the IPv4 datagram head (100), is characterized in that comprising the operating means or the equipment of the command sequence of carrying out following steps:
Inspection is positioned at the specific attribute field (210) among the IPv4 datagram head, and deal with data is reported in the following manner:
If this attribute field (210) does not exist, then use 32 potential source address fields (120) in the IPv4 datagram head and 32 destination address field (DAF)s (130) respectively as source address and destination address;
If this attribute field (210) exists, then 32 potential source address fields (120) in the IPv4 datagram head or among 32 destination address field (DAF)s (130) at least one are combined 32 longer source addresses of ratio of components or destination address with data bit among another field (230) that the datagram head is comprised.
10. the system of processing internet data message according to claim 9 is characterized in that: the command sequence of carrying out described step is comprised among the module of processing internet data message of computer operating system kernel.
CN2009101437611A 2009-05-26 2009-05-26 Method and system for processing Internet data message Active CN101557349B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101437611A CN101557349B (en) 2009-05-26 2009-05-26 Method and system for processing Internet data message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101437611A CN101557349B (en) 2009-05-26 2009-05-26 Method and system for processing Internet data message

Publications (2)

Publication Number Publication Date
CN101557349A true CN101557349A (en) 2009-10-14
CN101557349B CN101557349B (en) 2012-12-12

Family

ID=41175299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101437611A Active CN101557349B (en) 2009-05-26 2009-05-26 Method and system for processing Internet data message

Country Status (1)

Country Link
CN (1) CN101557349B (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012089107A1 (en) * 2010-12-27 2012-07-05 华为技术有限公司 Method and device for transmitting information over ipv4 network
CN103416030A (en) * 2011-02-28 2013-11-27 英国电讯有限公司 Obtaining information from data items
CN103441871A (en) * 2013-08-22 2013-12-11 杭州华三通信技术有限公司 Method and device for automatically adding anycast rendezvous point members
CN104184646A (en) * 2014-09-05 2014-12-03 深信服网络科技(深圳)有限公司 VPN data interaction method and system and VPN data interaction device
WO2015165383A1 (en) * 2014-04-28 2015-11-05 Huawei Technologies Co., Ltd. Centrally optimized variable length coding for source routed multicast
CN105187568A (en) * 2015-08-12 2015-12-23 广东睿江科技有限公司 IPV4 address conversion method and device
CN105577844A (en) * 2014-11-06 2016-05-11 普天信息技术有限公司 Method for generating multicast user plane address, core network device and terminal
AU2013407433B2 (en) * 2013-12-11 2017-07-20 Sca Hygiene Products Ab Scheme for addressing protocol frames to target devices
CN107241457A (en) * 2017-06-01 2017-10-10 苏州派因太利网络科技有限公司 A kind of method for realizing network end-to-end communication
CN107888714A (en) * 2017-10-31 2018-04-06 贵州白山云科技有限公司 A kind of method and device for selecting local cache DNS
CN109150584A (en) * 2018-07-04 2019-01-04 北京中创腾锐技术有限公司 A method of being instructed based on SMID is that network packet classification provides acceleration support
CN112532641A (en) * 2020-12-07 2021-03-19 四川光慧新能源科技有限公司 Communication protocol and message format for connecting internal modules of charging pile
CN107852586B (en) * 2015-07-23 2021-04-02 励智识别技术有限公司 Electronic access control for application middle layer
US20220070208A1 (en) * 2019-05-06 2022-03-03 Bank Of America Corporation Network forensic system for performing transmission metadata tracking and analysis
CN114461685A (en) * 2022-04-14 2022-05-10 天津南大通用数据技术股份有限公司 Method for flexibly expanding database field
CN115428415A (en) * 2020-04-16 2022-12-02 华为技术有限公司 System and method for forwarding packets in a hierarchical network architecture using variable length addresses
US11838263B1 (en) * 2022-10-17 2023-12-05 Verizon Patent And Licensing Inc. Stateless address auto-configuration with multiple subnet support method and apparatus

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127679A (en) * 2006-08-18 2008-02-20 冼剑光 Method for Internet address expansion
CN101277309B (en) * 2007-03-29 2012-07-25 汪涛 IP address system and method for establishing communication connection between users with the same

Cited By (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571545A (en) * 2010-12-27 2012-07-11 华为技术有限公司 Method and device for transmitting information in IPv4 (Internet Protocol vision 4) network
WO2012089107A1 (en) * 2010-12-27 2012-07-05 华为技术有限公司 Method and device for transmitting information over ipv4 network
CN103416030A (en) * 2011-02-28 2013-11-27 英国电讯有限公司 Obtaining information from data items
US9515960B2 (en) 2011-02-28 2016-12-06 British Telecommunications Public Limited Company Obtaining information from data items
CN103416030B (en) * 2011-02-28 2016-12-14 英国电讯有限公司 The method and apparatus obtaining information from data item
CN103441871A (en) * 2013-08-22 2013-12-11 杭州华三通信技术有限公司 Method and device for automatically adding anycast rendezvous point members
CN103441871B (en) * 2013-08-22 2016-06-01 杭州华三通信技术有限公司 The method and equipment broadcasting and converge some member are appointed in a kind of automatic interpolation
AU2013407433B2 (en) * 2013-12-11 2017-07-20 Sca Hygiene Products Ab Scheme for addressing protocol frames to target devices
WO2015165383A1 (en) * 2014-04-28 2015-11-05 Huawei Technologies Co., Ltd. Centrally optimized variable length coding for source routed multicast
US9699071B2 (en) 2014-04-28 2017-07-04 Huawei Technologies Co., Ltd. Centrally optimized variable length coding for source routed multicast
CN104184646A (en) * 2014-09-05 2014-12-03 深信服网络科技(深圳)有限公司 VPN data interaction method and system and VPN data interaction device
CN104184646B (en) * 2014-09-05 2017-12-22 深信服网络科技(深圳)有限公司 VPN data interactive method and system and its network data exchange equipment
CN105577844A (en) * 2014-11-06 2016-05-11 普天信息技术有限公司 Method for generating multicast user plane address, core network device and terminal
CN105577844B (en) * 2014-11-06 2018-12-14 普天信息技术有限公司 Generate method, equipment of the core network and the terminal of multicast user face address
CN107852586B (en) * 2015-07-23 2021-04-02 励智识别技术有限公司 Electronic access control for application middle layer
CN105187568B (en) * 2015-08-12 2018-09-25 广东睿江云计算股份有限公司 A kind of IPV4 address conversion methods and device
CN105187568A (en) * 2015-08-12 2015-12-23 广东睿江科技有限公司 IPV4 address conversion method and device
CN107241457B (en) * 2017-06-01 2020-09-11 常青 Method for realizing network end-to-end communication
CN107241457A (en) * 2017-06-01 2017-10-10 苏州派因太利网络科技有限公司 A kind of method for realizing network end-to-end communication
CN107888714A (en) * 2017-10-31 2018-04-06 贵州白山云科技有限公司 A kind of method and device for selecting local cache DNS
CN107888714B (en) * 2017-10-31 2020-02-11 贵州白山云科技股份有限公司 Method and device for selecting local cache DNS
CN109150584A (en) * 2018-07-04 2019-01-04 北京中创腾锐技术有限公司 A method of being instructed based on SMID is that network packet classification provides acceleration support
CN109150584B (en) * 2018-07-04 2022-02-25 北京中创腾锐技术有限公司 Method for providing acceleration support for network packet classification based on SIMD instruction
US11621977B2 (en) * 2019-05-06 2023-04-04 Bank Of America Corporation Network forensic system for performing transmission metadata tracking and analysis
US20220070208A1 (en) * 2019-05-06 2022-03-03 Bank Of America Corporation Network forensic system for performing transmission metadata tracking and analysis
US11902158B2 (en) 2020-04-16 2024-02-13 Huawei Technologies Co., Ltd. System and method for forwarding packets in a hierarchical network architecture using variable length addresses
CN115428415A (en) * 2020-04-16 2022-12-02 华为技术有限公司 System and method for forwarding packets in a hierarchical network architecture using variable length addresses
CN112532641A (en) * 2020-12-07 2021-03-19 四川光慧新能源科技有限公司 Communication protocol and message format for connecting internal modules of charging pile
CN112532641B (en) * 2020-12-07 2023-04-28 四川光慧新能源科技有限公司 Communication method for connecting internal modules of charging pile
CN114461685A (en) * 2022-04-14 2022-05-10 天津南大通用数据技术股份有限公司 Method for flexibly expanding database field
US11838263B1 (en) * 2022-10-17 2023-12-05 Verizon Patent And Licensing Inc. Stateless address auto-configuration with multiple subnet support method and apparatus

Also Published As

Publication number Publication date
CN101557349B (en) 2012-12-12

Similar Documents

Publication Publication Date Title
CN101557349B (en) Method and system for processing Internet data message
JP4130962B2 (en) System and method for using a domain name to route data sent to a destination on a network
US7657642B2 (en) IP network node and middleware for establishing connectivity to both the IPv4 and IPv6 networks
JP2003308262A (en) Internet communication protocol system realized by hardware protocol processing logic and data parallel processing method using the system
US7779158B2 (en) Network device
US20070147421A1 (en) ISATAP router for tunneling packets and method thereof
CN100413289C (en) Method for realizing IPv6 high performance interconnection based on P2P on IPv4
JPH11112574A (en) Method and system for generating data packet in different kinds of network
WO2012013133A1 (en) Method and device for network communications
CN1711743A (en) Method and apparatus allowing remote access in data networks
EP1579656A1 (en) System and method for establishing communication between a client and a server in a heterogenous ip network
JP2006148902A (en) IPv4-IPv6 CONVERSION SYSTEM USING DUAL STACK CONVERSION MECHANISM AND ITS METHOD
CN100471163C (en) Method for supporting IPv4 applied program utilizing intermain machine tunnel in IPV6
Chauhan et al. A survey on next generation Internet Protocol: IPv6
Hinden Simple internet protocol plus white paper
Fiuczynski et al. The Design and Implementation of an IPv6/IPv4 Network Address and Protocol Translator.
US20060193320A1 (en) Data transmission method having improved network address translation method in home gateway and a system thereof
CN101431477A (en) P2P operator and campus network router combined IPv4/IPv6 grouping conversion method
CN112261054B (en) Ethernet/IP and IPv6 protocol conversion system and method based on application service quality of service
CN101277309B (en) IP address system and method for establishing communication connection between users with the same
McGovern et al. CATNIP: Common Architecture for the Internet
CN111711706A (en) DNS recursive request method and system
CN107104911B (en) UDP (user Datagram protocol) data packet segmentation method and transmission method
CN107241457B (en) Method for realizing network end-to-end communication
CN101411160A (en) Method and apparatus for routing data packets between different internet communications stack instances

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