Summary of the invention
The object of the invention is a kind of method providing port arrangement, realizes the similar superposition forwarding service of TRILL+IP to solve in common Ethernet switch.
First aspect present invention provides a kind of method of port arrangement, and described method comprises:
For the virtual LAN VLAN of the unidirectional symmetry of loopback port arrangement of Ethernet switch converts, wherein, described loopback port is described Ethernet switch for the General Physics port of data loopback or General Logic port or inner reserved port;
For described loopback port assignment is that described loopback port assignment is for two layers of VLAN forwarded and the 2nd VLAN for three layers of forwarding.
In conjunction with first aspect, in the first possible implementation of first aspect, described method also comprises:
When described loopback port accepts Ethernet message, according to a described VLAN and the 2nd VLAN, VLAN conversion is carried out to described Ethernet message.
In conjunction with the first possible implementation of first aspect or first aspect, in the implementation that the second of first aspect is possible, before the VLAN conversion of the unidirectional symmetry of loopback port arrangement for Ethernet switch, described method also comprises:
Close the mac learning function of described loopback port, make described loopback port exit all VLAN;
At the enable loop fuction of described loopback port, wherein, described loopback refers to Ethernet message that described loopback port sends after the media interviews mac layer or physical PHY layer of described loopback port by described loopback port accepts.
In conjunction with the implementation that the second of first aspect is possible, in the third possible implementation of first aspect, described when described loopback port accepts Ethernet message, according to a described VLAN and the 2nd VLAN, VLAN conversion is carried out to described Ethernet message, comprising:
After described Ethernet switch receives multilink transparent interconnection TRILL message from TRILL network, remove the TRILL encapsulation of described TRILL message, obtain the Ethernet message of a VLAN;
The Ethernet message of a described VLAN is carried out two layers of forwarding in described Ethernet switch inside;
The Ethernet message of a VLAN described in the loopback port accepts of described Ethernet switch, according to the outgoing direction configured or the VLAN conversion entering direction, described VLAN conversion is carried out to the Ethernet message of a VLAN, the Ethernet message of a described VLAN is revised as the Ethernet message of the 2nd VLAN; Described enter direction be the direction that described Ethernet message is dealt into described loopback port, described outgoing direction is that described Ethernet message is dealt into the direction of other ports of described Ethernet switch from described loopback port;
At described loopback port, the Ethernet message of described 2nd VLAN is looped back to described Ethernet switch;
Described Ethernet switch carries out three layers of forwarding to after Ethernet message Reseal two layers of head of described 2nd VLAN.
In conjunction with the implementation that the second of first aspect is possible, in the 4th kind of possible implementation of first aspect, described when described loopback port accepts Ethernet message, according to a described VLAN and the 2nd VLAN, VLAN conversion is carried out to described Ethernet message, comprising:
After described Ethernet switch receives IP message from IP network, described IP message is carried out three layers of forwarding, after three layers forward, described IP message is encapsulated as the Ethernet message of the 2nd VLAN;
The Ethernet message of the 2nd VLAN described in the loopback port accepts of described Ethernet switch;
The loopback port of described Ethernet switch, according to the outgoing direction of configuration or the VLAN conversion entering direction, carries out described VLAN conversion to the Ethernet message of described 2nd VLAN, the Ethernet message of described 2nd VLAN is revised as the Ethernet message of a VLAN;
Described in described loopback port, the Ethernet message of a VLAN is looped back to described Ethernet switch;
Described Ethernet switch carries out two layers of forwarding after adding TRILL encapsulation to the Ethernet message of a described VLAN.
Second aspect present invention provides a kind of Ethernet switch, and described Ethernet switch comprises:
Dispensing unit, the VLAN for the unidirectional symmetry of loopback port arrangement for Ethernet switch converts, and wherein, described loopback port is described Ethernet switch for the General Physics port of data loopback or General Logic port or inner reserved port;
Allocation units, for for being described loopback port assignment for described loopback port assignment for two layers of VLAN forwarded and the 2nd VLAN that forwards for three layers.
In conjunction with second aspect, in the first possible implementation of second aspect, described ethernet switch also comprises:
VLAN converter unit, for when described loopback port accepts Ethernet message, carries out VLAN conversion according to a described VLAN and the 2nd VLAN to described Ethernet message.
In conjunction with the first possible implementation of second aspect or second aspect, in the implementation that the second of second aspect is possible, described Ethernet switch also comprises:
Closing unit, for closing the mac learning function of the loopback port of described Ethernet switch, makes described loopback port exit all VLAN;
Loop back processing being unit, at the enable loop fuction of described loopback port, wherein, described loopback refers to Ethernet message that described loopback port sends after the MAC layer or PHY layer of described loopback port by described loopback port accepts.
In conjunction with the implementation that the second of second aspect is possible, in the third possible implementation of second aspect, described VLAN converter unit, comprising:
Lifting unit, for after described Ethernet switch receives multilink transparent interconnection TRILL message from TRILL network, removes the TRILL encapsulation of described TRILL message, obtains the Ethernet message of a VLAN;
First receiving element, for carrying out two layers of forwarding by the Ethernet message of a described VLAN in described Ethernet switch inside;
One VLAN converter unit, for described Ethernet switch loopback port accepts described in the Ethernet message of a VLAN, according to the outgoing direction configured or the VLAN conversion entering direction, described VLAN conversion is carried out to the Ethernet message of a VLAN, the Ethernet message of a described VLAN is revised as the Ethernet message of the 2nd VLAN; Described enter direction be the direction that described Ethernet message is dealt into described loopback port, described outgoing direction is that described Ethernet message is dealt into the direction of other ports of described Ethernet switch from described loopback port;
Second receiving element, for being looped back to described Ethernet switch at described loopback port by the Ethernet message of described 2nd VLAN;
First retransmission unit, carries out three layers of forwarding for described Ethernet switch to after Ethernet message Reseal two layers of head of described 2nd VLAN.
In conjunction with the implementation that the second of second aspect is possible, in the 4th kind of possible implementation of second aspect, described VLAN converter unit, comprising:
Second retransmission unit, for after described Ethernet switch receives IP message from IP network, carries out three layers of forwarding by described IP message, after three layers forward, described IP message is encapsulated as the Ethernet message of the 2nd VLAN;
3rd receiving element, for described Ethernet switch loopback port accepts described in the Ethernet message of the 2nd VLAN;
2nd VLAN converter unit, for described Ethernet switch loopback port according to configuration outgoing direction or enter direction VLAN conversion, described VLAN conversion is carried out to the Ethernet message of described 2nd VLAN, the Ethernet message of described 2nd VLAN is revised as the Ethernet message of a VLAN;
4th receiving element, is looped back to described Ethernet switch for the Ethernet message of a VLAN described in described loopback port;
Encapsulation unit, carries out two layer forwarding after adding TRILL encapsulation for described Ethernet switch to the Ethernet message of a described VLAN.
Compared with prior art, the method of a kind of port arrangement provided by the invention and Ethernet switch, by arranging the loopback port of described Ethernet switch, the Ethernet message that Ethernet switch is received, after Ethernet switch process also sends, can get back to described Ethernet switch, simultaneously by arranging the VLAN conversion of the unidirectional symmetry of loopback port, the Ethernet message after conversion is made to carry out forwarding operation by different logical channels in the same physical channel of described Ethernet switch, described different logical channel makes the Ethernet message after carrying out two layers of forwarding do three layers of forwarding, or make the Ethernet message after carrying out three layers of forwarding do two layers of forwarding, instead of return same Ethernet message from original physical channel, avoid network Cheng Huan, and then realize the superposition forwarding service realizing TRILL+IP on same common Ethernet switch.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
Embodiment one
With reference to the method flow diagram that figure 1, Fig. 1 is a kind of port arrangement that the embodiment of the present invention one provides.Said method comprising the steps of:
Step 101, for the virtual LAN VLAN of the unidirectional symmetry of loopback port arrangement of Ethernet switch converts, wherein, described loopback port is described Ethernet switch for the General Physics port of data loopback or General Logic port or inner reserved port;
Wherein, described VLAN conversion refers to that described loopback port is when receiving Ethernet message, VLAN value transform original in described Ethernet message is become the VLAN value of described loopback port, the Ethernet message after conversion is made to carry out forwarding operation by different logical channels in the same physical channel of described Ethernet switch, described different logical channel makes the Ethernet message after carrying out two layers of forwarding do three layers of forwarding, or makes the Ethernet message after carrying out three layers of forwarding do two layers of forwarding.Concrete, described Ethernet exchanging function carries out three layers of forwarding of described Ethernet message after realizing the TRILL encapsulation of releasing Ethernet message, and can be embodied as the two layers of forwarding carrying out described Ethernet message after Ethernet message adds TRILL encapsulation.
Wherein, unidirectional in the VLAN conversion of the unidirectional symmetry of described configuration can be outgoing direction or enter direction, described enter direction be that described Ethernet message enters the direction of described loopback port from other ports of described Ethernet switch, described outgoing direction is that described Ethernet message is dealt into the direction of other ports of described Ethernet switch from described loopback port.The VLAN conversion of described symmetry refers to for same unidirectional VLAN conversion, the Ethernet message received from TRILL network for described Ethernet switch or applicable equally from the Ethernet message of IP network reception.
Step 102 is the 2nd VLAN that described loopback port assignment is used for two layers of VLAN forwarded and forwards for three layers.
In this step, be VLAN, e.g., the VLAN1 that described loopback port assignment one forwards for double layer network, and the 2nd VLAN, e.g., a VLAN2 forwarded for three layers, and described loopback port is added described two VLAN.Wherein, described VLAN2 can be the idle VLAN of internal system distribution.
Further, described method also comprises:
When described loopback port accepts is to Ethernet message, according to a described VLAN and the 2nd VLAN, VLAN conversion is carried out to described Ethernet message.
Alternatively, the Ethernet message received from TRILL network for described Ethernet switch carries out VLAN conversion and loop back processing being in the following manner:
After described Ethernet switch receives TRILL message from TRILL network, remove the TRILL encapsulation of described TRILL message, obtain the Ethernet message of VLAN1;
When the Ethernet message of described VLAN1 to carry out in described Ethernet switch inside two layers forward time, because described loopback port adds VLAN1, the loopback port of described Ethernet switch can receive the Ethernet message of described VLAN1;
The loopback port of described Ethernet switch is according to the unidirectional VLAN conversion of configuration, and carry out described VLAN conversion to the Ethernet message of described VLAN1, the Ethernet message by VLAN1 is revised as the Ethernet message of VLAN2;
Described loopback port sends the Ethernet message of VLAN2, because described loopback port is added into VLAN2, by described loopback port, the Ethernet message of described VLAN2 is received back described Ethernet switch;
Described Ethernet switch carries out three layers of forwarding to after Ethernet message Reseal two layers of head of described VLAN2.
Alternatively, the Ethernet message received from IP network for described Ethernet switch carries out VLAN conversion and loop back processing being in the following manner:
After described Ethernet switch receives IP message from IP network, described IP message is carried out three layers of forwarding, after three layers forward, described IP message is encapsulated as the Ethernet message of VLAN2;
Because described loopback port adds VLAN2, described loopback port can receive the Ethernet message of a VLAN2;
The loopback port of described Ethernet switch is according to the unidirectional VLAN conversion of configuration, and the Ethernet message of described VLAN2 is carried out described VLAN conversion, and the Ethernet message by VLAN2 is revised as the Ethernet message of VLAN1;
Described loopback port sends the Ethernet message of VLAN1, because described loopback port is added into VLAN1, by described loopback port, the Ethernet message of described VLAN1 is received back described Ethernet switch;
Described Ethernet switch carries out two layers of forwarding after adding TRILL encapsulation to the Ethernet message of VLAN1.
The Ethernet message of above-mentioned VLAN1, the Ethernet message of VLAN2 refers to that message content is identical, but the VLAN carried in heading mark is respectively VLAN1 and VLAN2, and the Ethernet message sent in VLAN1 and VLAN2 respectively.
The embodiment of the present invention is by arranging the loopback port of described Ethernet switch, and the Ethernet message that Ethernet switch is received, after Ethernet switch process also sends, can get back to described switch Ethernet switch; Simultaneously by arranging the VLAN conversion of the unidirectional symmetry of loopback port, the Ethernet message after conversion is made to carry out forwarding operation by different logical channels in the same physical channel of described Ethernet switch, described different logical channel makes the Ethernet message after carrying out two layers of forwarding do three layers of forwarding, or make the Ethernet message after carrying out three layers of forwarding do two layers of forwarding, instead of return same Ethernet message from original physical channel, avoid network Cheng Huan.Thus realize the superposition forwarding service realizing TRILL+IP on same common Ethernet switch.
Embodiment two
With reference to the method flow diagram that figure 2, Fig. 2 is a kind of port arrangement that the embodiment of the present invention two provides.Said method comprising the steps of:
Step 201, close the mac learning function of the loopback port of described Ethernet switch, make described loopback port exit all VLAN, wherein, described loopback port is described Ethernet switch for the General Physics port of data loopback or General Logic port or inner reserved port;
In this step, by the loopback port shutdown mac learning at Ethernet switch, make described loopback port exit all VLAN operations, make described loopback port only for carrying out VLAN conversion to Ethernet message and receiving the Ethernet message after VLAN conversion.
Step 202, at the enable loop fuction of described loopback port, wherein, described loopback refers to Ethernet message that described loopback port sends after the MAC layer or PHY layer of described loopback port by described loopback port accepts;
Step 203, for the VLAN of the unidirectional symmetry of loopback port arrangement of Ethernet switch converts;
Step 204 is the 2nd VLAN that described loopback port assignment is used for two layers of VLAN forwarded and forwards for three layers;
Step 205, when described loopback port accepts Ethernet message, carries out VLAN conversion according to a described VLAN and the 2nd VLAN to described Ethernet message.
Step 203, step 204 explains concrete refer step 101, and step 102 does not repeat them here.
The embodiment of the present invention, by the loopback port shutdown mac learning at Ethernet switch, makes described loopback port exit all VLAN operations, makes described loopback port only for carrying out VLAN conversion to Ethernet message and receiving the Ethernet message after VLAN conversion.And by the enable loop fuction of described loopback port, make described loopback port receive the Ethernet message sent from loopback port.Meanwhile, by arranging the loopback port of described Ethernet switch, the Ethernet message that Ethernet switch is received, after Ethernet switch process also sends, can get back to described switch Ethernet switch; Simultaneously by arranging the VLAN conversion of the unidirectional symmetry of loopback port, the Ethernet message after conversion is made to carry out forwarding operation by different logical channels in the same physical channel of described Ethernet switch, described different logical channel makes the Ethernet message after carrying out two layers of forwarding do three layers of forwarding, or make the Ethernet message after carrying out three layers of forwarding do two layers of forwarding, instead of return same Ethernet message from original physical channel, avoid network Cheng Huan, and then realize the superposition forwarding service realizing TRILL+IP on same common Ethernet switch.
Embodiment three
With reference to the method flow diagram that figure 3, Fig. 3 is a kind of port arrangement that the embodiment of the present invention three provides.Said method comprising the steps of:
Step 301, close the mac learning function of the loopback port of described Ethernet switch, make described loopback port exit all VLAN, wherein, described loopback port is described Ethernet switch for the General Physics port of data loopback or General Logic port or inner reserved port;
Step 302, at the enable loop fuction of described loopback port, wherein, described loopback refers to Ethernet message that described loopback port sends after the MAC layer or PHY layer of described loopback port by described loopback port accepts;
Concrete, with reference to figure 4, Port1 refers to the port that Ethernet switch is connected with other Ethernet switches of TRILL network, for receiving Ethernet message from TRILL network or Ethernet message being sent to TRILL network, makes described Ethernet switch remove the TRILL encapsulation of Ethernet message; Port2 is the loopback port of the described Ethernet switch of configuration, for described Ethernet message being done VLAN conversion and loop back processing being; Port3 refers to the port of described Ethernet switch and the mutual Ethernet message of IP network, for receiving Ethernet message from IP network or Ethernet message being sent to IP network, makes described Ethernet switch encapsulate two layers of head of Ethernet message.
Step 303, by described loopback port arrangement from TRILL network to IP network direction, and make symmetrical VLAN from IP network to TRILL network direction and convert, and be arranged on loopback port outgoing direction and carry out VLAN conversion, described outgoing direction is that described Ethernet message is dealt into the direction of other ports of described Ethernet switch from described loopback port;
Step 304 is the 2nd VLAN that described loopback port assignment is used for two layers of VLAN forwarded and forwards for three layers;
Step 305, when described loopback port accepts is to Ethernet message, carries out VLAN conversion according to a described VLAN and the 2nd VLAN to described Ethernet message.
Alternatively, with reference to shown in figure 4:
Described Ethernet switch to receive the Ethernet message of VLAN1 by Port1 from TRILL network after, remove TRILL encapsulation, namely remove VLANm and Trill head as shown in Figure 4; Described VLANm is the VLAN of described Ethernet message in TRILL network.
When the Ethernet message of VLAN1 to carry out in described Ethernet switch inside two layers forward time, because described loopback port adds VLAN1, the loopback port of described Ethernet switch can receive the Ethernet message of described VLAN1.
The loopback port of described Ethernet switch is according to the VLAN conversion of the outgoing direction of configuration, and carry out described VLAN conversion to the Ethernet message of described VLAN1, the Ethernet message by VLAN1 is modified as the Ethernet message of VLAN2.
Described loopback port sends the Ethernet message of VLAN2, and because described loopback port is added into VLAN2, the Ethernet message of described VLAN2 is received back described Ethernet switch by described loopback port;
Described Ethernet switch carries out three layers of forwarding to after Ethernet message Reseal two layers of head of described VLAN2.
Concrete, with reference to figure 5 left figure shown in, when the Ethernet message of VLAN1 is sent by Port2, the VLAN according to the outgoing direction of configuration converts, and the Ethernet message of VLAN1 is revised as the Ethernet message of VLAN2.
Optionally, shown in figure 4, after described Ethernet switch receives the Ethernet message of IP network from IP network, the Ethernet message of described IP network is carried out three layers of forwarding, namely after three layers forward, the Ethernet message of described IP network is encapsulated as the Ethernet message of VLAN2;
Concrete, shown in figure 4, the MAC head of the Ethernet message of described IP network and VLAN value by Port3, are packaged into new MAC head and convert VLAN value for after VLAN2, carry out three layers of forwarding after the Ethernet message of described IP network reception IP network by described Ethernet switch.
Because described loopback port adds VLAN2, described loopback port can receive described VLAN2 Ethernet message;
The loopback port of described Ethernet switch is according to the VLAN conversion of the outgoing direction of configuration, and the Ethernet message of described VLAN2 is carried out described VLAN conversion, and the Ethernet message by VLAN2 is revised as VLAN1;
Described loopback port sends the Ethernet message of VLAN1, because described loopback port is added into VLAN1, uses loop back processing being, the Ethernet message of described VLAN1 is received back described Ethernet switch at described loopback port;
The Ethernet message of described Ethernet switch to VLAN1 carries out two layers of forwarding after adding TRILL encapsulation.
Concrete, with reference to figure 5 right figure shown in, when the Ethernet message of VLAN2 is sent by Port2, the VLAN according to the outgoing direction of configuration converts, and the Ethernet message of VLAN2 is revised as the Ethernet message of VLAN1.
The embodiment of the present invention, by the loopback port shutdown mac learning at Ethernet switch, makes described loopback port exit all VLAN operations, makes described loopback port only for carrying out VLAN conversion to Ethernet message and receiving the Ethernet message after VLAN conversion.And by the enable loop fuction of described loopback port, make described loopback port receive the Ethernet message sent from loopback port.Meanwhile, by arranging the loopback port of described Ethernet switch, the Ethernet message that Ethernet switch is received, after Ethernet switch process also sends, can get back to described switch Ethernet switch; Simultaneously by arranging the VLAN conversion of the unidirectional symmetry of loopback port, though make the Ethernet message after conversion carry out forwarding operation by different logical channels in the same physical channel of described Ethernet switch, described different logical channel makes the Ethernet message after carrying out two layers of forwarding do three layers of forwarding, or make the Ethernet message after carrying out three layers of forwarding do two layers of forwarding, instead of return same Ethernet message from original physical channel, avoid network Cheng Huan, and then realize the superposition forwarding service realizing TRILL+IP on same common Ethernet switch.
Embodiment four
A kind of method flow diagram sending Ethernet message that the embodiment of the present invention four provides with reference to figure 6, Fig. 6.Said method comprising the steps of:
Step 601, close the mac learning function of the loopback port of described Ethernet switch, make described loopback port exit all VLAN, wherein, described loopback port is described Ethernet switch for the General Physics port of data loopback or General Logic port or inner reserved port;
Step 602, at the enable loop fuction of described loopback port, wherein, described loopback refers to Ethernet message that described loopback port sends after the MAC layer or PHY layer of described loopback port by described loopback port accepts;
Concrete, with reference to figure 4, Port1 refers to the port that Ethernet switch is connected with other Ethernet switches of TRILL network, for receiving Ethernet message from TRILL network or Ethernet message being sent to TRILL network, makes described Ethernet switch remove the TRILL encapsulation of Ethernet message; Port2 is the loopback port of the described Ethernet switch of configuration, for described Ethernet message being done VLAN conversion and loop back processing being; Port3 refers to the port of described Ethernet switch and the mutual Ethernet message of IP network, for receiving Ethernet message from IP network or Ethernet message being sent to IP network, makes described Ethernet switch encapsulate two layers of head of Ethernet message.
Step 603, by described loopback port arrangement from TRILL network to IP network direction, and make symmetrical VLAN from IP network to TRILL network direction and convert, and be arranged on loopback port and enter the VLAN conversion carried out in direction, described in enter direction be that described Ethernet message is sent to the direction of described loopback port from other ports of described Ethernet switch;
Step 604 is the 2nd VLAN that described loopback port assignment is used for two layers of VLAN forwarded and forwards for three layers;
Step 605, when described loopback port accepts is to Ethernet message, carries out VLAN conversion according to a described VLAN and the 2nd VLAN to described Ethernet message.
Alternatively, shown in figure 4,
After described Ethernet switch to receive the Ethernet message of VLAN1 from TRILL network by Port1, remove TRILL encapsulation, namely remove VLANm and Trill head as shown in Figure 4; Described VLANm is the VLAN of described Ethernet message in TRILL network.
When the Ethernet message of VLAN1 to carry out in described Ethernet switch inside two layers forward time, because described loopback port adds VLAN1, the loopback port of described Ethernet switch can receive the Ethernet message of to described VLAN1;
The loopback port of described Ethernet switch is according to the VLAN conversion entering direction of configuration, and carry out described VLAN conversion to the Ethernet message of described VLAN1, the Ethernet message by VLAN1 is modified to the Ethernet message of VLAN2.
Described loopback port sends the Ethernet message of VLAN2, and because described loopback port is added into VLAN2, the Ethernet message of described VLAN2 is received back described Ethernet switch by described loopback port;
Described Ethernet switch carries out three layers of forwarding to after Ethernet message Reseal two layers of head of described VLAN2.
Concrete, with reference to figure 7 left figure shown in, when the Ethernet message of VLAN1 is sent to Port2 by Port1, the VLAN entering direction according to configuration converts, and the Ethernet message of VLAN1 is revised as the Ethernet message of VLAN2.
Optionally, shown in figure 4, after described Ethernet switch receives the Ethernet message of IP network from IP network, the Ethernet message of described IP network is carried out three layers of forwarding, namely after three layers forward, the Ethernet message of described IP network is encapsulated as the Ethernet message of VLAN2;
Concrete, shown in figure 4, the MAC head of the Ethernet message of described IP network and VLAN value by Port3, are packaged into new MAC head and convert VLAN value for after VLAN2, carry out three layers of forwarding after the Ethernet message of described IP network reception IP network by described Ethernet switch.
Because described loopback port adds VLAN2, described loopback port can receive described VLAN2 Ethernet message;
The loopback port of described Ethernet switch is according to the VLAN conversion entering direction of configuration, and the Ethernet message of described VLAN2 is carried out described VLAN conversion, and the Ethernet message by VLAN2 is revised as VLAN1;
Described loopback port sends the Ethernet message of VLAN1, because described loopback port is added into VLAN1, uses loop back processing being, the Ethernet message of described VLAN1 is received back described Ethernet switch at described loopback port;
The Ethernet message of described Ethernet switch to VLAN1 carries out two layers of forwarding after adding TRILL encapsulation.
Concrete, with reference to figure 7 right figure shown in, when the Ethernet message of VLAN2 is sent to Port2 by Port3, the VLAN entering direction according to configuration converts, and the Ethernet message of VLAN2 is revised as the Ethernet message of VLAN1.
The embodiment of the present invention, by the loopback port shutdown mac learning at Ethernet switch, makes described loopback port exit all VLAN operations, makes described loopback port only for carrying out VLAN conversion to Ethernet message and receiving the Ethernet message after VLAN conversion.And by the enable loop fuction of described loopback port, make described loopback port receive the Ethernet message sent from loopback port.Meanwhile, by arranging the loopback port of described Ethernet switch, the Ethernet message that Ethernet switch is received, after Ethernet switch process also sends, can get back to described switch Ethernet switch; Simultaneously by arranging the VLAN conversion of the unidirectional symmetry of loopback port, though make the Ethernet message after conversion carry out forwarding operation by different logical channels in the same physical channel of described Ethernet switch, described different logical channel makes the Ethernet message after carrying out two layers of forwarding do three layers of forwarding, or make the Ethernet message after carrying out three layers of forwarding do two layers of forwarding, instead of return same Ethernet message from original physical channel, avoid network Cheng Huan, and then realize the superposition forwarding service realizing TRILL+IP on same common Ethernet switch.
Embodiment five
With reference to the structure drawing of device that figure 8, Fig. 8 is a kind of Ethernet switch that the embodiment of the present invention five provides.Described Ethernet switch comprises with lower unit:
Dispensing unit 801, the VLAN for the unidirectional symmetry of loopback port arrangement for Ethernet switch converts, and wherein, described loopback port is described Ethernet switch for the General Physics port of data loopback or General Logic port or inner reserved port;
Concrete, described Ethernet switch has loopback port, and described loopback port is described Ethernet switch for the General Physics port of data loopback or General Logic port or inner reserved port.
Wherein, described VLAN conversion refers to that described loopback port is when receiving Ethernet message, VLAN value transform original in described Ethernet message is become the VLAN value of described loopback port, although make the Ethernet message after conversion carry out forwarding operation in the same physical channel of described Ethernet switch, but belong to different logical channels, described different logical channel makes the Ethernet message after carrying out two layers of forwarding do three layers of forwarding, or makes the Ethernet message after carrying out three layers of forwarding do two layers of forwarding.Concrete, described Ethernet exchanging function carries out three layers of forwarding of described Ethernet message after realizing the TRILL encapsulation of releasing Ethernet message, and carries out two layers of forwarding of described Ethernet message after realizing the TRILL encapsulation of interpolation Ethernet message.
Wherein, unidirectional in the VLAN conversion of the unidirectional symmetry of described configuration can be outgoing direction or enter direction, described enter direction be the direction that described Ethernet message is dealt into described loopback port, described outgoing direction is that described Ethernet message is dealt into the direction of other ports of described Ethernet switch from described loopback port.The VLAN conversion of described symmetry refers to for same unidirectional VLAN conversion, the Ethernet message received from TRILL network for described Ethernet switch or be simultaneously suitable for from the Ethernet message of IP network reception.
This unit is by arranging the loopback port of described Ethernet switch, and the Ethernet message that Ethernet switch is received, after processing and send, can be received by described Ethernet switch again; In addition, by arranging the VLAN conversion of the unidirectional symmetry of loopback port, the Ethernet message after conversion is enable to carry out forwarding operation by different logical channels in the same physical channel of described Ethernet switch, described different logical channel makes the Ethernet message after carrying out two layers of forwarding do three layers of forwarding, or make the Ethernet message after carrying out three layers of forwarding do two layers of forwarding, avoid network Cheng Huan.
Allocation units 802, for being described loopback port assignment for described loopback port assignment for two layers of VLAN forwarded and the 2nd VLAN that forwards for three layers.
Wherein, be that described loopback port distributes an idle VLAN in the two directions respectively for described loopback port assignment VLAN, be the idle VLAN that described loopback port assignment one is served for TRILL network, e.g., VLAN1, and idle VLAN, an e.g. for IP network service, VLAN2, and described loopback port is added described two VLAN.
Concrete, after the VLAN conversion of the unidirectional symmetry of loopback port arrangement at described Ethernet switch, the Ethernet message that described Ethernet switch receives can send a loopback port to described Ethernet switch, and the loopback port of described Ethernet switch carries out VLAN conversion and loop back processing being to the Ethernet message sent.
Further, described Ethernet switch also comprises VLAN converter unit 803.
VLAN converter unit 803, for when described loopback port accepts is to Ethernet message, carries out VLAN conversion according to a described VLAN and the 2nd VLAN to described Ethernet message.
As another kind of optional embodiment, described Ethernet switch also comprises with lower unit:
Closing unit 804, for closing the mac learning function of the loopback port of described Ethernet switch, makes described loopback port exit all VLAN;
Loop back processing being unit 805, at the enable loop fuction of described loopback port, wherein, described loopback refers to Ethernet message that described loopback port sends through the MAC layer of described loopback port or PHY layer by described loopback port accepts.
Alternatively, described VLAN converter unit 803 comprises with lower unit:
Lifting unit 901, for after described Ethernet switch receives multilink transparent interconnection TRILL message from TRILL network, removes the TRILL encapsulation of described TRILL message, obtains the Ethernet message of a VLAN;
First receiving element 902, for carrying out two layers of forwarding by the Ethernet message of a described VLAN in described Ethernet switch inside;
One VLAN converter unit 903, for described Ethernet switch loopback port accepts described in the Ethernet message of a VLAN, according to the outgoing direction configured or the VLAN conversion entering direction, described VLAN conversion is carried out to the Ethernet message of a VLAN, the Ethernet message of a described VLAN is revised as the Ethernet message of the 2nd VLAN; Described enter direction be the direction that described Ethernet message is dealt into described loopback port, described outgoing direction is that described Ethernet message is dealt into the direction of other ports of described Ethernet switch from described loopback port;
Second receiving element 904, for being looped back to described Ethernet switch at described loopback port by the Ethernet message of described 2nd VLAN;
First retransmission unit 905, carries out three layers of forwarding for described Ethernet switch to after Ethernet message Reseal two layers of head of described 2nd VLAN.
Alternatively, described VLAN converter unit 803 comprises with lower unit:
Second retransmission unit 1001, for after described Ethernet switch receives IP message from IP network, carries out three layers of forwarding by described IP message, after three layers forward, described IP message is encapsulated as the Ethernet message of the 2nd VLAN;
3rd receiving element 1002, for described Ethernet switch loopback port accepts described in the Ethernet message of the 2nd VLAN;
2nd VLAN converter unit 1003, for described Ethernet switch loopback port according to configuration outgoing direction or enter direction VLAN conversion, described VLAN conversion is carried out to the Ethernet message of described 2nd VLAN, the Ethernet message of described 2nd VLAN is revised as the Ethernet message of a VLAN;
4th receiving element 1004, is looped back to described Ethernet switch for the Ethernet message of a VLAN described in described loopback port;
Encapsulation unit 1005, carries out two layer forwarding after adding TRILL encapsulation for described Ethernet switch to the Ethernet message of a described VLAN.
The embodiment of the present invention, by the loopback port shutdown mac learning at Ethernet switch, makes described loopback port exit all VLAN operations, makes described loopback port only for carrying out VLAN conversion to Ethernet message and receiving the Ethernet message after VLAN conversion.And by the enable loop fuction of described loopback port, make described loopback port receive the Ethernet message sent from loopback port.Meanwhile, by arranging the loopback port of described Ethernet switch, the Ethernet message that Ethernet switch is received, after Ethernet switch process also sends, can get back to described switch Ethernet switch; Simultaneously by arranging the VLAN conversion of the unidirectional symmetry of loopback port, the Ethernet message after conversion is made to carry out forwarding operation by different logical channels in the same physical channel of described Ethernet switch, described different logical channel makes the Ethernet message after carrying out two layers of forwarding do three layers of forwarding, or make the Ethernet message after carrying out three layers of forwarding do two layers of forwarding, instead of return same Ethernet message from original physical channel, avoid network Cheng Huan, and then realize the superposition forwarding service realizing TRILL+IP on same common Ethernet switch.
Embodiment six
Reference Figure 11, Figure 11 are a kind of Ethernet switches 1100 that the embodiment of the present invention six provides.Described Ethernet switch 1100 comprises with lower unit:
Processor (processor) 1101, communication interface (CommunicationsInterface) 1102, memory (memory) 1103, bus 1104.
Processor 1101, communication interface 1102, memory 1103 completes mutual communication by bus 1104.
Communication interface 1102, for communicating with other equipment;
Processor 1101, for executive program A.
Particularly, program A can comprise program code, and described program code comprises computer-managed instruction.
Processor 1101 may be a central processor CPU, or specific integrated circuit ASIC(ApplicationSpecificIntegratedCircuit), or be configured to the one or more integrated circuits implementing the embodiment of the present invention.
Memory 1103, for depositing program A.Memory 1103 may comprise high-speed RAM memory, still may comprise nonvolatile memory (non-volatilememory), such as at least one magnetic disc store.Program A specifically can comprise:
Dispensing unit 801, the VLAN for the unidirectional symmetry of loopback port arrangement for Ethernet switch converts, and wherein, described loopback port is described Ethernet switch for the General Physics port of data loopback or General Logic port or inner reserved port;
Allocation units 802, for being described loopback port assignment for described loopback port assignment for two layers of VLAN forwarded and the 2nd VLAN that forwards for three layers.
As a kind of optional embodiment, described ethernet switch 1100 also comprises:
VLAN converter unit 803, for when described loopback port accepts Ethernet message, carries out VLAN conversion according to a described VLAN and the 2nd VLAN to described Ethernet message.
As another kind of optional embodiment, described Ethernet switch 1100 also comprises with lower unit:
Closing unit 804, for closing the mac learning function of the loopback port of described Ethernet switch, makes described loopback port exit all VLAN;
Loop back processing being 805, at the enable loop fuction of described loopback port, wherein, described loopback refers to Ethernet message that described loopback port sends through the MAC layer of described loopback port or PHY layer by described loopback port accepts.
Corresponding units in program A in the specific implementation of each unit embodiment shown in Figure 8, is not repeated herein.
The foregoing is only of the present invention and select execution mode, do not form limiting the scope of the present invention.Any any amendment done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included in application claims and comprise within scope.