[go: up one dir, main page]

CN116582498A - Method for automatically adjusting port rate of switch to connect other network equipment - Google Patents

Method for automatically adjusting port rate of switch to connect other network equipment Download PDF

Info

Publication number
CN116582498A
CN116582498A CN202310617141.7A CN202310617141A CN116582498A CN 116582498 A CN116582498 A CN 116582498A CN 202310617141 A CN202310617141 A CN 202310617141A CN 116582498 A CN116582498 A CN 116582498A
Authority
CN
China
Prior art keywords
switch
connection
rate
network devices
port
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
CN202310617141.7A
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.)
Shenzhen Tenda Technology Co Ltd
Original Assignee
Shenzhen Tenda 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 Shenzhen Tenda Technology Co Ltd filed Critical Shenzhen Tenda Technology Co Ltd
Priority to CN202310617141.7A priority Critical patent/CN116582498A/en
Publication of CN116582498A publication Critical patent/CN116582498A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/25Flow control; Congestion control with rate being modified by the source upon detecting a change of network conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3054Auto-negotiation, e.g. access control between switch gigabit interface connector [GBIC] and link
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

本发明提供一种交换机自动调整端口速率连接其他网络设备的方法,包括:交换机检测自身的连接状态,判断是否需要与其他网络设备建立连接;当需要与其他网络设备建立连接时,交换机通过I2C的通信方式访问自身光模块的存储器获取光模块的速率标称;交换机根据自身的端口速率档次,调整符合光模块速率标称支持的端口速率与其他网络设备建立连接。本发明的有益效果:能够根据交换机的光模块调整交换机的端口速率以便于实现与其他网络设备的快速连接。

The invention provides a method for a switch to automatically adjust the port rate to connect to other network devices, including: the switch detects its own connection status, and judges whether it needs to establish a connection with other network devices; when it needs to establish a connection with other network devices, the switch uses I2C The communication method accesses the memory of its own optical module to obtain the nominal rate of the optical module; the switch adjusts the port rate that meets the nominal rate of the optical module to establish a connection with other network devices according to its own port rate grade. The beneficial effect of the present invention is that the port rate of the switch can be adjusted according to the optical module of the switch so as to realize fast connection with other network devices.

Description

一种交换机自动调整端口速率连接其他网络设备的方法A method for a switch to automatically adjust port speed to connect other network devices

技术领域technical field

本发明涉及交换机技术领域,尤其涉及一种交换机自动调整端口速率连接其他网络设备的方法。The invention relates to the technical field of switches, in particular to a method for a switch to automatically adjust port speeds to connect to other network devices.

背景技术Background technique

交换机,是一种用于电信号转发的网络设备,它可以为接入交换机的任意两个网络节点提供独享的电信号通路,最常见的交换机是以太网交换机。A switch is a network device used for electrical signal forwarding. It can provide an exclusive electrical signal path for any two network nodes connected to the switch. The most common switch is an Ethernet switch.

随着科技的快速发展,人们对于网络通讯速率的需求越发增大,网络设备的速率由百兆、千兆发展至万兆甚至更高。目前普遍的万兆传输方式便是使用光纤及相应的光电转换设备搭配支持万兆转发的设备,如万兆交换机作为中转设备,万兆光模块作为光电转换设备,光纤作为传输介质。With the rapid development of science and technology, people's demand for network communication speed is increasing, and the speed of network equipment has developed from 100M and 1000M to 10M or even higher. At present, the common 10-Gigabit transmission method is to use optical fiber and corresponding photoelectric conversion equipment with equipment that supports 10-Gigabit forwarding, such as a 10-Gigabit switch as a transit device, a 10-Gigabit optical module as a photoelectric conversion device, and an optical fiber as a transmission medium.

但是目前并非所有的万兆交换机均支持两端速率自协商功能,当交换机不支持端口速率自协商时,不便于交换机的管理和使用:1、对端速率发生改变,就会发生断连,需要修改速率才能再次进行管理;2、交换机与其他网络设备连接时需要手动设置速率,不便于使用,该缺陷主要来源于交换机所使用的交换芯片的限制。However, not all 10 Gigabit switches currently support the auto-negotiation function of the port rate. When the switch does not support the port rate auto-negotiation, it is not convenient for the management and use of the switch: 1. If the peer rate changes, the connection will be disconnected. Only by modifying the rate can it be managed again; 2. When the switch is connected to other network devices, the rate needs to be manually set, which is inconvenient to use. This defect mainly comes from the limitation of the switching chip used by the switch.

发明内容Contents of the invention

为解决现有技术中的问题,本发明提供一种交换机自动调整端口速率连接其他网络设备的方法,能够根据交换机的光模块速率标称调整交换机的端口速率档次以便于实现与其他网络设备的快速连接,解决了现有技术中当交换机不支持端口速率自协商时速率发生改变就会发生断连、交换机与其他网络设备连接时需要手动设置速率不便于使用的问题。In order to solve the problems in the prior art, the present invention provides a method for a switch to automatically adjust the port rate to connect to other network devices, which can adjust the port rate grade of the switch according to the nominal rate of the optical module of the switch so as to realize fast communication with other network devices. The connection solves the problems in the prior art that when the switch does not support port rate auto-negotiation, the rate changes and the connection will be disconnected, and the rate needs to be manually set when the switch is connected to other network devices, which is inconvenient to use.

本发明的一种交换机自动调整端口速率连接其他网络设备的方法包括如下步骤:A method for automatically adjusting the port speed of a switch to connect to other network devices of the present invention comprises the following steps:

步骤1:交换机检测自身的连接状态,判断是否需要与其他网络设备建立连接;Step 1: The switch detects its own connection status and determines whether it needs to establish a connection with other network devices;

步骤2:当需要与其他网络设备建立连接时,交换机通过I2C的通信方式访问自身光模块的存储器获取光模块的速率标称;Step 2: When it is necessary to establish a connection with other network devices, the switch accesses the memory of its own optical module through I2C communication to obtain the nominal rate of the optical module;

步骤3:交换机根据自身的端口速率档次,调整符合光模块速率标称支持的端口速率与其他网络设备建立连接。Step 3: The switch adjusts the port rate that conforms to the nominal rate supported by the optical module according to its own port rate level to establish a connection with other network devices.

本发明作进一步改进,在所述步骤1中,还包括如下步骤,The present invention is further improved, and in said step 1, the following steps are also included,

步骤101:交换机检测到自身端口中是否有光信号;Step 101: the switch detects whether there is an optical signal in its own port;

步骤102:当交换机检测自身端口中有光信号时,交换机检测自身是否已经与其他网络设备成功建立连接;Step 102: When the switch detects that there is an optical signal in its own port, the switch detects whether it has successfully established a connection with other network devices;

步骤103:当交换机检测到自身没有与其他网络设备成功建立连接时,交换机检测自身本次端口速率尝试与其他网络设备建立连接是否已超第一设定时间;Step 103: When the switch detects that it has not successfully established a connection with other network devices, the switch detects whether the current port rate of the switch to attempt to establish a connection with other network devices has exceeded the first set time;

步骤104:当交换机检测到自身本次端口速率尝试与其他网络设备建立连接没有超过第一设定时间时,交换机记录自身当下端口速率档次。Step 104: When the switch detects that its current port rate attempt to establish a connection with other network devices does not exceed the first set time, the switch records its current port rate level.

本发明作进一步改进,在所述步骤3中,还包括如下步骤,The present invention is further improved, in said step 3, also includes the following steps,

步骤301:交换机判断自身当下的端口速率档次是否符合光模块速率标称支持的端口速率;Step 301: The switch judges whether its current port rate class conforms to the port rate supported by the nominal rate of the optical module;

步骤302:当交换机判断自身当下的端口速率档次符合光模块速率标称支持的端口速率时,交换机检测自身本次端口速率尝试与其他网络设备建立连接是否已超第一设定时间;Step 302: When the switch judges that its current port rate class conforms to the port rate supported by the nominal rate of the optical module, the switch detects whether the current port rate attempt of the switch to establish a connection with other network devices has exceeded the first set time;

步骤303:当交换机检测到自身本次端口速率尝试与其他网络设备建立连接没有超过第一设定时间时,交换机根据自身的端口速率档次,调整符合光模块速率标称支持的端口速率档次,继续与其他网络设备建立连接。Step 303: When the switch detects that its current port rate attempt to establish a connection with other network devices has not exceeded the first set time, the switch adjusts the port rate level that meets the nominal rate of the optical module according to its own port rate level, and continues Establish connections with other network devices.

本发明作进一步改进,在所述步骤1中,当不需要与其他网络设备建立连接时,交换机提示无需与其他网络设备建立连接。The present invention is further improved. In the step 1, when there is no need to establish a connection with other network equipment, the switch prompts that there is no need to establish a connection with other network equipment.

本发明作进一步改进,在所述步骤101中,当交换机检测到自身端口中没有光信号时,交换机提示无其他网络设备可连接。The present invention is further improved. In the step 101, when the switch detects that there is no optical signal in its own port, the switch prompts that there is no other network device to be connected.

本发明作进一步改进,在所述步骤102中,当交换机检测到自身已经与其他网络设备成功建立连接时,交换机提示连接已完成。The present invention is further improved. In the step 102, when the switch detects that it has successfully established a connection with other network devices, the switch prompts that the connection has been completed.

本发明作进一步改进,在所述步骤103中,当交换机检测到自身本次端口速率尝试与其他网络设备建立连接已经超过第一设定时间时,交换机检测自身本次端口速率尝试与其他网络设备建立连接是否超过第二设定时间,如果没有超过第二设定时间,执行步骤101;如果超过第二设定时间,则交换机认定尝试建立连接的其他网络设备与本交换机不匹配,不再进行连接,所述第一设定时间的初始设定值为2秒,所述第二设定时间的初始设定值为8秒。The present invention makes a further improvement. In the step 103, when the switch detects that the current port rate of the switch itself has attempted to establish a connection with other network equipment for more than the first set time, the switch detects that the current port rate of the switch itself attempts to establish a connection with other network equipment. Whether the connection establishment exceeds the second set time, if it does not exceed the second set time, execute step 101; if it exceeds the second set time, the switch determines that other network devices that are trying to establish a connection do not match the switch, and do not proceed connection, the initial setting value of the first setting time is 2 seconds, and the initial setting value of the second setting time is 8 seconds.

本发明作进一步改进,在所述步骤301中,当交换机判断自身当下的端口速率档次不符合光模块速率标称支持的端口速率时,直接执行步骤303。The present invention is further improved. In the step 301, when the switch judges that its current port rate grade does not meet the port rate supported by the nominal rate of the optical module, it directly executes the step 303.

本发明作进一步改进,在所述步骤302中,当交换机检测到自身本次端口速率尝试与其他网络设备建立连接已经超过第一设定时间时,交换机继续尝试与其他网络设备建立连接。The present invention makes a further improvement. In the step 302, when the switch detects that the current port rate of the switch is trying to establish a connection with other network devices for more than the first set time, the switch continues to try to establish a connection with other network devices.

本发明作进一步改进,在所述步骤303中,当交换机根据自身的端口速率档次,调整完了所有符合光模块速率标称支持的端口速率与其他网络设备建立连接都没有成功连接时,返回执行步骤1。The present invention makes a further improvement. In the step 303, when the switch has adjusted all the port rates that meet the nominal rate support of the optical module according to its own port rate level and fails to establish a connection with other network devices, return to the execution step 1.

本发明的有益效果是:本发明提供的一种交换机自动调整端口速率连接其他网络设备的方法,交换机根据自身的端口速率档次,获取自身光模块的速率标称,然后调整交换机到符合光模块速率标称范围内的端口速率档次,继续不断与其他网络设备尝试建立连接,以便于实现与其他网络设备的快速连接,解决了现有技术中当交换机不支持端口速率自协商时速率发生改变就会发生断连、交换机与其他网络设备连接时需要手动设置速率不便于使用的问题。The beneficial effects of the present invention are: a method for automatically adjusting the port rate of a switch to connect to other network devices provided by the present invention, the switch obtains the nominal rate of its own optical module according to its own port rate grade, and then adjusts the switch to meet the rate of the optical module The port speed grade within the nominal range continues to try to establish connections with other network devices, so as to achieve fast connections with other network devices, and solves the problem of speed changes when the switch does not support port speed auto-negotiation in the prior art. When disconnection occurs and the switch is connected to other network devices, it is necessary to manually set the rate and it is not convenient to use.

附图说明Description of drawings

图1为本发明的一种交换机自动调整端口速率连接其他网络设备的方法的流程图;Fig. 1 is the flow chart of the method for a kind of switch automatically adjusting port rate of the present invention to connect other network devices;

图2为本发明的一种交换机自动调整端口速率连接其他网络设备的方法的流程图;Fig. 2 is the flow chart of the method for a kind of switch automatically adjusting port rate of the present invention to connect other network devices;

图3为本发明的一种交换机自动调整端口速率连接其他网络设备的方法的流程图;Fig. 3 is the flow chart of the method for a kind of switch automatically adjusting port rate of the present invention to connect other network devices;

图4为本发明的一种交换机自动调整端口速率连接其他网络设备的方法的网络部署原理图;Fig. 4 is a network deployment principle diagram of a method for automatically adjusting the port rate of a switch to connect to other network devices according to the present invention;

图5为本发明的交换机与自身光模块通信的原理图。Fig. 5 is a schematic diagram of the communication between the switch and its own optical module according to the present invention.

具体实施方式Detailed ways

下面结合附图和实施例对本发明做进一步详细说明。The present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments.

请参见图1-5,本发明的一种交换机自动调整端口速率连接其他网络设备的方法包括如下步骤:Referring to Fig. 1-5, a kind of method that switch automatically adjusts port rate to connect other network equipments of the present invention comprises the following steps:

步骤1:交换机检测自身的连接状态,判断是否需要与其他网络设备建立连接;当不需要与其他网络设备建立连接时,交换机提示无需与其他网络设备建立连接。Step 1: The switch detects its own connection status to determine whether it needs to establish a connection with other network devices; when it does not need to establish a connection with other network devices, the switch prompts that it does not need to establish a connection with other network devices.

步骤2:当需要与其他网络设备建立连接时,交换机通过I2C的通信方式访问自身光模块的存储器获取光模块的速率标称。Step 2: When it is necessary to establish a connection with other network devices, the switch accesses the memory of its own optical module through I2C communication to obtain the nominal rate of the optical module.

步骤3:交换机根据自身的端口速率档次,调整符合光模块速率标称支持的端口速率与其他网络设备建立连接。Step 3: The switch adjusts the port rate that conforms to the nominal rate supported by the optical module according to its own port rate level to establish a connection with other network devices.

请参见图4,目前万兆网络体系构建中,一般使用光纤作为传输介质,万兆交换机作为数据中转设备,光模块作为光纤与万兆交换机的连接中间设备,交换机与其他网络设备之间需要进行速率配置,速率一致下连接才能成功,其他网络设备可以是其他交换机或者路由器。其中,光模块,又称SFP(Small Form Pluggable)可以简单理解为GBIC(GigabitInterface Converter的缩写)升级版本,是将千兆位电信号转换为光信号的接口器件,可以热插拔使用。Please refer to Figure 4. In the construction of the current 10G network system, optical fibers are generally used as the transmission medium, 10G switches are used as data transfer devices, and optical modules are used as intermediate devices for connecting optical fibers to 10G switches. Switches and other network devices need to be connected. Rate configuration, the connection can be successful only when the rate is consistent, and other network devices can be other switches or routers. Among them, the optical module, also known as SFP (Small Form Pluggable), can be simply understood as an upgraded version of GBIC (abbreviation for Gigabit Interface Converter), which is an interface device that converts gigabit electrical signals into optical signals, and can be hot-swapped.

在本实施例中,光模块符合SFF-8472协议。SFF-8472协议规定,光模块中有两块EEPROM用于厂商储存光模块相关信息,地址为分别为A0H与A2H。其中A0H用于储存光模块的规格信息,包括收发器类型,供应商,支持的速率与链路长度等。EEPROM,全称(Electrically Erasable Programmable Read-Only Memory),即带电可擦可编程只读存储器,是一种掉电后数据不丢失的存储芯片。SFF-8472协议的部分内容如下:In this embodiment, the optical module conforms to the SFF-8472 protocol. The SFF-8472 protocol stipulates that there are two EEPROMs in the optical module for the manufacturer to store information about the optical module, and the addresses are A0H and A2H respectively. Among them, A0H is used to store the specification information of the optical module, including transceiver type, supplier, supported rate and link length, etc. EEPROM, full name (Electrically Erasable Programmable Read-Only Memory), that is, electrically erasable programmable read-only memory, is a memory chip that does not lose data after power failure. Part of the SFF-8472 agreement is as follows:

其中第12位地址位信息为:速率标称。可以得到该光模块可以支持的最大速率上限,由此限制交换机所配置的端口速率档次。Among them, the 12th address bit information is: rate nominal. The upper limit of the maximum rate supported by the optical module can be obtained, thereby limiting the port rate grade configured by the switch.

在本实施例中,光模块的EEPROM可以通过I2C的通信方式进行访问,根据地址位读取相关信息,在交换芯片上可以通过对应的GPIO引脚模拟I2C或交换芯片包含I2C功能去实现。I2C通信通过两根双向I/O线进行通信,分别为SDA(串行数据线)和SCL(串行时钟线)与光模块之间的通信,其交互通信简略原理图请参见图5。其中,I2C通信方式方式是指,两线――串行数据(SDA)和串行时钟(SCL)线在连接到总线的器件间传递信息的方式。每个器件都有一个唯一的地址识别(无论是微控制器——MCU、LCD驱动器、存储器或键盘接口),而且都可以作为一个发送器或接收器(由器件的功能决定),LCD驱动器只是一个接收器,而存储器则既可以接收又可以发送数据。除了发送器和接收器外器件在执行数据传输时也可以被看作是主机或从机。主机是初始化总线的数据传输并产生允许传输的时钟信号的器件。此时,任何被寻址的器件都被认为是从机。In this embodiment, the EEPROM of the optical module can be accessed through the I2C communication method, and the relevant information can be read according to the address bits, which can be realized by simulating I2C through the corresponding GPIO pins on the switch chip or by including the I2C function on the switch chip. I2C communication communicates through two bidirectional I/O lines, which are the communication between SDA (serial data line) and SCL (serial clock line) and the optical module. Please refer to Figure 5 for a schematic diagram of the interactive communication. Among them, the I2C communication mode refers to the way in which two lines - serial data (SDA) and serial clock (SCL) lines transmit information between devices connected to the bus. Each device has a unique address identification (whether it is a microcontroller - MCU, LCD driver, memory or keyboard interface), and can be used as a transmitter or receiver (determined by the function of the device), the LCD driver is just A receiver, while the memory can both receive and send data. In addition to transmitters and receivers, devices can also be considered as masters or slaves when performing data transfers. The master is the device that initiates the data transfer on the bus and generates the clock signals that allow the transfer. At this point, any addressed device is considered a slave.

请参见图2,在所述步骤1中,还包括如下步骤,Please refer to Figure 2, in the step 1, the following steps are also included,

步骤101:交换机检测到自身端口中是否有光信号;当交换机检测到自身端口中没有光信号时,交换机提示无其他网络设备可连接。Step 101: the switch detects whether there is an optical signal in its own port; when the switch detects that there is no optical signal in its own port, the switch prompts that no other network device can be connected.

步骤102:当交换机检测自身端口中有光信号时,交换机检测自身是否已经与其他网络设备成功建立连接;当交换机检测到自身已经与其他网络设备成功建立连接时,交换机提示连接已完成。在本实施例中,检测到光信号代表有其他网络设备已经与本交换机进行了物理连接。Step 102: When the switch detects that there is an optical signal in its own port, the switch detects whether it has successfully established a connection with other network devices; when the switch detects that it has successfully established a connection with other network devices, the switch prompts that the connection has been completed. In this embodiment, the detection of the optical signal indicates that other network devices have been physically connected to the switch.

步骤103:当交换机检测到自身没有与其他网络设备成功建立连接时,交换机检测自身本次端口速率尝试与其他网络设备建立连接是否已超第一设定时间;当交换机检测到自身本次端口速率尝试与其他网络设备建立连接已经超过第一设定时间时,交换机检测自身本次端口速率尝试与其他网络设备建立连接是否超过第二设定时间,如果没有超过第二设定时间,执行步骤101;如果超过第二设定时间,则交换机认定尝试建立连接的其他网络设备与本交换机不匹配,不再进行连接,第一设定时间的初始设定值为2秒,第二设定时间的初始设定值为8秒。Step 103: When the switch detects that it has not successfully established a connection with other network devices, the switch detects whether the current port rate of the switch itself has attempted to establish a connection with other network devices for more than the first set time; When trying to establish a connection with other network devices has exceeded the first set time, the switch detects whether the port rate of the switch itself is trying to establish a connection with other network devices for more than the second set time, and if it does not exceed the second set time, go to step 101 ; If the second setting time is exceeded, the switch will determine that other network devices trying to establish a connection do not match the switch, and no longer connect. The initial setting value of the first setting time is 2 seconds, and the second setting time is 2 seconds. The initial setting is 8 seconds.

步骤104:当交换机检测到自身本次端口速率尝试与其他网络设备建立连接没有超过第一设定时间时,交换机记录自身当下端口速率档次。在本实施例中,交换机本身内置有多个端口速率档次。Step 104: When the switch detects that its current port rate attempt to establish a connection with other network devices does not exceed the first set time, the switch records its current port rate level. In this embodiment, the switch itself has multiple built-in port rate grades.

请参见图3,在所述步骤3中,还包括如下步骤,Please refer to Figure 3, in the step 3, the following steps are also included,

步骤301:交换机判断自身当下的端口速率档次是否符合光模块速率标称支持的端口速率;当交换机判断自身当下的端口速率档次不符合光模块速率标称支持的端口速率时,直接执行步骤303。Step 301: The switch judges whether its current port speed grade conforms to the port speed supported by the nominal speed of the optical module; when the switch judges that its current port speed grade does not conform to the port speed supported by the nominal speed of the optical module, it directly executes step 303.

步骤302:当交换机判断自身当下的端口速率档次符合光模块速率标称支持的端口速率时,交换机检测自身本次端口速率尝试与其他网络设备建立连接是否已超第一设定时间;当交换机检测到自身本次端口速率尝试与其他网络设备建立连接已经超过第一设定时间时,交换机继续尝试与其他网络设备建立连接。Step 302: When the switch judges that its current port rate grade conforms to the port rate supported by the nominal rate of the optical module, the switch detects whether the current port rate of the switch itself is trying to establish a connection with other network devices for more than the first set time; when the switch detects When the current port rate attempt to establish a connection with other network devices has exceeded the first set time, the switch continues to try to establish a connection with other network devices.

步骤303:当交换机检测到自身本次端口速率尝试与其他网络设备建立连接没有超过第一设定时间时,交换机根据自身的端口速率档次,调整符合光模块速率标称支持的端口速率档次,继续与其他网络设备建立连接;其中,当交换机根据自身的端口速率档次,调整完了所有符合光模块速率标称支持的端口速率与其他网络设备建立连接都没有成功连接时,返回执行步骤1。在本实施例中,交换机本身内置有多个端口速率档次。例,假如交换机内置有1Gb/s、2Gb/s、10Gb/s三个端口速率档次,而光模块速率标称为5Gb/s,那么只需要调整1Gb/s、2Gb/s两个端口速率档次与其他网络设备建立连接,无需尝试10Gb/s的端口速率档次,以便于实现与其他网络设备的快速连接。Step 303: When the switch detects that its current port rate attempt to establish a connection with other network devices has not exceeded the first set time, the switch adjusts the port rate level that meets the nominal rate of the optical module according to its own port rate level, and continues Establish connections with other network devices; among them, when the switch adjusts all the port speeds that meet the nominal rate support of the optical module according to its own port speed level and fails to establish a connection with other network devices, return to step 1. In this embodiment, the switch itself has multiple built-in port rate grades. For example, if the switch has built-in three port speed grades of 1Gb/s, 2Gb/s, and 10Gb/s, and the nominal speed of the optical module is 5Gb/s, then only the two port speed grades of 1Gb/s and 2Gb/s need to be adjusted To establish a connection with other network devices, there is no need to try the 10Gb/s port speed grade, so as to realize fast connection with other network devices.

由上可知,本发明的有益效果是:本发明提供的一种交换机自动调整端口速率连接其他网络设备的方法,交换机根据自身的端口速率档次,获取自身光模块的速率标称,然后调整交换机到符合光模块速率标称范围内的端口速率档次,继续不断与其他网络设备尝试建立连接,以便于实现与其他网络设备的快速连接,解决了现有技术中当交换机不支持端口速率自协商时速率发生改变就会发生断连、交换机与其他网络设备连接时需要手动设置速率不便于使用的问题。As can be seen from the above, the beneficial effects of the present invention are: a method for automatically adjusting the port rate of a switch to connect to other network devices provided by the present invention, the switch obtains the rate rating of its own optical module according to its own port rate grade, and then adjusts the switch to Conforms to the port rate grade within the nominal range of the optical module rate, and continues to try to establish connections with other network devices, so as to achieve fast connections with other network devices, and solves the problem in the prior art when the switch does not support port rate auto-negotiation. If there is a change, there will be a disconnection, and when the switch is connected to other network devices, it is necessary to manually set the rate and it is not convenient to use.

以上所述之具体实施方式为本发明的较佳实施方式,并非以此限定本发明的具体实施范围,本发明的范围包括并不限于本具体实施方式,凡依照本发明所作的等效变化均在本发明的保护范围内。The specific implementations described above are preferred implementations of the present invention, and are not intended to limit the specific implementation scope of the present invention. The scope of the present invention includes and is not limited to the specific implementations. All equivalent changes made according to the present invention are Within the protection scope of the present invention.

Claims (10)

1. A method for automatically adjusting port rate of a switch to connect with other network devices is characterized by comprising the following steps,
step 1: the switch detects the connection state of the switch and judges whether connection with other network equipment is required to be established;
step 2: when connection with other network equipment is required to be established, the switch accesses a memory of the own optical module through an I2C communication mode to obtain the rate nominal of the optical module;
step 3: and the switch adjusts the port rate which accords with the nominal support of the optical module rate according to the port rate grade of the switch and establishes connection with other network equipment.
2. The method for automatically adjusting port rate for connecting other network devices according to claim 1, wherein in said step 1, further comprising the step of,
step 101: the switch detects whether an optical signal exists in a port of the switch;
step 102: when the switch detects that the optical signal exists in the port of the switch, the switch detects whether the switch successfully establishes connection with other network equipment or not;
step 103: when the switch detects that the switch does not successfully establish connection with other network equipment, the switch detects whether the port rate of the switch tries to establish connection with other network equipment or not exceeds a first set time;
step 104: when the switch detects that the port rate of the switch tries to establish connection with other network equipment at this time does not exceed the first set time, the switch records the current port rate grade of the switch.
3. The method for automatically adjusting port rate for connecting other network devices according to claim 2, wherein in said step 3, further comprising the step of,
step 301: the exchanger judges whether the current port rate grade accords with the port rate nominally supported by the optical module rate or not;
step 302: when the switch judges that the current port rate grade of the switch accords with the port rate nominally supported by the optical module rate, the switch detects whether the current port rate of the switch tries to establish connection with other network equipment or not exceeds a first set time;
step 303: when the switch detects that the port rate of the switch tries to establish connection with other network equipment at this time does not exceed the first set time, the switch adjusts the port rate grade which accords with the nominal support of the optical module rate according to the port rate grade of the switch, and continues to establish connection with other network equipment.
4. The method for automatically adjusting port rates for connection to other network devices by a switch as recited in claim 3, wherein: in the step 1, when no connection needs to be established with other network devices, the switch prompts that no connection needs to be established with other network devices.
5. The method for automatically adjusting port rates for connection to other network devices by a switch according to claim 4, wherein: in the step 101, when the switch detects that there is no optical signal in its own port, the switch prompts that no other network device is connectable.
6. The method for automatically adjusting port rates for connection to other network devices by a switch according to claim 5, wherein: in said step 102, when the switch detects that itself has successfully established a connection with another network device, the switch prompts that the connection has been completed.
7. The method for automatically adjusting port rates for connection to other network devices by a switch according to claim 6, wherein: in the step 103, when the switch detects that the current port rate attempts to establish connection with other network devices for more than a first set time, the switch detects whether the current port rate attempts to establish connection with other network devices for more than a second set time, and if the current port rate attempts to establish connection with other network devices for more than the second set time, the switch executes the step 101; if the second set time is exceeded, the switch judges that other network devices attempting to establish connection are not matched with the switch and no connection is performed, the initial set value of the first set time is 2 seconds, and the initial set value of the second set time is 8 seconds.
8. The method for automatically adjusting port rates for connection to other network devices by a switch according to claim 7, wherein: in the step 301, when the switch determines that the current port rate level does not conform to the port rate nominally supported by the optical module rate, step 303 is directly performed.
9. The method for automatically adjusting port rates for connection to other network devices by a switch according to claim 8, wherein: in the step 302, when the switch detects that the port rate of the switch itself attempts to establish connection with other network devices for more than a first set time, the switch continues to attempt to establish connection with other network devices.
10. The method for automatically adjusting port rates for connection to other network devices by a switch according to claim 9, wherein: in step 303, when the switch adjusts all port rates meeting the nominal support of the optical module rate according to the port rate level thereof, and the connection with other network devices is not successfully established, step 1 is executed again.
CN202310617141.7A 2023-05-29 2023-05-29 Method for automatically adjusting port rate of switch to connect other network equipment Pending CN116582498A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310617141.7A CN116582498A (en) 2023-05-29 2023-05-29 Method for automatically adjusting port rate of switch to connect other network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310617141.7A CN116582498A (en) 2023-05-29 2023-05-29 Method for automatically adjusting port rate of switch to connect other network equipment

Publications (1)

Publication Number Publication Date
CN116582498A true CN116582498A (en) 2023-08-11

Family

ID=87533899

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310617141.7A Pending CN116582498A (en) 2023-05-29 2023-05-29 Method for automatically adjusting port rate of switch to connect other network equipment

Country Status (1)

Country Link
CN (1) CN116582498A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008005061A (en) * 2006-06-20 2008-01-10 Allied Telesis Holdings Kk Automatic adaptive SFP port
CN111835569A (en) * 2020-07-17 2020-10-27 上海博达数据通信有限公司 Optical interface rate and mode self-adapting method, system and storage medium
CN115643503A (en) * 2022-09-27 2023-01-24 新华三技术有限公司 Optical module configuration method and device
CN115714941A (en) * 2023-01-05 2023-02-24 北京工蜂电子技术有限公司 Optical interface rate self-adaption method, device, medium and equipment of network communication equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008005061A (en) * 2006-06-20 2008-01-10 Allied Telesis Holdings Kk Automatic adaptive SFP port
CN111835569A (en) * 2020-07-17 2020-10-27 上海博达数据通信有限公司 Optical interface rate and mode self-adapting method, system and storage medium
CN115643503A (en) * 2022-09-27 2023-01-24 新华三技术有限公司 Optical module configuration method and device
CN115714941A (en) * 2023-01-05 2023-02-24 北京工蜂电子技术有限公司 Optical interface rate self-adaption method, device, medium and equipment of network communication equipment

Similar Documents

Publication Publication Date Title
CN100524272C (en) Managing transmissions between devices
US11100036B2 (en) Serial connection between management controller and microcontroller
US7346764B2 (en) Optical transceiver module initialization
CN101039148B (en) Optical module and method and network equipment for supporting GE optical connector and FE optical connector
US6694440B1 (en) Computer, network controller, and system and remote activating method using the computer and controller
CN103797732B (en) Communication method, high-speed peripheral component interconnection PCIE chip and PCIE device
CN104639468A (en) Optical port adaptive Ethernet switch and adaptive method thereof
US20240414032A1 (en) Equalization training method and apparatus, and system
WO2014114094A1 (en) Optical interface rate self-adapting method and optical network device
US12317131B2 (en) Multi-protocol communication network
CN103392303B (en) Receiving end detection method, detection circuit, optical module and system
WO2024183416A1 (en) Out-of-band ethernet interface switching apparatus, multi-node server system and server device
CN101958888A (en) Configuration method of port negotiation capacity, communication port and communication device
CN206498408U (en) Network matching device for bus type FC‑AE‑1553 network
CN105763442A (en) PON system and method avoiding interruption of LACP aggregation link in main-standby switching process
CN115604374A (en) A switch port adaptation method, system, device and readable storage medium
JP5144735B2 (en) Subscriber premises optical line termination equipment
CN116582498A (en) Method for automatically adjusting port rate of switch to connect other network equipment
US7756149B2 (en) Ethernet switch and router for unshielded twisted pair/optical integrated network and frame processing method thereof
CN102752050A (en) Method and device for realizing communication between host machine and multiple optical modules
JP2008160197A (en) Subscriber premises optical line terminator and optical transmission system
KR20150135834A (en) Method, link establishing device, and, link partner device for establishing link
CN117149678A (en) RS485 bus arbitration system and method with multiple masters and multiple slaves
CN113507349B (en) A kind of optoelectronic matching method and system
WO2018035681A1 (en) Method of establishing interface connection, and interface chip

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