CN114157402A - Dual-redundancy network card communication method and device - Google Patents
Dual-redundancy network card communication method and device Download PDFInfo
- Publication number
- CN114157402A CN114157402A CN202111346893.1A CN202111346893A CN114157402A CN 114157402 A CN114157402 A CN 114157402A CN 202111346893 A CN202111346893 A CN 202111346893A CN 114157402 A CN114157402 A CN 114157402A
- Authority
- CN
- China
- Prior art keywords
- network card
- network
- dual
- communication
- address
- 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
Links
- 238000004891 communication Methods 0.000 title claims abstract description 74
- 238000000034 method Methods 0.000 title claims abstract description 18
- 230000009977 dual effect Effects 0.000 claims description 13
- 238000005516 engineering process Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000003111 delayed effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/22—Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
- H04L12/12—Arrangements for remote connection or disconnection of substations or of equipment thereof
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Abstract
The application provides a dual-redundancy network card communication method, which comprises the following steps: setting the same MAC address and IP address for the first network card and the second network card; initializing the first network card and starting a first enabling interruption of the first network card, detecting a physical connection state of the first network card, and if a first network card access is closed, establishing communication connection by the first network card; if the first network card access is disconnected, the first enabling interrupt is closed, the second network card is initialized, the second enabling interrupt is opened, and the second network card sends an address port updating notice to the switch to establish communication connection. By setting the double network cards as the same MAC address, the communication can be established without updating the network card address, and the time for establishing the communication is effectively saved. The application also provides a dual-redundancy network card communication device.
Description
Technical Field
The present application relates to communications technologies, and in particular, to a dual redundant network card communications method. The application also relates to a dual-redundancy network card communication device.
Background
The Ethernet is widely applied to production and life as a communication technology, and has irreplaceable functions in the fields of aerospace and the like. The particularity of the aerospace field is that the products used for aerospace are of a delicate degree and expensive, and therefore have high requirements on the reliability of the communication, which could otherwise cause irreparable losses. Based on this, in the field of aerospace, the DSP is used as a board card of a processor, and ethernet communication using dual redundant network cards is already common.
In the prior art, the reliability of communication is greatly increased by using a dual-redundancy scheme, and the dual-redundancy network card is a scheme technology of adopting two MAC addresses and one IP address when dual redundancy is designed. During dual redundancy switching, because the MAC addresses of the two network cards are different, ARP communication is added to update the MAC addresses, so that the communication time is increased, and the time for reestablishing normal communication is delayed.
Disclosure of Invention
In order to solve the problem of long communication establishing time in the prior art, the application provides a dual-redundancy network card communication method. The application also provides a dual-redundancy network card communication device.
The application provides a dual-redundancy network card communication method, which comprises the following steps:
setting the same MAC address and IP address for the first network card and the second network card;
initializing the first network card and starting a first enabling interruption of the first network card, detecting a physical connection state of the first network card, and if a first network card access is closed, establishing communication connection by the first network card;
if the first network card access is disconnected, the first enabling interrupt is closed, the second network card is initialized, the second enabling interrupt is opened, and the second network card sends an address port updating notice to the switch to establish communication connection.
Optionally, a network protocol stack is built in the first network card and the second network card.
Optionally, the first network card and the second network card are connected to a DSP, and the DSP is a host controller and a communication connector of the first network card and the second network card.
Optionally, the network card adopts a W5500 chip.
Optionally, before the first enable interrupt is turned off, the first network card is reset.
The application also provides a dual-redundancy network card communication device, including:
the setting module is used for setting the same MAC address and IP address for the first network card and the second network card;
the first connection module is used for initializing the first network card, starting first enabling interruption of the first network card, detecting the physical connection state of the first network card, and establishing communication connection by the first network card if the first network card access is closed;
and the second connection module is used for closing the first enabling interrupt, initializing the second network card, opening a second enabling interrupt and establishing communication connection after the second network card sends an address port updating notice to the switch if the first network card access is disconnected.
Optionally, a network protocol stack is built in the first network card and the second network card.
Optionally, the first network card and the second network card are connected to a DSP, and the DSP is a host controller and a communication connector of the first network card and the second network card.
Optionally, the network card adopts a W5500 chip.
Optionally, before the first enable interrupt is turned off, the first network card is reset.
Compared with the prior art, the application has the advantages that:
the application provides a dual-redundancy network card communication method, which comprises the following steps: setting the same MAC address and IP address for the first network card and the second network card; initializing the first network card and starting a first enabling interruption of the first network card, detecting a physical connection state of the first network card, and if a first network card access is closed, establishing communication connection by the first network card; if the first network card access is disconnected, the first enabling interrupt is closed, the second network card is initialized, the second enabling interrupt is opened, and the second network card sends an address port updating notice to the switch to establish communication connection. By setting the double network cards as the same MAC address, the communication can be established without updating the network card address, and the time for establishing the communication is effectively saved.
Drawings
Fig. 1 is a flowchart of dual redundant network card communication according to the present application.
Fig. 2 is a schematic diagram of a dual redundant network card communication device according to the present application.
Detailed Description
The following is an example of a specific implementation process provided for explaining the technical solutions to be protected in the present application in detail, but the present application may also be implemented in other ways than those described herein, and a person skilled in the art may implement the present application by using different technical means under the guidance of the idea of the present application, so that the present application is not limited by the following specific embodiments.
The application provides a dual-redundancy network card communication method, which comprises the following steps: setting the same MAC address and IP address for the first network card and the second network card; initializing the first network card and starting a first enabling interruption of the first network card, detecting a physical connection state of the first network card, and if a first network card access is closed, establishing communication connection by the first network card; if the first network card access is disconnected, the first enabling interrupt is closed, the second network card is initialized, the second enabling interrupt is opened, and the second network card sends an address port updating notice to the switch to establish communication connection. By setting the double network cards as the same MAC address, the communication can be established without updating the network card address, and the time for establishing the communication is effectively saved.
Fig. 1 is a flowchart of dual redundant network card communication according to the present application.
Referring to fig. 1, S101 sets the same MAC address and IP address for the first network card and the second network card.
The first network card and the second network card are both connected to a DSP (digital signal processor), and the DSP controls the dual-network card, and the dual-network card comprises: detecting the link state of the network card, switching the network card and the like.
The first network card and the second network card work independently, when the first network card works, the second network card does not work any more, and when the second network card works, the first network card does not work any more. The first network card is a default network card, that is, the first network card is initialized by default after the power is turned on.
In the application, the same MAC address and IP address are set for the first network card and the second network card, but the address ports of the first network card and the second network card are different. With the arrangement, the DSP can select different network cards through the selection port without changing the address of the network card.
Referring to fig. 1, S102 initializes the first network card and starts a first enable interrupt of the first network card, detects a physical connection state of the first network card, and establishes a communication connection with the first network card if a first network card access is closed.
After the first network card is initialized, the DSP is performed by default, and after the initialization is completed, the first network card is enabled and interrupted. The enable interrupt for the first network card is referred to herein as a first enable interrupt.
The enabling interruption means enabling interruption, and the operation of the network card in the application needs to start the enabling interruption, otherwise, the network card cannot operate. Preferably, the enable interrupt is connected between the DSP and the network card through a separate line.
Before the first network card is operated, the physical connection state of the first network card needs to be detected, and the physical connection state includes: closed and open path. The closed path means that the first network card can work normally, and the open path means that the first network card fails and cannot work normally.
And if the detected physical connection state of the first network card is closed, the first network card can be normally started to establish communication connection, and a data processing flow is carried out.
Referring to fig. 1, if the first network card access is disconnected, S103 closes the first enabling interrupt, initializes the second network card and opens a second enabling interrupt, and the second network card sends an address port update notification to the switch to establish a communication connection.
And when the first network card can work normally, the first network card establishes communication connection to perform a data processing flow. The method and the device have the advantages that the double redundant network cards are arranged, and when the first network card is disconnected, the second network card is initially replaced.
Specifically, after detecting that the first network card is disconnected, the first enabling interrupt of the first network card is closed, then the second network card is initialized, the second enabling interrupt of the second network card is started, then the second network card is started to establish communication connection, and a data processing flow is performed.
According to the method and the device, the MAC addresses and the IP addresses of the second network card and the first network card are the same, so that normal communication processing of network data can be carried out only by updating the address interface end of the second network card into the switch, and the network card address does not need to be updated.
The application also provides a dual-redundancy network card communication device, including: a setting module 201, configured to set the same MAC address and IP address for the first network card and the second network card; a first connection module 202, configured to initialize the first network card, start a first enable interrupt of the first network card, detect a physical connection state of the first network card, and establish a communication connection with the first network card if a first network card access is closed; the second connection module 203 is configured to close the first enabling interrupt, initialize the second network card, open a second enabling interrupt, and establish a communication connection after the second network card sends an address port update notification to the switch if the first network card access is disconnected.
Fig. 2 is a schematic diagram of a dual redundant network card communication device according to the present application.
Referring to fig. 2, a setting module 201 is configured to set the same MAC address and IP address for the first network card and the second network card.
The first network card and the second network card are both connected to a DSP (digital signal processor), and the DSP controls the dual-network card, and the dual-network card comprises: detecting the link state of the network card, switching the network card and the like.
The first network card and the second network card work independently, when the first network card works, the second network card does not work any more, and when the second network card works, the first network card does not work any more. The first network card is a default network card, that is, the first network card is initialized by default after the power is turned on.
In the application, the same MAC address and IP address are set for the first network card and the second network card, but the address ports of the first network card and the second network card are different. With the arrangement, the DSP can select different network cards through the selection port without changing the address of the network card.
Referring to fig. 2, a first connection module 202 is configured to initialize the first network card, start a first enable interrupt of the first network card, detect a physical connection state of the first network card, and establish a communication connection with the first network card if a first network card access is closed.
After the first network card is initialized, the DSP is performed by default, and after the initialization is completed, the first network card is enabled and interrupted. In the application, the enabling interruption of the first network card becomes a first enabling interruption.
The enabling interruption means enabling interruption, and the operation of the first network card needs to start the enabling interruption, otherwise, the first network card cannot operate.
Before the first network card is operated, the physical connection state of the first network card needs to be detected, and the physical connection state includes: closed and open path. The closed path means that the first network card can work normally, and the open path means that the first network card fails and cannot work normally.
And if the detected physical connection state of the first network card is closed, the first network card can be normally started to establish communication connection, and a data processing flow is carried out.
Referring to fig. 2, the second connection module 203 is configured to close the first enabling interrupt, initialize the second network card, open the second enabling interrupt, and establish a communication connection after the second network card sends an address port update notification to the switch if the first network card access is disconnected.
And when the first network card can work normally, the first network card establishes communication connection to perform a data processing flow. The method and the device have the advantages that the double redundant network cards are arranged, and when the first network card is disconnected, the second network card is initially replaced.
Specifically, after detecting that the first network card is disconnected, the first enabling interrupt of the first network card is closed, then the second network card is initialized, the second enabling interrupt of the second network card is started, then the second network card is started to establish communication connection, and a data processing flow is performed.
According to the method and the device, the MAC addresses and the IP addresses of the second network card and the first network card are the same, so that normal communication processing of network data can be carried out only by updating the address interface end of the second network card into the switch, and the network card address does not need to be updated.
Claims (10)
1. A dual redundant network card communication method is characterized by comprising the following steps:
setting the same MAC address and IP address for the first network card and the second network card;
initializing the first network card and starting a first enabling interruption of the first network card, detecting a physical connection state of the first network card, and if a first network card access is closed, establishing communication connection by the first network card;
if the first network card access is disconnected, the first enabling interrupt is closed, the second network card is initialized, the second enabling interrupt is opened, and the second network card sends an address port updating notice to the switch to establish communication connection.
2. The dual redundant network card communication method of claim 1, wherein the first network card and the second network card have built-in network protocol stacks.
3. The dual redundant network card communication method of claim 1, wherein the first network card and the second network card are connected to a DSP, and the DSP is a host controller and a communication connector of the first network card and the second network card.
4. The dual-redundancy network card communication method of claim 1, wherein the network card uses W5500 chips.
5. The dual-redundancy-network-card communication method of claim 1, wherein the first network card is reset before the first enable interrupt is turned off.
6. A dual redundant network card communication device, comprising:
the setting module is used for setting the same MAC address and IP address for the first network card and the second network card;
the first connection module is used for initializing the first network card, starting first enabling interruption of the first network card, detecting the physical connection state of the first network card, and establishing communication connection by the first network card if the first network card access is closed;
and the second connection module is used for closing the first enabling interrupt, initializing the second network card, opening a second enabling interrupt and establishing communication connection after the second network card sends an address port updating notice to the switch if the first network card access is disconnected.
7. The dual redundant network card communication device of claim 6, wherein the first network card and the second network card have built-in network protocol stacks.
8. The dual-redundancy-network-card communication device of claim 6, wherein the first network card and the second network card are connected to a DSP, and the DSP is a host controller and a communication connector of the first network card and the second network card.
9. The dual-redundancy network card communication device of claim 6, wherein the network card is a W5500 chip.
10. The dual-redundancy NIC communication device of claim 6, wherein the first NIC is reset before the first enable interrupt is turned off.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111346893.1A CN114157402A (en) | 2021-11-15 | 2021-11-15 | Dual-redundancy network card communication method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111346893.1A CN114157402A (en) | 2021-11-15 | 2021-11-15 | Dual-redundancy network card communication method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114157402A true CN114157402A (en) | 2022-03-08 |
Family
ID=80459954
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111346893.1A Pending CN114157402A (en) | 2021-11-15 | 2021-11-15 | Dual-redundancy network card communication method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114157402A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103036780A (en) * | 2012-12-14 | 2013-04-10 | 滁州安瑞电力自动化有限公司 | Intelligent hot standby redundant double network cards and hot standby redundant method |
CN104468238A (en) * | 2014-12-22 | 2015-03-25 | 上海斐讯数据通信技术有限公司 | Double-network-card redundancy switching method based on vxworks system |
CN106301836A (en) * | 2015-05-25 | 2017-01-04 | 北京视联动力国际信息技术有限公司 | A kind of method of redundancy backup, terminal and regard networked system |
CN106657029A (en) * | 2016-12-05 | 2017-05-10 | 南京南瑞继保电气有限公司 | Redundant communication method for realizing multi-internet access IP address sharing based on white list |
CN109474466A (en) * | 2018-11-13 | 2019-03-15 | 天津津航计算技术研究所 | The method of dual redundant network interface card switching is realized on DDS middleware |
CN109831341A (en) * | 2019-03-19 | 2019-05-31 | 中国电子科技集团公司第三十六研究所 | A kind of fast switch over method and device of redundancy double netcard |
CN113645048A (en) * | 2021-08-09 | 2021-11-12 | 武汉德创信通科技有限公司 | Network card switching method and device and field programmable gate array FPGA |
-
2021
- 2021-11-15 CN CN202111346893.1A patent/CN114157402A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103036780A (en) * | 2012-12-14 | 2013-04-10 | 滁州安瑞电力自动化有限公司 | Intelligent hot standby redundant double network cards and hot standby redundant method |
CN104468238A (en) * | 2014-12-22 | 2015-03-25 | 上海斐讯数据通信技术有限公司 | Double-network-card redundancy switching method based on vxworks system |
CN106301836A (en) * | 2015-05-25 | 2017-01-04 | 北京视联动力国际信息技术有限公司 | A kind of method of redundancy backup, terminal and regard networked system |
CN106657029A (en) * | 2016-12-05 | 2017-05-10 | 南京南瑞继保电气有限公司 | Redundant communication method for realizing multi-internet access IP address sharing based on white list |
CN109474466A (en) * | 2018-11-13 | 2019-03-15 | 天津津航计算技术研究所 | The method of dual redundant network interface card switching is realized on DDS middleware |
CN109831341A (en) * | 2019-03-19 | 2019-05-31 | 中国电子科技集团公司第三十六研究所 | A kind of fast switch over method and device of redundancy double netcard |
CN113645048A (en) * | 2021-08-09 | 2021-11-12 | 武汉德创信通科技有限公司 | Network card switching method and device and field programmable gate array FPGA |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102088411B (en) | Integrated switch | |
CN101321085B (en) | Intelligent failover in a load-balanced networking environment | |
EP2640013B1 (en) | Method And Apparatus Providing Network Redundancy And High Availability To Remote Network Nodes | |
CN101557313B (en) | Method for protecting uplink plate card of carrier-grade broadband access equipment | |
CN108155978B (en) | Hot backup method for redundant network card in VxWorks environment | |
CN101645876A (en) | Automatic network switching method and system | |
CN112653621A (en) | Domestic LRM gigabit network module with dual-redundancy switching function | |
CN104917700A (en) | Management unit and exchange unit dual-redundancy switch | |
CA2261323A1 (en) | Backup procedure for dss2-based signalling links | |
CN114157402A (en) | Dual-redundancy network card communication method and device | |
CN111417034B (en) | Switch and hot plug method, device and system for switch board card thereof | |
CN204633800U (en) | The switch of a kind of administrative unit and the two redundancy of crosspoint | |
US7117288B2 (en) | USB dynamic service switch for dual processor architecture | |
US11444842B2 (en) | Network switch and network switch system thereof | |
KR20040058636A (en) | Apparatus and method for dual link in ethernet interface equipment | |
JP3415494B2 (en) | Method and apparatus for duplicated LAN switch for virtual LAN | |
JPH09326810A (en) | Connection changeover method on occurrence of fault | |
CN105530120A (en) | Service processing method, controller and service processing system | |
KR20040020727A (en) | Apparatus of duplexing for ethernet switching board in communication processing system | |
US20230412463A1 (en) | Method for resuming topology of single loop network and switch network system | |
CN102065585A (en) | Method and device for Ethernet access | |
CN218004103U (en) | Communication circuit and electronic equipment | |
CN116248546A (en) | Simple multi-WAN port detection switching mode | |
CN112596369A (en) | Multi-machine redundancy seamless switching system and method thereof | |
JPH10105490A (en) | Method for monitoring server fault and its countermeasure method |
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 |