CN102123055B - Ethernet switch and method for modifying configuration of same - Google Patents

Ethernet switch and method for modifying configuration of same Download PDF

Info

Publication number
CN102123055B
CN102123055B CN 201110097946 CN201110097946A CN102123055B CN 102123055 B CN102123055 B CN 102123055B CN 201110097946 CN201110097946 CN 201110097946 CN 201110097946 A CN201110097946 A CN 201110097946A CN 102123055 B CN102123055 B CN 102123055B
Authority
CN
China
Prior art keywords
configuration
switch
port
state
ethernet switch
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
CN 201110097946
Other languages
Chinese (zh)
Other versions
CN102123055A (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.)
Xinhuasan Intelligent Terminal Co ltd
Original Assignee
Hangzhou H3C Technologies 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN 201110097946 priority Critical patent/CN102123055B/en
Publication of CN102123055A publication Critical patent/CN102123055A/en
Application granted granted Critical
Publication of CN102123055B publication Critical patent/CN102123055B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The invention provides an Ethernet switch and a method for modifying the configuration of the same. The method comprises the following steps of: presetting configuration modification conditions, wherein the configuration modification conditions comprise the PHY (Physical Layer) state of a port, configuration function items and the corresponding relationship of configuration options of the Ethernet switch; setting the PHY state of the port of the Ethernet switch according to the preset configuration modification conditions; detecting the PHY state of the port of the Ethernet switch per se and judging whether the detected PHY state of the port satisfies the preset configuration modification conditions, by the Ethernet switch; and modifying configurations of the configuration function items in the configuration modification conditions into the configuration options in the configuration modification conditions if the PHY state of the port satisfies the preset configuration modification conditions. In the invention, the configurations of the Ethernet switch can be modified without the help of a computer.

Description

Method for modifying configuration of Ethernet switch and Ethernet switch
Technical Field
The present invention relates to the field of electronic devices, and in particular, to a method for modifying an ethernet switch configuration and an ethernet switch.
Background
Ethernet (Ethernet) refers to the baseband lan specification created by Xerox corporation and jointly developed by Xerox, Intel and DEC corporation, using the IEEE 802.3 standard, is the most common communication technology used in existing lans today. An Ethernet Switch (Ethernet Switch) is an Ethernet multi-port bridge device, which has multiple ports with different port rates, and can simultaneously perform data communication between multiple source ports and multiple destination ports. An ethernet switch generally includes a Central Processing Unit (CPU), a memory, a Media Access Control (MAC) controller, and a physical layer (PHY) controller, wherein a Random Access Memory (RAM), an Electrically Erasable Programmable Read Only Memory (EEPROM), and a FLASH memory (FLASH) may be used as the memory of the ethernet switch. Part of the ethernet switch chip will integrate the MAC controller and PHY together.
After the ethernet switch is powered on and started, hardware initialization is firstly performed through a bootstrap program, for example, a CPU and a memory are initialized, then a designated running program in the memory is loaded into a RAM through the bootstrap program to run, finally, a configuration file in the memory is read through the designated running program, and the value setting of registers of a MAC controller and a PHY of the switch is performed according to parameters of the configuration file to complete the whole starting process.
And modifying the configuration of the Ethernet switch, namely modifying the value of the MAC controller register of the Ethernet switch. The most common method at present is to read and write the register of the MAC controller according to a specific protocol, such as hypertext transfer protocol (HTTP), TELNET protocol (TELNET), Simple Network Management Protocol (SNMP), or a running program that logs in the RAM of the ethernet switch through a serial interface (SerialInterface).
Ethernet switches are classified into network management type switches and non-network management type switches. Because the RAM space of the network pipe type switch is sufficient, a network management system can be operated generally, a user is allowed to log in the network management system operated in the ethernet switch through various protocols, such as an IOS network management system of cisco, and then the register of the MAC controller is read and written through the network management system to perform device configuration. The non-network management type exchanger can only operate a specific software program on a computer generally because the RAM space is smaller, and the register of the MAC controller is read and written for configuration by accessing the software program which is operated in the RAM space and is matched with the specific software through the serial interface.
According to the current method for modifying the configuration of the Ethernet switch, the configuration is difficult to carry out on occasions lacking computers, for example, the switch is installed in a cell unit distribution room, and if a portable notebook computer is not available, the equipment is difficult to configure so that the equipment works normally. Even if a computer can be used, the device configuration is difficult to be performed under the condition that the specific configuration of the network management program cannot be confirmed, for example, an ethernet switch operating in a network cannot be confirmed or forgotten, if the switch manages an IP or manages a VLAN port, the device network management system cannot be accessed by using a remote login protocol such as HTTP, TELNET, SNMP and the like, so as to configure the device. For the non-network management type switch, a common user cannot obtain a specific software program and cannot modify the configuration, for example, the default configuration of the non-network management type switch is set when the equipment leaves a factory, and if the default configuration is not suitable for the network environment of the user, the common user cannot modify the switch configuration to solve the problem.
To sum up, the current method for modifying the configuration of the ethernet switch cannot be performed without a computer; moreover, for the network management type switch, the specific configuration of the network management program needs to be known; for the network-management-free type switch, an ordinary user has no way to modify the configuration of the switch according to requirements.
Disclosure of Invention
In view of the above, the present invention provides a method for modifying the configuration of an ethernet switch, which is capable of modifying the configuration of the ethernet switch without the aid of a computer.
In order to achieve the above object, the present invention provides a method for modifying an ethernet switch configuration, the method comprising:
presetting configuration modification conditions, wherein the configuration modification conditions are the corresponding relation of port PHY states, configuration function items and configuration options of an Ethernet switch;
when the configuration of the Ethernet switch needs to be modified, setting the PHY state of a port physical layer of the Ethernet switch according to a preset configuration modification condition;
the Ethernet switch detects the PHY state of the port of the Ethernet switch, judges whether the detected PHY state of the port meets the preset configuration modification condition, and if so, modifies the configuration of the configuration function item in the configuration modification condition into the configuration option in the configuration modification condition.
The present invention also provides an ethernet switch, comprising: a configuration unit, a detection unit;
the configuration unit is used for presetting configuration modification conditions, wherein the configuration modification conditions are the corresponding relation among the port PHY state, the configuration function items and the configuration options of the Ethernet switch;
the detection unit is used for detecting the PHY state of the port of the detection unit, judging whether the detected PHY state of the port meets the preset configuration modification condition of the configuration unit, and if so, modifying the configuration of the configuration function item in the configuration modification condition into the configuration option in the configuration modification condition.
It can be known from the above technical solutions that, in the method for modifying the configuration of the ethernet switch of the present invention, the configuration modification condition of the ethernet switch is configured in advance, when a certain configuration function item of the ethernet switch needs to be modified, the port PHY state of the ethernet switch is set according to the pre-configured configuration modification condition, and when the switch detects that the port PHY state meets the configuration modification condition, the configuration of the configuration function item in the configuration modification condition is modified to the configuration option in the configuration modification condition, so that the configuration of the ethernet switch can be modified without a computer.
Drawings
FIG. 1 is a flow diagram of a method for modifying the configuration of an Ethernet switch according to an embodiment of the invention;
fig. 2 is a schematic structural diagram of an ethernet switch according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail below with reference to the accompanying drawings and examples.
Referring to fig. 1, fig. 1 is a flowchart of a method for modifying the configuration of an ethernet switch according to an embodiment of the present invention, including the following steps:
step 101, presetting configuration modification conditions, wherein the configuration modification conditions are corresponding relations of port PHY states, configuration function items and configuration options of the Ethernet switch.
The port PHY state described herein refers to the combination of all port states in the ethernet switch. In the ethernet, the ethernet ports include three network ports of RJ45, BNC and AUI according to different transmission media. Each port state is determined by one or more combinations of its duplex state, operating rate, and enable state, depending on the port. Taking the RJ45 port of a gigabit ethernet as an example, each RJ45 port has three operating rates: 10M, 100M, 1000M; two duplex states: half duplex and full duplex; two enabled states: an enabled (UP) state and a not enabled (DOWN); when the enabling state of the RJ45 port is not enabled, only one DOWN state is available, and when the enabling state of the RJ45 port is enabled, 6 states of 10M/Half duplex (Half), 10M/Full duplex (Full), 100M/Half, 100M/Full, 1000M/Half, and 1000M/Full exist, so that 7 port states are available for each RJ45 port of gigabit Ethernet. Assuming 24 RJ45 ports in an ethernet switch, the ethernet switch has a total port state combination of power 24 of 7. Note that the port according to the present invention is not limited to the RJ45 port.
The configuration function item is also a configurable function item of the ethernet switch, such as a flow control function; for any configuration function item, a specific configuration option corresponding to the configuration function item is required, for example, the configuration options for flow control may be: enable flow control, or disable flow control.
The specific meaning of the corresponding relationship among the port PHY state, the configuration function item and the configuration option of the Ethernet switch is as follows: when the port PHY state of the Ethernet switch is the same as the port PHY state in the corresponding relation, the configuration of the configuration function item in the corresponding relation is modified into the configuration option in the corresponding relation.
And 102, when the configuration of the Ethernet switch needs to be modified, setting the port physical layer (PHY) state of the Ethernet switch according to a preset configuration modification condition.
In this step, after the port PHY state of the ethernet switch is set, the staff needs to wait for at least a preset time to allow the port PHY state of the ethernet switch to be changed, otherwise, it may cause a failure in modifying the configuration of the ethernet switch. Here, the preset time is a time interval for detecting the PHY state of the port of the ethernet.
Step 103, the ethernet switch detects the PHY state of its own port once every preset time, and determines whether the detected PHY state of the port meets the configuration modification condition, and if so, modifies the configuration of the configuration function item in the configuration modification condition to the configuration option in the configuration modification condition.
In this step, the ethernet switch periodically detects the PHY status of its own port, and modifies the configuration of the ethernet switch when the PHY status of its port meets the preset configuration modification condition. Here, the method for determining whether the detected port PHY state satisfies the configuration modification condition includes: and searching the preset configuration modification condition according to the port PHY state, wherein if the port PHY state in one configuration modification condition is the same as the detected port PHY state, the detected port PHY state meets the configuration modification condition.
In addition, before modifying the configuration of the configuration function item in the configuration modification condition, it may be determined whether the current configuration of the configuration function item in the configuration modification condition is the same as the configuration option in the configuration modification condition, if so, the configuration of the configuration function item in the configuration modification condition does not need to be modified, and the current configuration is still maintained, and if not, the configuration of the configuration function item in the configuration modification condition is modified to the configuration option in the configuration modification condition.
In fig. 1, the ethernet switch detects the PHY status of its own port at fixed time intervals, and triggers configuration modification when it is determined that configuration modification is required. In fact, a manner of immediately triggering the ethernet switch to perform configuration modification may also be adopted, for example, a trigger signal is preset, and is manually triggered after the port PHY state is set, and after receiving the trigger signal, the ethernet switch immediately detects its own port PHY state, and performs corresponding configuration modification according to the detection result. However, since the setting of the trigger signal also requires additional software and hardware support, the scheme shown in fig. 1 is mainly further described in the present invention.
In the technical solution of the present invention shown in fig. 1, a configuration switch may be further provided. Before modifying the configuration of the ethernet switch, further comprising: starting a configuration switch to allow the configuration of the Ethernet switch to be modified; before modifying the configuration of the configuration function item in the configuration modification condition, further judging whether a configuration switch is turned on, if so, modifying the configuration of the configuration function item in the configuration modification condition to configure the configuration item in the configuration modification condition, otherwise, still keeping the current configuration of the configuration function item in the configuration modification condition unchanged; after the configuration modification of the ethernet switch is completed, further comprising: and closing the configuration switch and forbidding modifying the configuration of the Ethernet switch. The configuration switch is arranged, so that abnormal change of the configuration of the switch caused by non-active operation of a user can be avoided, and the times of non-forced erasing of the memory can be reduced.
The enabling condition of the configuration switch may be that the port of the ethernet switch is negotiated to a specified PHY state, that is, a corresponding relationship between the opening of the configuration switch and the PHY state of the port of the ethernet switch, and a corresponding relationship between the closing of the configuration switch and the PHY state of the port of the ethernet switch are preset.
The method for turning on the configuration switch comprises the following steps: setting the port PHY state of the Ethernet switch as a port PHY state corresponding to the starting of the configuration switch, and waiting for at least preset time; and when the Ethernet switch detects that the port PHY state is the state that the corresponding port PHY is started by the configuration switch, setting the configuration switch to be in the starting state.
The method for closing the configuration switch comprises the following steps: setting the port PHY state of the Ethernet switch as the port PHY state corresponding to the closing of the configuration switch, and waiting for at least preset time; and when the Ethernet switch detects that the port PHY state is the port PHY state corresponding to the closing of the configuration switch, the configuration switch is set to be in the closing state.
The invention can also preset the configuration validation mode. The configuration validation mode comprises immediate validation and validation after restart. The immediate effect mode is simple and quick, and is suitable for the configuration of the network-administration-free type switch. The effective mode after restarting can avoid the problems of network instantaneous interruption and network topology oscillation caused by configuration modification, and is suitable for the configuration of the network management type switch.
The invention also presets the parameters corresponding to the configuration switch.
In the immediate effect mode, the method for setting the configuration switch to the on state is as follows: setting the parameter corresponding to the configuration switch as a value corresponding to the opening of the configuration switch, for example, the value corresponding to the opening of the configuration switch is 1; the method for setting the configuration switch to be in the closed state comprises the following steps: and setting the parameter corresponding to the configuration switch to a value corresponding to the closing of the configuration switch, for example, the value corresponding to the closing of the configuration switch is 0.
In general, for a non-network management type switch, the value of the MAC register corresponding to each configuration function item can be directly modified. Therefore, in an immediate effect manner, for the network-managed switch, the method for modifying the configuration of the configuration function item in the configuration modification condition to the configuration option in the configuration modification condition in step 102 is as follows: modifying the value of the MAC register corresponding to the configuration function item in the configuration modification condition into the value corresponding to the configuration option in the configuration modification condition, for example, the value corresponding to the configuration modification condition is 1 when the configuration is enabled, and the value corresponding to the configuration modification condition is 0 when the configuration is not enabled; for the network management type switch, it is generally not allowed to directly modify the MAC register value corresponding to each configuration function item. However, since the network management system operating in the network management type switch has configuration parameters corresponding to each configuration function item, the purpose of modifying the configuration of the configuration function item can be indirectly achieved by modifying the parameters corresponding to the configuration function item in the network management system. Therefore, in an immediate effect manner, for the network management type switch, the method for modifying the configuration of the configuration function item in the configuration modification condition to the configuration option in the configuration modification condition in step 102 is as follows: and modifying the configuration parameters in the network management system corresponding to the configuration function items in the configuration modification conditions into values corresponding to the configuration options in the configuration modification conditions. The parameters in the network management system are modified, for example, the technical scheme of the invention is realized in the network management system, and the direct modification of various parameters in the network management system is supported, which belongs to the problem of specific implementation and is not described any more.
If the configuration validation mode is set to be valid after the restart, step 102 sets a port physical layer PHY state of the ethernet switch according to a preset configuration modification condition, and waits for at least a preset time, further includes: restarting the Ethernet switch after power down; the method for modifying the configuration of the configuration function item of the configuration modification condition as the configuration option of the configuration modification condition in step 103 is: and modifying the value of the MAC register in the configuration file stored in the memory space of the Ethernet switch corresponding to the configuration function item of the configuration modification condition into the value corresponding to the configuration option in the configuration modification condition.
In an effective manner after the restart, in a process of starting the configuration switch, setting the port PHY state of the ethernet switch to a port PHY state corresponding to the start of the configuration switch, and waiting for at least a preset time, further comprising: restarting the Ethernet switch after power down; the method for setting the configuration switch to be in the opening state comprises the following steps: modifying the value corresponding to the configuration switch in the configuration file stored in the memory space of the Ethernet switch into the value corresponding to the opening of the configuration switch; in the process of closing the configuration switch, the setting the port PHY state of the ethernet switch to the port PHY state corresponding to the closing of the configuration switch, and waiting for at least a preset time, further includes: restarting the Ethernet switch after power down; the method for setting the configuration switch to be in the closed state by the Ethernet switch comprises the following steps: and modifying the value corresponding to the configuration switch in the configuration file stored in the memory space of the Ethernet switch into the value corresponding to the closing of the configuration switch.
In the effective mode after restarting, the Ethernet switch can realize the purposes of opening and closing the configuration switch, modifying the configuration and the like by reading the updated configuration file in the memory in the power-off restarting process.
The configuration validation mode can be preset by the manufacturer of the Ethernet switch or can be selected by the user. When the user selects the configuration effective mode, the invention also presets the parameter corresponding to the configuration effective mode, and also presets the corresponding relation between the configuration effective mode and the port PHY state, namely the corresponding relation between the port PHY state of the Ethernet switch and the immediate effective mode, and the corresponding relation between the port PHY state of the Ethernet switch and the effective mode after restarting; before the configuration switch is turned on, a configuration validation mode can be further set, and the specific setting method comprises the following steps: and setting the port PHY state of the Ethernet switch as the port PHY state corresponding to the required configuration effective mode, waiting for at least preset time, and setting the parameter corresponding to the configuration effective mode as the value corresponding to the immediate effective mode or the effective mode after restarting when the Ethernet switch detects that the port PHY state corresponds to the immediate effective mode or the effective mode after restarting. Here, the setting configuration validation manner only needs to be set once.
It should be noted that, in the above method for modifying the configuration of the ethernet switch, the waiting time is at least a preset time because: the time interval for detecting the port PHY state of the ethernet switch is the preset time, and if the waiting time is less than the preset time, it is possible that the port PHY state before the change is not detected before the change. For example, after the port PHY state setting configuration switch is turned on, and before the ethernet switch detects the port PHY state, the port PHY state is set to the state corresponding to the enable traffic control, and the configuration switch is not actually turned on at this time.
The following describes the method for modifying the configuration of the ethernet switch by taking the example of modifying the flow control function of the most common ethernet-type switch without network management, which has 24 RJ45 ports. Suppose that the ethernet switch leaves the factory as follows:
1. the default flow control function of the switch is in a closed state, namely, an disabled state; configuring the switch to be in a closed state; the configuration effective mode of the switch is an immediate effective mode;
2. when the P1-P21 ports are in a Down state and the P22-P24 ports are in a 10M/Half state, the specific configuration of the flow control function of the exchanger is modified to enable flow control;
3. the P1-P8 ports are in a 10M/half state, and when other ports are in a Down state, the configuration switch of the switch is modified to be in an open state, so that the configuration of the switch is allowed to be modified;
4. when the P9-P16 port is in a 10M/Half state and other ports are in a Down state, modifying the configuration switch of the switch to be in a closed state, and forbidding modifying the configuration of the switch;
5. when the P17-P24 port is 10M/Half, and other ports are in a Down state, the configuration effective mode of the modified switch is effective after restarting.
If a user wants to modify the configuration validation mode of the switch into validation after restarting, and modify the configuration of the flow control function of the switch into enabling flow control, assuming that the period of detecting the port PHY state by the Ethernet switch is 5 seconds, the specific configuration steps are as follows:
A. connecting P17-P24 ports of the switch with a HUB (HUB) with 8 ports and a working speed of 10M by using a common twisted pair, connecting other ports with no network cable, waiting for at least 5 seconds after the connection is finished, and modifying the configuration effective mode of the switch into effective mode after restarting; and in the waiting time, the Ethernet switch detects the state of the port PHY, and modifies the configuration effective mode into the effective mode after restarting according to the state of the port PHY.
B. Connecting the P1-P8 ports of the switch with a HUB (HUB) with 8 ports and working speed of 10M by using a common twisted pair, not connecting the other ports with a network cable, waiting for at least 5 seconds after the connection is completed, and powering down the switch for restarting. And in the waiting time, the Ethernet switch detects the PHY state of the port, modifies the value corresponding to the configuration switch in the configuration file stored in the storage space of the Ethernet switch into the value corresponding to the open configuration switch according to the PHY state of the port, and takes effect after the switch is restarted. So far, a configuration switch of the switch is turned on, and the configuration of the switch is allowed to be modified;
C. connecting the P22-P24 ports of the switch with a HUB (HUB) with 8 ports and working speed of 10M by using a common twisted pair, not connecting the other ports with a network cable, waiting for at least 5 seconds after the connection is completed, and powering down the switch for restarting. And in the waiting time, the Ethernet switch detects the PHY state of the port, modifies the value corresponding to the flow control function in the configuration file stored in the storage space of the Ethernet switch into the value corresponding to the enabled flow control according to the PHY state of the port, and takes effect after the switch is restarted. At this point, the flow control function of the switch is started, namely enabled;
D. connecting the P9-P16 ports of the switch with a HUB (HUB) with 8 ports and working speed of 10M by using a common twisted pair, not connecting the other ports with a network cable, waiting for at least 5 seconds after the connection is completed, and powering down the switch for restarting. And in the waiting time, the Ethernet switch detects the PHY state of the port, modifies the value corresponding to the configuration switch in the configuration file stored in the storage space of the Ethernet switch into the value corresponding to the closed configuration switch according to the PHY state of the port, and takes effect after the switch is restarted. At this point, the configuration switch of the switch is closed, prohibiting the configuration of the switch from being modified.
Through the A, B, C, D steps, the user can modify the configuration of the flow control function of the Ethernet exchanger without the help of a computer. Because a gigabit ethernet switch with 24 RJ45 ports has 24 port state combinations of power 7, the basic function setting of the switch, the factory default setting restoration, and the like are completely satisfied, and in the case of enough ports, some more complex functions, such as the division of Virtual Local Area Networks (VLANs), and the like, can be theoretically realized by different port PHY state combinations.
The present invention also provides an ethernet switch that supports a configuration of the ethernet switch that can be modified without the aid of a computer.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an ethernet switch according to an embodiment of the present invention. The Ethernet switch includes: a configuration unit 210, a detection unit 220; wherein,
a configuration unit 210, configured to preset configuration modification conditions, where the configuration modification conditions are the corresponding relationships between port PHY states, configuration function items, and configuration options of the ethernet switch;
a detecting unit 220, configured to detect a port PHY state of the ethernet switch, and determine whether the detected port PHY state meets a configuration modification condition preset by the configuration unit 210, and if so, modify the configuration of the configuration function item in the configuration modification condition to a configuration option in the configuration modification condition.
The detecting unit 220 includes: a detection subunit 221, a judgment unit 222, and an execution unit 223;
the detection subunit 221, configured to detect the PHY status of the own port every other time, and notify the determination unit 222 of the detection result;
the determining unit 222 is configured to determine whether the port PHY status detected by the detecting sub-unit 221 meets a configuration modification condition preset by the configuration unit 210, and if yes, notify the executing unit 223 to modify the configuration of the configuration function item in the configuration modification condition;
the executing unit 223 is configured to modify the configuration of the configuration function item in the configuration modification condition into the configuration option in the configuration modification condition after receiving the notification of the determining unit 222.
When the determining unit 222 determines whether the port PHY status detected by the detecting sub-unit 221 satisfies the configuration modification condition preset by the configuration unit 210, it is configured to: and searching the preset configuration modification condition according to the detected port PHY state, wherein if the port PHY state corresponding to one of the configuration modification conditions is the same as the detected port PHY state, the detected port PHY state meets the configuration modification condition.
Before the determining unit 222 notifies the executing unit 223 to modify the configuration of the configuration function item in the configuration modification condition, the determining unit is further configured to: and judging whether the current configuration of the configuration function item of the configuration modification condition is the same as the configuration option in the configuration modification condition, and if so, not notifying the execution unit 223.
The configuration unit 210 is also configured with a configuration switch in advance, a corresponding relationship between the opening of the configuration switch and the PHY state of the port, and a corresponding relationship between the closing of the configuration switch and the PHY state of the port;
the determining unit 222 is further configured to determine whether the port PHY state detected by the detecting subunit 221 is the same as the port PHY state corresponding to the configuration switch being turned on or the configuration switch being turned off, and if the port PHY state corresponding to the configuration switch being turned on is the same as the port PHY state corresponding to the configuration switch being turned on, notify the executing unit 223 to turn on the configuration switch; if the port PHY state corresponding to the configuration switch closing is the same, the execution unit 223 is notified to close the configuration switch;
the executing unit 223 is further configured to set the configuration switch to the on state when receiving the notification of turning on the configuration switch of the determining unit 222, and set the configuration switch to the off state when receiving the notification of turning off the configuration switch of the determining unit 222.
The determining unit 222 further notifies the executing unit 223 to modify the configuration of the configuration function item in the configuration modification condition before: and judging whether the configuration switch is turned on, and if not, not informing the execution unit 223.
The configuration unit 210 also presets a configuration validation mode, where the configuration validation mode includes an immediate validation mode and an after-restart validation mode; presetting a corresponding relation between a port PHY state of an Ethernet switch and an immediate effective mode and a corresponding relation between the port PHY state of the Ethernet switch and an effective mode after restarting;
the determining unit 222 is further configured to determine whether the port PHY state detected by the detecting subunit 221 is the same as the port PHY state corresponding to the immediate-effect mode or the post-restart-effect mode, and if the port PHY state is the same as the port PHY state corresponding to the immediate-effect mode, notify the executing unit 223 to modify the configuration-effect mode to be immediately effective; if the port PHY state corresponding to the post-restart validation method is the same, the notification execution unit 223 sets the configuration validation method to be valid after restart;
the execution unit 223 is configured to modify the configuration validation manner into an immediate validation manner after receiving the notification of modifying the configuration validation manner into the immediate validation manner from the determination unit 222; after receiving the notification of the determining unit 222 that the configuration validation manner is modified to the restart validation manner, the configuration validation manner is modified to the power-off restart validation.
The configuration unit 210 sets the configuration validation mode to be immediate validation in advance;
when the execution unit 223 sets the configuration switch to the on state, it is configured to: setting the parameter value corresponding to the configuration switch as a value corresponding to the opening of the configuration switch;
when the execution unit 223 sets the configuration switch to the off state, it is configured to: and setting the parameter value corresponding to the configuration switch as a value corresponding to the closing of the configuration switch.
The Ethernet switch is a network-administration-free switch;
when the executing unit 223 modifies the configuration of the configuration function item in the configuration modification condition to the configuration option in the configuration modification condition, it is configured to: modifying the value of the MAC register corresponding to the configuration function item in the configuration modification condition into the value corresponding to the configuration option in the configuration modification condition;
or,
the Ethernet switch is a network management type switch;
when the executing unit 223 modifies the configuration of the configuration function item in the configuration modification condition to a configuration option in the configuration modification condition, the executing unit is configured to: and modifying the value of the configuration parameter in the network management system corresponding to the configuration function item in the configuration modification condition into the value corresponding to the configuration option in the configuration modification condition.
The configuration unit 210 also presets a configuration validation mode to be valid after restarting;
when the executing unit 223 modifies the configuration of the configuration function item in the configuration modification condition to the configuration option in the configuration modification condition, it is configured to: modifying the value of the MAC register in the configuration file stored in the memory space of the Ethernet switch corresponding to the configuration function item of the configuration modification condition into the value corresponding to the configuration option in the configuration modification condition;
when the execution unit 223 sets the configuration switch to the on state, it is configured to: modifying the value corresponding to the configuration switch in the configuration file stored in the memory space of the Ethernet switch into the value corresponding to the opening of the configuration switch;
when the execution unit 223 sets the configuration switch to the off state, it is configured to: and modifying the value corresponding to the configuration switch in the configuration file stored in the memory space of the Ethernet switch into the value corresponding to the closing of the configuration switch.
According to the technical scheme, the method for modifying the configuration of the Ethernet switch is characterized in that the corresponding relation among the PHY state of the port of the Ethernet switch, the configuration function items and the configuration options is preset, when the configuration of a certain configuration function item of the Ethernet switch needs to be modified, the port of the Ethernet switch is set to be in the corresponding PHY state of the port, and when the PHY state of the port is detected by the Ethernet switch, the configuration of the corresponding configuration function item is modified, so that the purpose of modifying the configuration of the Ethernet switch without a computer is achieved; in addition, the invention also presets a configuration switch, when the configuration of the Ethernet switch needs to be modified, the configuration switch is started, and after the configuration modification is finished, the configuration switch is closed, thereby avoiding the abnormal modification of the configuration of the Ethernet switch caused by the user non-active operation, and reducing the times of unforced erasing and writing of the storage space; in addition, the invention can also support the user to select the mode for the configuration to be effective.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (15)

1. A method of modifying an ethernet switch configuration, the method comprising:
presetting configuration modification conditions, wherein the configuration modification conditions are the corresponding relation of port PHY states, configuration function items and configuration options of an Ethernet switch;
when the configuration of the Ethernet switch needs to be modified, setting the PHY state of a port physical layer of the Ethernet switch according to a preset configuration modification condition;
the Ethernet switch detects the PHY state of a port of the Ethernet switch, judges whether the detected PHY state of the port meets the preset configuration modification condition, and if so, modifies the configuration of the configuration function item in the configuration modification condition into the configuration option in the configuration modification condition;
wherein, the port PHY state refers to all port state combinations in the Ethernet switch, and each port state is determined by one or more combinations of duplex state, working speed and enabling state.
2. The method according to claim 1, wherein the method for determining whether the detected port PHY status satisfies the preset configuration modification condition comprises: and searching the preset configuration modification condition according to the detected port PHY state, wherein if the port PHY state corresponding to one of the configuration modification conditions is the same as the detected port PHY state, the detected port PHY state meets the configuration modification condition.
3. A method of modifying an ethernet switch configuration according to claim 1 or 2, wherein the method further presets a configuration switch;
before the setting the port PHY state of the ethernet switch according to the preset configuration modification condition, the method further includes: starting a configuration switch to allow the configuration of the Ethernet switch to be modified;
the modifying the configuration of the configuration function item in the configuration modification condition further comprises, before the modifying the configuration of the configuration function item in the configuration modification condition, that: judging whether a configuration switch is turned on, if not, keeping the current configuration of the configuration function items of the configuration modification conditions unchanged;
the modifying the configuration of the configuration function item in the configuration modification condition further comprises, after the modifying the configuration of the configuration function item in the configuration modification condition, the following steps: and closing the configuration switch and forbidding modifying the configuration of the Ethernet switch.
4. The method according to claim 3, wherein the method further presets a corresponding relationship between the configuration switch on and the port PHY status, and a corresponding relationship between the configuration switch off and the port PHY status;
the method for turning on the configuration switch comprises the following steps: setting the port PHY state of the Ethernet switch as the port PHY state corresponding to the opening of the configuration switch according to the corresponding relation between the preset opening of the configuration switch and the port PHY state; when the Ethernet switch detects that the PHY state of the port corresponds to the opening of the configuration switch, the configuration switch is set to be in an opening state;
the method for closing the configuration switch comprises the following steps: setting the port PHY state of the Ethernet switch as the port PHY state corresponding to the closing of the configuration switch according to the corresponding relation between the closing of the preset configuration switch and the port PHY state; and when the Ethernet switch detects that the PHY state of the port corresponds to the closing of the configuration switch, setting the configuration switch to be in a closing state.
5. The method according to claim 4, wherein the method further presets a configuration validation manner, and the configuration validation manner includes an immediate validation manner and a post-restart validation manner; pre-configuring the corresponding relation between the port PHY state of the Ethernet switch and an immediate effective mode and the corresponding relation between the port PHY state of the Ethernet switch and an effective mode after restarting;
the method for setting the configuration effective mode to be immediately effective comprises the following steps: setting the port PHY state of the Ethernet switch as the port PHY state corresponding to the immediate effect mode; when the Ethernet switch detects that the PHY state of the port corresponds to an immediate effect mode, setting the configuration effect mode to be immediate effect;
the method for setting the configuration effective mode to be effective after restarting comprises the following steps: setting the port PHY state of the Ethernet switch as the port PHY state corresponding to the mode of generating effect after restarting; and when the Ethernet switch detects that the PHY state of the port corresponds to the effective mode after restarting, setting the configuration effective mode to be effective after restarting.
6. The method of modifying an ethernet switch configuration of claim 5, wherein the configuration validation means is preset to be immediate;
the Ethernet switch is a network-administration-free switch;
the configuration for modifying the configuration function item in the configuration modification condition is as follows: modifying the value of the MAC register corresponding to the configuration function item in the configuration modification condition into the value corresponding to the configuration option in the configuration modification condition;
or,
the Ethernet switch is a network management type switch;
the configuration for modifying the configuration function item in the configuration modification condition is as follows: and modifying the value of the configuration parameter in the network management system corresponding to the configuration function item in the configuration modification condition into the value corresponding to the configuration option in the configuration modification condition.
7. The method of claim 5, wherein the configuration validation mode is preset to be valid after restart;
after the setting of the port physical layer PHY state of the ethernet switch according to the preset configuration modification condition, the method further includes: restarting the Ethernet switch after power down; the configuration for modifying the configuration function item in the configuration modification condition is as follows: modifying the value of the MAC register in the configuration file stored in the memory space of the Ethernet switch corresponding to the configuration function item of the configuration modification condition into the value corresponding to the configuration option in the configuration modification condition;
after the setting the port PHY state of the ethernet switch to the port PHY state corresponding to the configuration switch being turned on, the method further includes: restarting the Ethernet switch after power down; the setting of the configuration switch to the on state is as follows: modifying the value corresponding to the configuration switch in the configuration file stored in the memory space of the Ethernet switch into the value corresponding to the opening of the configuration switch;
after the setting the port PHY state of the ethernet switch to the port PHY state corresponding to the closing of the configuration switch, the method further includes: restarting the Ethernet switch after power down; the setting of the configuration switch to the off state is as follows: and modifying the value corresponding to the configuration switch in the configuration file stored in the memory space of the Ethernet switch into the value corresponding to the closing of the configuration switch.
8. An ethernet switch, comprising: a configuration unit, a detection unit;
the configuration unit is used for presetting configuration modification conditions, wherein the configuration modification conditions are the corresponding relation among the port physical layer (PHY) state, the configuration function items and the configuration options of the Ethernet switch;
the detection unit is used for detecting the port PHY state of the Ethernet switch and judging whether the detected port PHY state meets the configuration modification condition preset by the configuration unit, if so, the configuration of the configuration function item in the configuration modification condition is modified to the configuration option in the configuration modification condition;
wherein, the port PHY state refers to all port state combinations in the Ethernet switch, and each port state is determined by one or more combinations of duplex state, working speed and enabling state.
9. An ethernet switch in accordance with claim 8, wherein said detection unit comprises: the device comprises a detection subunit, a judgment unit and an execution unit;
the detection subunit is used for detecting the PHY state of the self port every other time and informing the judgment unit of the detection result;
the judging unit is used for judging whether the port PHY state detected by the detecting subunit meets the configuration modification condition preset by the configuration unit, and if so, informing the execution unit to modify the configuration of the configuration function item in the configuration modification condition;
and the execution unit is used for modifying the configuration of the configuration function item in the configuration modification condition into the configuration option in the configuration modification condition after receiving the notification of the judgment unit.
10. The ethernet switch according to claim 9, wherein the determining unit, when determining whether the port PHY status detected by the detecting sub-unit satisfies the configuration modification condition preset by the configuration unit, is configured to: and searching the preset configuration modification condition according to the detected port PHY state, wherein if the port PHY state corresponding to one of the configuration modification conditions is the same as the detected port PHY state, the detected port PHY state meets the configuration modification condition.
11. An ethernet switch according to claim 9 or 10, wherein the configuration unit further pre-configures a configuration switch, a corresponding relationship between the switch on and port PHY status of the configuration switch, and a corresponding relationship between the switch off and port PHY status of the configuration switch;
the judging unit is further configured to judge whether the port PHY state detected by the detecting subunit is the same as a port PHY state corresponding to the configuration switch being turned on or the configuration switch being turned off, and notify the executing unit to turn on the configuration switch if the port PHY state corresponding to the configuration switch being turned on is the same as the port PHY state corresponding to the configuration switch being turned on; if the PHY state of the port corresponding to the closing of the configuration switch is the same, informing an execution unit to close the configuration switch;
the execution unit is further configured to set the configuration switch to an on state when receiving the notification of turning on the configuration switch by the determination unit, and set the configuration switch to an off state when receiving the notification of turning off the configuration switch by the determination unit.
12. An ethernet switch according to claim 11, wherein said determining unit further performs the following before notifying the executing unit to modify the configuration of the configuration function item in the configuration modification condition: and judging whether the configuration switch is turned on, and if not, not informing the execution unit.
13. The ethernet switch according to claim 12, wherein the configuration unit further presets a configuration validation manner, and the configuration validation manner includes an immediate validation manner and a post-restart validation manner; presetting a corresponding relation between a port PHY state of an Ethernet switch and an immediate effective mode and a corresponding relation between the port PHY state of the Ethernet switch and an effective mode after restarting;
the judging unit is further configured to judge whether the port PHY state detected by the detecting subunit is the same as the port PHY state corresponding to the immediate-effect mode or the post-restart-effect mode, and notify the executing unit to modify the configuration-effect mode into immediate-effect mode if the port PHY state is the same as the port PHY state corresponding to the immediate-effect mode; if the port PHY state corresponding to the post-restart validation mode is the same, informing the execution unit to set the configuration validation mode to be valid after restart;
the execution unit is used for modifying the configuration validation mode into an immediate validation mode after receiving the notification of modifying the configuration validation mode into the immediate validation mode from the judgment unit; and after receiving the notification of the judging unit for modifying the configuration validation mode into the restart-after-effect mode, modifying the configuration validation mode into the power-off restart-after-effect mode.
14. An ethernet switch according to claim 13, wherein said configuration unit presets the configuration validation mode as immediate validation;
the Ethernet switch is a network-administration-free switch;
when the execution unit modifies the configuration of the configuration function item in the configuration modification condition into the configuration option in the configuration modification condition, the execution unit is configured to: modifying the value of the MAC register corresponding to the configuration function item in the configuration modification condition into the value corresponding to the configuration option in the configuration modification condition;
or,
the Ethernet switch is a network management type switch;
when the execution unit modifies the configuration of the configuration function item in the configuration modification condition into a configuration option in the configuration modification condition, the execution unit is configured to: and modifying the value of the configuration parameter in the network management system corresponding to the configuration function item in the configuration modification condition into the value corresponding to the configuration option in the configuration modification condition.
15. An ethernet switch according to claim 13, wherein said configuration unit presets a configuration validation mode to be valid after restart;
when the execution unit modifies the configuration of the configuration function item in the configuration modification condition into the configuration option in the configuration modification condition, the execution unit is configured to: modifying the value of the MAC register in the configuration file stored in the memory space of the Ethernet switch corresponding to the configuration function item of the configuration modification condition into the value corresponding to the configuration option in the configuration modification condition;
when the execution unit sets the configuration switch to be in an on state, the execution unit is used for: modifying the value corresponding to the configuration switch in the configuration file stored in the memory space of the Ethernet switch into the value corresponding to the opening of the configuration switch;
when the execution unit sets the configuration switch to be in the off state, the execution unit is used for: and modifying the value corresponding to the configuration switch in the configuration file stored in the memory space of the Ethernet switch into the value corresponding to the closing of the configuration switch.
CN 201110097946 2011-04-19 2011-04-19 Ethernet switch and method for modifying configuration of same Active CN102123055B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110097946 CN102123055B (en) 2011-04-19 2011-04-19 Ethernet switch and method for modifying configuration of same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110097946 CN102123055B (en) 2011-04-19 2011-04-19 Ethernet switch and method for modifying configuration of same

Publications (2)

Publication Number Publication Date
CN102123055A CN102123055A (en) 2011-07-13
CN102123055B true CN102123055B (en) 2013-09-25

Family

ID=44251516

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110097946 Active CN102123055B (en) 2011-04-19 2011-04-19 Ethernet switch and method for modifying configuration of same

Country Status (1)

Country Link
CN (1) CN102123055B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102364891B (en) * 2011-09-13 2014-08-27 杭州华三通信技术有限公司 Method for upgrading software of embedded Ethernet equipment and embedded Ethernet equipment
CN103269288B (en) * 2012-12-18 2017-11-21 上海斐讯数据通信技术有限公司 A kind of detection method to switch ports themselves
CN103236936A (en) * 2013-04-28 2013-08-07 上海斐讯数据通信技术有限公司 Method for protecting network devices
CN103684848B (en) * 2013-10-24 2018-01-05 浙江中控研究院有限公司 A kind of non-management type industrial ethernet switch automatically configured and its implementation
CN103701618A (en) * 2013-12-27 2014-04-02 上海斐讯数据通信技术有限公司 POE (power over Ethernet) switch port setting power limiting value validating method
CN104869025A (en) * 2014-02-24 2015-08-26 中国移动通信集团广东有限公司 PTN (Packet Transport Network) service configuration parameter detecting method and system
US10680957B2 (en) * 2014-05-28 2020-06-09 Cavium International Method and apparatus for analytics in a network switch
CN104539435B (en) * 2015-01-16 2018-02-06 盛科网络(苏州)有限公司 A kind of method and system for controlling multiport MAC to realize energy-conservation Ethernet
CN106790715A (en) * 2017-03-14 2017-05-31 深圳市友华通信技术有限公司 One kind is based on terminal configuration optimization implementation method under Remote configuration
CN108206715B (en) * 2017-12-18 2022-01-18 中交遥感天域科技江苏有限公司 Unmanned vehicles formation flight control data chain system based on ethernet
CN109818877A (en) * 2019-01-22 2019-05-28 深圳市网是科技有限公司 A method of the data transmission distance that automatically prolongs is realized by Port detecting algorithm
CN111106949A (en) * 2019-11-15 2020-05-05 苏州浪潮智能科技有限公司 Method and equipment for managing multiple Phy chips of switch
CN113014411B (en) * 2019-12-20 2022-11-22 华为技术有限公司 Method, device and system for managing network device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1764193A (en) * 2005-11-23 2006-04-26 杭州华为三康技术有限公司 Method for renewing address analysis protocol rapidly

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9178909B2 (en) * 2006-10-13 2015-11-03 Hewlett-Packard Development Company, L.P. Graphical representation of a port security state

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1764193A (en) * 2005-11-23 2006-04-26 杭州华为三康技术有限公司 Method for renewing address analysis protocol rapidly

Also Published As

Publication number Publication date
CN102123055A (en) 2011-07-13

Similar Documents

Publication Publication Date Title
CN102123055B (en) Ethernet switch and method for modifying configuration of same
TWI495297B (en) Process, computer readable media, and system for device power management using network connections
RU2370916C1 (en) Local network intermediator used for remote connected mobile device operating in reduced power consumption mode
US9104406B2 (en) Network presence offloads to network interface
US8321616B2 (en) System and method for enabling interchangeable dedicated management network interface card access via fabric controller
JP4500806B2 (en) Method and apparatus for configuring a router port
US8208486B2 (en) Apparatus and control method for energy-aware home gateway based on network
CN109150579B (en) Method and system for configuring multi-chassis link and storage medium thereof
EP2621127A1 (en) Method for achieving low power consumption of data exchange equipment and apparatus thereof, and data exchange equipment
KR20100013286A (en) Power supply system, server, power supply method, and computer readable recording medium
US20110040900A1 (en) Host/peripheral local interconnect that is compatible with self-configurable peripheral device
EP3884612B1 (en) Intermediary device for extracting power supplied over a data connection
US20100274943A1 (en) Line-card disabling for power management
RU2498398C2 (en) System and method of efficient realisation of improved routing device
JP2009135783A (en) Communication adapter and connection information setting method thereof
TWI649992B (en) Method for determining network node card operation speed of network node, port fanout configuration system and method thereof
CN107204888B (en) Method and device for switching timeout time and communication equipment
CN102413179A (en) Automatic power-on or wake-up machine and power-on or wake-up method thereof
JP2012227804A (en) Information processing device, and control method for information processing device
WO2014169647A1 (en) Power saving control method and apparatus for mobile device, mobile device and host terminal
US11108826B2 (en) Security modes for enhanced network security
TWM574793U (en) Network device capable of detecting state of external device
TWI469053B (en) Electronic device and startup method therefore
CN108108124B (en) Memory array and method for controlling memory array
CN107566131B (en) PSE multi-path automatic switching chip

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: Xinhua three Technology Co., Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: Huasan Communication Technology Co., Ltd.

CP03 Change of name, title or address
TR01 Transfer of patent right

Effective date of registration: 20220602

Address after: 510555 100, room 406, No. 1, Yichuang street, Zhongxin knowledge city, Huangpu District, Guangzhou City, Guangdong Province

Patentee after: Xinhuasan Intelligent Terminal Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right