CN107919999A - The discovery of different segment digital camera and connection method in a kind of LAN - Google Patents

The discovery of different segment digital camera and connection method in a kind of LAN Download PDF

Info

Publication number
CN107919999A
CN107919999A CN201711168596.6A CN201711168596A CN107919999A CN 107919999 A CN107919999 A CN 107919999A CN 201711168596 A CN201711168596 A CN 201711168596A CN 107919999 A CN107919999 A CN 107919999A
Authority
CN
China
Prior art keywords
digital camera
arp
segment
address
interface card
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
CN201711168596.6A
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.)
Tianjin Intane Video Technology Co Ltd
Original Assignee
Tianjin Intane Video 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 Tianjin Intane Video Technology Co Ltd filed Critical Tianjin Intane Video Technology Co Ltd
Priority to CN201711168596.6A priority Critical patent/CN107919999A/en
Publication of CN107919999A publication Critical patent/CN107919999A/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/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Environmental & Geological Engineering (AREA)
  • Studio Devices (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

It is as follows that the present invention provides the discovery of different segment digital camera and connection method, its process in a kind of LAN:1st, monitor and receive the ARP messages from LAN;2nd, the network interface card IP and its place network segment that terminal is sent are extracted from ARP messages, and records terminal IP and its network segment;3rd, the network segment according to where terminal IP, when user searches for digital camera, adds the unappropriated IP address for having recorded the network segment, and retain the original IP of network interface card on the machine network interface card;4th, search protocol message is sent to terminal using same network segment IP, obtains feedback information;5th, user carries out data connection by network IP where adding digital camera to digital camera.This method can also not only be attached video camera by the video camera in broadcast search protocol discovery LAN by way of adding IP on video recorder network interface card, avoid user from carrying out cumbersome IP distribution and configuration.

Description

The discovery of different segment digital camera and connection method in a kind of LAN
Technical field
The invention belongs to field of video monitoring, found more particularly, to different segment digital camera in a kind of LAN and Connection method.
Background technology
Address resolution protocol, i.e. ARP (Address Resolution Protocol), are to obtain physics according to IP address One ICP/IP protocol of address.ARP request comprising target ip address is broadcast to the institute on network by host when sending information There is host, and receive return message, the physical address of target is determined with this;Receive and return after message by the IP address and physically Location is stored in the machine arp cache and retains certain time, and next time directly inquires about arp cache to economize on resources when asking.Every makes With the digital camera of ICP/IP protocol, it is necessary to which possessing the MAC Address of destination host can correctly send the data to Destination host, the MAC Address corresponding to target ip address can be obtained by ARP protocol, so every number for being connected into LAN Word video camera all can dynamic access or transmission ARP protocol message.
In video surveillance applications, the network address of user configuration digital camera and the network of video cassette recorder are generally required Address, if the two is in same LAN, it is necessary to which the two configuration in the same network segment, so just can guarantee that number by user Word video camera and video cassette recorder normal communication.But which adds the burden of user configuration, influence user experience. Such as, it is assumed that the video recorder IP in LAN is that 10.30.31.68 subnet masks are 255.255.255.0, and LAN memory In the video camera that IP address is 192.168.2.6 and 192.168.1.99, video recorder is broadcasted by current IP 10.30.31.68 Digital camera find agreement, be the feedback that can not obtain video camera, and in LAN, also can not manually add The mode of IP connects the video camera of different segment.Therefore, different segment digital camera in a kind of efficiently errorless LAN is researched and developed Machine is found and connection method is a urgent problem to be solved.
The content of the invention
In view of this, the present invention is directed to propose in a kind of LAN different segment digital camera find and connection method, On video recorder network interface card add IP by way of, not only can by the video camera in broadcast search protocol discovery LAN, Video camera can also be attached.User is avoided to carry out cumbersome IP distribution and configuration.
To reach above-mentioned purpose, the technical proposal of the invention is realized in this way:
Different segment digital camera is found in a kind of LAN and connection method, its process are as follows:
1st, monitor and receive the ARP messages from LAN;
2nd, the network interface card IP and its place network segment that terminal is sent are extracted from ARP messages, and records terminal IP and its network segment;
3rd, the network segment according to where terminal IP, when user searches for digital camera, adds on the machine network interface card and has recorded the network segment Unappropriated IP address, and retain network interface card original IP;
4th, search protocol message is sent to terminal using same network segment IP, obtains feedback information;
5th, user carries out data connection by network IP where adding digital camera to digital camera.
Further, in step 1, the ARP messages from LAN are collected, create watcher thread, starts and monitors Socket, the ARP messages of listening broadcast, filters received data packet, obtains the ARP protocol that non-native network interface card is sent Message.
Further, the ARP recording parameterses specifically include:ARP message senders IP address, ARP messages sender institute The network segment renewal time where network segment data, ARP messages receiving time and ARP message senders.ARP message receiving times are main The newest line durations of IP for updating ARP senders, network segment renewal time where ARP messages sender are used to update this network segment Line duration.
Further, in step 1, the ARP Receive message times are recorded by ARP tape decks, renewal obtain IP and The time of the network segment where it, when the ARP messages for not obtaining identical IP or phase same network segment again for a long time and sending, to the IP that has recorded and Network segment data are deleted.
Further, in step 3, unused IP address in other interior network segments of LAN is obtained, is recorded by Searching I P, The IP address not being recorded is searched, before adding IP address on network interface card, ARP broadcast is sent and checks whether this IP address is occupied, If time-out does not receive ARP and replys message, this IP address is added on network interface card.
Further, in step 4, digital camera is sent by different segment IP on network interface card and finds Radio Broadcasting Agreements, is connect The reply from digital camera is received, gets real digital camera IP.
Further, when in same LAN the IP of video cassette recorder and digital camera respectively in different segment when, depending on Frequency video recorder by adding the IP address of the digital camera network segment on the machine network interface card, by this IP address and digital camera into Row data connection.
Further, no matter whether user monitor before in the IP of addition digital camera manually on video cassette recorder To the ARP data with digital camera same network segment, will be added on network interface card and the IP address of digital camera same network segment.
Further, the digital camera quantity under the same network segment of connection is recorded, when quantity is more than or equal to 1, The IP address under the same network segment is added on the machine network interface card, when the digital camera quantity of connection is equal to 0, is removed on the machine network interface card IP address under the same network segment of addition.
Relative to the prior art, different segment digital camera is found in LAN of the present invention and connection method has There is following advantage:This method can not only pass through broadcast search protocol discovery by way of adding IP on video recorder network interface card Video camera in LAN, can also be attached video camera, avoid user from carrying out cumbersome IP distribution and configuration;With height The advantages that imitating, be convenient, errorless.
Brief description of the drawings
The attached drawing for forming the part of the present invention is used for providing a further understanding of the present invention, schematic reality of the invention Apply example and its explanation is used to explain the present invention, do not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is ARP message format schematic diagrames in the embodiment of the present invention;
Fig. 2 is the schematic diagram of the embodiment of the present invention.
Embodiment
It should be noted that in the case where there is no conflict, the feature in embodiment and embodiment in the present invention can phase Mutually combination.
Below with reference to the accompanying drawings and the present invention will be described in detail in conjunction with the embodiments.
Different segment digital camera is found in a kind of LAN and connection method, its process are as follows:
1st, monitor and receive the ARP messages from LAN.
Specific method is:The ARP messages from LAN are collected, create watcher thread, starts and monitors socket, are monitored wide The ARP messages broadcast, filter received data packet, obtain the message for the ARP protocol that non-native network interface card is sent.Pass through ARP Tape deck, records the ARP Receive message times, and renewal obtains the time of IP and its place network segment, when not obtaining phase again for a long time The ARP messages sent with IP or phase same network segment, delete the IP and network segment data recorded.
The ARP recording parameterses specifically include:Network segment number where ARP message senders IP address, ARP messages sender According to network segment renewal time where, ARP messages receiving time and ARP messages sender.ARP message receiving times are mainly used for updating The newest line durations of IP of ARP senders, network segment renewal time where ARP messages sender be used to updating this network segment it is online when Between.
2nd, the network interface card IP and its place network segment that terminal is sent are extracted from ARP messages, and records terminal IP and its network segment.
3rd, the network segment according to where terminal IP, when user searches for digital camera, adds on the machine network interface card and has recorded the network segment Unappropriated IP address, and retain network interface card original IP.
Unused IP address in other interior network segments of LAN is obtained, is recorded by Searching I P, searches the IP address not being recorded, Before adding IP address on network interface card, send ARP broadcast and check whether this IP address is occupied, if time-out does not receive ARP replies Message, then add this IP address on network interface card.
4th, search protocol message is sent to terminal using same network segment IP, obtains feedback information.Pass through different nets on network interface card Section IP sends digital camera and finds Radio Broadcasting Agreements, receives the reply from digital camera, gets real digital camera Machine IP.
5th, user carries out data connection by network IP where adding digital camera to digital camera.
No matter whether user listen to and taken the photograph with numeral in the IP of addition digital camera manually on video cassette recorder before The ARP data of camera same network segment, will add and the IP address of digital camera same network segment on network interface card.
When in same LAN the IP of video cassette recorder and digital camera respectively in different segment when, video cassette recorder leads to The IP address that the digital camera network segment is added on the machine network interface card is crossed, data company is carried out by this IP address and digital camera Connect.
The digital camera quantity under the same network segment of connection is recorded, when quantity is more than or equal to 1, on the machine network interface card The IP address under the same network segment is added, when the digital camera quantity of connection is equal to 0, is added on removal the machine network interface card same IP address under the network segment.
Illustrate the course of work with reference to specific embodiment:
Collect the ARP messages from LAN;Watcher thread is created, starts and monitors socket, the ARP reports of listening broadcast Text, filters received data packet, obtains the message for the ARP protocol that non-native network interface card is sent.
The network interface card IP and its place network segment of the transmission of terminal, ARP protocol message as shown in Figure 1 are extracted from the message Message part includes sender's physical address, sender's IP address, purpose physical address, destination IP after ARP stems, and the present invention needs Sender's IP address of needs is extracted from ARP messages.
Record terminal IP and its network segment;As shown in Fig. 2, by the sender's IP address got, such as 192.168.2.6 and 192.168.1.99 and it is 24 i.e. 255.255.255.0 to give tacit consent to its subnet mask.
When user searches for digital camera, the unappropriated IP address for having recorded the network segment is added on the machine network interface card, such as 192.168.2.166;The ARP network segment data listened to are traveled through, check whether 192.168.2.166 is occupied, to protect For the sake of danger, established socket is reused, by splicing ARP messages, to sender's physical address, sender's IP address, mesh Physical address and destination IP field be filled, whether broadcast query 192.168.2.166 is taken by other-end.
Digital camera is sent by different segment IP on network interface card and finds Radio Broadcasting Agreements, by 192.168.2.166 and 192.168.1.128 and the original IP 10.30.31.68 of the machine network interface card send Radio Broadcasting Agreements.
Receive the reply from digital camera, get real digital camera IP 192.168.2.6 and 192.168.1.99, user is shown to, allows user to choose whether to be attached.
Data connection is carried out to digital camera by network IP where adding digital camera, user is in video cassette recorder When IP is 192.168.2.6 digital cameras in upper addition LAN, connected by the IP192.168.2.166 of same network segment Connect, reaching user, manual configuration IP can not add digital camera.
Using this method, video cassette recorder is being received after the ARP messages that digital camera in LAN is sent, and is led to Parsing ARP Receive messages are crossed to digital camera IP address, the unappropriated IP address of the same network segment is added on the machine network interface card, It can directly search and connect digital camera, without being set by digital camera or by the IP of video cassette recorder to same net Under section, do not increase user and additionally configure.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention With within principle, any modification, equivalent replacement, improvement and so on, should all be included in the protection scope of the present invention god.

Claims (9)

1. the discovery of different segment digital camera and connection method in a kind of LAN, it is characterised in that its process is as follows:
1) monitor and receive the ARP messages from LAN;
2) the network interface card IP and its place network segment that terminal is sent are extracted from ARP messages, and records terminal IP and its network segment;
3) network segment according to where terminal IP, when user searches for digital camera, adds on the machine network interface card and has recorded the network segment not Occupied IP address, and retain the original IP of network interface card;
4) search protocol message is sent to terminal using same network segment IP, obtains feedback information;
5) user carries out data connection by network IP where adding digital camera to digital camera.
2. the discovery of different segment digital camera and connection method, its feature in a kind of LAN according to claim 1 It is:In step 1, the ARP messages from LAN are collected, create watcher thread, starts and monitors socket, listening broadcast ARP messages, received data packet is filtered, obtains the message for the ARP protocol that non-native network interface card is sent.
3. the discovery of different segment digital camera and connection method in a kind of LAN according to claim 1 or 2, it is special Sign is:In step 1, by ARP tape decks, the ARP Receive message times are recorded, renewal obtains IP and its place network segment Time, when the ARP messages for not obtaining identical IP or phase same network segment again for a long time and sending, to the IP that has recorded and network segment data into Row is deleted.
4. the discovery of different segment digital camera and connection method, its feature in a kind of LAN according to claim 1 It is:The ARP recording parameterses specifically include:ARP message senders IP address, network segment data where ARP messages sender, ARP messages receiving time and ARP messages sender place network segment renewal time.
5. the discovery of different segment digital camera and connection method, its feature in a kind of LAN according to claim 1 It is:In step 3, unused IP address in other interior network segments of LAN is obtained, is recorded by Searching I P, lookup is not recorded IP address, on network interface card add IP address before, send ARP broadcast checks whether this IP address occupied, if time-out do not receive Message is replied to ARP, then this IP address is added on network interface card.
6. the discovery of different segment digital camera and connection method, its feature in a kind of LAN according to claim 1 It is:In step 4, digital camera is sent by different segment IP on network interface card and finds Radio Broadcasting Agreements, receives and is taken the photograph from numeral The reply of camera, gets real digital camera IP.
7. the discovery of different segment digital camera and connection method, its feature in a kind of LAN according to claim 1 It is:When in same LAN the IP of video cassette recorder and digital camera respectively in different segment when, video cassette recorder passes through The IP address of the digital camera network segment is added on the machine network interface card, data connection is carried out by this IP address and digital camera.
8. the discovery of different segment digital camera and connection method in a kind of LAN according to claim 1 or 7, it is special Sign is:No matter whether user listen to and taken the photograph with numeral in the IP of addition digital camera manually on video cassette recorder before The ARP data of camera same network segment, will add and the IP address of digital camera same network segment on network interface card.
9. the discovery of different segment digital camera and connection method, its feature in a kind of LAN according to claim 1 It is:The digital camera quantity under the same network segment of connection is recorded, when quantity is more than or equal to 1, is added on the machine network interface card Add the IP address under the same network segment, when the digital camera quantity of connection is equal to 0, remove the same net added on the machine network interface card IP address under section.
CN201711168596.6A 2017-11-21 2017-11-21 The discovery of different segment digital camera and connection method in a kind of LAN Pending CN107919999A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711168596.6A CN107919999A (en) 2017-11-21 2017-11-21 The discovery of different segment digital camera and connection method in a kind of LAN

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711168596.6A CN107919999A (en) 2017-11-21 2017-11-21 The discovery of different segment digital camera and connection method in a kind of LAN

Publications (1)

Publication Number Publication Date
CN107919999A true CN107919999A (en) 2018-04-17

Family

ID=61896835

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711168596.6A Pending CN107919999A (en) 2017-11-21 2017-11-21 The discovery of different segment digital camera and connection method in a kind of LAN

Country Status (1)

Country Link
CN (1) CN107919999A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111147623A (en) * 2019-12-27 2020-05-12 深圳市丰润达科技有限公司 Method for realizing whole-network host scanning, server and computer readable storage medium
CN113573023A (en) * 2021-07-27 2021-10-29 长视科技股份有限公司 Camera network distribution method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011002910A (en) * 2009-06-16 2011-01-06 Canon Inc Apparatus and method for processing search
CN104639913A (en) * 2015-02-12 2015-05-20 浙江宇视科技有限公司 Network video recorder (NVR) and automatic IPC (Internet Protocol Camera) access method thereof
WO2016077826A1 (en) * 2014-11-14 2016-05-19 The United States Playing Card Company Card connector
CN105681484A (en) * 2015-12-31 2016-06-15 深圳市磊科实业有限公司 IPC automatic detection and connection method based on ARP protocol and ONVIF standard
CN106656659A (en) * 2016-11-30 2017-05-10 浙江宇视科技有限公司 Network path selection method and network video recorder (NVR)
CN107295315A (en) * 2017-08-15 2017-10-24 深圳市天视通电子科技有限公司 A kind of Network Personal Video Recorder system and its implementation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011002910A (en) * 2009-06-16 2011-01-06 Canon Inc Apparatus and method for processing search
WO2016077826A1 (en) * 2014-11-14 2016-05-19 The United States Playing Card Company Card connector
CN104639913A (en) * 2015-02-12 2015-05-20 浙江宇视科技有限公司 Network video recorder (NVR) and automatic IPC (Internet Protocol Camera) access method thereof
CN105681484A (en) * 2015-12-31 2016-06-15 深圳市磊科实业有限公司 IPC automatic detection and connection method based on ARP protocol and ONVIF standard
CN106656659A (en) * 2016-11-30 2017-05-10 浙江宇视科技有限公司 Network path selection method and network video recorder (NVR)
CN107295315A (en) * 2017-08-15 2017-10-24 深圳市天视通电子科技有限公司 A kind of Network Personal Video Recorder system and its implementation

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111147623A (en) * 2019-12-27 2020-05-12 深圳市丰润达科技有限公司 Method for realizing whole-network host scanning, server and computer readable storage medium
CN113573023A (en) * 2021-07-27 2021-10-29 长视科技股份有限公司 Camera network distribution method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108880899B (en) Network topological graph generation method and server
CN101964787B (en) Method, device and system for implementation of multiple-terminal breakpoint broadcast of programs
CN104601959B (en) A kind of method of video monitoring system and its fast access into network video camera
CN101730090B (en) Method and equipment for releasing IP addresses by DHCP server
CN101771614B (en) DHCP route tracing method and DHCP relay equipment
CN102394948B (en) DHCP (dynamic host configuration protocol) address distribution method and DHCP server
CN102710965B (en) Video monitoring data acquisition method and system and special bearing network
CN102394950A (en) Method and system for IP address distribution of network security terminal under home gateway
CN107070790B (en) Route learning method and routing equipment
CN104243190A (en) Method and network device for achieving Bonjour services
CN105100129A (en) Data transmission method, device and system
CN102143036B (en) Prefix sending method, prefix appointing method and corresponding devices
CN110996056B (en) Video storage method and device of cascade monitoring system
CN107919999A (en) The discovery of different segment digital camera and connection method in a kind of LAN
CN113132227A (en) Method, device, computer equipment and storage medium for updating routing information
CN105337746A (en) Multicast data transmission method and apparatus
CN105490911A (en) Virtual local area network mapping method and apparatus
JP5066064B2 (en) Transmitting terminal, receiving terminal and transmission system used in one-way transmission path
JP2018510588A (en) Data processing method, apparatus, and device
CN101395905A (en) Method and apparatus of communication between embedded cable modem and embedded set-top box
US10102286B2 (en) Local object instance discovery for metric collection on network elements
CN102143050A (en) Network connection processing method and device for internet protocol version 6 (IPv6) network
CN106375489B (en) Method and device for processing Media Access Control (MAC) address
CN114430390B (en) Method and device for acquiring cross-domain link
CN102340553B (en) Method and device for allocating and determining IP addresses

Legal Events

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

Application publication date: 20180417

RJ01 Rejection of invention patent application after publication