Relay apparatus

A relay apparatus connected to communication lines to perform data relay between the communication lines is provided. The relay apparatus includes a receiver unit that receives rewrite information, which includes information for changing setting of the relay apparatus, from a source apparatus via any of the communication lines, a setting changer unit that changes the setting of the relay apparatus in accordance with the rewrite information, and a change information sending unit that sends the rewrite information to another relay apparatus existing in a local network.

CROSS REFERENCE TO RELATED APPLICATION

The present application is based on Japanese Patent Application No. 2015-58112 filed on Mar. 20, 2015 and Japanese Patent Application No. 2016-49619 filed on Mar. 14, 2016, disclosures of which are incorporated herein by reference.

TECHNICAL FIELD

The present disclosure relates to a relay apparatus for performing data relay between multiple communication lines.

BACKGROUND

A configuration for using multiple relay apparatuses in a local network such as a local area network is known (for example, Patent Literature 1).

When multiple relay apparatuses are used in a local network, a demand to change the setting of the multiple relay apparatuses without spending time and labor arises. However, because a procedure of changing the setting of the relay apparatus is of great variety, the writing apparatus needs to have the procedures that correspond to respective relay apparatuses. Additionally, because a relay apparatus having a microcomputer is expensive, there is a demand to use a relay apparatus having no microcomputer.

SUMMARY

In view of the foregoing, it is an object of the present disclosure to provide a technology that is directed to a relay apparatus for performing data relay between multiple communication lines and that enables a change in setting of multiple switches by a common (same) procedure even when the relay apparatus has no microcomputer.

A relay apparatus in an aspect of the present disclosure comprises a receiver unit, a setting changer unit and a change information sending unit. The receiver unit receives rewrite information, which includes information for changing setting of the relay apparatus, from a source apparatus via any of multiple communication lines. The setting changer unit changes the setting of the relay apparatus in accordance with the rewrite information. The change information sending unit sends the rewrite information to another as relay apparatus existing in a local network.

According to the above relay apparatus, because the relay apparatus changes its own setting based on the rewrite information and relays the rewrite information to another relay apparatus existing in the local network, it becomes possible to collectively change settings of multiple relay apparatuses even when the relay apparatus has no microcomputer or an apparatus having a microcomputer is not connected.

DETAILED DESCRIPTION

Embodiments will be described with reference to the drawings.

(Structures in the Present Embodiment)

A communication system1is mounted in a vehicle, which is for example an automobile. In the communication system1, multiple apparatuses are communicable each other within a local network, which is a communication network in the vehicle. As shown inFIG. 1, the communication system1includes a writing apparatus10, multiple Ethernet (registered trademark) switches20,30,40,50, and multiple electronic control units (ECUs)26,36,37,46,47,56,57. The writing apparatus10, the Ethernet switch20,30,40,50, and the ECUs26,36,37,46,47,56,57perform communications via communication lines71,72,73,74,85,76,77,78,79,80,81using Ethernet standards and TCP/IP protocol.

The writing apparatus10is provided as one ECU (Electronic Control Unit) and includes a microcomputer (not shown) with a CPU11, a memory12such as a ROM, a RAM and the like. The CPU11performs processes based on programs stored in the memory12.

In the present embodiment in particular, the writing apparatus10performs a process for changing communications-related settings of the Ethernet switches20,30,40,50, which are within the local network constituting the communication system1. Specifically, the writing apparatus10sends a rewrite instruction to the Ethernet switches20,30,40,50, thereby changing the communications-related settings of the Ethernet switches20,30,40,50.

Ethernet switch [A1]20, Ethernet switch [A2]30, Ethernet switch [B]40, Ethernet switch [C]50are provided as the Ethernet switches20,30,40,50. Bracketed alphabets [A][B][C] represent manufacturing companies of the Ethernet switches.

The Ethernet switches [A1][A2] are manufactured by the same manufacturing company. The Ethernet switches [A1][A2], the Ethernet switch [B]40, and the Ethernet switch [C]50are manufactured by different manufacturing companies. This shows that in the communication system1, multiple Ethernet switches manufactured by different manufacturing companies are implementable as network devices.

The Ethernet switches20,30,40,50have common parts including control circuits21,31,41,51, EEPROMs22,32,42,52, and buffers23,33,43,53. These parts in the Ethernet switches20,30,40,50have substantially the same function and these parts of the Ethernet switch20will be described. The explanation on the Ethernet switch20is applicable to other Ethernet switches30,40,50.

The control circuit21of the Ethernet switch20has a relay function. The relay function is a function to send the data, which is received from the connected communication lines71to74, to a communication line that is designated based on a destination MAC address. In performing the relay function, the Ethernet switch20temporarily stores the received data in the buffer23.

The control circuit21further has a rewrite function to rewrite setting of an Ethernet switch function stored in the EEPROM22in accordance with an instruction from the writing apparatus10. In the EEPROM22, the control circuit21stores trouble information such as a communication error generated in the Ethernet switch20and the like. The trouble information may include, for example, MIB (Management Information Base) and the like.

The ECUs26,36,37,46,47,56,57may be known ECUs provided with sensors (not shown), interfaces (not shown) and the like. Each ECU26,36,37,46,47,56,57performs predetermined processing and sends a result of the processing via the communication lines.

(Processes in the Present Embodiment)

In the communication system1, the writing apparatus10and the Ethernet switch20(Ethernet switches30,40,50also) perform the setting rewrite process illustrated inFIG. 2. The setting rewrite process is a process corresponding to the above-mentioned rewrite function. The setting rewrite process illustrated inFIG. 2starts in response to, for example, power on of the communication system1, and thereafter, the setting rewrite process is repeatedly performed at constant cycles.

As shown inFIG. 2, in the setting rewrite process, first, the writing apparatus10and the Ethernet switch20start communications using default configuration (config) information (S10, S20). The config is an abbreviation of a configuration and refers to a general setting of communication.

In the present embodiment, the settings relate to auto negotiation defined in IEEE802.3u and EEE defined in IEEE802.3az. Details of these settings will be described later.

When an instruction to rewrite the config information is inputted to the writing apparatus10by input of a user's operation or the like, the writing apparatus10sends a test mode transition instruction to the Ethernet switch20(S110). In the above, the writing apparatus10makes the test mode transition instruction by using a record area of a multicast MAC Address.

Specifically, as shown inFIG. 3, an Ethernet frame containing the test mode transition instruction includes a preamble, an SFD (Start of Frame Delimiter), a destination address, a source address, a data area etc. Among these, the destination address includes the MAC address as shown inFIG. 4. Specifically, the MAC Address includes a standard bit pattern indicating multicast and a multicast IP address portion (for example 23 bits).

In this multicast IP address portion, the instruction from the writing apparatus10and a response from each Ethernet switch20,30,40,50are recorded. For example, as shown inFIG. 5, the test the mode transition instruction is designated as “1” and the rewrite instruction is designated as “2” or the like and these numerical values are expressed in binary form in the multicast IP address portion.

The Ethernet switch20which has received the test mode transition instruction transfers the test mode transition instruction to another Ethernet switch30,40,50(S115). Because the Ethernet switch20,30,40,50which has received the test mode transition instruction transfers the test mode transition instruction in this way, all the Ethernet switches20,30,40,50within the local network can receive the test mode transition instruction.

Subsequently, the Ethernet switch20transitions to the test mode (S120). After the transition to the test mode, the Ethernet switch20becomes able to perform the rewriting of the EEPROM22and the like according to the instruction from the writing apparatus10. In other words, when the operation mode of the Ethernet switch is not the test mode, the change in the setting of the Ethernet switch is prohibited.

The Ethernet switch20sends a completion notification indicating the completion of the transition to the test mode to the writing apparatus10(S130). When the writing apparatus10receives this completion notification, the writing apparatus10sends the rewrite instruction (S140). This rewrite instruction is sent by multicast as is the case of the test mode transition instruction. The Ethernet switch20transfers the rewrite instruction to another Ethernet switch30,40,50(S145).

The Ethernet switch20sends a response to the writing apparatus10indicating that the rewriting is ready (OK, permitted) or prohibited (NG). Methods of determining whether the rewriting is OK or NG are preset in the writing apparatus10. When the rewriting is prohibited, the setting rewrite process is ended without execution of the subsequent steps.

When the writing apparatus10receives the response indicating that the rewriting is ready (OK), the writing apparatus10sends the rewrite information to the Ethernet switch20(S160). In doing so, the rewrite information is sent by multicast as is the case of the test mode transition instruction.

As shown inFIG. 6, the config information includes enable or disable of execution of the auto negotiation, enable or disable of execution of the EEE (IEEE802.3az) etc. The auto negotiation refers to a function to recognize a communication speed at a time of starting communication. When this function is enabled, it becomes possible for an apparatus (also referred to as a subject apparatus) to switch over a communication speed of the subject apparatus in accordance with a communication speed of a communication counterparty apparatus. This however may make longer the startup time of the subject apparatus. Thus, when a configuration of the communication counterparty apparatus is recognized in advance, it may be preferable to disable this function in some cases.

The EEE (IEEE802.3az) includes a function to intermittently stop a transmission circuit to reduce power consumption during communications. When this function is enabled in both the subject apparatus and the communication counterparty apparatus, the power consumption during communication can be reduced. However, when this function is enabled in the communication counterparty apparatus, the power consumption cannot be reduced.

For these items of the config information, default values are typically designated according to applications such as a consumer use, an industrial use, an automobile use etc. Therefore, with respect to switches having default values of different applications, there is meaning in making these functions common within the local network.

This rewrite information is also stored in the multicast IP address portion. When the Ethernet switch20receives this rewrite information, the Ethernet switch20transfers the rewrite information to another Ethernet switch30,40,50(S165). The Ethernet switch20rewrites the config information with the information as instructed in the rewrite information (S170).

The Ethernet switch20sends, as a response, a completion notification indicating completion of rewriting the config information to the writing apparatus10(S180).

The writing apparatus10is further configured to read out various kinds of information from the Ethernet switch20. For example, the writing apparatus10may be configured to read out the MIB and the config information.

Specifically, when the writing apparatus10receives an instruction to read out information from a user's operation or the like, the writing apparatus10causes the Ethernet switch20to transition to the test mode (S110to S120) as described above and sends a read instruction to the Ethernet switch20(S210).

The Ethernet switch20transfers the read instruction to another Ethernet switch30,40,50(S215) and performs the reading of information as instructed (S220). The Ethernet switch20responds to the writing apparatus10to indicate whether the reading is ready (OK) or not (NG) (S230). When the reading is ready (OK), the Ethernet switch20sends the instructed information such as the config information and the like to the writing apparatus10(S240).

The Ethernet switch20sends a completion notification, which indicates completion of the sending, to the writing apparatus10(S250).

The content of the response from the Ethernet switch20is stored in the multicast IP address portion. When the rewriting of the config information and the reading of the information are finished, the writing apparatus10sends a normal mode transition instruction to the Ethernet switch20(S310). By multicast, this normal mode transition instruction is sent to all the Ethernet switches20,30,40,50within the local network. Specifically, the Ethernet switch20transfers the normal mode transition instruction to another Ethernet switch30,40,50(S315).

The Ethernet switch20transitions to the normal mode (S320) and sends a completion notification indicating completion of the transition to the normal mode to the writing apparatus10(S330), When these steps are ended, the setting rewrite process is ended.

(Technical Effects of the Present Embodiment)

The control circuit21,31,41,51in the above-described Ethernet switch20,30,40,50receives the rewrite information, which is for changing the setting of the Ethernet switch, from the rewrite apparatus10via any of the multiple Ethernet communication lines. The Ethernet switch changes its setting (the setting of the Ethernet switch which has received there write information) in accordance with the rewrite information and sends the rewrite information to another Ethernet switch existing in the local network.

Therefore, these Ethernet switches20,30,40,50change their own settings based on the rewrite information and relay the rewrite information to another Ethernet switch within the local network. Thus, without directly connecting a microcomputer, the present embodiment can collectively change the settings of multiple Ethernet switches within the local network.

Moreover, the above Ethernet switch20,30,40,50performs the sending and receiving of the rewrite information by multicast communication. Accordingly, the Ethernet switch20,30,40,50uses the multicast instead of the generally-high-use broadcast. Therefore, an influence on broadcast-based communication can be avoided.

Moreover, in the above Ethernet switch20,30,40,50, the config information is contained in the rewrite information. Because the rewrite information includes the config information, the config information of the respective multiple Ethernet switches can be written into any values.

In the above Ethernet switch20,30,40,50, the rewrite information is stored in a MAC address record area of the data that contains this rewrite information. Therefore, the MAC address record area can be effectively used.

Moreover, when receiving the test mode transition instruction instructing the transition to the test mode via any of the multiple Ethernet communication lines, the control circuit21,31,41,51of the Ethernet switch20,30,40,50transitions the operation mode of the Ethernet switch to the test mode. Additionally, when the operation mode of the Ethernet switch is not the test mode, the control circuit prohibits the changing of the setting of the Ethernet switch.

According to this Ethernet switch20,30,40,50, the Ethernet switch can permit the changing of the setting of the Ethernet switch when it is in the test mode and prohibit the changing of the setting of the Ethernet switch when it is not in the test mode.

Moreover, when completing the changing of its own setting of the Ethernet switch, the control circuit21,31,41,51of the Ethernet switch20,30,40,50notifies the writing apparatus10of the completion notification indicating the completion of the setting change.

Because the Ethernet switch20,30,40,50notifies the writing apparatus of the setting change completion, the source (sender) of the rewrite information can recognize the Ethernet switch that has completed the setting change.

Moreover, the control circuit21,31,41,51of the Ethernet switch20,30,40,50sends the trouble information, which indicates the presence and absence of trouble of the Ethernet switch itself etc., to the rewrite apparatus10.

According to this Ethernet switch20,30,40,50, it becomes possible for the source (sender) of the rewrite information to recognize the information on the presence and absence of trouble (MIB).

Embodiments are not limited to the above-illustrated embodiment. The above embodiment may be modified in various ways. For example, a function of one element in the above embodiment may be distributed to multiple elements. Functions of multiple elements may be integrated into one element. A part of the above embodiment may be replaced with another part having a similar function. A part of the above embodiment may be omitted. A part of the above embodiment may be added to another embodiment and may be replaced with a part of another embodiment.

An embodiment may be the above Ethernet switch. Another embodiment may be a system including the above Ethernet switch. Another embodiment may be a program that causes a computer to function as the above Ethernet switch. The program may be stored in a non-transitory storage medium. Another embodiment may be an Ethernet switch rewriting method.

In the above embodiment, the multicast ID address portion stores the instruction and the rewrite information from the writing apparatus10, the response from the Ethernet switch20,30,40,50, and the like. Alternatively, as shown inFIG. 7, a data area may store these. This is effective in particular when an amount of data is large, e.g., when there are many items for the change in the rewrite information, when the trouble information such as MIB is to be sent, and the like.

In a modification, when the Ethernet switch20,30,40,50sends the completion notification, this completion notification may contain the trouble information. According to this modification, the sending of the completion notification and the sending of the trouble information can be done at once, and therefore, the number of data exchanges can be reduced.

In the above embodiments, the writing apparatus10corresponds to a source apparatus. The Ethernet switch20,30,40,50corresponds to a relay apparatus. The Ethernet switch20,30,4050which performs S110and S120among various processes corresponds to a test mode transition unit (means). The Ethernet switch which performs S150corresponds to a change prohibition unit (means)

Further, in the above embodiments, the Ethernet switch which performs S160corresponds to a receiver unit (means), The Ethernet switch which performs S165corresponds to a change information sending unit. The Ethernet switch which performs S170corresponds to a setting changer unit (means). The Ethernet switch which performs S180corresponds to a completion notifier unit (means)

Further, the Ethernet switch which performs S240corresponds to a trouble information sending unit (means).