A method for configuring device IP address and parameters
By presetting unique numbers and network parameters on the software side and querying configurations through unique numbers on the hardware device, the problem of complex virtual LAN configuration and cross-VLAN configuration is solved, and the effect of simplifying configuration and avoiding conflicts is achieved.
Patent Information
- Application Number
- CN202411991361.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-01
AI Technical Summary
The existing virtual LAN (VLAN) configuration methods are complex and cannot configure device parameters in different virtual LANs.
By setting multiple unique numbers on the software side and presetting a set of network parameters for each unique number, the hardware to be configured querys the network parameters by sending a unique number, and configures its own network parameters based on the feedback results. At the same time, the relay mode is used to configure device parameters in different virtual LANs.
The device network parameter configuration steps are simplified, configuration conflicts are avoided, and device parameter configuration in different virtual LANs is realized.
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of network configuration, and in particular relates to a method for configuring device IP addresses and parameters. Background Art
[0002] Configuring parameters such as the device network IP address is a key step to ensure that the device can access the network smoothly and communicate effectively. First, it is necessary to clarify the network environment in which the device is located, including the network type (such as LAN, WAN) and the IP address allocation method (static or dynamic). Static IP configuration requires manual input of the IP address, subnet mask, gateway, and DNS server address to ensure that the address is unique and does not conflict; dynamic configuration relies on the DHCP server to automatically allocate, simplifying the setting process. Reasonable configuration of device network parameters is the basis for ensuring the stability and efficiency of network communication. However, the existing virtual local area network (VLAN) configuration method is relatively complicated, and device parameters cannot be configured in different virtual local area networks (VLANs). Summary of the invention
[0003] Based on the above problems in the prior art, the present invention provides a method for configuring the IP address and parameters of a device, which first sets multiple unique numbers on the software side and gives a set of network parameters determined by each unique number. The hardware to be configured queries the network parameters by sending the unique number and configures its own network parameters according to the query feedback result. The method specifically includes the following steps: Step S1: multiple unique numbers are set on the software end, each unique number is given a set of determined network parameters, and the network parameters include an IP address; Step S2: The hardware to be configured sends a configuration request including a unique number to the software end; Step S3: The software end receives the configuration request and checks the unique number. If the unique number in the configuration request is one of the multiple unique numbers preset in step S1, the software end feeds back the network parameters corresponding to the unique number to the hardware to be configured according to the unique number; Step S4: The hardware to be configured configures its own corresponding network parameters according to the information fed back by the software end, and the configuration is completed.
[0004] Wherein, the step S3 also includes a step S31: if the unique number in the configuration request is not one of the multiple unique numbers preset in step S1, the software end does not reply and the configuration ends.
[0005] The step S2 further includes a step S21: setting or modifying the unique number in the hardware to be configured by physical input, and forming a configuration request with the latest unique number.
[0006] The physical input includes one or a combination of key input, knob input and touch screen input.
[0007] The network parameters also include parameter information such as subnet mask, gateway, server IP, port and login password.
[0008] Wherein, when the software end and the hardware are in different virtual local area networks (VLANs), the method further includes step S0: setting up relay hardware; defining the software end in virtual local area network 1 (VLAN1) and the hardware in virtual local area network 2 (VLAN2), wherein step S0 includes in detail, Step S0-1: first connect the software end to the virtual local area network 2, and complete the configuration of a hardware in the virtual local area network 2 according to steps S1 to S4, and the hardware is defined as relay hardware; Step S0-2: configuring the server address of the relay hardware to be the legal server address of the virtual local area network 1, and setting the relay hardware to the relay mode; the relay mode is to receive the configuration request of the virtual local area network 2 and send the configuration request to the software end of the virtual local area network 1 through point-to-point communication, and then receive feedback information from the software end through point-to-point communication and multicast or broadcast it to the virtual local area network 2; Step S0-3: reconnect the software end to the virtual local area network 1, and configure the IP address of the software end as the server address of the relay hardware; step S0 is completed, and steps S2-S4 continue normally.
[0009] The communication mode between the software and the hardware is multicast or broadcast.
[0010] The invention has the beneficial effects of presetting a unique number and assigning a set of network parameters to each unique number, and then performing network parameter configuration on the hardware device through the unique number to simplify the configuration steps. During configuration, only the unique number needs to be entered to automatically complete the configuration, and there is no need to form the corresponding network parameters through complicated configuration steps. Moreover, since the network parameters have been pre-set and grouped, there will be no conflict. In addition, the relay mode can be used to implement device parameter configuration in different virtual local area networks (VLANs). DETAILED DESCRIPTION
[0011] The present invention is described in detail below in conjunction with specific embodiments.
[0012] Embodiment 1: Configuration of IP addresses and parameters of devices in the same virtual local area network (VLAN) (pass-through mode).
[0013] A method for configuring device IP addresses and parameters, which first sets multiple unique numbers on the software side and gives a set of network parameters determined by each unique number, and the hardware to be configured queries the network parameters by sending the unique number and configures its own network parameters according to the query feedback result, specifically including the following steps: Step S1: Set multiple unique numbers on the software side, each unique number is given a set of determined network parameters to form a unique number database, the network parameters include IP address, subnet mask, gateway, server IP, port and login password and other parameter information, for example, the device numbered 1234 has an IP address of 192.168.1.11, a subnet mask of 255.255.255.0, a gateway of 192.168.1.1, a server address of 192.168.1.100, a port of 8000, and a login password of 1234; Step S21: The hardware device to be configured has a digital display panel, which displays the unique number of the device. The unique number is set or modified in the hardware to be configured through physical input. After the unique number is changed or input, a configuration request is formed with the latest unique number; the physical input includes one or more combinations of key input, knob input and touch screen input; Step S2: The hardware to be configured sends a configuration request containing a unique number to the software end through the network in a multicast or broadcast manner. The configuration request includes a query instruction and the unique number of the device that was last configured; Step S3: The software end receives the configuration request and reads the unique number in the configuration request, searches and verifies the unique number in the preset unique number database. If the unique number in the configuration request is one of the multiple unique numbers preset in step S1, that is, there is a corresponding unique number in the unique number database, the software end retrieves a corresponding set of network parameters in the unique number database according to the unique number, and feeds back the network parameters corresponding to the unique number to the hardware to be configured by multicast or broadcast; Step S31: If the unique number in the configuration request is not one of the multiple unique numbers preset in step S1, the software end does not respond and the configuration ends; Step S4: After receiving the feedback reply, the hardware to be configured configures its own corresponding network parameters according to the information fed back by the software end, and the configuration is completed.
[0014] Embodiment 2: Configuration of IP addresses and parameters of devices in different virtual local area networks (VLANs) (relay mode).
[0015] The difference between this embodiment and the first embodiment is that the network environment is different. This embodiment has two virtual local area networks (VLANs), and the legal addresses in the two virtual local area networks (VLANs) can access each other, such as the software end is in VLAN1, 192.168.1 segment; the hardware device is in VLAN2, 192.168.2 segment.
[0016] At this time, you need to complete the configuration of the relay hardware first, which specifically includes step S0: setting up the relay hardware; defining the software end in virtual LAN 1 and the hardware in virtual LAN 2, as follows: Step S0-1: firstly connect the software end to the virtual local area network 2, and complete the configuration of a hardware in the virtual local area network 2 according to the method of the first embodiment, so that the hardware device obtains the legal communication address of VLAN2, and the hardware is defined as a relay hardware; Step S0-2: configure the server address of the relay hardware to be the legal server address of the virtual local area network 1, such as 192.168.1.100, and set the relay hardware to the relay mode; the relay mode is to receive the configuration request of the virtual local area network 2 and send the configuration request to the software end of the virtual local area network 1 through point-to-point communication, and then receive feedback information from the software end through point-to-point communication and multicast or broadcast it to the virtual local area network 2; Step S0-3: Reconnect the software end to the virtual LAN 1, and configure the IP address of the software end to the server address of the relay hardware (192.168.1.100); Step S0 is completed, and steps S2-S4 continue normally.
[0017] When other hardware devices in VLAN2 send configuration requests according to the steps of Example 1, the configuration requests will be received by the relay hardware, and communicate with the server address (the software end in VLAN1) through point-to-point communication (such as TCP, UDP, HTTP, etc.), and the reply information of the software end in VLAN1 will be sent to other hardware devices in VLAN2 through multicast or broadcast, so that other non-relay hardware can complete the configuration.
[0018] Embodiment 3: Use the AB buttons to set the unique number of the hardware device.
[0019] There are two buttons, A and B, on the hardware device. The A button is used to select the modification position (starting from the first position of the device to the last position); the B button is used to modify the number. Each press increases the number by 1, and it cycles continuously from 0 to 9. For example, when the device leaves the factory, the number is 0000. Press the A button, and the first digit of the number flashes (0 at this time). Press the B button, and the first digit becomes 1. Press the A button again, and the second digit flashes (0 at this time). Press the B button twice, and the second digit becomes 2. Repeat this process until the number flashes at the last position. Press the A button again, and the number is written into the hardware device, and the process of sending a configuration request to the software is executed.
[0020] Embodiment 4: Setting the unique number of the hardware device by lightly touching the knob switch.
[0021] There is a touch knob switch on the hardware device, which can be rotated or pressed. When pressed, the position to be modified is selected; when rotated, the number is changed, one scale is rotated clockwise +1, one scale is rotated counterclockwise -1, and the single number is continuously cycled from 0 to 9. For example, when leaving the factory, the number is 0000. Press the touch knob, the first digit of the number flashes (0 at this time), rotate clockwise one scale, the first digit becomes 1; press the touch knob again, the second digit flashes (0 at this time), rotate clockwise two scales, and the second digit becomes 2; repeat this process until the number flashes at the last position, press the touch knob again, the number is written into the hardware device, and the process of sending a configuration request to the software is executed.
[0022] The above-mentioned embodiments only express four implementation modes of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention patent shall be subject to the attached claims.
Claims
1. A method for configuring device IP address and parameters, characterized in that: It first sets multiple unique numbers on the software side and gives each unique number a set of network parameters. The hardware to be configured queries the network parameters by sending the unique number and configures its own network parameters according to the query feedback results.
2. A method for configuring device IP addresses and parameters according to claim 1, characterized in that: It includes the following steps, Step S1: multiple unique numbers are set on the software end, each unique number is given a set of determined network parameters, and the network parameters include an IP address; Step S2: The hardware to be configured sends a configuration request including a unique number to the software end; Step S3: The software end receives the configuration request and checks the unique number. If the unique number in the configuration request is one of the multiple unique numbers preset in step S1, the software end feeds back the network parameters corresponding to the unique number to the hardware to be configured according to the unique number; Step S4: The hardware to be configured configures its own corresponding network parameters according to the information fed back by the software end, and the configuration is completed.
3. A method for configuring device IP addresses and parameters according to claim 2, characterized in that: The step S3 also includes a step S31: if the unique number in the configuration request is not one of the multiple unique numbers preset in step S1, the software end does not reply and the configuration ends.
4. A method for configuring device IP addresses and parameters according to claim 2, characterized in that: The step S2 also includes a step S21: setting or modifying the unique number in the hardware to be configured by physical input, and forming a configuration request with the latest unique number.
5. A method for configuring device IP addresses and parameters according to claim 4, characterized in that: The physical input includes one or a combination of key input, knob input and touch screen input.
6. A method for configuring device IP addresses and parameters according to claim 2, characterized in that: The network parameters also include subnet mask, gateway, server IP, port and login password.
7. A method for configuring device IP addresses and parameters according to claim 2, characterized in that: When the software end and the hardware are in different virtual local area networks (VLANs), the step S0 is also included: setting up relay hardware; defining the software end in virtual local area network 1 and the hardware in virtual local area network 2, and the step S0 includes in detail, Step S0-1: first connect the software end to the virtual local area network 2, and complete the configuration of a hardware in the virtual local area network 2 according to steps S1 to S4, and the hardware is defined as relay hardware; Step S0-2: configuring the server address of the relay hardware to be the legal server address of the virtual local area network 1, and setting the relay hardware to the relay mode; the relay mode is to receive the configuration request of the virtual local area network 2 and send the configuration request to the software end of the virtual local area network 1 through point-to-point communication, and then receive feedback information from the software end through point-to-point communication and multicast or broadcast it to the virtual local area network 2; Step S0-3: reconnect the software end to the virtual local area network 1, and configure the IP address of the software end as the server address of the relay hardware; step S0 is completed, and steps S2-S4 continue normally.
8. A method for configuring device IP addresses and parameters according to any one of claims 1 to 7, characterized in that: The communication mode between the software end and the hardware is multicast or broadcast.