CN111770210B - Multi-controller grouping method and readable medium - Google Patents

Multi-controller grouping method and readable medium Download PDF

Info

Publication number
CN111770210B
CN111770210B CN202010506042.8A CN202010506042A CN111770210B CN 111770210 B CN111770210 B CN 111770210B CN 202010506042 A CN202010506042 A CN 202010506042A CN 111770210 B CN111770210 B CN 111770210B
Authority
CN
China
Prior art keywords
address
controller
data
controllers
network
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.)
Active
Application number
CN202010506042.8A
Other languages
Chinese (zh)
Other versions
CN111770210A (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.)
Shenzhen Ex Lighting Technology Holdings Co Ltd
Original Assignee
Shenzhen Ex Lighting Technology Holdings 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 Shenzhen Ex Lighting Technology Holdings Co Ltd filed Critical Shenzhen Ex Lighting Technology Holdings Co Ltd
Priority to CN202010506042.8A priority Critical patent/CN111770210B/en
Publication of CN111770210A publication Critical patent/CN111770210A/en
Application granted granted Critical
Publication of CN111770210B publication Critical patent/CN111770210B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet 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/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/255Maintenance or indexing of mapping tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Abstract

The invention relates to the technical field of networks, in particular to a multi-controller grouping method and a readable medium, wherein the IP addresses of a plurality of controllers are obtained through a system; IP grouping is carried out on a plurality of controllers in a centralized manner to generate a mapping table; mapping the corresponding relation between the IP address and the MAC address to the network card one by one through the corresponding relation between the IP address and the MAC address of the mapping controller; configuring router MAC information; reading a mapping table corresponding to a controller when data is sent, and acquiring a corresponding IP address; and finally, setting the IP address sent by the socket. According to the invention, IP grouping is carried out on a plurality of controllers according to the IP addresses of the controllers, and a mapping table is generated; mapping the corresponding relation between the IP address and the MAC address to the network card one by one; when data is sent, the mapping table corresponding to the controller is read, the corresponding IP address is obtained, then data sending is carried out according to the target IP address, and the efficiency of the switch and the number of control points can be obviously improved.

Description

Multi-controller grouping method and readable medium
Technical Field
The invention relates to the technical field of networks, in particular to a multi-controller grouping method and a readable medium.
Background
In the field of LED intelligent light control, a data packet is sent to a switch by a plurality of controllers located at various places in the existing data transmission mode. Specifically, the existing method is to directly connect the controller through the internet access and send data to the switch through the broadcast packet.
However, the prior art has the following problems:
1. in the case of direct connection, after a plurality of controllers are cascaded, the delay of receiving data by subsequent controllers is large.
2. And in the mode of broadcasting packets to the switch, when the number of the controllers is excessive, data forwarding fails due to limited buffer of the switch.
Disclosure of Invention
Aiming at the defects of the prior art, the invention discloses a multi-controller grouping method, a multi-controller grouping system and a readable medium, which are used for solving the problem that the delay of the data received by the subsequent controller is very large after a plurality of controllers are cascaded under the condition of direct connection; the mode of broadcasting packets to the switch, when the number of the controllers is too large, the data forwarding fails due to limited buffer of the switch.
The invention is realized by the following technical scheme:
in a first aspect, the invention discloses a method for grouping multiple controllers, which comprises the following steps:
the S1 system acquires IP addresses of a plurality of controllers; IP grouping is carried out on a plurality of controllers in a centralized manner to generate a mapping table;
s2, mapping the corresponding relation of the IP address and the MAC address to the network card one by one through the corresponding relation of the IP address and the MAC address of the mapping controller;
s3 configuring router MAC address information;
s4, reading a mapping table corresponding to the controller when the data is sent, and acquiring a corresponding IP address;
s5 sets the IP address to which the socket is sent.
Furthermore, in the step S2, mapping the corresponding relationships to the network cards one by one is realized through a netsh-c "i i" add neighbors Idx mapping table command.
Further, in S4, the mapping table corresponding to the controller when sending data is read, and the IP address is found out by the ID of the controller according to the correspondence between the storage controller and the IP address.
Furthermore, when data is sent through the network card, the network card automatically converts the data into an MAC address according to the IP address in the data packet;
when the data packet is pushed to the router, the router pushes the data to the specified network port according to the configured corresponding relation between the network port and the MAC, and a corresponding controller is hung below the network port.
Further, in S5, when the destination address is dynamically set to the corresponding IP address, the data is sent via the following route: the method comprises the steps of specifying a network card- > a router- > a specified network port- > a specified controller.
Furthermore, the IP address is applied to a network layer, the MAC address is applied to a data link layer, and when the IP address corresponds to the MAC address, the data link layer protocol transfers data from one node to another node of the same link, and the network layer protocol transfers data from one network to another network.
In a second aspect, the present invention discloses a multi-controller IP packet system for performing the multi-controller packet method of the first aspect, comprising
The address acquisition module is used for acquiring a plurality of running addresses of a target, determining computer languages corresponding to the running addresses respectively when the running addresses are acquired, acquiring a plurality of addresses of a user and converting the addresses into the computer languages;
the algorithm processing module is used for editing and calculating various algorithms of the computer language and outputting the processed algorithms to the computer language;
and the communication module is used for communication among users and transmission of various data to realize user intersection.
In a third aspect, the present invention provides a readable medium comprising executable instructions which, when executed by a processor of a multi-controller IP packet system, cause the multi-controller IP packet system to perform the multi-controller packet method of the first aspect.
The invention has the beneficial effects that:
according to the invention, IP grouping is carried out on a plurality of controllers according to the IP addresses of the controllers, and a mapping table is generated; mapping the corresponding relation between the IP address and the MAC address to the network card one by one; when data is sent, the mapping table corresponding to the controller is read, the corresponding IP address is obtained, then data sending is carried out according to the target IP address, and the efficiency of the switch and the number of control points can be obviously improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic block diagram of a multi-controller grouping method of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
The embodiment discloses a multi-controller grouping method as shown in fig. 1, which comprises the following steps:
the S1 system acquires IP addresses of a plurality of controllers; IP grouping is carried out on a plurality of controllers in a centralized manner to generate a mapping table;
s2, mapping the corresponding relation of the IP address and the MAC address to the network card one by one through the corresponding relation of the IP address and the MAC address of the mapping controller;
s3 configuring router MAC address information;
s4, reading a mapping table corresponding to the controller when the data is sent, and acquiring a corresponding IP address;
s5 sets the IP address sent by the socket to complete the IP grouping.
In S2, mapping the corresponding relations to the network cards one by one through a netsh-c 'i i' add neighbors Idx mapping table command.
In S4, the mapping table corresponding to the controller when sending data is read, and the IP address is found out by the ID of the controller according to the correspondence between the storage controller and the IP address.
When data is sent through the network card, the network card automatically converts the data into an MAC address according to the IP address in the data packet;
when the data packet is pushed to the router, the router pushes the data to the specified network port according to the configured corresponding relation between the network port and the MAC, and a corresponding controller is hung below the network port.
In S5, when the destination address is dynamically set to the corresponding IP address, the data is transmitted via the following route: the method comprises the steps of specifying a network card- > a router- > a specified network port- > a specified controller.
The IP address is applied to a network layer, the MAC address is applied to a data link layer, when the data link layer corresponds to the MAC address, the data link layer protocol enables data to be transmitted from one node to another node of the same link, the network layer protocol enables the data to be transmitted from one network to another network, the MAC address of the intermediate node is found according to the target IP address, and the MAC address is transmitted through the intermediate node to realize the correspondence.
In the embodiment, IP grouping is carried out on a plurality of controllers according to the IP addresses of the controllers to generate a mapping table; mapping the corresponding relation between the IP address and the MAC address to the network card one by one; when data is sent, the mapping table corresponding to the controller is read, the corresponding IP address is obtained, then data sending is carried out according to the target IP address, and the efficiency of the switch and the number of control points can be obviously improved.
Example 2
The embodiment discloses an IP grouping method with three multiple controllers, which comprises the following steps:
in step S1, IP addresses of the plurality of controllers are acquired.
Step S2 is to collectively perform IP grouping on the plurality of controllers based on the IP addresses of the plurality of controllers, and to generate a mapping table.
Specifically, when there are three controllers, the format of the generated mapping table is:
controller 1-IP:192.168.0.101-Mac:00-0F-0A-25-FE-01
Controller 2-IP 192.168.0.101-Mac 00-0F-0A-25-FE-01
The controller 3-IP:192.168.0.102-Mac: 00-0F-0A-25-FE-02.
It should be noted that the format of the mapping table is only for illustrative purposes, and the mapping table is set and mapped according to the difference between the actual IP address and the MAC address.
And step S3, mapping the corresponding relation between the IP address and the MAC address of the controller, and mapping the corresponding relation between the IP address and the MAC address to the network card one by one.
In an embodiment of the invention, the mapping is achieved by the following commands:
netsh-c "i i" add neighbors Idx mapping table.
Specifically, the correspondence between IP and Mac is mapped through commands, and the command format netsh-c 'i i' is added neighbors Idx 192.168.0.10100-0F-0A-25-FE-01.
And mapping the corresponding relation between the Mac address and the IP address to the network cards one by one (Idx is a subscript of the network cards in the system).
Step S4, configure router MAC address information.
Specifically, the router has a function of configuring MAC address information for each network port.
Step S5, when sending data, reads the mapping table corresponding to the controller, and obtains the corresponding IP address.
Specifically, the IP address is found out by the ID of the controller according to the correspondence between the storage controller and the IP address. When data is sent through the network card, the network card automatically converts the data into an MAC address according to the IP address in the data packet; when the data packet is pushed to the router, the router pushes the data to the specified network port according to the configured corresponding relation between the network port and the MAC, and a corresponding controller is hung below the network port. This forms a closed loop for data to reach the designated controller.
Step S6, the IP address to which the socket is sent is set.
And setting the IP address sent by the socket. The Sendto function supports a destination IP address, and when the destination address is dynamically set to the corresponding IP address, data is sent via the following route: the method comprises the steps of specifying a network card- > a router- > a specified network port- > a specified controller.
According to the multi-controller grouping method provided by the embodiment of the invention, IP grouping is carried out on a plurality of controllers according to the IP addresses of the controllers, and a mapping table is generated; mapping the corresponding relation between the IP address and the MAC address to the network card one by one; and when data is sent, reading the mapping table corresponding to the controller, acquiring the corresponding IP address, and then sending the data according to the target IP address. The invention can obviously improve the efficiency and the control point number of the exchanger.
Example 3
The embodiment discloses a multi-controller IP grouping system, which comprises an address acquisition module, a data processing module and a data processing module, wherein the address acquisition module is used for acquiring a plurality of running addresses of a target, determining corresponding computer languages when each running address is acquired, acquiring a plurality of addresses of a user and converting the addresses into the computer languages;
the algorithm processing module is used for editing and calculating various algorithms of the computer language and outputting the processed algorithms to the computer language;
and the communication module is used for communication among users and transmission of various data to realize user intersection.
Example 4
The present embodiment discloses a readable medium comprising execution instructions that, when executed by a processor of a multi-controller IP packet system, cause the multi-controller IP packet system to perform the multi-controller packet method of embodiment 1.
In summary, the present invention performs IP grouping on multiple controllers according to the IP addresses of the controllers to generate a mapping table; mapping the corresponding relation between the IP address and the MAC address to the network card one by one; when data is sent, the mapping table corresponding to the controller is read, the corresponding IP address is obtained, then data sending is carried out according to the target IP address, and the efficiency of the switch and the number of control points can be obviously improved.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (4)

1. A method for grouping a plurality of controllers, comprising the steps of:
the S1 system acquires IP addresses of a plurality of controllers; grouping the controllers in a centralized manner according to the IP addresses of the controllers to generate a mapping table, wherein the mapping table comprises the corresponding relation of the ID, the IP addresses and the MAC address information of the controllers;
s2, mapping the corresponding relation of the IP address and the MAC address to the network card one by one through the corresponding relation of the IP address and the MAC address of the mapping controller;
s3 configuring MAC address information for each network port through the router;
s4, reading a mapping table corresponding to a controller when data is sent, wherein the controller is a target controller of the data to be sent, and finding out an IP address through the ID of the controller according to the stored corresponding relation between the ID of the controller and the IP address;
s5, setting the IP address sent by the socket, and when the target address is dynamically set to the corresponding IP address, sending the data through the following route: the method comprises the steps that a network card is appointed- > a router- > an internet port is appointed- > a controller is appointed, and when data are sent through the network card, the network card is automatically converted into an MAC address according to an IP address in a data packet; when the data packet is pushed to the router, the router pushes the data to the specified network port according to the configured corresponding relation between the network port and the MAC address, and a corresponding controller is hung below the network port.
2. The method for grouping multiple controllers as claimed in claim 1, wherein in S2, mapping the mapping relationship to the network card one by one is realized through a netsh-c "i i" add neighbors Idx mapping table command.
3. The method of claim 1, wherein the IP address is applied to a network layer and the MAC address is applied to a data link layer, wherein the data link layer protocol causes data to be transferred from one node to another node on the same link, and wherein the network layer protocol causes data to be transferred from one network to another network, wherein the MAC address of the intermediate node is found based on the destination IP address and transmitted through the intermediate node to achieve the correspondence.
4. A readable medium comprising executable instructions that, when executed by a processor, perform the multi-controller grouping method of any of claims 1-3.
CN202010506042.8A 2020-06-05 2020-06-05 Multi-controller grouping method and readable medium Active CN111770210B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010506042.8A CN111770210B (en) 2020-06-05 2020-06-05 Multi-controller grouping method and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010506042.8A CN111770210B (en) 2020-06-05 2020-06-05 Multi-controller grouping method and readable medium

Publications (2)

Publication Number Publication Date
CN111770210A CN111770210A (en) 2020-10-13
CN111770210B true CN111770210B (en) 2021-09-21

Family

ID=72720148

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010506042.8A Active CN111770210B (en) 2020-06-05 2020-06-05 Multi-controller grouping method and readable medium

Country Status (1)

Country Link
CN (1) CN111770210B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114158036B (en) * 2021-12-06 2024-01-23 成都飞鱼星科技股份有限公司 Method, equipment, system and medium for configuration management of AP

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1941744A (en) * 2005-09-13 2007-04-04 阿尔卡特公司 Low latency working vpls
CN101193116A (en) * 2007-07-09 2008-06-04 福建星网锐捷网络有限公司 A method, system and router for coordinated prevention from address parsing protocol attack
CN104363231A (en) * 2014-11-17 2015-02-18 北京锐驰信安技术有限公司 Network security isolation and information exchange method and system based on one-way channel
CN110838935A (en) * 2018-08-15 2020-02-25 上海宽带技术及应用工程研究中心 High-availability SDN controller clustering method, system, storage medium and equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854268B (en) * 2009-04-04 2013-06-05 华为技术有限公司 Method, device and system of IP (Internet Protocol) network performance measurement as well as method, device and system of IP network service quality control
US20140282542A1 (en) * 2013-03-14 2014-09-18 Infinio Systems Inc. Hypervisor Storage Intercept Method
CN103297560B (en) * 2013-05-21 2018-09-07 江苏中科羿链通信技术有限公司 A kind of method and server of data flow classification
CN110932890B (en) * 2019-11-20 2022-09-09 厦门网宿有限公司 Data transmission method, server and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1941744A (en) * 2005-09-13 2007-04-04 阿尔卡特公司 Low latency working vpls
CN101193116A (en) * 2007-07-09 2008-06-04 福建星网锐捷网络有限公司 A method, system and router for coordinated prevention from address parsing protocol attack
CN104363231A (en) * 2014-11-17 2015-02-18 北京锐驰信安技术有限公司 Network security isolation and information exchange method and system based on one-way channel
CN110838935A (en) * 2018-08-15 2020-02-25 上海宽带技术及应用工程研究中心 High-availability SDN controller clustering method, system, storage medium and equipment

Also Published As

Publication number Publication date
CN111770210A (en) 2020-10-13

Similar Documents

Publication Publication Date Title
CN103166874B (en) A kind of message forwarding method and equipment
US20170244792A1 (en) Power-Line Carrier Terminal Control Apparatus, System, and Method
US7664116B2 (en) Network based routing scheme
US9960998B2 (en) Forwarding packet in stacking system
US20160134513A1 (en) Concerted Multi-Destination Forwarding in a Joint TRILL Fabric and VXLAN/IP Fabric Data Center
KR101391965B1 (en) Implementing control planes for hybrid networks
US10334020B2 (en) Method and apparatus for sending target data to and acquiring target data from network
CN102185782A (en) Data transmission method and device of multilink transparent transmission interconnection network
CN104937896A (en) Method for processing address resolution protocol message, forwarder and controller
CN111147372B (en) Downlink message sending and forwarding method and device
CN109088957B (en) NAT rule management method, device and equipment
CN105187311A (en) Message forwarding method and message forwarding device
CN111770210B (en) Multi-controller grouping method and readable medium
KR20210058720A (en) Resource allocation method, apparatus, and system, and storage medium
CN104734930B (en) Method and device for realizing access of Virtual Local Area Network (VLAN) to Variable Frequency (VF) network and Fiber Channel Frequency (FCF)
US10523629B2 (en) Control apparatus, communication system, communication method, and program
EP3104561A1 (en) Communication control system, communication control method, and communication control program
CN111211977B (en) Ship communication method and system supporting external multi-heterogeneous channel connection
CN112583736A (en) Signaling message distribution method, device, equipment and medium
CN114124787A (en) Data sending method, device, equipment and hybrid network
KR20210016802A (en) Method for optimizing flow table for network service based on server-client in software defined networking environment and sdn switch thereofor
CN109347734A (en) A kind of file transmitting method, device, the network equipment and computer-readable medium
US20140032711A1 (en) Bandwidth control apparatus, bandwidth control method, and bandwidth control program
CN108810182B (en) NAT flow table dynamic learning and configuration method based on openflow system
CN113904980B (en) Channel switching method, device, switch and storage medium

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
GR01 Patent grant
GR01 Patent grant