Method and apparatus for preventing loops in a network topology
10924387 ยท 2021-02-16
Assignee
Inventors
Cpc classification
International classification
Abstract
The embodiments herein relate to a method and a network switch device for preventing the occurrence of loops in a network topology comprising a plurality of network switch devices, each switch device is assigned a unique SW-ID. The method comprises exchanging each SW-ID between all switch devices; and building, for each switch device, a routing table. The method further comprises when receiving, at a first switch device, a data frame from a second switch device that includes an SS-ID, assigned to the second switch device, and the data frame is received at a port of the first switch device, if, according to the routing table of the first switch device, the assigned SW-ID for this port is different from the SS-ID included in the data frame, discarding the data frame, otherwise, processing forward the data frame.
Claims
1. A method for preventing loops in a network topology comprising a plurality of switch devices, the method comprising: assigning, to each switch device, a unique switch identification number, SW-ID; exchanging each SW-ID between all switch devices; building, for each switch device, a routing table based on said received SW-IDs, so that the switch devices can reach each other, each entry in the routing table associated with a switch device, and including an assigned SW-ID of the switch device, a dedicated port number, and a number of hops to reach the switch device, the number of hops corresponding to a shortest path to reach the switch device; and receiving, at a first switch device, a data frame from a second switch device that includes a single switch identification number, namely a source switch identification number, SS-ID, assigned to the second switch device, the data frame is received at a port of the first switch device; when, according to the routing table of the first switch device, the assigned SW-ID for the port of the first switch device is different from the SS-ID included in the data frame, discarding the data frame, and when, according to the routing table of the first switch device, the assigned SW-ID for the port of the first switch device is not different from the SS-ID included in the data frame, processing forwarding the data frame, wherein processing forwarding the data frame comprises: when the data frame is a broadcast frame or an unknown-unicast frame, flooding the data frame out from each port of the first switch device that is connected to other switch devices except from the port from which the data frame was received; and removing the SS-ID from the data frame and flooding the data frame without the SS-ID frame out from each port of the first switch device that is directly connected to at least one host node, and when the data frame is a known-unicast frame, checking, using the routing table of the first switch device, if there is any SW-ID assigned to a port number that is associated with a MAC destination address in the data frame; and when there is no SW-ID, removing the SS-ID from the data frame and forwarding the data frame out from said associated port to its destination MAC address; and when there is a SW-ID, forwarding the data frame to the switch device having the SW-ID.
2. The method according to claim 1, further comprising: receiving, at a switch device, a data frame from a host device connected to the switch device; when the data frame is a broadcast frame or a unknown-unicast frame, adding or including, in the data frame, the SW-ID of the switch device as SS-ID and flooding the data frame including the SS-ID out from each port of the switch device that is connected to other switch devices except from the port from which the data frame was received; and flooding the received data frame out from each port of the switch device that is directly connected to at least one host node except from the port from which the data frame was received; when the data frame is a known-unicast frame, checking, using the routing table, if there is any SW-ID assigned to a port number that is associated with a MAC destination address in the data frame; and when there is a SW-ID, adding or including, in the data frame, the SW-ID of the switch device as SS-ID and forwarding the data frame including the SS-ID out from said port; and when there is no SW-ID, forwarding the data frame out from said associated port, to its destination MAC address.
3. A switch device for preventing loops in a network topology comprising a plurality of switch devices, wherein each switch device is assigned a unique switch-identification number, SW-ID, the switch device comprising a processor and a memory, said memory containing instructions executable by the processor wherein the switch device is operative to: exchange the assigned SW-ID with all switch devices; receive from each switch device its assigned SW-ID; build a routing table based on said received SW-IDs, each entry in the routing table associated with a switch device, and including an assigned SW-ID of the switch device, a dedicated port number, and a number of hops to reach the switch device, the number of hops corresponding to the shortest path to reach the switch device; and receive a data frame from another switch device that includes a single switch identification number, namely a source switch identification number, SS-ID, assigned to said another switch device, the data frame being received at a port of the switch device; when, according to the routing table of the switch device, the assigned SW-ID for this port is different from the SS-ID included in the data frame, discard the data frame, and when, according to the routing table of the switch device, the assigned SW-ID for this port is not different from the 55-ID included in the data frame, process forward the data frame, wherein process forward the data frame comprises: when the data frame is a broadcast frame or an unknown-unicast frame, flood the data frame out from each port of the switch device that is connected to other switch devices except from the port from which the data frame was received; and remove the SS-ID from the data frame and flood the data frame without the SS-ID frame out from each port of the switch device that is directly connected to at least one host node, and when the data frame is a known-unicast frame, check, using the routing table of the switch device, if there is any SW-ID assigned to a port number that is associated with a MAC destination address in the data frame; and when there is no SW-ID, remove the SS-ID from the data frame and forward the data frame out from said associated port to its destination MAC address; and when there is a SW-ID, forward the data frame to the switch device having the SW-ID.
4. A switch device according to claim 3, further operative to: receive a data frame from a host device connected to the switch device; when the data frame is a broadcast frame or a unknown-unicast frame, add or include, in the data frame, the SW-ID of the switch device as SS-ID and flood the data frame including the SS-ID out from each port of the switch device that is connected to other switch devices except from the port from which the data frame was received; and flood the received data frame out from each port of the switch device that is directly connected to at least one host node, except from the port from which the data frame was received; and when the data frame is a known-unicast frame, check, using the routing table, if there is any SW-ID assigned to a port number that is associated with a MAC destination address in the data frame; and when there is a SW-ID, add or include, in the data frame, the SW-ID of the switch device as SS-ID and forward the data frame including the SS-ID, out from said port; and when there is no SW-ID, forward the data frame out from said associated port, to its destination MAC address.
5. A method in a switch device for preventing loops in a network topology comprising a plurality of switch devices, wherein each switch device is assigned a unique switch-identification number, SW-ID, the method comprising: exchanging the assigned SW-ID with all switch devices; receiving from each switch device its assigned SW-ID; building a routing table based on said received SW-IDs, each entry in the routing table associated with a switch device, and including an assigned SW-ID of the switch device, a dedicated port number, and a number of hops to reach the switch device, the number of hops corresponding to the shortest path to reach the switch device; and receiving a data frame from another switch device that includes a single switch identification number, namely a source switch identification number, SS-ID, assigned to said another switch device, the data frame being received at a port of the switch device, when, according to the routing table of the switch device, the assigned SW-ID for this port is different from the SS-ID included in the data frame, discarding the data frame, and when, according to the routing table of the switch device, the assigned SW-ID for this port is not different from the SS-ID included in the data frame, processing forward the data frame, wherein processing forward the data frame comprises: when the data frame is a broadcast frame or an unknown-unicast frame, flooding the data frame out from each port of the switch device that is connected to other switch devices except from the port from which the data frame was received; and removing the SS-ID from the data frame and flood the data frame without the SS-ID frame out from each port of the switch device that is directly connected to at least one host node, and when the data frame is a known-unicast frame, checking, using the routing table of the switch device, if there is any SW-ID assigned to a port number that is associated with a MAC destination address in the data frame; and when there is no SW-ID, removing the SS-ID from the data frame and forward the data frame out from said associated port to its destination MAC address; and when there is a SW-ID, forwarding the data frame to the switch device having the SW-ID.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) Example of embodiments herein are described in more detail with reference to attached drawings in which:
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
DETAILED DESCRIPTION
(10) In the following, a detailed description of the exemplary embodiments is presented in conjunction with the drawings to enable easier understanding of the solutions(s) described herein.
(11) Hereinafter, is described, according to embodiments herein, a new method for preventing loops in a network topology. The method may be referred to as ILSP which stands for Intelligent Loop-Free Switching Protocol. Decisions taken by switch devices are based on rules as will be explained.
(12) The following terminology is used:
(13) ILSP port: a port of a switch device receiving or sending a data frame from/to another switch device. In
(14) Access port: a port of a switch device directly connected to host device(s). In
(15) SW-ID: a unique switch identification number assigned to a switch device. In
(16) SS-ID: a source switch identification number assigned to a switch device. This SS-ID is included/injected in the data frame by the source switch device prior to transmission and the SS-ID does not change in the entire path between the source switch device and a destination switch. Hence, every switch device has a unit SW-ID but the ID which is inside a data frame is the SS-ID.
(17) SR-Table: a switch routing table. Each switch device has its own SR-Table.
(18) Host node: A host node is not a switch device. A host node is connected to an access port of a switch device. In
(19) The ILSP method according to some embodiments herein works by creating a shortest switching path between a source switch and a destination switch in the network topology. Then it tracks data frames by using a new field (SS-ID) in the data frame. Based on from which port(s) the data frame arrives, a switch device applies some rules to the data frame to make a decision on whether the data fame should be flooded, forwarded or discarded. By using this technique and using said rules, broadcast frames, unknown-unicast frames and/or unicast frames are handled in an efficient way and no loop or other traditional issues can bring the network down.
(20) In the following, a more detailed overview of the method based on ILSP will be described in accordance with some embodiments herein followed by an example applying the principles of the present invention in a network topology such as the one shown in
(21) The overview steps of ILSP include:
(22) 1) All switches in an ILSP Domain start to negotiate with each other to build a Switching Routing Table (SR-Table), so that each switch knows through which local port (ILSP port) it can reach to any other switch device with shortest path. An ILSP domain, herein, includes all switch devices in the network topology who participate in ILSP.
2) Some rules apply to incoming and outgoing frames to make the right decision.
3) The switch device, before it sends out a data frame it injects its SS-ID as a new field into the data frame.
4) Every switch device that receives such a data frame looks at this SS-ID field and based on its SR-Table and considering its MAC Address table, it applies some predefined rules, and makes a decision on how to handle the data frame. The data frame may be any type of frame including broadcast, unknown-unicast, or known-unicast.
Step 1: Creating SR-Table (Switching Routing Table)
(23) As previously described, each switch device has its unique SW-ID. Each switch device in the network topology is configured to exchange its SW-ID to all other switch devices. Hence, an exchange of each SW-ID is performed between all the switch devices. This is used to build or create a SR-Table. This may be performed by a distance vector routing protocol, such as RIP (Routing Information Protocol), or any other suitable routing protocol. After this phase, every single switch device in the ILSP domain will have its own SR-Table. For example, based on the topology shown in
(24) TABLE-US-00001 SR-TABLE A Destination Port Hop SW-B 2 1 SW-C 1 1
(25) The first entry (first row) in the SR-Table of switch device SW-A 301 is associated with a switch device that is connected to SW-AA 301, which is switch device B 302, having SW-ID=SW-B that is assigned to switch device B. This entry also includes a dedicated port number (port 2) of switch device A 301 for reaching switch device B 302, and the number of hops to reach switch B 302, which in this case is one hop. Hence, if a data frame on SW-A 301 wants to reach to SW-B 302, the shortest path is through port 2 (ILSP port 2) and the distance is one hop. One hop means it is directly connected with no switches in-between. The SR-Table for switch B 302 and the SR-Table for switch device C 303 are shown below:
(26) TABLE-US-00002 SR-TABLE B Destination Port Hop SW-A 2 1 SW-C 1 1
(27) TABLE-US-00003 SR-TABLE C Destination Port Hop SW-B 2 1 SW-A 1 1
(28) It should be noted that a switch device may include any number of ports and a network topology may include any number of switch devices. The embodiments herein are therefore not restricted to any number of ports (ILSP ports or access ports) or any number switch devices or any number of host nodes or devices connected to the switch devices.
(29) As previously described, there are some rules that are applied by switch devices depending on whether a data frame is received by a switch device or is leaving a switch device. Below are described two main rules, Rule 1 and Rule 2. Rule 1 applies on ingress switch ports of a switch device and includes sub-rules Rule 1a)-1c). By ingress switch ports it is meant when the switch device receives a data frame. Rule 2 applies on egress switch ports and includes sub-rules Rule 1a)-1d). By egress switch ports it is meant when the switch device wants to send out a data frame.
(30) Step 2: Rules for Making Decision(s) According to Some Embodiments Herein
(31) Rule 1: Apply on Ingress Switch Port(s) of a Switch Device
(32) Rule 1a).
(33) If a switch device receives a data frame from an access port (i.e., the data frame is received from a host node), the switch device accepts the data frame for further processing. This data frame does not include an SS-ID.
(34) If a switch device receives a data frame from an ILSP port (i.e., the data frame is received directly from another switch device), the data frame includes an SS-ID inside the frame. In this case the switch device uses its SR-Table and performs a look up.
(35) Rule 1b).
(36) If, according to the SR-Table, the associated or assigned SW-ID for this ILSP port is the same with the SS-ID included in the data frame, the data frame gets accepted by the switch device for further procedure/processing.
(37) Rule 1c).
(38) If the associated or assigned SW-ID for this ILSP port is different from the SS-ID in the data frame, the data frame is discarded with no additional process.
(39) Rule 2: Apply on Egress Switch Ports of a Switch Device:
(40) If a switch device wants to send out a data frame on an access port (i.e., this port is not directly connected another switch node):
(41) Rule 2a).
(42) If there is already an SS-ID inside the data frame, the switch device removes it and sends the data frame to a host node.
(43) Rule 2b).
(44) If there is no SS-ID inside the data frame, the switch device sends out the frame as it is.
(45) If a switch device wants to send out a frame on an ILSP port (i.e., this switch device is directly connected to another switch device):
(46) Rule 2c).
(47) If there is no SS-ID inside the data frame, the switch includes/injects/adds as SS-ID its own SW-ID into the data frame before sending the frame out.
(48) Rule 2d).
(49) If there is already an SS-ID inside the frame, the switch device just sends out the frame as it is.
(50) Steps 3-4: Applying the Principles of the ILSP Method According to Embodiments Herein
(51) Now that the rules have been described, the general principles of the ILSP method will now be described in conjunction with the flowcharts shown in
(52)
(53) As previously explained, each switch device has an assigned unique SW-ID and an own routing table (SR-table) and an own MAC address table. An example of an (empty) data frame is shown below. It includes a field for a MAC destination address, a field for MAC source address at Layer 2, a ILSP field for the SS-ID, a Layer 3 and FCS which stands for Frame Check Sequence which may be used for error-detection. Note that the data frame may include additional data/information such as a payload, etc. But for simplicity and for easier understanding the principles of the method according to the embodiments herein, such additional data/information are not discussed.
(54) Example of a Data Frame:
(55) TABLE-US-00004 L 2 ILSP L 3 FCS Destination Source SS-ID . . . . . . MAC MAC . . . . . . . . .
(56) In step 401: SW-1 receives a data frame from SW-2 on an ILSP port. This data frame includes the SS-ID assigned to SW-2. SW-2 includes as SS-ID its own SW-ID.
(57) In step 402: SW-1 checks using its SR-table if the assigned SW-ID for this ILSP port is the same or is different from the 55-ID in the received data frame.
(58) In step 403. If the answer is NO, i.e., the SW-ID is different from the SS-ID, Rule 1c is applied which means that the data frame is discarded with no additional process thus preventing loops to occur in the network topology independently on the type of frame that is received by SW-1.
(59) If the answer is YES, i.e., the SW-ID the same as the SS-ID in the data frame, a forward processing of the data frame is performed (step 404).
(60) Step 404 includes different sub-steps which will now be described.
(61) In step 404A, SW-1 checks whether or not a source MAC address in the received data frame is included in a MAC address table of SW-1. This check is denoted Process 1 and is shown in
(62) In step 404B, SW-1 checks if the destination MAC address in the received data frame is a broadcast address. As an example, when a MAC destination address is specified as FF:FF:FF.FF.FF:FF it is known as a broadcast address.
(63) If the answer is YES, the received data frame is considered a broadcast frame (404C). Rule 2a and Rule 2d apply, so SW-1 should flood this frame on all its ports except from the port from which the data frame was received. If SW-1 has ports connected to host nodes, or non-ILSP ports, i.e., these ports are access ports, SW-1 removes the SS-ID from the data frame (404E) and floods the data frame on these access ports (404F) except the port from which the data frame was received. If SW-1 also has ILSP ports, SW-1 floods the received data frame (including the SS-ID) on all the ILSP ports except the port from which the data frame was received (step 404D).
(64) In step 404B, if the answer is NO, i.e., the data frame is not a broadcast frame, SW-1 checks (404G) if the destination MAC address in the data frame is already registered in the MAC table. If the answer is NO, the data frame is considered an unknown-unicast frame (404M). Thus an unknown-unicast frame means that the data frame includes a destination MAC address of a node but the switch (here SW-1) has no entry for that destination address in its MAC table. Also here Rule 2a and Rule 2d apply since this unknown-unicast frame is considered to be a broadcast frame. Therefore, SW-1 removes the SS-ID from the data frame (404E) and SW-1 floods the data frame on its access ports (404F), and SW-1 floods the received data frame (including the SS-ID) on all the ILSP ports except the port from which the data frame was received (step 404D).
(65) In step 404G, is the answer is YES i.e., the destination MAC address in the data frame is already registered in the MAC table of SW-1, this data frame is considered a known-unicast frame (404H). In this case, SW-1 forwards the known-unicast frame out from a single port which is not the port from which the data frame is received. For this, SW-1 checks, using its SR-table if there is any SW-ID assigned to a port number that is associated with the destination MAC address. In other words, SW-1 checks if the destination MAC address is on an access port or on a ILSP port (404I). If the answer is YES, i.e., the destination is on an access port, Rule 2a applies in that SW-1 removes the SS-ID from the known-unicast frame and forwards the frame (404L) to the host node that is connected to this access port. If the answer is NO, i.e., the destination is on an ILSP port according to the SR-table, Rule 2d applies in that SW-1 forwards the known-unicast frame (404J) including the SS-ID to the switch device having the SW-ID on the ILSP port.
(66) Referring to
(67) In step 601, SW-1 receives a data frame on an access port from a host node. Rule 1a applies, SW-1 accepts the data frame and this frame has no SS-ID included in it.
(68) In step 602, Process 1 is performed (see
(69) Step 602B is similar to previously described step 404B. SW-1 checks if the destination MAC address in the received data frame is a broadcast address (e.g. FF:FF:FF:FF:FF:FF).
(70) If the answer is YES, the received data frame is considered a broadcast frame (602C). Rule 2b and Rule 2c apply. According to Rule 2b, SW-1 floods the received broadcast frame on all its access ports except from the port from which the data frame was received (602D); and according to Rule 2c, SW-1 includes its own SW-ID (e.g., SW-1) as SS-ID in the received data frame (602E) and floods this data frame, including this SS-ID, on all ILSP ports (602F). Hence, the data frame on the access port(s) is sent to host nodes or non-ILSP switch devices, whereas the data frame including the SS-ID of SW-1 is sent on the ILSP port(s) to ILSP switch devices (e.g., SW-2). Below are examples of the broadcast frame with and without the SS-ID. The source MAC address from which SW-1 received the broadcast frame is exemplified as xx:xx:xx:xx:xx:xx.
(71) Broadcast Frame to Send on ILSP Port(s) in Step 602F
(72) TABLE-US-00005 L 2 ILSP L 3 FCS Destination Source SS-ID . . . X MAC MAC FF:FF:FF:FF:FF:FF xx:xx:xx:xx:xx:xx SW-1
Broadcast Frame to Send on Access Port(s) in Step 602D
(73) TABLE-US-00006 L 2 L 3 FCS Destination Source . . . X MAC MAC FF:FF:FF:FF:FF:FF xx:xx:xx:xx:xx:xx
(74) In step 602B, if the answer is NO, i.e., if the data frame is not a broadcast frame, SW-1 checks (602G) if the destination MAC address in the data frame is already registered in the MAC table of SW-1. If the answer is NO, the data frame is considered an unknown-unicast frame (602M). Similarly to the case when the frame is a broadcast frame, Rule 2b and Rule 2c apply. According to Rule 2b, SW-1 floods the received unknown-unicast frame on all its access ports except from the port from which the data frame was received (602D); and according to Rule 2c, SW-1 includes its own SW-ID (e.g., SW-1) as SS-ID in the received data frame (602E) and floods this data frame, including this SS-ID, on all ILSP ports (602F). Hence, the data frame on the access port(s) is sent to host nodes or non-ILSP switch devices, whereas the data frame including the SS-ID of SW-1 is sent on the ILSP port(s) to ILSP switch devices (e.g. SW-2).
(75) In step 602G, is the answer is YES, i.e., the destination MAC address in the data frame is already registered in the MAC table of SW-1, this data frame is considered a known-unicast frame (602H). In this case, SW-1 forwards the known-unicast frame out from a single port which is not the port from which the data frame is received. For this, SW-1 checks, using its SR-table if there is any SW-ID assigned to a port number that is associated with the destination MAC address. In other words SW-1 checks if the destination MAC address is on an access port or on a ILSP port (602I). If the answer is YES, i.e., the destination is on an access port, Rule 2b applies in that SW-1 send the known-unicast frame on proper access port (602L), e.g., to a host node that is connected to this access port. If the answer is NO, i.e., the destination is on an ILSP port according to the SR-table, Rule 2c applies in that SW-1 includes its own SW-ID (SW-1) as SS-ID in the known-unicast frame (602J) and forwards the known-unicast frame (602K) including the SS-ID to the switch device having the SW-ID on the ILSP port.
(76) In the following, the previously described general principles of the ILSP method will now be applied to the network topology shown in
(77) Broadcast Frame
(78) Assuming now that host node N-X 304 connected to SW-A 301 wants to send out an ARP (Address resolution Protocol) request in order to fetch the MAC address of another host node/device, e.g., of host node N-Z 306 which is shown connected to SW-C 303. The ARP request is a type of a broadcast frame. An example of this broadcast frame is shown below. The source MAC address xx:xx:xx:xx:xx:xx is that of N-X 304.
(79) TABLE-US-00007 L 2 L 3 FCS Destination Source . . . X MAC MAC FF:FF:FF:FF:FF:FF xx:xx:xx:xx:xx:xx
(80) SW-A 301 receives this frame on port 8 and since there is no SS-ID field inside the frame, SW-A 301 applies some of the steps shown in
(81) 1. SW-A 301 checks its MAC address table to see if there is any entry registered for the source MAC address included in this frame as previously described in conjunction with step 602A in
(82) TABLE-US-00008 SW-A MAC ADDRESS TABLE Destination Port xx:xx:xx:xx:xx:xx 8
(83) So, from now on, if SW-A 301 receives any data frame destined to host node N-X 304 it knows which port to use for forwarding the frame, which is port 8.
(84) 2. Since the frame is a broadcast frame, SW-A 301 should flood this frame out of all its ports except port 8 from which the frame was received. According to the SR-Table of SW-A 301, which is repeated below, SW-A 301 is connected to two ILSP switch devices SW-B on port 2 and SW-C on port 1.
(85) TABLE-US-00009 SR-TABLE A Destination Port Hop SW-B 2 1 SW-C 1 1
(86) SW-A 301 applies Rule 2c), i.e., SW-A 301 includes its own SW-ID (=SW-A) as SS-ID in the data frame and floods the data frame on both ports.
(87) The ready to send broadcast frame is shown below:
(88) TABLE-US-00010 L2 ILSP L3 FCS Destination Source SS-ID . . . X MAC MAC FF:FF:FF:FF:FF:FF xx:xx:xx:xx:xx:xx SW-A
(89) Hence, this broadcast frame is sent to SW-B 302 on ILSP port 2 and to SW-C 303 on ILSP port 1.
(90) As an extra explanation, one can see that there is a physical loop in the domain since the traffic flow has two paths:
(91) Path-1: N-X.fwdarw.SW-A.fwdarw.SW-B.fwdarw.SW-C.fwdarw.SW-A.fwdarw. . . . .
(92) Path 2: N-X.fwdarw.SW-A.fwdarw.SW-C.fwdarw.SW-B.fwdarw.SW-A.fwdarw. . . . .
(93) Path-1: N-X.fwdarw.SW-A.fwdarw.SW-B.fwdarw.SW-C.fwdarw.SW-A.fwdarw. . . . .
(94) After SW-A 301 floods the broadcast frame out from port 2, the frame arrives to SW-B 302 on port 2 (see
(95) TABLE-US-00011 SR-TABLE B Destination Port Hop SW-A 2 1 SW-C 1 1
(96) Since this entry (SW-A) is the same with the SS-ID in the received frame, SW-B 302 accepts the frame adds the source MAC address of the frame into its MAC address table as shown below:
(97) TABLE-US-00012 SW-B MAC ADDRESS TABLE Destination Port xx:xx:xx:xx:xx:xx 2
(98) This path is the shortest path from SW-B 301 to reach N-X 304 since only one hop is between SW-A 301 and SW-B 302.
(99) Since the frame is a broadcast frame, SW-B 302 also should flood this frame on all its ports except port 2 from which the frame was received. This means ILSP port 1 and access port 8. Hence, at this stage, Rule 2a and Rule 2d following step 404C apply (see
(100) According to the SR-table of SW-B 302, port 1 is connected SW-C 303 and port-8 is connected to node N-Y 305. So the ready to send frame on each port is different.
(101) Frame on ILSP port 1 (the frame is sent as received (step 404D in
(102) TABLE-US-00013 L 2 ILSP L 3 FCS Destination Source SS-ID X MAC MAC FF:FF:FF:FF:FF:FF xx:xx:xx:xx:xx:xx SW-A
(103) Frame on access port 8 (the SS-ID is removed before sending in to N-Y 305 (step 404E and 404F in
(104) TABLE-US-00014 L 2 L 3 FCS Destination Source X MAC MAC FF:FF:FF:FF:FF:FF xx:xx:xx:xx:xx:xx
(105) A copy of the frame arrives to SW-C 303 on ILSP port 2. SW-C 303 checks its SR-Table and determines that the assigned SW-ID for this ILSP port 2 is SW-B.
(106) TABLE-US-00015 SR-TABLE C Destination Port Hop SW-B 2 1 SW-A 1 1
(107) SW-C 303 compares this SW-ID (SW-B) with the SS-ID (SW-A) in the data frame and since they are different, SW-C 303 applies Rule 1c and discards this broadcast frame with no further processing. This corresponds to 403 in
(108) Hence, path 1 ends here with no success for the frame to reach its destination node N-Z 306. But during this process the MAC address table of SW-B 302 gets updated to know how to it can reach N-X 304 and also the frame was forwarded to all connected ports to SW-B to see if N-Z is connected there or not. And at the end of the process, the data frame is discarded properly and loops is efficiently prevented.
(109) Path-2: N-X.fwdarw.SW-A.fwdarw.SW-C.fwdarw.SW-B.fwdarw.SW-A.fwdarw. . . . .
(110) The frame arrives to SW-C 303 on ILSP port 1. SW-C 303 checks its SR-table to determine what SW-ID is assigned to this ILSP port 1.
(111) TABLE-US-00016 SR-Table C Destination Port Hop SW-B 2 1 SW-A 1 1
(112) According to the SR-table of SW-C 303, it is SW-A which is then compared to the SS-ID (SW-A) in the received frame. As there are the same, SW-C 303 process forward the data frame.
(113) SW-C 303 adds the source MAC address of the frame in its MAC address table:
(114) TABLE-US-00017 SW-C MAC address Table Destination Port xx:xx:xx:xx:xx:xx 1
(115) Then as this is a broadcast frame SW-C 303 should flood this frame on all its ports except port 1 from which the frame was received. There are two ports, one ILSP port 2 and one access port 8.
(116) Frame sent on port 2 of SW-C (based on SR-table of SW-C this port in connected to an ILSP switch SW-B 302 on port 1):
(117) TABLE-US-00018 L2 Destination Source ILSP MAC MAC SS-ID L3 FCS FF:FF:FF:FF:FF:FF xx:xx:xx:xx:xx:xx SW-A X
(118) TABLE-US-00019 SR-Table C Destination Port Hop SW-B 2 1 SW-A 1 1
(119) When SW-B 302 receives this frame on ILSP port 1, its uses its SR-table to determine what assigned SW-ID is for this port 1. It is SW-C.
(120) TABLE-US-00020 SR-Table B Destination Port Hop SW-A 2 1 SW-C 1 1
(121) SW-B 302 compares this SW-ID (SW-C) with the SS-ID in the frame (SW-A) and since there are the same, SW-B 305 discards the data frame with no more process (step 403 in
(122) As mentioned earlier, SW-C 303 should also flood the frame on port 8, which is an access port. SW-C 303 applies Rule 2a and removes the SS-ID from the data frame and floods the data frame on port 8 to N-Z 306 which is the target of the frame. This corresponds to steps 404E and 404F in
(123) Path 2 ends in SW-B to prevent a loop but the ARP request successfully reached its target which is N-Z 306.
(124) Unknown Unicast Frame
(125) As previously disclosed, unknown-unicast frame means that a frame has a destination MAC address of a node but the switch device does not have an entry for that destination in its MAC address table.
(126) With reference to
(127) TABLE-US-00021 L2 Destination Source MAC MAC L3 FCS zz:zz:zz:zz:zz:zz xx:xx:xx:xx:xx:xx X
(128) SW-A 301 applies Rule No. 1 to this arrived frame. Because this is a frame with no SS-ID, SW-A 301 assumes that it arrives directly from a host node or a non-ILSP switch device. SW-A 301 adds the source MAC address of the frame into its MAC address table if it is not already there and also does a lookup in its MAC address table to see if there is any entry for this destination. The MAC address table of SW-A 301 is as shown below:
(129) TABLE-US-00022 SW-A MAC address Table Destination Port xx:xx:xx:xx:xx:xx 8
(130) Assuming that SW-A 301 has already an entry for xx:xx:xx:xx:xx:xx in its MAC address table, SW-A 301 does not need to add it. But there is no entry for N-Z 306 in its MAC address table. So SW-A 31 should floods this frame like a broadcast. Before that the SW-A 301 includes its SW-ID as SS-ID in the frame and floods the frame on ILSP port 2 towards SW-B 302 and on ILSP port 1 towards SW-C 303. The rest of the process is exactly same as previously described and loops are effectively prevented. As a summary, the unknown-unicast frame has two paths: Path-1: N-X->SW-A->SW-B->SW-C->SW-A-> . . . Frame arrives to SW-B 302 Based on Rule No. 1 it accepted by SW-C 302 for further processing SW-B 302 also floods this frame based on Rule No. 2 as there is no entry for the destination MAC address of the frame Frame arrives to SW-C 303 Based on Rule 1c, the frame is discarded by SW-C 303 with no further process because of the mismatch between the SS-ID included in the frame and the assigned SW-ID for the port receiving the frame at SW-C as previously described. Path-2: N-X->SW-A->SW-C->SW-B->SW-A-> . . . Frame arrives to SW-C 303 Based on Rule No. 1 it accepted by SW-C 303 for further processing. SW-C 303 also floods this frame based on Rule No. 2 as there is no entry for the destination MAC address of the frame One copy of the frame reaches to N-Z 306 which is the target as previously described. Another copy of the frame reaches to SW-B 302 Based on Rule 1c the frame is discarded by SW-B 302 with no further process as previously described.
Known-Unicast Frame
(131) Known-Unicast means not only frame has a destination MAC address of a node but also the switch device does have an entry for that destination in its MAC address table.
(132) This time we assume that N-Z 306 wants to reply to N-X 304 ARP request. N-Z 306 known the MAC address of N-X 304. So in this case a known-unicast frame generated by N-Z 306 and arrives to SW-C 303 is as shown below:
(133) TABLE-US-00023 L2 Destination Source MAC MAC L3 FCS xx:xx:xx:xx:xx:xx zz:zz:zz:zz:zz:zz X
(134) By applying previously described rule 1a, SW-C 303 accepts the frame and assumes it arrives directly from a node or a no-ILSP switch. SW-C 303 tries to add the source MAC address of the frame into its MAC address table if it is not already there. The SW-C MAC address table is as shown below:
(135) TABLE-US-00024 SW-C MAC address Table Destination Port xx:xx:xx:xx:xx:xx 1
(136) In this case, SW-C 303 adds the MAC address of the N-Z 306 in its MAC address table. So the MAC address table will become:
(137) TABLE-US-00025 SW-C MAC address Table Destination Port xx:xx:xx:xx:xx:xx 1 zz:zz:zz:zz:zz:zz 8
(138) SW-C 303 does a lookup in its MAC address table to see if there is any entry for this destination xx:xx:xx:xx:xx:xx. According to the MAC address table of SW-C 303 the answer is yes and the destination is on port 1. So SW-C 303 forwards the frame just on port 1. In this scenario there is no two paths for the frame as it is a known-unicast frame with specific path.
(139) Now it's time SW-C 303 applies Rule 2 based on SR-Table C:
(140) TABLE-US-00026 SR-Table C Destination Port Hop SW-B 2 1 SW-A 1 1
(141) As there is an SW-ID assigned to port 1, SW-C 303 knows that this port is connected to an ILSP switch (SW-A) so it includes/adds its SS-ID (SW-C) into the frame before sends out the frame:
(142) TABLE-US-00027 L2 Destination Source ILSP MAC MAC SS-ID L3 FCS xx:xx:xx:xx:xx:xx zz:zz:zz:zz:zz:zz SW-C X
(143) When the frame reaches to SW-A 301. Rule 1 is applied. The first action is to compare the SS-ID field of the arrived frame which is SW-C with the assigned SW-ID to the receiver for port 1 using the SR-Table of SW-A 301:
(144) TABLE-US-00028 SR-Table A Destination Port Hop SW-B 2 1 SW-C 1 1
(145) According to the SR-Table A it is SW-C. As this entry is the same with SS-ID on the arrived frame, SW-A 301 accepts the frame and start to process it. SW-A 301 adds the source MAC address of the frame into its MAC address table since as it is not already there:
(146) TABLE-US-00029 SW-A MAC address Table Destination Port xx:xx:xx:xx:xx:xx 8 zz:zz:zz:zz:zz:zz 1
(147) Then SW-A 301 looks at its MAC address table to see if there is any entry for the destination address in the frame. Refer to the above MAC address table of SW-A, there is an entry for that destination (xx:xx:xx:xx:xx:xx) which points to port 8.
(148) Before the frame gets forwarded to that specific port, Rule 2a is applied to the frame. SW-A 301 looks at its SR-Table to see if there is any assigned SW-ID for this port 8 or not:
(149) TABLE-US-00030 SR-Table A Destination Port Hop SW-B 2 1 SW-C 1 1
(150) As there is no entry for port-8, SW-A 301 understands that the other side of port 8 either is a host node or a non-ILSP switch. Then, SW-A 301 removes the SS-ID and forwards a standard frame out to port 8 to N-X 304.
(151) As demonstrated above, loops are effectively prevented independently on the type of frame that is sent in the network topology. In addition to this advantage there are additional advantages that are achieved by the embodiments described herein and which include at least the following:
(152) There is no need to disable any link in the topology to prevent loops.
(153) All switch devices and ports are up and operational.
(154) The flow of different frame's types including, broadcast, unknown-unicast, or known-unicast frames do not cause any issue on network topology.
(155) Broadcast or unknown-unicast frames pass all switch devices and ports but not more than one time.
(156) Known-unicast frame should not pass any extra path rather than its right path.
(157) There are no duplicate frame issue.
(158) A frame not only is delivered to its destination but it also arrives there through the shortest possible path. All switches' MAC address tables are filled correctly. Further, freezing periods are not used, as it is not necessary. In addition, the ILSP method is totally transparent to end-nodes or host nodes, which means that no changes are required at the end-nodes.
(159) A summary of the method for preventing loops in a network topology comprising a plurality of switch devices (301, 302, 303), comprises: assigning, to each switch device (301, 302, 303), a unique switch identification number, SW-ID; exchanging each SW-ID between all switch devices (301, 302, 303); building, for each switch device (301, 302, 303), a routing table based on said received SW-IDs, so that switch devices (301, 302, 303) can reach each other; wherein each entry in the routing table is associated with a switch device, and includes an assigned SW-ID of the switch device; a dedicated port number and a number of hops to reach the switch device, wherein the number of hops corresponds to the shortest path to reach the switch device;
(160) The method further comprising: when receiving (401), at a first switch device (301), a data frame, from a second switch device (302), that includes a source switch identification number, SS-ID, assigned to the second switch device (302); and the data frame is received at a port of the first switch device (301); if, according to the routing table of the first switch device (301), the assigned SW-ID for this port is different from the SS-ID included in the data frame, discarding (403) the data frame; otherwise, processing (404) forward the data frame.
(161) According to an embodiment and as described earlier, processing forward the data frame includes: if the data frame is a broadcast frame (404C) or an unknown-unicast frame, flooding (404D) the data frame out from each port of the first switch device (301) that is connected to other switch devices (302, 303) except from the port from which the data frame was received; and removing (404E) the SS-ID from the data frame and flooding (404F) the data frame without the SS-ID frame out from each port of the first switch device (301) that is directly connected to at least one host node (304); if the data frame is a known-unicast frame (404H); forwarding (404J, 404L) the data frame out from a single port which is not the port from which the data frame was received if the data frame is a known-unicast frame (404H): checking (404I), using the routing table of the first switch device (301), if there is any SW-ID assigned to a port number that is associated with a MAC destination address in the data frame; andif there is no SW-ID, removing (404K) the SS-ID from the data frame and forwarding (404L) the data frame, out from said associated port, to its destination MAC address; and if there is a SW-ID, forwarding (404J) the data frame to the switch device having the SW-ID.
(162) The method further comprises: when receiving (601), at a switch device (301) a data frame from a host device (304) connected to the switch device (301), if the data frame is a broadcast frame (602C) or a unknown-unicast frame (602H), adding or including (602E), in the data frame, the SW-ID of the switch device (301) as SS-ID and flooding (602F) the data frame including the SS-ID, out from each port of the switch device (301) that is connected to other switch devices (302, 303) except from the port from which the data frame was received; and further flooding (602D) the received data frame, out from each port of the switch device that is directly connected to at least one host node, except from the port from which the data frame was received. If the data frame is a known-unicast frame (602H), checking (602I), using the routing table, if there is any SW-ID assigned to a port number that is associated with a MAC destination address in the data frame; andif there is a SW-ID, adding or including (602J), in the data frame, the SW-ID of the switch device (301) as SS-ID and forwarding (602K) the data frame including the SS-ID, out from said port; andif there is no SW-ID, forwarding (602L) the data frame, out from said associated port, to its destination MAC address. It should be noted that there are some rare situations in switching technology that may cause loops.
(163)
(164)
(165)
(166) In order to handle these situations, the following two rules Rule 3 and Rule 4 may be introduced, which may be added as complement to Rules 1 and 2 previously described.
(167) Rule 3: if a switch device receives its own SW-ID with Hop=0 on a port, it deactivates that port.
(168) Rule 4: When a switch device receives the same SW-ID on different ports with Hop=0, it keeps one port enabled and deactivate the other ports.
(169) With reference to
(170) With reference to
(171) This situation may also cause a loop. The only valid reason and benefit for such a connections is to make those connections as a port-channel which looks like a single port to a switch device with no loop. Otherwise there is no reason to have such a connection. One solution for such a condition is to deactivate all extra links between the two switch devices if they are not part of a port-channel. This time Rule 4 will be applied to address the issue.
(172) If both links between SW-D and SW-E are configured as a port-channel then it looks like a single link to both switches and there is no problem. But if those are not configured as port-channel, the process is as below: a. Step-1, one of these switches, for instance SW-D starts first to advertise its own SW-ID from port 1 and port 2. b. Step-2, SW-E receives SW-D's ID on port 1 and port 2 with Hop=0. c. According to Rule 4, one SW-ID is received on more than of one port on SW-E with Hop=0. So, SW-E keeps up one of these ports and deactivates the other one. By doing this loops are prevented.
(173) With reference to
(174) This situation is very rare. However, if it occurs, it has to be handled. The following explains the issue in more detail. Based on
(175) Assume that N-X sends a broadcast frame like an ARP request out. The process works as follows: 1Broadcast frame reaches to HUB-A. 2HUB-A floods frame out of port 1 and port 2 3Both SW-D and SW-E receive the frame and update their MAC address table to register that port 1 is the path to reach to N-X 4Both SW-D and SW-E flood the frame out of their port 2 toward HUB-B 5HUB-B floods these two received frames with no more action. a. Two copies of the frame reach to N-Y (frame duplication issue). b. One copy of the frame reach to SW-D and one reach to SW-E 6Both SW-D and SW-B update their MAC address table that port 2 is the path to reach to N-X (MAC Address Table corruption). 7SW-D and SW-E flood the frame again as it is a broadcast frame (Broadcast storm issue).
(176) This situation logically is similar with the previous one when two switch devices are connected to each other with more than one link (
(177) To perform the ILSP method described earlier, a switch device 800 is provided as depicted in
(178) The processing module/circuit 810 includes a processor, microprocessor, an application specific integrated circuit (ASIC), field programmable gate array (FPGA), or the like, and may be referred to as the processor 810. The processor 810 controls the operation of the switch 800 and its components. Memory (circuit or module) 820 includes a random access memory (RAM), a read only memory (ROM), and/or another type of memory to store data and instructions that may be used by processor 810. In general, it will be understood that the switch 800 in one or more embodiments includes fixed or programmed circuitry that is configured to carry out the operations in any of the embodiments disclosed herein.
(179) The processor 810 is configured to execute computer program instructions from a computer program stored in a non-transitory computer-readable medium that is in, or is accessible to the processing circuitry. Here, non-transitory does not necessarily mean permanent or unchanging storage, and may include storage in working or volatile memory, but the term does connote storage of at least some persistence. The execution of the program instructions stored in the memory specially adapts or configures the processor 810 to carry out the operations of the switch 800 disclosed herein. Further, it will be appreciated that the switch 800 may comprise additional components not shown in
(180) The switch device 800 prevents the occurrence of loops in a network technology comprising a plurality of switch devices, wherein each switch device is assigned a SW-ID, the switch device 800 is operative to: exchange the assigned SW-ID with all switch devices; receive from each switch device its assigned SW-ID, build a routing table based on said received SW-IDs; wherein each entry in the routing table is associated with a switch device, and includes an assigned SW-ID of the switch device; a dedicated port number and a number of hops to reach the switch device, wherein the number of hops corresponds to the shortest path to reach the switch device. When the switch device 800 receives a data frame from another switch device that includes a source switch identification number (SS-ID) assigned to said another switch device; and the data frame is received at a port of the switch device 800; if, according to the routing table of the switch device 800, the assigned SW-ID for this port is different from the SS-ID included in the data frame, the switch device 800 is operative to: discard the data frame; otherwise, process forward the data frame.
(181) As previously described, the switch device 800 is operative to process forward the data frame as follows: if the data frame is a broadcast frame or an unknown-unicast frame, the switch device 800 is operative to flood the data frame out from each port of the first switch device 800 that is connected to other switch devices except from the port from which the data frame was received; and to remove the SS-ID from the data frame and to flood the data frame without the SS-ID frame out from each port of the switch device 800 that is directly connected to at least one host node (if any). If the data frame is a known-unicast frame; the switch device 800 is operative to forward the data frame out from a single port which is not the port from which the data frame is received.
(182) If the data frame is a known-unicast frame, the switch device 800 is operative to: check, using the routing table, if there is any SW-ID assigned to a port number that is associated with a MAC destination address in the data frame; and if there is no SW-ID, to remove the SS-ID from the data frame and to forward the data frame, out from said associated port, to its destination MAC address; and if there is a SW-ID, to forward the data frame to the switch device having the SW-ID. When the switch device 800 receives a data frame from a host device connected to the switch device 800; if the data frame is a broadcast frame or a unknown-unicast frame, the switch device is operative to add or include, in the data frame, the SW-ID of the switch device 800 as SS-ID and to flood the data frame including the SS-ID, out from each port of the switch device 800 that is connected to other switch devices except from the port from which the data frame was received; and the switch device 800 is further operative to flood the received data frame, out from each port of the switch device 800 that is directly connected to at least one host node (if any), except from the port from which the data frame was received.
(183) If the data frame is a known-unicast frame, the switch device 800 is operative to: check, using the routing table, if there is any SW-ID assigned to a port number that is associated with a MAC destination address in the data frame; and if there is a SW-ID, to add or include, in the data frame, the SW-ID of the switch device as SS-ID and to forward the data frame including the SS-ID, out from said port; and if there is no SW-ID, to forward the data frame, out from said associated port, to its destination MAC address.
(184) Additional operations that may be performed by the switch device have already been described and need not be repeated.
(185) There is also provided a computer program comprising instructions which when executed on at least one processor 810 of the switch device 800 according to embodiments herein, cause the at least one processor 810 to carry out at least the method previously described. Also a carrier containing the computer program is provided, wherein the carrier is one of a computer readable storage medium; an electronic signal, optical signal or a radio signal.
(186) Throughout this disclosure, the word comprise or comprising has been used in a non-limiting sense, i.e. meaning consist at least of. Although specific terms may be employed herein, they are used in a generic and descriptive sense only and not for purposes of limitation.