A kind of method of dynamic assignment Ethernet media access control address
Technical field
The present invention relates to internet arena, particularly relate to a kind of method of dynamic assignment Ethernet media access control address.
Background technology
Along with the IP The Application of Technology, now increasing broadband operation commercialization is finished ADSL (Asymmetric Digital Subscriber Line) (ADSL) wideband switch-in business based on the alternative digital subscriber line access and multiplexing device (ATM DSLAM) based on asynchronous transfer mode of the digital subscriber line access and multiplexing device (IP DSLAM) of IP agreement.ADSL user under IP DSLAM pattern inserts schematic diagram, as shown in Figure 1; ADSL user under ATM DSLAM pattern inserts schematic diagram, as shown in Figure 2.
In ATM DSLAM pattern, in order to need not authentication, can insert private line service (for example: a circuit is rented a small enterprise service on net is provided), usually ADSL (Asymmetric Digital Subscriber Line) modulator-demodulator (ADSL modem) is configured to bearer IP service on the asynchronous transmission network (IPOA) pattern (the IPOA content is asked for an interview standard document rfc2225 or the rfc1577 that internet engineer taskings formulates).Afterwards, configure user end IP address on ADSL modem, and the default gateway ip address of specifying ADSL modem.When ADSL modem and DSLAM devices communicating, ADSL modem directly is encapsulated in user's internet information in the ATM(Asynchronous Transfer Mode) cell of IPOA form and sends to ATM DSLAM equipment.Because the ATM cell that ATM DSLAM equipment just sends ADSL modem directly is transparent on the atm device of upper strata, carry out ATM cell to the conversion work the IP message by upper layer device then, therefore ATM DSLAM equipment need not to know user side IP address and the default gateway ip address of ADSL modem, can finish the service for leased-line customers of IPOA pattern.
But in IP DSLAM pattern,, must know on IP DSLAM that therefore the user side IP address of ADSL modem and default gateway ip address just can finish described conversion work because IP DSLAM equipment must be finished ATM cell to the conversion work of IP message.
It is as follows to the flow path switch of IP message that IP DSLAM finishes ATM cell:
A, be that it distributes a unique ethernet mac address according to the user side IP address of ADSL modem;
B, according to default gateway ip address, use address resolution protocol, perhaps manual configuration is obtained the default gateway ethernet mac address of ADSLmodem;
C, when IP DSLAM receives the ATM cell that ADSL modem sends, extract IP message payload wherein, and after using described ethernet mac address and default gateway ethernet mac address to add the ethernet link layer encapsulation header, send to upstream plant by the IP up going port as IP message payload.Ethernet ip message encapsulation format schematic diagram, as shown in Figure 3.
At present, the collocation method that is adopted at IP DSLAM pattern is user side IP address and the default gateway ip address of manual configure ADSL modem on IP DSLAM equipment, supports the ADSLmodem of IPOA pattern.Obviously,, obtain the very inconvenience of its user side IP address because ADSL modem is dispersed in user side, and the user side IP address of manual configuration ADSL modem also easily configuration make mistakes.And then IPDSLAM equipment can't know when online the user is, even the not online ethernet mac address of this user's fixed configurations that also is necessary for of user causes the wasting of resources.
Summary of the invention
The invention provides a kind of method of dynamic assignment ethernet mac address, obtain the inconvenience of user side IP information, manual configuration user side IP information and the problem of distributing ethernet mac address to make mistakes easily in order to solve to exist in the prior art.Further solve IP DSLAM equipment and can't know when online the user is, can't the dynamic assignment ethernet mac address, cause the problem of the wasting of resources.
The inventive method comprises step: A, the default gateway ip address of configure user end on based on the digital subscriber line access and multiplexing device IPDSLAM of IP agreement;
B, IP DSLAM make up request message with described default gateway ip address as source IP address, and send to user side every certain time length according to the user profile of pre-configured user side;
After C, user side are received the described request message, carry the response message of this user side IP address to IP DSLAM transmission according to source IP address wherein;
D, IP DSLAM distribute ethernet mac address according to the IP address in the described response message for this user.
After described step D, also comprise step:, then be left the ethernet mac address that this user distributes if IP DSLAM continues the response message of receiving that this user side is sent; Otherwise, be recovered as the ethernet mac address that this user distributes.
Describedly continue to receive that the determination methods of response message is to be provided with one to judge duration in described IP DSLAM,, judge that then non-continuing receive if in described judgement duration, do not receive the response message that this user side is sent; Otherwise, judge to continue to receive.
Described step B sends the described request message according to the user profile that disposes on the IP DSLAM to user side.Described user profile is the channel information that the user sends cell.
Described user side is non-symmetrical figure local loop modulator-demodulator ADSL.
Described ADSL is the ADSL of bearer IP service IPOA on the asynchronous transmission network.
Beneficial effect of the present invention is as follows: the inventive method initiatively sends request message to user side by IP DSLAM, when reaching the standard grade, this user will receive the described request message, and send the back message using carry this user side IP address from trend IP DSLAM, IP DSLAM just can parse the IP address of user side from described back message using like this, thereby realizes obtaining automatically the also purpose of the IP address of configure user end.The inventive method sends a described request message every certain time length to user side, whether continue to respond according to user side and judge whether this user is online, if the user does not respond in the judgement duration that is provided with, then think this user off-line, IP DSLAM will be recovered as the Ethernet resource that this user distributes so, thereby realize the dynamic assignment ethernet mac address, reach the effect of saving the Ethernet resource.
Description of drawings
Fig. 1 inserts schematic diagram for the ADSL user under IP DSLAM pattern;
Fig. 2 inserts schematic diagram for the ADSL user under ATM DSLAM pattern;
Fig. 3 is an ethernet ip message encapsulation format schematic diagram;
Fig. 4 is the flow chart of steps of the inventive method.
Embodiment
In order to make IP DSLAM can obtain the also IP address of configure user end automatically; Whether real-time judge user is online, and according to judged result dynamic assignment ethernet mac address.The inventive method is obtained the also IP address of configure user end by the message interaction between IPDSLAM and the user side; And pass through IPDSLAM constantly to user side transmission message, judge and the dynamic assignment ethernet mac address according to the response condition of user side.The flow process of the inventive method as shown in Figure 4, its concrete implementation step is as follows:
At first, at the default gateway ip address of going up the configure user end based on the digital subscriber line access and multiplexing device (IP DSLAM) of IP agreement, and with the source IP address of this default gateway ip address as user side.
Secondly, IP DSLAM makes up request message with described default gateway ip address as source IP address, user side is known after receiving the described request message should whither be replied corresponding message.After the described request message made up and finishes, according to ADSL user profile pre-configured on IP DSLAM, for example: ADSL user sent the channel information of ATM cell, sent once to user side every certain time length.
Because IP DSLAM every certain time length to user side send a described request message, so when user off-line, this user side can not receive request message that IP DSLAM send, and can not make any response thereafter; And when the user reaches the standard grade, this user side will be received the request message that described IP DSLAM sends.After user side is received the described request message, from the described request message, resolve and obtain source IP address, and the automatic response message that carries this user side IP address that makes up, send described response message from the described source IP address of trend afterwards, just the IP address with this user side feeds back to the IP DSLAM that has disposed described user side default gateway ip address.
Afterwards, after IP DSLAM receives described response message, resolve described response message, and therefrom obtain the IP address of user side, realize obtaining automatically the purpose of user side IP address.IP DSLAM distributes ethernet mac address according to the user side IP address that obtains for this user; And the use address resolution protocol, on IPDSLAM, obtain and the corresponding default gateway ethernet mac address of default gateway ip address; After carrying out above-mentioned preparation, when IP DSLAM receives the ATM cell that ADSL modem sends, extract IP message payload wherein, and after using described ethernet mac address and default gateway ethernet mac address to add the ethernet link layer encapsulation header, send to upstream plant by the IP up going port as IP message payload; After the upstream plant processing, finish the consumer wideband access service.
At last, after finishing the consumer wideband access service, IP DSLAM still sends a described request message every certain time length to user side, and this user side all sends a bar response message to IP DSLAM after receiving the described request message at every turn.Be provided with one and judge duration in described IP DSLAM, this judges the interval duration of duration greater than described transmission request message, and it is used to judge whether continue the response message of receiving that this user side is sent.When this user is online, this user side is inevitable receives the request message that an IP DSLAM sends every certain time length, after described user side responds, IP DSLAM is inevitable to receive the response message that this user side is sent every certain time length, promptly continue to receive response message, IP DSLAM judges that this user is current online in view of the above, and is left the ethernet mac address that this user side distributes; When this user's off-line, this user will can not receive the request message that IP DSLAM sends, also just can not respond, IP DSLAM will can not receive the response message that this user sends so, if IP DSLAM does not receive the response message that this user sends in described judgement duration, promptly do not continue to receive response message, then IP DSLAM judges this user off-line in view of the above, and is recovered as the ethernet mac address that this user distributes.
So just avoided each user that is necessary for that prior art adopted to distribute a fixing ethernet mac address, when not using the Ethernet resource, this user also can't reclaim the too shortcoming of net resource, realized whether the real-time judge user is online, and, reach the effect of saving the Ethernet resource according to the current whether online dynamic assignment ethernet mac address that comes of user.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.