CN104580547A - IP (internet protocol) configuration method and device for Linux operation system - Google Patents

IP (internet protocol) configuration method and device for Linux operation system Download PDF

Info

Publication number
CN104580547A
CN104580547A CN201410816670.0A CN201410816670A CN104580547A CN 104580547 A CN104580547 A CN 104580547A CN 201410816670 A CN201410816670 A CN 201410816670A CN 104580547 A CN104580547 A CN 104580547A
Authority
CN
China
Prior art keywords
address
target
request message
unit
described target
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.)
Pending
Application number
CN201410816670.0A
Other languages
Chinese (zh)
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.)
Dawning Information Industry Beijing Co Ltd
Original Assignee
Dawning Information Industry Beijing 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 Dawning Information Industry Beijing Co Ltd filed Critical Dawning Information Industry Beijing Co Ltd
Priority to CN201410816670.0A priority Critical patent/CN104580547A/en
Publication of CN104580547A publication Critical patent/CN104580547A/en
Pending legal-status Critical Current

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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses

Landscapes

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

Abstract

The invention discloses an IP (internet protocol) configuration method and device for a Linux operation system. The device comprises a receiving unit, a generation unit connected with the receiving unit, and a detection unit connected with the generation unit, wherein the receiving unit is used for receiving a target IP address required to be configured in a current node and sending the target IP address; the generation unit is used for receiving the target IP address, generating a target IP request message based on the target IP address and sending the target IP request message, and the target IP request message includes the target IP address; the detection unit is used for detecting a reply signal corresponding to the target IP request message, and comprises a sending unit and a configuration unit; the sending unit is used for sending an error signal under the condition that the reply signal is detected; the configuration unit is used for configuring an IP of the current node according to the target IP address under the condition that no reply signal is detected.

Description

For IP collocation method and the device of (SuSE) Linux OS
Technical field
The present invention relates to computer realm, specifically, relate to a kind of IP collocation method for (SuSE) Linux OS and device.
Background technology
Current internet has become a requisite part in people's live and work, and from network, obtaining information accounts for increasing ratio in the approach of people's obtaining information.The Internet is made up of countless nodes, and these nodes may be computer, router, switch etc., and wherein most node is computer.Be interconnected by medium physically between these nodes, medium comprises netting twine, optical fiber, electromagnetic wave etc., and uses ICP/IP protocol to intercom mutually.ICP/IP protocol is divided into the level that physical layer, data link layer, network layer, transport layer, application layer etc. are different.
An internet node wants to intercom mutually with another one node, will know the address of the other side each other.In ICP/IP protocol, different levels uses different addresses, to use in MAC Address, network layer the general use side slogan that to use in IP address, transport layer as address as in data link layer.In a node, MAC Address is for network interface card, and each network interface card has a MAC Address, and this MAC Address distributes in advance, can not arbitrarily change.IP address, for node itself, it represent the address of this node in the Internet.Port numbers is for application, and application different in node uses different port numbers.Can see that from description above the IP address of egress is most important a kind of address, which represent the position of this node in the Internet, and IP address freely can configure.
The mode of current configuration of IP address has two kinds: configuration and manual configuration automatically.It is DHCP technology that automatic configuration uses usually, and this technology places a Dynamic Host Configuration Protocol server in a network, node initiatively to Dynamic Host Configuration Protocol server application IP address, the management of IP address is completed automatically by Dynamic Host Configuration Protocol server.Manual configuration is by the IP address of the manual configuration node of the manager of node, normally use the IP address of " ifconfig " command configuration node under Linux, wherein, ifconfig order is the order for display or configure network devices (network interface unit) in linux operating system.
But, due to various reason, for the configuration mode of the IP address of node, the mode still manually configured be widely used at present realizes the IP address configuration to node, under current Linux, manual configuration of IP address is the configuration using " ifconfig " order to carry out IP address in most cases, but the IP address that this collocation method is very easy to appear as Joint Enterprise is identical with the IP address of other node, namely easily there is the IP collision problem of each node, and IP address is as node unique identification in a network, if generation IP address conflict, not only can cause having conflict two, IP address node can not with other node communication, also easily cause the paralysis of whole network.
For IP address manual in correlation technique configuration mode existing for the problem of IP address conflict easily causing configuring, at present effective solution is not yet proposed.
Summary of the invention
For the problem in correlation technique, the present invention proposes a kind of IP collocation method for (SuSE) Linux OS and device, can avoid conflicting mutually to the IP address of each Joint Enterprise in network, thus avoid network communication failure and network paralysis problem that IP address conflict causes.
Technical scheme of the present invention is achieved in that
According to an aspect of the present invention, a kind of IP inking device for (SuSE) Linux OS is provided.
This device comprises: receiving element, the generation unit be connected with receiving element and the detecting unit be connected with generation unit, wherein,
Receiving element, needs configuration to the target ip address of present node for receiving and sends;
Generation unit, for receiving target IP address, and based target IP address generates Target IP request message and sends, and wherein, comprises target ip address in Target IP request message;
Detecting unit, for detecting the recall signal corresponding to Target IP request message, wherein, detecting unit comprises transmitting element and dispensing unit, and wherein, transmitting element, for when recall signal being detected, sends error signal; Dispensing unit, for when recall signal not detected, is configured according to the IP of target ip address to present node.
Wherein, detecting unit, for detecting the recall signal corresponding to Target IP request message within the predetermined time.
In addition, this device comprises further:
Report an error unit, for when receiving error signal, generating the error message of target ip address and sending.
Preferably, the type of Target IP request message is Internet Control Message Protocol icmp packet.
According to another aspect of the present invention, a kind of IP collocation method for (SuSE) Linux OS is provided.
The method comprises:
Receive the target ip address needing configuration to present node;
Based target IP address generates Target IP request message, wherein, comprises target ip address in Target IP request message;
Detect the recall signal corresponding to Target IP request message, wherein, when recall signal being detected, sending error signal, when recall signal not detected, being configured according to the IP of target ip address to present node.
Preferably, the recall signal corresponding to Target IP request message is detected within the predetermined time.
In addition, the method comprises further:
When receiving error signal, generating the error message of target ip address and sending.
Preferably, the type of Target IP request message is Internet Control Message Protocol icmp packet.
The present invention, by detecting IP address before configuration of IP address, effectively avoids the conflict of IP address between each node, thus the serious problems such as the network service identification preventing IP address conflict to bring or network paralysis.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the block diagram of the IP inking device for (SuSE) Linux OS according to the embodiment of the present invention;
Fig. 2 is the workflow diagram of the IP inking device for (SuSE) Linux OS according to the embodiment of the present invention;
Fig. 3 is the flow chart of the IP collocation method for (SuSE) Linux OS according to the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain, all belongs to the scope of protection of the invention.
According to embodiments of the invention, provide a kind of IP inking device for (SuSE) Linux OS.
As shown in Figure 1, comprise according to the IP inking device of the embodiment of the present invention:
Receiving element 11, the generation unit 12 be connected with receiving element 11 and the detecting unit 13 be connected with generation unit 12, wherein,
Receiving element 11, needs configuration to the target ip address of present node for receiving and sends;
Generation unit 12, for receiving target IP address, and based target IP address generates Target IP request message and sends, and wherein, comprises target ip address in Target IP request message;
Detecting unit 13, for detecting the recall signal corresponding to Target IP request message, wherein, detecting unit 13 comprises transmitting element 131 and dispensing unit 132, and wherein, transmitting element 131, for when recall signal being detected, sends error signal; Dispensing unit 132, for when recall signal not detected, is configured according to the IP of target ip address to present node.
Wherein, in one embodiment, detecting unit 13, for detecting the recall signal corresponding to Target IP request message within the predetermined time.
In addition, comprise further according to the device of the embodiment of the present invention:
Report an error unit (not shown), for when receiving error signal, generating the error message of target ip address and sending.
Preferably, the type of Target IP request message is Internet Control Message Protocol icmp packet.
Technique scheme for a better understanding of the present invention, is described in detail technique scheme of the present invention below in conjunction with Fig. 2.
In the present embodiment, above-mentioned IP inking device of the present invention is applied in (SuSE) Linux OS, receive the target ip address of user's input at the receiving element 11 of IP inking device after, namely the present node to user (such as node A) is needed to carry out the IP address of IP configuration, generation unit 12 can receive this target ip address, and generate and send Target IP request message ICMP Echo Request in network by ICMP agreement (sub-protocol of TCP/IP protocol suite) based on this target ip address, wherein, the target ip address that will detect is included in ICMP Echo Request, wherein, ICP/IP protocol specifies after the node (such as Node B) that target ip address is corresponding receives this ICMP Echo Request message, this Node B can send reply message ICMP Echo Reply message, after the recall signal so detected corresponding to Target IP request message at detecting unit 13, can determine that the target ip address detected has existed corresponding node in a network, so in order to avoid the IP address to node A configuration conflict, transmitting element 131 can when detecting recall signal, send error signal to the unit that reports an error, report an error unit when receiving error signal, the error message of target ip address will be generated, and this error message (IP address exists) is printed and shows in display screen, if when detecting unit 13 does not receive the recall signal corresponding to IP request message, then prove that this target ip address can be used, dispensing unit 132 when this recall signal not detected, will be configured according to the IP of target ip address to present node A.
In technique scheme of the present invention, by modifying to " ifconfig " order, before configuration of IP address, first call " ping " order detect the IP address that will configure and whether exist in a network, if existed, then print the already present error message in IP address to exit, otherwise just really carry out the configuration of IP address.
According to embodiments of the invention, additionally provide a kind of IP collocation method for (SuSE) Linux OS.
As shown in Figure 3, comprise according to the IP collocation method of the embodiment of the present invention:
Step S301, receives the target ip address needing configuration to present node;
Step S303, based target IP address generates Target IP request message, wherein, comprises target ip address in Target IP request message;
Step S305, detects the recall signal corresponding to Target IP request message, wherein, when recall signal being detected, sending error signal, when recall signal not detected, being configured according to the IP of target ip address to present node.
Preferably, in one embodiment, the recall signal corresponding to Target IP request message can be detected within the predetermined time.
In addition, in one embodiment, comprise further according to the method for the embodiment of the present invention:
When receiving error signal, generating the error message of target ip address and sending.
Preferably, in one embodiment, the type of this Target IP request message is Internet Control Message Protocol icmp packet.
In sum, by means of technique scheme of the present invention, by detecting IP address before to Joint Enterprise IP address, and the process whether detection IP address exists is incorporated in " ifconfig " order, that forces before configuration node being carried out to IP address, all carry out IP address looks into re-detection, effectively avoid the conflict of IP address between each node, thus the serious problems such as the network service identification preventing IP address conflict to bring or network paralysis.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (8)

1. for an IP inking device for (SuSE) Linux OS, it is characterized in that, the detecting unit comprising receiving element, the generation unit be connected with described receiving element and be connected with described generation unit, wherein,
Described receiving element, needs configuration to the target ip address of present node for receiving and sends;
Described generation unit, for receiving described target ip address, and generates Target IP request message based on described target ip address and sends, wherein, comprising described target ip address in described Target IP request message;
Described detecting unit, for detecting the recall signal corresponding to described Target IP request message, wherein, described detecting unit comprises transmitting element and dispensing unit, wherein, and described transmitting element, for when described recall signal being detected, send error signal; Described dispensing unit, for when described recall signal not detected, is configured according to the IP of described target ip address to described present node.
2. device according to claim 1, is characterized in that, described detecting unit, for detecting the recall signal corresponding to described Target IP request message within the predetermined time.
3. device according to claim 1, is characterized in that, described device comprises further:
Report an error unit, for when receiving described error signal, generating the error message of described target ip address and sending.
4. device according to claim 1, is characterized in that, the type of described Target IP request message is Internet Control Message Protocol icmp packet.
5., for an IP collocation method for (SuSE) Linux OS, it is characterized in that, comprising:
Receive the target ip address needing configuration to present node;
Generate Target IP request message based on described target ip address, wherein, in described Target IP request message, comprise described target ip address;
Detect the recall signal corresponding to described Target IP request message, wherein, when described recall signal being detected, send error signal, when described recall signal not detected, be configured according to the IP of described target ip address to described present node.
6. method according to claim 5, is characterized in that, detects the described recall signal corresponding to described Target IP request message within the predetermined time.
7. method according to claim 5, is characterized in that, described method comprises further:
When receiving described error signal, generating the error message of described target ip address and sending.
8. method according to claim 5, is characterized in that, the type of described Target IP request message is Internet Control Message Protocol icmp packet.
CN201410816670.0A 2014-12-23 2014-12-23 IP (internet protocol) configuration method and device for Linux operation system Pending CN104580547A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410816670.0A CN104580547A (en) 2014-12-23 2014-12-23 IP (internet protocol) configuration method and device for Linux operation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410816670.0A CN104580547A (en) 2014-12-23 2014-12-23 IP (internet protocol) configuration method and device for Linux operation system

Publications (1)

Publication Number Publication Date
CN104580547A true CN104580547A (en) 2015-04-29

Family

ID=53095702

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410816670.0A Pending CN104580547A (en) 2014-12-23 2014-12-23 IP (internet protocol) configuration method and device for Linux operation system

Country Status (1)

Country Link
CN (1) CN104580547A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106487946A (en) * 2016-10-12 2017-03-08 重庆金美通信有限责任公司 A kind of large-scale communication network network IP resource contention detection method, system and equipment
CN108933714A (en) * 2018-10-24 2018-12-04 郑州云海信息技术有限公司 It is a kind of to detect the method, apparatus and storage medium that IP address whether there is
CN112929460A (en) * 2021-01-20 2021-06-08 苏州长风航空电子有限公司 IP address configuration method and configuration device based on Linux system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2230550A1 (en) * 1997-03-14 1998-09-14 At&T Corp. Hosting a network service on a cluster of servers using a single-address image
CN101175000A (en) * 2007-11-22 2008-05-07 华为技术有限公司 Method and device for automatic IP address detection
CN101651722A (en) * 2009-08-28 2010-02-17 华为技术有限公司 Method, device and system for automatically allocating IP address
CN101656763A (en) * 2009-09-11 2010-02-24 华为技术有限公司 IP address automatic distribution method, client and server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2230550A1 (en) * 1997-03-14 1998-09-14 At&T Corp. Hosting a network service on a cluster of servers using a single-address image
CN101175000A (en) * 2007-11-22 2008-05-07 华为技术有限公司 Method and device for automatic IP address detection
CN101651722A (en) * 2009-08-28 2010-02-17 华为技术有限公司 Method, device and system for automatically allocating IP address
CN101656763A (en) * 2009-09-11 2010-02-24 华为技术有限公司 IP address automatic distribution method, client and server

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106487946A (en) * 2016-10-12 2017-03-08 重庆金美通信有限责任公司 A kind of large-scale communication network network IP resource contention detection method, system and equipment
CN106487946B (en) * 2016-10-12 2019-11-19 重庆金美通信有限责任公司 A kind of large-scale communication network network IP resource contention detection method, system and equipment
CN108933714A (en) * 2018-10-24 2018-12-04 郑州云海信息技术有限公司 It is a kind of to detect the method, apparatus and storage medium that IP address whether there is
CN112929460A (en) * 2021-01-20 2021-06-08 苏州长风航空电子有限公司 IP address configuration method and configuration device based on Linux system

Similar Documents

Publication Publication Date Title
CN103491203B (en) A kind of method of virtualization DHCP service, device, system and server
CN114070723B (en) Virtual network configuration method and system of bare metal server and intelligent network card
CN110572275A (en) Network card switching method and device, server and computer readable storage medium
CN102685270B (en) Method and equipment for distributing dynamic addresses
JP2013511207A5 (en)
US10148610B2 (en) Method to publish remote management services over link local network for zero-touch discovery, provisioning, and management
CN108650336A (en) IP address dynamic allocation method, device and storage medium, wireless relay apparatus
CN102170484B (en) A detection method and a detection device of IP address conflict
KR20150046041A (en) Method and apparatus for configuring dhcp client
CN107995321A (en) A kind of VPN client acts on behalf of the method and device of DNS
CN104580547A (en) IP (internet protocol) configuration method and device for Linux operation system
CN106412146B (en) The method and apparatus that a kind of dhcp client updates IP
CN109819064B (en) Method for communication between modules, operating system module and conference panel
CN107911496A (en) A kind of VPN service terminal acts on behalf of the method and device of DNS
CN107547674A (en) Address distribution method and device
CN105827496A (en) Method and apparatus for managing PE device
CN104780229A (en) Method of setting cloud server IP address through cloud terminal, system and cloud system
US20150106490A1 (en) Automatic notification of isolation
CN106375489B (en) Method and device for processing Media Access Control (MAC) address
CN107070725B (en) A kind of method that server two-level management intermodule communication is shaken hands
US10382274B2 (en) System and method for wide area zero-configuration network auto configuration
EP3343835A1 (en) Network element management method and system
CN105610619B (en) A kind of network element managing method and apparatus
CN108259271A (en) A kind of method for detecting link state after more network card bindings by ARP
US20150229513A1 (en) Systems and methods for efficient remote security panel configuration and management

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150429

RJ01 Rejection of invention patent application after publication