CN106302853A - A kind of method carrying out network configuration and terminal thereof - Google Patents

A kind of method carrying out network configuration and terminal thereof Download PDF

Info

Publication number
CN106302853A
CN106302853A CN201610657935.6A CN201610657935A CN106302853A CN 106302853 A CN106302853 A CN 106302853A CN 201610657935 A CN201610657935 A CN 201610657935A CN 106302853 A CN106302853 A CN 106302853A
Authority
CN
China
Prior art keywords
address
terminal
configuration information
server
message
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
CN201610657935.6A
Other languages
Chinese (zh)
Other versions
CN106302853B (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.)
Hisense Broadband Multimedia Technology Co Ltd
Original Assignee
Hisense Broadband Multimedia Technology Co Ltd
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 Hisense Broadband Multimedia Technology Co Ltd filed Critical Hisense Broadband Multimedia Technology Co Ltd
Priority to CN201610657935.6A priority Critical patent/CN106302853B/en
Publication of CN106302853A publication Critical patent/CN106302853A/en
Application granted granted Critical
Publication of CN106302853B publication Critical patent/CN106302853B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The present invention relates to wireless communication technology field, particularly to a kind of method carrying out network configuration and terminal thereof, in order to solve current terminal when carrying out network configuration every time, it is required to obtain IP address from server, carries out the time of network configuration needs longer problem.Embodiment of the present invention terminal obtains the configuration information that locally stored IP address is corresponding with IP address;Terminal determines when IP address is effective, uses the IP address configuration information corresponding with IP address to carry out network configuration, wherein IP address be server-assignment, terminal the last time carry out the IP address of use during network configuration;Owing to the embodiment of the present invention is when locally stored IP address is effective, terminal directly uses locally stored IP address to carry out network configuration, need not reacquire IP address from server, thus decrease between server mutual, save terminal and carry out the time needed for network configuration.

Description

A kind of method carrying out network configuration and terminal thereof
Technical field
The present invention relates to wireless communication technology field, particularly to a kind of method carrying out network configuration and terminal thereof.
Background technology
Along with the development of information technology, human society comes into digitized, information age, and intelligent terminal has come into People live.Intelligent terminal is when carrying out network configuration at present, mostly uses DHCP (Dynamic Host Configuration Protocol, DHCP) mode dynamically obtain IP from server (Internet Protocol, between network The agreement of interconnection) address, and carry out network configuration according to the IP address got.At present, terminal uses method as shown in Figure 1 Carry out network configuration:
Step 101, starting up of terminal start;
Step 102, the mode of employing DHCP dynamically obtain IP address from server;
Whether step 103, terminal judges get IP address, if so, perform step 104, if it is not, perform step 102;
Step 104, terminal carry out network configuration according to the IP address got.
Prior art is when using DHCP dynamically to obtain IP, it is not necessary to user determines the IP address of setting, it is not required that use Family manually arranges IP.But using DHCP dynamically to obtain the mode of IP, when terminal needs to carry out network configuration every time, terminal is all To send request to server, to obtain IP address, in the case of network environment is good, terminal obtains IP address from server Process at least needs the time of 2-3s, if network environment is the best, the process that terminal obtains IP address from server will need longer Time, extreme influence terminal carries out the speed of network configuration.
In sum, current terminal, when carrying out network configuration every time, is required to obtain IP address from server, carries out net The time that network configuration needs is longer.
Summary of the invention
The present invention provides a kind of method carrying out network configuration and terminal thereof, is carrying out net in order to solve current terminal every time During network configuration, it is required to obtain IP address from server, carries out the time of network configuration needs longer problem.
Based on the problems referred to above, the embodiment of the present invention provides a kind of method carrying out network configuration, including:
Terminal obtains the configuration information that between locally stored network, the Protocol IP address of interconnection is corresponding with described IP address;
Described terminal determines when described IP address is effective, uses the configuration information that described IP address is corresponding with described IP address Carrying out network configuration, wherein said IP address is terminal the last time server-assignment, described to carry out use during network configuration IP address;
Described terminal determines when described IP address is invalid, obtains IP address and the IP ground of distribution of distribution from described server The configuration information that location is corresponding;IP address according to the described distribution configuration information corresponding with the IP address of described distribution carries out network Configuration, and update the configuration information that locally stored IP address is corresponding with described IP address.
Owing to the embodiment of the present invention is when carrying out network configuration, obtain locally stored join corresponding with IP address of IP address Confidence ceases, and when determining that locally stored IP address is effective, terminal uses the configuration letter of locally stored IP address and correspondence thereof Breath carries out network configuration;When locally stored IP address is invalid, reacquire IP address and the configuration of correspondence thereof from server Information, and update locally stored IP address and configuration information thereof.When locally stored IP address is effective, terminal directly uses Locally stored IP address carries out network configuration, it is not necessary to reacquires IP address from server, thus decreases and server Between mutual, save terminal and carry out the time needed for network configuration.
On the other hand, the embodiment of the present invention also provides for a kind of terminal, including:
Acquisition module, for obtaining the configuration information that locally stored IP address is corresponding with described IP address;
Processing module, is used for determining when described IP address is effective, uses described IP address and corresponding the joining in described IP address Confidence breath carries out network configuration, and wherein said IP address is terminal the last time server-assignment, described to carry out network configuration Time use IP address;
Described processing module, is additionally operable to determine when described IP address is invalid, obtains the IP address of distribution from described server The configuration information corresponding with the IP address of distribution;The configuration that IP address according to described distribution is corresponding with the IP address of described distribution Information carries out network configuration, and updates the configuration information that locally stored IP address is corresponding with described IP address.
Accompanying drawing explanation
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, in embodiment being described below required for make Accompanying drawing briefly introduce, it should be apparent that, below describe in accompanying drawing be only some embodiments of the present invention, for this From the point of view of the those of ordinary skill in field, on the premise of not paying creative work, it is also possible to obtain it according to these accompanying drawings His accompanying drawing.
Fig. 1 is the method flow diagram carrying out network configuration in background technology;
Fig. 2 is the method flow diagram that the embodiment of the present invention carries out network configuration;
Fig. 3 be the locally stored IP address of the embodiment of the present invention invalid time carry out the method flow diagram of network configuration;
Fig. 4 is the overall flow figure that the embodiment of the present invention carries out the method for network configuration;
Fig. 5 is the overall flow figure that specific embodiment of the invention Set Top Box carries out the method for network configuration;
Fig. 6 is the structural representation of embodiment of the present invention terminal.
Detailed description of the invention
Embodiment of the present invention terminal obtains the configuration information that locally stored IP address is corresponding with described IP address;Described end End determines when described IP address is effective, and the configuration information using described IP address corresponding with described IP address carries out network configuration, Wherein said IP address is IP address terminal the last time server-assignment, described carrying out use during network configuration;Described Terminal determines when described IP address is invalid, obtains, from described server, the configuration that the IP address distributed is corresponding with the IP address of distribution Information;IP address according to the described distribution configuration information corresponding with the IP address of described distribution carries out network configuration, and updates The configuration information that locally stored IP address is corresponding with described IP address.
Owing to the embodiment of the present invention is when carrying out network configuration, obtain locally stored join corresponding with IP address of IP address Confidence ceases, and when determining that locally stored IP address is effective, terminal uses the configuration letter of locally stored IP address and correspondence thereof Breath carries out network configuration;When locally stored IP address is invalid, reacquire IP address and the configuration of correspondence thereof from server Information, and update locally stored IP address and configuration information thereof.When locally stored IP address is effective, terminal directly uses Locally stored IP address carries out network configuration, it is not necessary to reacquires IP address from server, thus decreases and server Between mutual, save terminal and carry out the time needed for network configuration.
In order to make the purpose of the application, technical scheme and advantage clearer, below in conjunction with accompanying drawing the application made into One step ground describes in detail, it is clear that described embodiment is only the application some embodiments rather than whole enforcement Example.Based on the embodiment in the application, those of ordinary skill in the art are obtained under not making creative work premise All other embodiments, broadly fall into the scope of the application protection.
As in figure 2 it is shown, a kind of method carrying out network configuration of the embodiment of the present invention, including:
Step 201, terminal obtain the configuration information that locally stored IP address is corresponding with described IP address;
Step 202, described terminal determine when described IP address is effective, use described IP address corresponding with described IP address Configuration information carries out network configuration, and wherein said IP address is terminal the last time server-assignment, described to carry out network to join The IP address used when putting;
Step 203, described terminal determine when described IP address is invalid, obtain the IP address of distribution from described server and divide The configuration information that the IP address joined is corresponding;The configuration information that IP address according to described distribution is corresponding with the IP address of described distribution Carry out network configuration, and update the configuration information that locally stored IP address is corresponding with described IP address.
Configuration information corresponding to embodiment of the present invention IP address includes but not limited to:
Gateway, mask, DNS (Domain Name System, domain name system), IP effective life.
It should be noted that the IP address of terminal local storage in the embodiment of the present invention, and this corresponding joining in IP address Confidence ceases, for server-assignment to terminal.And server-assignment is effective property to the IP address of terminal, it is allowed to terminal This IP address is used in effective life.
It addition, the server of the embodiment of the present invention is the server being responsible for distribution IP address.
Optionally, configuration information corresponding to the IP address obtained from server, this IP address is preserved by the embodiment of the present invention In the flash (flash memory) of terminal.
It should be noted that the embodiment of the present invention is when carrying out network configuration, it is by the IP address got and correspondence thereof Configuration information be arranged in network protocol stack internal memory, the most i.e. represent terminal network configured.
The embodiment of the present invention, when carrying out network configuration, obtains locally stored IP address and IP address pair from flash The configuration information answered, owing to the IP address that server is terminal distribution has ageing, therefore, terminal is locally stored in use Before the configuration information of IP address and correspondence thereof carries out network configuration, need to judge that locally stored IP address is the most effective.
Optionally, according to following manner, the terminal of the embodiment of the present invention judges that the IP address obtained from this locality is the most effective:
If in described terminal determines the IP effective life that current time comprises in described configuration information, and determining Described IP address is free IP addresses, and the most described terminal determines that described IP address is effective;Otherwise, described terminal determines described IP ground Location is invalid.
Owing to the embodiment of the present invention is before using locally stored IP address to carry out network configuration, need to judge that this locality is deposited Whether the IP address of storage is effective, and determining that current time, in IP effective life, and determines that described IP address is for sky During not busy IP address, determine that locally stored IP address is effective, it is to avoid terminal uses invalid IP address to cause configuration network conflict, Thus ensure that terminal carries out network configuration accurately.
As can be seen here, the terminal of the embodiment of the present invention determine meet following two condition time, it is judged that IP address is effective:
In condition one, terminal determine the IP effective life that current time comprises in configuration information.
Wherein, the IP effective life comprised in configuration information can be the time period, and the starting point of this time period is terminal Get the moment of this IP address from server, the terminal of this time period is that server allows terminal to use the cut-off of this IP address The release moment in moment, i.e. this IP address.Such as, the moment that terminal gets IP address from server is 01:00 on August 1: 00, and server is when distributing to this IP address of terminal, determines that the release moment of this IP address is 01:00:00 on August 4, then The IP effective life comprised in the configuration information that this IP address is corresponding, is limited to 01:00:00 on August 1~01:00:00 on August 4.
Or, the IP effective life comprised in configuration information can also is that the release moment of IP address.On this IP ground After the release moment of location arrives, terminal can not be continuing with this IP address, needs to discharge this IP address.
Wherein, the release moment of IP address can determine mode to use following two kinds:
1, terminal is according to getting moment of IP address, and server this IP ground of notice terminal when distributing IP address The permission use duration that location is corresponding, determines the release moment that this IP address is corresponding, and is had as IP in the IP the determined release moment Effect useful life.
Such as, it is 01:00:00 on August 1 that terminal receives server by the moment distributing to the IP address of terminal, and, Server, when IP address is distributed to terminal, will allow terminal to use the duration (the permission duration that IP address is corresponding) 3 of this IP My god (259200s) be sent to terminal, terminal is according to receiving the 01:00:00 on August 1 moment of IP address, corresponding with this IP address Permission use duration 259200s, determine that release moment corresponding to this IP address is 01:00:00 on August 4.
2, during terminal to server request dynamic distribution IP address, at server by configuration corresponding with IP address for IP address When information is sent to terminal, the release moment of IP address is left in configuration information sends jointly to terminal.
Such as, when the configuration information of the IP address and correspondence thereof of distributing to terminal is sent to terminal by server, service 01:00:00 existence on August 4 release moment corresponding for this IP address is sent to terminal in configuration information by device.
Condition two, terminal determine that IP address is free IP addresses.
The embodiment of the present invention is when getting locally stored IP address, in order to avoid this IP address is made by other-end With, IP conflict when causing network configuration.
Optionally, the embodiment of the present invention uses following manner to judge whether IP address is free IP addresses:
Described terminal with the form transmission inquiry message of broadcast, comprises institute in local network in wherein said inquiry message State MAC (Media Access Control, the media interviews control) address of IP address and described terminal, be used for inquiring described Whether there is, in ground network, the other-end using described IP address;If described terminal is not received by other in setting duration The confirmation message that the described IP of expression that terminal returns is used, it is determined that described IP address is free IP addresses;Otherwise, it determines institute Stating IP address is not free IP addresses.
Wherein, the inquiry message that terminal sends can be ARP (Address Resolution Protocol, address resolution Agreement) message.
Concrete, terminal with the form transmission ARP message of broadcast, wherein comprises terminal in ARP message in local network Need the IP address judged, and the MAC Address of this terminal.Other-end in local network, after receiving ARP message, is sentenced Whether the disconnected IP address self used is the IP address comprised in ARP message, uses this IP address if existing in other-end Terminal, then use the terminal of the MAC Address that the terminal of this IP address comprises in ARP message to send confirmation message, wherein confirm Message comprises the MAC Address of the terminal using this IP address.
If the confirmation message that the other-end that terminal is in receiving other local networks sends, determine this IP address Used, it is determined that this IP address is not free IP addresses.
If terminal is not received by the confirmation message that other-end in local network sends setting in duration, then terminal is true This IP address fixed is free IP addresses.The optional duration that sets can be 10s.
It should be noted that terminal is when determining that this IP address meets above-mentioned two condition simultaneously, determine that this IP address has , in above-mentioned two condition, there is ungratified condition, it is determined that this IP address is invalid in effect.
Owing to the embodiment of the present invention is when determining that locally stored IP address is effective, directly obtains IP address from this locality and be somebody's turn to do The configuration information that IP address is corresponding, and the configuration information using the IP address got from this locality corresponding with IP address carries out network Configuration.The following detailed description of terminal when determining that the IP address obtained from this locality is invalid, terminal carries out the method for network configuration.
Concrete, described terminal determines when described IP address is invalid, obtains the IP address of distribution from described server and divides The configuration information that the IP address joined is corresponding;The configuration information that IP address according to described distribution is corresponding with the IP address of described distribution Carry out network configuration, and update the configuration information that locally stored IP address is corresponding with described IP address.
Optionally, corresponding with the IP address of described distribution in the IP address according to described distribution configuration information carries out network Before configuration, described terminal determines that the IP address of described distribution is free IP addresses.
Owing to embodiment of the present invention terminal is after the configuration information obtaining IP address and correspondence thereof from server, terminal needs Judge that the IP address got is free IP addresses, it is to avoid local network exists the other-end using this IP address, causes Network conflict, thus ensures that terminal carries out network configuration accurately.
Wherein, terminal determines that the method that IP address is free IP addresses of distribution is adopted with the aforedescribed process, the most detailed at this Carefully repeat.
As it is shown on figure 3, when locally stored IP address is invalid, the embodiment of the present invention carries out network according to the following step and joins Put:
Step 301, terminal to server send the first message, for server request dynamic IP address allocation and distribution Configuration information corresponding to IP address;
Step 302, server choose the IP address distributing to terminal from corresponding idle IP pond;
Configuration information corresponding to the IP address and IP address of distributing to terminal is sent to terminal by step 303, server;
Whether the IP address that step 304, terminal judges receive is free IP addresses, if so, performs step 305, if it is not, Perform step 301;
Step 305, terminal are carried out according to the configuration information that the IP address of described distribution is corresponding with the IP address of described distribution Network configuration, and the configuration information that the IP address that preserves described distribution is corresponding with the IP address of described distribution.
In enforcement, if the server being responsible for terminal distribution IP address has multiple, terminal distributes IP at request server During address, terminal sends the first message with the form of broadcast, and wherein this first message can be discover (discovery) message;Many Individual server is after receiving the first message that terminal sends, and each server all can select in corresponding idle IP pond can To distribute to the IP of terminal, and the configuration information of the IP address chosen and correspondence thereof is sent jointly to terminal;Terminal receives one The IP address of individual server transmission and the configuration information of correspondence thereof, concrete, terminal receives the IP ground of the server sent at first Location and the configuration information of correspondence thereof.Terminal is after the configuration information of the IP address and correspondence thereof that receive server-assignment, to dividing The server of dispensing IP address of terminal sends request (request) message, notifies that described server terminal uses this service The IP address of device distribution.
It should be noted that the terminal of the embodiment of the present invention is according to the IP address received, and this IP address is corresponding It is identical with the method for prior art that configuration information carries out the method for network configuration, and in this not go into detail.
It addition, terminal is when carrying out network configuration, if obtaining locally stored IP address, and the IP address pair of storage During the configuration information answered, determine the local configuration information not storing IP address and correspondence thereof, then terminal uses and obtains from server Take the mode of configuration information corresponding to the IP address of distribution and this IP address.
Owing to embodiment of the present invention terminal is after server gets the configuration information of IP address and correspondence thereof, by this IP ground IP effective life corresponding to location leaves in the configuration information that IP address is corresponding, and terminal is effective according to the IP in configuration information Useful life determines the IP release moment that this IP address is corresponding, after this IP release moment arrives, and this IP ground that terminal uses Location will discharge, and this terminal can not be continuing with this IP address.Based on this problem, the terminal of the embodiment of the present invention can be to service Device request is delayed IP corresponding to this IP address and is discharged the moment, i.e. extends the IP effective life that this IP address is corresponding.
Optionally, the IP effective life that embodiment of the present invention employing following manner prolongation IP address is corresponding:
Described terminal sends the second message to described server, and wherein said second message is used for asking to extend described IP to be had Effect useful life;After described terminal receives the response message representing permission prolongation that described server returns, described terminal root According to the up-to-date IP effective life comprised in described response message, update the IP effective life comprised in described configuration information Limit.
Wherein, the second message that terminal to server sends can be request message, and, the second of terminal transmission Message includes following two kinds of forms:
1, second message comprises the time limit of terminal request;
2, second message does not comprise the time limit of terminal request.
For the second message of the multi-form that terminal sends, server determines the response report of return according to following manner Literary composition:
Optionally, if described second message comprises the time limit of terminal request, the response message that the most described terminal receives In the up-to-date IP effective life that comprises be limited to time limit of described terminal request;If described second message does not comprise terminal request Time limit, in the response message that the most described terminal receives, the up-to-date IP effective life that comprises, is limited to the time limit preset.
In enforcement, the time limit of the terminal request comprised in the second message can be duration or moment, specifically chosen duration Or the moment is to determine according to the IP effective life in configuration information.
Concrete, when IP effective life is limited to the time period, then the second message that terminal to server sends comprises Time limit of request be also the time period.Such as, the IP effective life comprised in the configuration information that IP address is corresponding, is limited to August During 01:00:00 on the 1st~01:00:00 on the 4th in August, if terminal needs to extend this IP effective life, then terminal to server is sent out The time limit of the request comprised in the second message sent can be 8 months 1 day 01:00:00~01:00:00 on August 6.
When IP effective life is limited to the release moment of IP address, then the second message that terminal to server sends wraps The time limit of the request contained is also for the moment.Such as, the IP effective life comprised in the configuration information that IP address is corresponding, is limited to August During 01:00:00 on the 4th, if terminal needs to extend this IP effective life, then the second message that terminal to server sends wraps The time limit of the request contained can be 8 months 6 days 01:00:00.
Do not comprise time limit of terminal request in the second message that terminal to server sends, then server is according to default Time limit, by allow terminal extend duration be sent to terminal, server using the default time limit as up-to-date IP effective life It is added in response message.
Concrete, when server is set in advance in the second message that terminal sends the time limit not comprising request, server Allowing terminal to use the duration that the renewal of this IP address is fixed, such as fixing duration can be 2 days every time.Server is connecing After receiving second message in the time limit not comprising request, IP effective life corresponding to IP address used according to terminal, with And according to the fixing duration extended every time, determine up-to-date IP effective life.
Such as, IP effective life corresponding to IP address that terminal uses, is limited to 01:00:00 on August 1~4 days 01 August: 00:00, after server receives second message in the time limit not comprising request that terminal sends, server is according to presetting The duration 2 days of fixing prolongation, determine that up-to-date IP effective life corresponding to this IP address is limited to 01:00:00 on August 1~8 Moon 01:00:00 on the 6th.
It should be noted that the embodiment of the present invention sends the second message at time point set in advance to server, wherein The time preset can be one or more, and time point set in advance is not later than the IP corresponding to IP address of terminal use Effectively use duration.
It addition, the terminal of the embodiment of the present invention is after receiving the response message representing permission prolongation that server returns, The IP effective life of terminal local storage is updated according to up-to-date IP effective life.
As shown in Figure 4, embodiment of the present invention terminal carries out the overall flow figure of the method for network configuration, including:
Step 401, terminal obtain the configuration information that locally stored IP address is corresponding with described IP address;
In the IP effective life whether step 402, terminal judges current time comprise in configuration information, if so, Perform step 403, if it is not, perform step 405;
Whether IP address described in step 403, terminal judges is free IP addresses, if so, performs step 404, if it is not, perform Step 405;
The configuration information that step 404, terminal use described IP address corresponding with described IP address carries out network configuration;
Step 405, terminal obtain, from server, the configuration information that the IP address distributed is corresponding with the IP address of distribution;
Step 406, terminal are carried out according to the configuration information that the IP address of described distribution is corresponding with the IP address of described distribution Network configuration, and update the configuration information that locally stored IP address is corresponding with described IP address;
Step 407, described terminal send the second message to described server, and wherein said second message is used for asking to extend Described IP effective life;
After step 408, terminal receive the response message representing permission prolongation that described server returns, described terminal root According to the up-to-date IP effective life comprised in described response message, update the IP effective life comprised in described configuration information Limit.
The method carrying out network configuration provided according to embodiments of the present invention, says with a specific embodiment below Bright.Terminal in this specific embodiment is Set Top Box, and server is Dynamic Host Configuration Protocol server.
Set Top Box in the specific embodiment of the invention, after each starting up, is required to carry out network configuration access network Network.
As it is shown in figure 5, the method that Set Top Box carries out network configuration includes:
Step 501, set-top-box opening start;
Step 502, Set Top Box obtain the configuration information that locally stored IP address is corresponding with described IP address;
Wherein, configuration information corresponding to Set Top Box is locally stored IP address includes but not limited to:
Gateway, mask, DNS, release time (release time).
Wherein release time is server fixing duration set in advance, and its unit is the second (s).
The configuration information that IP address locally stored in the specific embodiment of the invention is corresponding with described IP address, is stored in machine In the flash (flash memory) of top box.
Concrete, that Set Top Box is locally stored IP address, and configuration information corresponding to IP address be that Dynamic Host Configuration Protocol server divides Dispensing Set Top Box, and Set Top Box the last time carry out the IP address that network configuration is used.
Step 503, Set Top Box judge that current time, whether in IP effective life, if so, performs step 504, if No, perform step 506;
In the specific embodiment of the invention IP effective life be according to Set Top Box when server receives IP address Carve, and the release time that comprises in configuration information corresponding to IP address determines.
Such as, the moment that Set Top Box gets IP address from server is 01:00:00 on August 1, and this IP address pair The release time comprised in the configuration information answered is 259200s (3 days), it is determined that the IP effective life of this IP address For 01:00:00 on August 1~01:00:00 on August 4.If it is 12:00 on August 3 that Set Top Box currently carries out the moment of network configuration: 00, it is determined that current time is in the IP effective life that this IP address is corresponding;If Set Top Box currently carries out network configuration Moment is 12:00:00 on August 4, it is determined that current time is not in the IP effective life that this IP address is corresponding.
Step 504, Set Top Box judge whether described IP address is free IP addresses, if so, perform step 505, if it is not, hold Row step 506;
Optionally, the specific embodiment of the invention uses following manner to judge whether IP address is free IP addresses:
Described Set Top Box with the form transmission ARP message of broadcast, comprises institute in wherein said ARP message in local network State IP address and the MAC Address of described Set Top Box, whether exist in inquiring described local network and use described IP address Other Set Top Boxes;Other Set Top Boxes in local network are after receiving ARP message, it is judged that whether the IP address self used is The IP address comprised in ARP message, if there is the Set Top Box using this IP address in other Set Top Boxes, then uses this IP address The Set Top Box of the MAC Address that Set Top Box comprises in ARP message sends confirmation message, wherein comprises this IP of use in confirmation message The MAC Address of the Set Top Box of address.
If described Set Top Box is not received by what the described IP of expression that other Set Top Boxes return was used setting in duration Confirmation message, it is determined that described IP address is free IP addresses;Otherwise, it determines described IP address is not free IP addresses.Optional Setting duration can be 10s.
The configuration information that step 505, Set Top Box use described IP address corresponding with described IP address carries out network configuration;
It should be noted that Set Top Box carries out the side of network configuration according to the configuration information of the IP address determined and correspondence thereof Method uses the method for prior art, be not described in detail.
Step 506, Set Top Box obtain, from server, the configuration information that the IP address distributed is corresponding with the IP address of distribution;
Concrete, Set Top Box sends discover message to Dynamic Host Configuration Protocol server, and request Dynamic Host Configuration Protocol server is that Set Top Box is dynamic Distribution IP address, and the configuration information corresponding to IP address of distribution.
Step 507, Set Top Box enter according to the configuration information that the IP address of described distribution is corresponding with the IP address of described distribution Row network configuration, and update the configuration information that locally stored IP address is corresponding with described IP address;
Set Top Box receives the IP address of Dynamic Host Configuration Protocol server distribution, and the configuration information corresponding to IP address of distribution, and will IP address that Set Top Box is locally stored and the configuration information update of correspondence thereof are joining of this IP address got and correspondence thereof Confidence ceases.
Concrete, the method that Set Top Box carries out network configuration according to the configuration information of the IP address determined and correspondence thereof uses The method of prior art, be not described in detail at this.
In enforcement, the local network residing for Set Top Box includes multiple Dynamic Host Configuration Protocol server, and Set Top Box unclear many The particular location of individual Dynamic Host Configuration Protocol server, therefore, Set Top Box request distribution IP address time, with broadcast form in local network Send discover message, and carry option60 field;Multiple Dynamic Host Configuration Protocol server are receiving what Set Top Box sent After discover message, judge whether to need to distribute IP address to Set Top Box according to option60 field, if option60 word Carry character string in Duan and from corresponding IP pond, choose free IP addresses with Dynamic Host Configuration Protocol server coupling then this server, and will choose The IP address gone out, and configuration information corresponding to this IP address be sent to Set Top Box;Set Top Box selects first to receive IP ground Location and the configuration information of correspondence thereof, distribute to IP address and the configuration information of correspondence thereof of Set Top Box as Dynamic Host Configuration Protocol server.
Step 508, Set Top Box send the second message to Dynamic Host Configuration Protocol server, and wherein said second message is used for asking to extend institute State IP effective life;
Wherein, the second message is request message.
Owing to the locally stored IP address of Set Top Box in the specific embodiment of the invention is to there being IP effective life, if machine Top box use locally stored IP address carry out network configuration time be engraved in the IP effective life of its correspondence, then Set Top Box This IP address can be used, if Set Top Box uses locally stored IP address to carry out the moment of network configuration not at the IP of its correspondence In effective life, then Set Top Box cannot be continuing with this IP address, needs to reacquire IP address from Dynamic Host Configuration Protocol server. Therefore, Set Top Box is continuing with locally stored IP address for convenience, determines at Set Top Box and is continuing with locally stored IP During address, Dynamic Host Configuration Protocol server allows Set Top Box to send request to server, and request extends IP effective life.
After step 509, Set Top Box receive the response message representing permission prolongation that Dynamic Host Configuration Protocol server returns, described machine top Box, according to the up-to-date IP effective life comprised in described response message, updates the IP comprised in described configuration information and effectively makes Use the time limit.
Concrete, Set Top Box sends request message at default time point to Dynamic Host Configuration Protocol server, Dynamic Host Configuration Protocol server according to Receive the moment of request message, and release time set in advance, determine the up-to-date IP that this IP address is corresponding Effectively using duration, the up-to-date IP determined effectively is used duration to be added in response message by Dynamic Host Configuration Protocol server.Set Top Box exists After receiving response message, according to the up-to-date IP effective life comprised in response message, update Set Top Box locally stored IP effective life.
Based on same inventive concept, the embodiment of the present invention additionally provides a kind of terminal, owing to this terminal solves problem The method that principle carries out network configuration to the embodiment of the present invention is similar, and therefore the enforcement of this terminal may refer to the enforcement of method, Repeat no more in place of repetition.
As shown in Figure 6, embodiment of the present invention one terminal, including:
Acquisition module 601, for obtaining the configuration information that locally stored IP address is corresponding with described IP address;
Processing module 602, is used for determining when described IP address is effective, uses described IP address corresponding with described IP address Configuration information carries out network configuration, and wherein said IP address is terminal the last time server-assignment, described to carry out network to join The IP address used when putting;
Described processing module 602, is additionally operable to determine when described IP address is invalid, obtains the IP ground of distribution from described server The configuration information that location is corresponding with the IP address of distribution;Corresponding the joining in IP address of the IP address according to described distribution and described distribution Confidence breath carries out network configuration, and updates the configuration information that locally stored IP address is corresponding with described IP address.
Optionally, described processing module 602, specifically for:
Judge that described IP address is the most effective according to following manner:
If it is determined that in the IP effective life that comprises in described configuration information of current time, and determine described IP ground Location is free IP addresses, it is determined that described IP address is effective;Otherwise, it determines described IP address is invalid.
Optionally, described processing module 602, it is additionally operable to:
The IP address determining described distribution is free IP addresses.
Optionally, described processing module 602, specifically for:
Judge whether described IP address is free IP addresses according to following manner:
In local network, the form with broadcast sends inquiry message, comprises described IP address in wherein said inquiry message With the MAC Address of described terminal, whether there is, in inquiring described local network, the other-end using described IP address;If The confirmation message that the described IP of expression of other-end return is used it is not received by, it is determined that described IP ground in setting duration Location is free IP addresses;Otherwise, it determines described IP address is not free IP addresses.
Optionally, described processing module 602, it is additionally operable to:
Sending the second message to described server, wherein said second message is used for asking to extend described IP effective life Limit;After receiving the response message representing permission prolongation that described server returns, comprise according in described response message New IP effective life, updates the IP effective life comprised in described configuration information.
Optionally, described processing module 602, specifically for:
If comprising the time limit of terminal request in described second message, then the up-to-date IP comprised in the response message received has Effect useful life is the time limit of described terminal request;If described second message does not comprise the time limit of terminal request, then receive The up-to-date IP effective life comprised in response message, is limited to the time limit preset.
Above by reference to the method illustrated according to the embodiment of the present application, device (system) and/or the frame of computer program Figure and/or flow chart describe the application.Should be understood that and can realize block diagram and/or flow process diagram by computer program instructions One block of figure and the combination of the block of block diagram and/or flowchart illustration.Can be supplied to lead to by these computer program instructions By computer, the processor of special-purpose computer and/or other programmable data processing means, to produce machine so that via meter The instruction that calculation machine processor and/or other programmable data processing means perform creates and is used for realizing block diagram and/or flow chart block The method of the function/action specified by.
Correspondingly, it is also possible to implement the application with hardware and/or software (including firmware, resident software, microcode etc.).More Further, the application can take computer to use or the shape of computer program on computer-readable recording medium Formula, it has the computer realized in media as well and can use or computer readable program code, to be made by instruction execution system With or combined command perform system and use.In the present context, computer can use or computer-readable medium is permissible Being arbitrary medium, it can comprise, stores, communicates, transmit or transmission program, to be made by instruction execution system, device or equipment With, or combined command execution system, device or equipment use.
Obviously, those skilled in the art can carry out various change and the modification essence without deviating from the present invention to the present invention God and scope.So, if these amendments of the present invention and modification belong to the scope of the claims in the present invention and equivalent technologies thereof Within, then the present invention is also intended to comprise these change and modification.

Claims (10)

1. the method carrying out network configuration, it is characterised in that the method includes:
Terminal obtains the configuration information that between locally stored network, the Protocol IP address of interconnection is corresponding with described IP address;
Described terminal determines when described IP address is effective, and the configuration information using described IP address corresponding with described IP address is carried out Network configuration, wherein said IP address is terminal the last time server-assignment, described to carry out the IP of use during network configuration Address;
Described terminal determines when described IP address is invalid, obtains IP address and the IP address pair of distribution of distribution from described server The configuration information answered;IP address according to the described distribution configuration information corresponding with the IP address of described distribution carries out network and joins Put, and update the configuration information that locally stored IP address is corresponding with described IP address.
2. the method for claim 1, it is characterised in that whether described terminal judges described IP address according to following manner Effective:
If in described terminal determines the IP effective life that current time comprises in described configuration information, and determine described IP address is free IP addresses, and the most described terminal determines that described IP address is effective;Otherwise, described terminal determine described IP address without Effect.
3. the method for claim 1, it is characterised in that described terminal is according to the IP address of described distribution and described distribution Configuration information corresponding to IP address carry out network configuration before, also include:
Described terminal determines that the IP address of described distribution is free IP addresses.
4. method as claimed in claim 2 or claim 3, it is characterised in that described terminal judges described IP address according to following manner Whether it is free IP addresses:
Described terminal with the form transmission inquiry message of broadcast, comprises described IP in local network in wherein said inquiry message Whether address and the MAC Address of described terminal, exist other ends using described IP address in inquiring described local network End;
If described terminal is not received by the confirmation message that the described IP of expression of other-end return is used in setting duration, Then determine that described IP address is free IP addresses;Otherwise, it determines described IP address is not free IP addresses.
5. the method as described in claims 1 to 3 is arbitrary, it is characterised in that after described terminal carries out network configuration, also wrap Include:
Described terminal sends the second message to described server, and wherein said second message is used for asking to extend described IP effectively to be made Use the time limit;
After described terminal receives the response message representing permission prolongation that described server returns, described terminal is answered according to described Answer the up-to-date IP effective life comprised in message, update the IP effective life comprised in described configuration information.
6. method as claimed in claim 5, it is characterised in that it is effective that described terminal updates the IP comprised in described configuration information Useful life, specifically includes:
If comprising the time limit of terminal request in described second message, comprise in the response message that the most described terminal receives is up-to-date IP effective life, is limited to the time limit of described terminal request;
If not comprising the time limit of terminal request in described second message, comprise in the response message that the most described terminal receives is up-to-date IP effective life, is limited to the time limit preset.
7. a terminal, it is characterised in that including:
Acquisition module, for obtaining the configuration information that locally stored IP address is corresponding with described IP address;
Processing module, is used for determining when described IP address is effective, uses the configuration letter that described IP address is corresponding with described IP address Breath carries out network configuration, and wherein said IP address is to carry out terminal the last time server-assignment, described making during network configuration IP address;
Described processing module, is additionally operable to determine when described IP address is invalid, obtains the IP address of distribution from described server and divides The configuration information that the IP address joined is corresponding;The configuration information that IP address according to described distribution is corresponding with the IP address of described distribution Carry out network configuration, and update the configuration information that locally stored IP address is corresponding with described IP address.
8. terminal as claimed in claim 7, it is characterised in that described processing module, specifically for:
Judge that described IP address is the most effective according to following manner:
If it is determined that in the IP effective life that comprises in described configuration information of current time, and determine that described IP address is Free IP addresses, it is determined that described IP address is effective;Otherwise, it determines described IP address is invalid.
9. terminal as claimed in claim 8, it is characterised in that described processing module, specifically for:
Judge whether described IP address is free IP addresses according to following manner:
In local network, the form with broadcast sends inquiry message, comprises described IP address and institute in wherein said inquiry message State the MAC Address of terminal, whether there is, in inquiring described local network, the other-end using described IP address;If setting The confirmation message that the described IP of expression of other-end return is used it is not received by, it is determined that described IP address is in timing is long Free IP addresses;Otherwise, it determines described IP address is not free IP addresses.
10. the terminal as described in as arbitrary in claim 7~9, it is characterised in that described processing module, is additionally operable to:
Sending the second message to described server, wherein said second message is used for asking to extend described IP effective life; After receiving the response message representing permission prolongation that described server returns, according to the up-to-date IP comprised in described response message Effective life, updates the IP effective life comprised in described configuration information.
CN201610657935.6A 2016-08-11 2016-08-11 A kind of method and its terminal carrying out network configuration Active CN106302853B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610657935.6A CN106302853B (en) 2016-08-11 2016-08-11 A kind of method and its terminal carrying out network configuration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610657935.6A CN106302853B (en) 2016-08-11 2016-08-11 A kind of method and its terminal carrying out network configuration

Publications (2)

Publication Number Publication Date
CN106302853A true CN106302853A (en) 2017-01-04
CN106302853B CN106302853B (en) 2019-09-17

Family

ID=57669235

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610657935.6A Active CN106302853B (en) 2016-08-11 2016-08-11 A kind of method and its terminal carrying out network configuration

Country Status (1)

Country Link
CN (1) CN106302853B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114980273A (en) * 2022-06-06 2022-08-30 普联技术有限公司 Wireless network configuration method and device, readable storage medium and terminal equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1798060A (en) * 2004-12-24 2006-07-05 联想(北京)有限公司 Method and device for detecting conflict of IP addresses in networked computers
US20070239860A1 (en) * 2006-04-07 2007-10-11 Kyocera Mita Corporation Information processing device, network connection method, and program recording medium
CN101202767A (en) * 2006-12-29 2008-06-18 深圳市同洲电子股份有限公司 Method and device for hiring IP address
CN102594579A (en) * 2011-01-06 2012-07-18 卓思网络公司 Automatic configuration and network deployment for network devices
CN102857907A (en) * 2011-06-30 2013-01-02 安移通网络公司 Equipment abstract in self-organization wireless local area network
CN105812505A (en) * 2016-05-06 2016-07-27 上海斐讯数据通信技术有限公司 Method and device for renewing lease of IP address of terminal equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1798060A (en) * 2004-12-24 2006-07-05 联想(北京)有限公司 Method and device for detecting conflict of IP addresses in networked computers
US20070239860A1 (en) * 2006-04-07 2007-10-11 Kyocera Mita Corporation Information processing device, network connection method, and program recording medium
CN101202767A (en) * 2006-12-29 2008-06-18 深圳市同洲电子股份有限公司 Method and device for hiring IP address
CN102594579A (en) * 2011-01-06 2012-07-18 卓思网络公司 Automatic configuration and network deployment for network devices
CN102857907A (en) * 2011-06-30 2013-01-02 安移通网络公司 Equipment abstract in self-organization wireless local area network
CN105812505A (en) * 2016-05-06 2016-07-27 上海斐讯数据通信技术有限公司 Method and device for renewing lease of IP address of terminal equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114980273A (en) * 2022-06-06 2022-08-30 普联技术有限公司 Wireless network configuration method and device, readable storage medium and terminal equipment

Also Published As

Publication number Publication date
CN106302853B (en) 2019-09-17

Similar Documents

Publication Publication Date Title
CN100502413C (en) IP address requesting method for DHCP client by DHCP repeater
CN102647486B (en) Address distribution method, equipment and system
CN101304330B (en) Resource allocation method, server and network system
CN101800760B (en) Realization method and system for accessing data service
CN101730090B (en) Method and equipment for releasing IP addresses by DHCP server
CN105245629B (en) Host communication method based on DHCP and device
WO2004071055A3 (en) System and method for control of packet data serving node election in a mobile internet protocol network
CN105323173A (en) Network rule entry setting method and device
EP1966940A1 (en) Method for selective service updates for communication networks
AU2003259554A1 (en) Network terminal device, address management server, communication system, and network communication method using mac addresses to determine the ip target addresses
CN104320502B (en) Terminating gateway IP address distribution method, the method for data transfer, MME and system
CN102625287A (en) Method for downloading mobile phone application software
CN102215273A (en) Method and device for providing external network access for internal network user
CN102857587B (en) The method and system in dynamic address pond are shared under multi-VLAN environment
CN102082835B (en) Method and device for distributing IP (internet protocol) addresses
CN106612196B (en) Obtain the method and device of resource
CN100450114C (en) Automatic configuration method and system for digital household terminal
CN103312571A (en) Method and device for finding equipment
EP1635542A3 (en) IP telephone system, IP telephone apparatus and communications method with registration at an ENUM server
CN103581258A (en) Network data caching method and system
WO2019118263A1 (en) Directing packets to service chain associated with user plane anchor
CN102238243A (en) Data transmission method and system, address access method, terminal device and server
CN103152444A (en) Network address translation and message transmission method, device and system of trunking scheme
CN106302853A (en) A kind of method carrying out network configuration and terminal thereof
US20120271912A1 (en) Apparatus and method for transmitting and receiving ip information in a wireless communication network

Legal Events

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