Summary of the invention
The distribution method that the purpose of this invention is to provide IP address in a kind of broadband wireless MAN.
The present invention requires three kinds of entities in the broadband wireless MAN: travelling carriage, base station and Dynamic Host Configuration Protocol server are finished the IP address assignment process jointly.The network topology structure of broadband wireless MAN as shown in Figure 1.Travelling carriage is connected with the base station by air interface, and the base station is connected in each core metropolitan area subnet by couple in router.The metro core net is made of several metro core subnets, and different subnets interconnect by core router.Except configuration authentication, registration and management server, also disposed several Dynamic Host Configuration Protocol server or BOOTP (Bootstrap Protocol, BOOT strapping Protocol) Forward Proxy on each metro core subnet.For ease of linking to each other with various other networks, each metro core has also disposed exchange gateway on the net.
The present invention requires the Dynamic Host Configuration Protocol server of core net to be divided into country, province (state), the four kinds of levels in city and sub-district according to the geographical position needs.With different levels Dynamic Host Configuration Protocol server structure as shown in Figure 2.Higher level's Dynamic Host Configuration Protocol server has been preserved the whole IP address action scope that can distribute to subordinate's Dynamic Host Configuration Protocol server.The Dynamic Host Configuration Protocol server that is arranged in cell-level is directly managed the base station of each urban cells, need know the pairing BSID in each base station (Base Station Identifier, base station identifier) of management.
Base station identifier BSID be can unique identification one stylobate station in the carrier network scope and length be 48 symbol.It can reflect the geographical position and the residing hierarchical structure of base station.Shown in the BSID form table specific as follows:
The high address low address
Country (8) | State/province (6) | |
Operator's numbering (10) | City (8) |
Base station numbering (16) |
48 base station identifier forms
Similar with BSID, each travelling carriage can be by a MSID (Mobile StationIdentifier, Mobile Station Identifier) unique identification.MSID is equivalent to MAC (MediaAccess Control, the media interviews control) hardware address of travelling carriage, is disposed when dispatching from the factory by mobile station equipment manufacturer.
The present invention requires each base station to have a BSID, and preserves MSID, the IP address that travelling carriage obtains of request distributing IP address and distribute the dhcp server ip address three's of this IP address corresponding relation, guarantees that the IP address that each travelling carriage obtains do not conflict.This is by the decision of the characteristics of wireless MAN topological structure, because the relevant configuration information and the operation of travelling carriage are in charge of in the base station, whether conflict the travelling carriage IP address that is easy to detect its management, and conventional method generally is to reach the generation of avoiding the IP address conflict situation by client computer sends ARP (Address Resolution Protocol, address resolution protocol) bag or Dynamic Host Configuration Protocol server in subnet detection.
In the wired connection environment, client computer is directly to Dynamic Host Configuration Protocol server request distributing IP address, and different therewith, the present invention requires the intermediary of base station as distributing IP address between travelling carriage and the Dynamic Host Configuration Protocol server, and this is by the characteristics decision of wireless MAN topological structure equally.Dynamic Host Configuration Protocol server in core sub sends dhcp message by broadcasting or IP address-based clean culture in the base station, if do not have Dynamic Host Configuration Protocol server in the core sub that the base station connects, can send to the BOOTP Forward Proxy to message, communicate by letter with the Dynamic Host Configuration Protocol server of other core sub by Forward Proxy; Dynamic Host Configuration Protocol server then can be selected to broadcast, be sent message to the physical address (BSID) of base station or to wherein a kind of method of BOOTP Forward Proxy to the base station.
The present invention has defined IP address action scope request message Scope_Request and IP address action scope response message Scope_Response, is used for Dynamic Host Configuration Protocol server and dynamically obtains IP address action scope.The message format of three kinds of message is as shown in the table: 078 16
Type | P | Resv |
BS NUM |
BSI D1 |
…… |
BSID N |
IP address action scope request message message structure
8 of Type, type of message 0
1 of P, network protocol type: 0 expression request IPv4 address action scope
1 expression request IPv6 address action scope
7 of Resv, reserved field is used for extension of message
BS NUM sends the number of base stations of the Dynamic Host Configuration Protocol server management of action scope request
BSID n, 48 of n=1~N, base station identifier, unique identification one stylobate station, simultaneously also anti-
Reflected the geographical position of base station
0 7 8 16
Type | P | Resv |
BS NUM |
BSID 1 |
Start IP Address for BS 1 |
End IP Address for BS 1 |
…… |
BSID N |
StartIP Address for BS N |
End IP Address forBS N |
Length of Network ID |
Subnet Mask |
IP address action scope response message message structure
8 of Type, type of message 1
1 of P, network protocol type: 0 expression IPv4; 1 expression IPv6
7 of Resv, reserved field is used for extension of message
BS NUM sends the number of base stations of the Dynamic Host Configuration Protocol server management of action scope request
BSID n, 48 of n=1~N, base station identifier, unique identification one stylobate station
The IP address action scope initial address of each base station of Start IP Address for BS n
The action scope end address, IP address of each base station of End IPAddress for BS n
16 of Length of Network ID, network ID length
Subnet Mask subnet mask
IP address action scope in the tradition Dynamic Host Configuration Protocol server and network configuration information are generally by keeper's static configuration, and the present invention is on the basis of Dynamic Host Configuration Protocol server layer architecture, allow subordinate's Dynamic Host Configuration Protocol server dynamically to apply for to higher level's Dynamic Host Configuration Protocol server, do not need keeper's static configuration just can obtain IP address action scope and network configuration informations such as network ID length, subnet mask, the flow process that Dynamic Host Configuration Protocol server dynamically obtains IP address action scope as shown in Figure 3, step is as follows:
At the initial phase of core net framework, perhaps the base station sends the DHCP request and IP address action scope that the cell-level Dynamic Host Configuration Protocol server is safeguarded when be empty, and Dynamic Host Configuration Protocol server is to higher level's Dynamic Host Configuration Protocol server transmission action scope request message Scope_Request.Higher level's Dynamic Host Configuration Protocol server is after receiving Scope_Request message, base station geographic position according to subordinate's Dynamic Host Configuration Protocol server management distributes corresponding IP address action scope and optional DHCP configuration parameter, returns action scope response message Scope_Response to the DHCP of subordinate.
According to the needs that distribute and discharge the IP address between travelling carriage and the base station, the present invention has defined three kinds of message: IP address request IP_Request, IP address response message IP_Response and IP address release message IP_Release.The message format of two kinds of message is as shown in the table:
IP address request message structure
8 of Type, type of message 2
1 of P, network protocol type: 0 expression request distributing IP v4 address
1 expression request distributing IP v6 address
7 of Resv, reserved field is used for extension of message
48 of MSID, the travelling carriage MAC Address of transmission IP Address requests
0 7 8 16
Type | P | Resv |
Result |
MSID |
IP Address |
IP address request message structure
8 of Type, type of message 3
1 of P, network protocol type: 0 expression IPv4; 1 expression IPv6
7 of Resv, reserved field is used for extension of message
16 of Result, successful identification item: 0 expression IP distributes failure, and message does not have IP Address
; 1 expression IP is allocated successfully, and message has IP Address item
48 of MSID, the travelling carriage MAC Address of transmission IP Address requests
The newly assigned IP of IP Address Dynamic Host Configuration Protocol server address 078 16
Type | P | Resv |
MSID |
IP Address |
IP address release message message structure
8 of Type, type of message 4
1 of P, network protocol type: what 0 expression discharged is the IPv4 address
What 1 expression discharged is the IPv6 address
7 of Resv, reserved field is used for extension of message
48 of MSID send the travelling carriage MAC Address that the IP address discharges
The IP address that the request of IP Address travelling carriage discharges
Travelling carriage, base station and Dynamic Host Configuration Protocol server distribute and the flow process that discharges the IP address as shown in Figure 4, step is as follows:
In the initial network entry stage, travelling carriage sends IP address request IP_Request to the base station.The base station receives after the IP_Request message, according to DHCP agreement and the Dynamic Host Configuration Protocol server generation interacting message that is positioned at core sub, obtain the IP address and upgrade local data base, confirming to return IP address response message IP_Response to travelling carriage under the situation of not conflicting in the IP address.When travelling carriage does not re-use the IP address, send IP address release message IP_Release to the base station.The base station receives after the IP_Release message, upgrades local data base, and the notice Dynamic Host Configuration Protocol server is recovered to this IP address in the address pool of not using IP of base station correspondence.Wherein, the travelling carriage handling process as shown in Figure 5, the base station handling process as shown in Figure 6, the Dynamic Host Configuration Protocol server handling process is as shown in Figure 7.
Analyze the distribution method of above-mentioned broadband wireless MAN IP geology, it is as follows that summary obtains characteristics of the present invention:
(1) arranges net flexibly.A Dynamic Host Configuration Protocol server can be managed some stylobates station, and these base stations can belong to a subnet together, also can not belong to a subnet together; The metro core subnet that does not have Dynamic Host Configuration Protocol server can be transmitted dhcp message by the BOOTP Forward Proxy.
(2) Dynamic Host Configuration Protocol server hierarchy.By the direct management of base station of the Dynamic Host Configuration Protocol server that is in cell-level, higher level's Dynamic Host Configuration Protocol server can be according to the geographical position dynamic assignment IP address action scope and the network configuration information of Dynamic Host Configuration Protocol server institute of subordinate management of base station.
Technical scheme
The distribution method of broadband wireless MAN IP address: the Dynamic Host Configuration Protocol server of core net is divided into hierarchical structure according to the geographical position, every Dynamic Host Configuration Protocol server in the metropolitan area subnet can be managed some wireless base stations according to demand, these base stations can belong to same subnet, also can belong to different sub-network; The base station is as the intermediary that distributes and discharge the IP address between travelling carriage and the Dynamic Host Configuration Protocol server; In the starting stage of core net framework, subordinate's Dynamic Host Configuration Protocol server can dynamically obtain the IP address action scope of base station correspondence according to the geographical position of institute's management of base station to the request of higher level's Dynamic Host Configuration Protocol server; In the initial network entry stage, travelling carriage is to base station requests distributing IP address, the Dynamic Host Configuration Protocol server of base station and metropolitan area subnet is finished the assigning process of IP address by the DHCP protocol negotiation, under the situation of confirming not conflict the IP address in the base station, returns newly assigned IP address to travelling carriage.
The distribution method of IP address in the described broadband wireless MAN, the Dynamic Host Configuration Protocol server of core net is divided into country, province (state), the four kinds of levels in city and sub-district according to the geographical position needs, and higher level's Dynamic Host Configuration Protocol server is preserved the whole IP address action scope that can distribute to subordinate's Dynamic Host Configuration Protocol server; The Dynamic Host Configuration Protocol server that is arranged in cell-level is directly managed the base station of each urban cells, need know the pairing base station identifier BSID in each base station of management.
Each base station all has a base station identifier BSID unique in carrier network, and in fact BSID inside comprised residing geographical position, base station; The dhcp server ip address three's that the base station need be preserved the travelling carriage MAC Address MSID of request distributing IP address, IP address that travelling carriage obtains and be distributed this IP address corresponding relation guarantees that the IP address that each travelling carriage obtains do not conflict.
The flow process that Dynamic Host Configuration Protocol server dynamically obtains IP address action scope is as follows:
Step S1: at the initial phase of core net framework, perhaps the base station sends the DHCP request and IP address action scope that the cell-level Dynamic Host Configuration Protocol server is safeguarded when be empty, and Dynamic Host Configuration Protocol server is to higher level's Dynamic Host Configuration Protocol server transmission action scope request message Scope_Request;
Step S2: higher level's Dynamic Host Configuration Protocol server is after receiving Scope_Request message, base station geographic position according to subordinate's Dynamic Host Configuration Protocol server management distributes corresponding IP address action scope and some extra DHCP configuration parameters, and returns action scope response message Scope_Response to the DHCP of subordinate.
The distribution of IP address and the flow process of release are as follows:
Step S1: in the initial network entry stage, travelling carriage sends IP address request IP_Request to the base station;
Step S2: the base station receives after the IP_Request message, according to DHCP agreement and the Dynamic Host Configuration Protocol server generation interacting message that is positioned at core sub, obtain the IP address and upgrade local data base, confirming to return IP address response message IP_Response to travelling carriage under the situation of not conflicting in the IP address;
Step S3: when travelling carriage does not re-use the IP address, send IP address release message IP_Release to the base station;
Step S4: the base station receives after the IP_Release message, upgrades local data base, and the notice Dynamic Host Configuration Protocol server is recovered to this IP address in the address pool of not using IP of base station correspondence.
Embodiment
The distribution method of broadband wireless MAN IP address, wherein the handling process of mobile station MS as shown in Figure 5, each event handling step is as follows:
S5.1: mobile platform started initialization;
S5.2: travelling carriage sends IP address request IP_Request to the base station;
S5.3: travelling carriage initiation message retransmission timer T0;
S5.4: judge whether timer is overtime,, enter S5.2 if overtime, otherwise, change S5.5 over to;
S5.5: travelling carriage receives the IP address response message IP_Response that the base station sends;
S5.6: cancellation message retransmission timer T0;
S5.7: check the successful identification item Result in the IP_Response message;
S5.8: if successful identification item Result equals 1, show the IP address assignment success, enter S5.9,, show the IP address assignment failure, change S5.2 over to if Result equals 0;
S5.9: check the travelling carriage MAC Address MSID item in the IP_Response message;
S5.10: if the MSID in the message is consistent with the MSID of travelling carriage, show that message is that Dynamic Host Configuration Protocol server sends to this travelling carriage, enter S5.11, otherwise, change S5.2 over to;
S5.11: travelling carriage successfully obtains the IP address;
S5.12: the travelling carriage shutdown, do not re-use the IP address, send IP address release message IP_Release to the base station;
S5.13: the travelling carriage handling process finishes.
The distribution method of broadband wireless MAN IP address, wherein the handling process of base station BS as shown in Figure 6, each event handling step is as follows:
S6.1: the base station receives the IP address request IP_Request that travelling carriage sends;
S6.2: extract the MSID item in the IP_Request message, be filled into the option (options) of dhcp message DHCPDISCOVER, when being used for the Dynamic Host Configuration Protocol server return messages, the base station is easy to recognize which travelling carriage newly assigned IP address belongs to;
S6.3: base station identifier BSID is filled into client's hardware address chaddr item of dhcp discover, and effect has two aspects: (1) notification target Dynamic Host Configuration Protocol server is according to the IP address action scope of BSID for each base station assigns correspondence of management; (2) BSID in fact also can be used as the hardware address of base station, and therefore, Dynamic Host Configuration Protocol server can send response message to the base station by BSID;
S6.4: in subnet, broadcast dhcp discover,, can send to the BOOTP Forward Proxy to message, send to the Dynamic Host Configuration Protocol server of other subnet by Forward Proxy if there is not Dynamic Host Configuration Protocol server in the subnet;
S6.5: the base station will receive the DHCPOFFER message of this subnet or other several Dynamic Host Configuration Protocol server of subnet in a period of time;
S6.6: the base station is according to the sequencing that receives DHCPOFFER message, and the transmit leg under the message of selecting to receive at first is as the target Dynamic Host Configuration Protocol server;
S6.7: the base station sends DHCPREQUEST message to the target Dynamic Host Configuration Protocol server;
S6.8: start DHCPREQUEST message retransmission timer T1;
S6.9: judge whether T1 is overtime,, enter S6.7 if overtime, otherwise, change S6.10 over to;
S6.10: receive the response message that Dynamic Host Configuration Protocol server sends;
S6.11: cancellation retransmission timer T1;
S6.12: if the message that receives is successfully acknowledge message DHCPACK, enter S6.13,, change S6.18 over to if message is failure acknowledge message DHCPNAK;
S6.13: resolve DHCPACK message, obtain the MSID and the newly assigned IP address that are stored in the options item;
S6.14: the search local data base, check whether IP address allocated is occupied;
S6.15: if the IP address is taken by other travelling carriage in the compass of competency of base station, enter S6.7, otherwise, change S6.16 over to;
S6.16: the travelling carriage MAC Address MSID of request distributing IP address, IP address that travelling carriage obtains and the dhcp server ip address three's that distributes this IP address corresponding relation is saved in the local data base;
S6.17: being set to merit identification item Result is 1, enters S6.19;
S6.18: being set to merit identification item Result is 0;
S6.19: generate IP address response message IP_Response according to successful identification item Result, to the travelling carriage transmission of MSID correspondence;
S6.20: the base station receives the IP address release message IP_Release that travelling carriage sends;
S6.21: send DHCPRELEASE message to Dynamic Host Configuration Protocol server;
S6.22: the base station handling process finishes.
The distribution method of broadband wireless MAN IP address, wherein the handling process of Dynamic Host Configuration Protocol server as shown in Figure 7, each event handling step is as follows:
The S7.1:DHCP server receives dhcp discover;
S7.2: resolve dhcp discover, check configuration parameter, obtain the identifier BSID of request base station;
S7.3:, distribute a new IP address the IP address pool from not using of base station correspondence according to the BSID of base station;
S7.4: belong to same subnet if send the base station and the Dynamic Host Configuration Protocol server of request, then broadcasting or directly send DHCPOFFER message in subnet to the base station according to BSID; If base station and Dynamic Host Configuration Protocol server belong to different sub-network, then DHCPOFFER message is sent to the BOOTP Forward Proxy of dhcp discover appointment;
S7.5: receive the DHCPREQUEST message that the base station sends;
S7.6: judge whether this machine is the target Dynamic Host Configuration Protocol server of request;
S7.7: if this machine is exactly a destination server, then enter S7.8, otherwise, change S7.14 over to;
S7.8: the configuration parameter of checking DHCPREQUEST message once more;
S7.9: if parameter is conflicted with dhcp discover, enter S7.10, otherwise, change S7.11 over to;
S7.10: select a kind of DHCPNAK of the transmission message in following three kinds of modes: in subnet, broadcast, directly send, send, enter S7.14 by the BOOTP Forward Proxy to the base station according to BSID;
S7.11: select a kind of DHCPACK of the transmission message in following three kinds of modes: in subnet, broadcast, directly send, send by the BOOTP Forward Proxy to the base station according to BSID;
S7.12: receive the DHCPRELEASE message that the base station sends;
S7.13: the IP address is recovered to not using in the IP address pool of base station correspondence;
S7.14:DHCP server process flow process finishes.
S7.13: the IP address is recovered to not using in the IP address pool of base station correspondence;
S7.14:DHCP server process flow process finishes.