Sunday, November 17, 2013

Need for redundant links between switches and problems caused by those redundants links

At first, lets take a look at the below topology which has no redundant path (Alternate path).




Here there is only one link connecting both switches, all the PC's in this network can communicate properly until any of the below things happen:
1. Link failure
2. Port failure (Either Fa0/1 port on switch1 or Fa0/24 port on switch2)

If any of the above things happen then the entire network will go down (PC's cannot communicate). Here the issue is single point failure.

So in order to reduce the chances of single point failure and build a stable network, we will add one more link between those switches. If one link fails the PC's will communicate through another link. The topology might looks like this


Now in this network we have a redundant path (SW1(Fa0/2)<---->SW2(Fa0/23)) between the switches. If any of the port fails the communication will occur through another port, similarly if one link fails another one is used.

But the introduction of this additional link not only brings the stability for the network but also adds three major problems to the network which may bring down the network completely and may use the more CPU cycles for unnecessary frames.

Let's see what are those three problems:
1.In-stable MAC addresses table
2.Broadcast storm
3.Duplicate frame delivery

Instability of MAC Address table:

First we will see how the switch developed it's CAM (Content Addressable Memory) table with only one link.

Now lets disable/shutdown anyone of the ports in-order to remove the redundancy.
Lets disable Fa0/2 port on switch1.
------------------Disabling Fa0/2 on switch1-------------------
Switch1#configure terminal
Switch1(config)#interface fastEthernet 0/2
Switch1(config-if)#shutdown
Switch1(config-if)#end
Switch1#
%SYS-5-CONFIG_I: Configured from console by console

Switch1#wr
Building configuration...
[OK]

---------------------------------------------------------------
Now lets take a look at the detailed pic of the topology:   (//Ignore the label "ROOT Switch" in this pic for now, we'll discuss about it in the next post)



Now only active link is from SW1(Fa0/1)<---->SW2(Fa0/24).
 Let’s ping PC’s and see MAC table.
If I ping PC1 (10.0.0.2) from PC2 (10.0.0.3) then both the switches should have the MAC’s of both PCs.
Switch2 should store PC2 MAC on its Fa0/1 and PC1 MAC on its Fa0/24.
Switch1 should store PC2 MAC on its Fa0/1 and PC2 MAC on its Fa0/11.
Let’s see the output of Show mac-address-table on both switches:



O/p from switch1:

Switch1#show mac-address-table

          Mac Address Table

-------------------------------------------

Vlan    Mac Address       Type        Ports

----    -----------       --------    -----

   1    0030.f236.73b8    DYNAMIC     Fa0/1

   1    0050.0f67.55be    DYNAMIC     Fa0/11

   1    0090.2ba9.e018    DYNAMIC     Fa0/1



O/p from switch2:

Switch2#show mac-address-table

-------------------------------------------

Vlan    Mac Address       Type        Ports

----    -----------       --------    -----

   1    0030.f236.73b8    DYNAMIC     Fa0/1

   1    0050.0f67.55be    DYNAMIC     Fa0/24

   1    0060.2f5d.d701    DYNAMIC     Fa0/24

This is how the switch develops its MAC table.

// The default time for MAC table timeout is 5mins //

Now let us clear MAC table on both switches and bring up Fa0/2 port on Switch1 and see how the MAC ADDRESS TABLE IS BECOMING INSTABLE:

Now there are two active paths between switches. Again I'll cleared the MAC table.
So now both switches will have two mac-addresses stored on their table (since I cleared it):

O/P from swtich1:

Switch1#sh mac-address-table

          Mac Address Table

-------------------------------------------

Vlan    Mac Address       Type        Ports

----    -----------       --------    -----

   1    0090.2ba9.e017    DYNAMIC     Fa0/2                      ** MAC of SW2 Fa0/23 **

   1    0090.2ba9.e018    DYNAMIC     Fa0/1                      ** MAC of SW2 Fa0/24 **



O/p from switch1:

Switch2#sh mac-address-table

-----------------------------------------

Vlan    Mac Address       Type        Ports

----    -----------       --------    -----



   1    0060.2f5d.d701    DYNAMIC     Fa0/24                     ** MAC of SW1 Fa0/1 **

   1    0060.2f5d.d702    DYNAMIC     Fa0/23                     ** MAC of SW1 Fa0/2 **

Now I will ping PC1 (10.0.0.2) from PC2 (10.0.0.3). Let’s see through which port switches communicate.





O/p from switch1:

Switch1#sh mac-address-table

          Mac Address Table

-------------------------------------------



Vlan    Mac Address       Type        Ports

----    -----------       --------    -----



   1    0030.f236.73b8    DYNAMIC     Fa0/2

   1    0050.0f67.55be    DYNAMIC     Fa0/1                      

   1    0090.0c31.164e    DYNAMIC     Fa0/1

   1    0090.2ba9.e017    DYNAMIC     Fa0/2

   1    0090.2ba9.e018    DYNAMIC     Fa0/1



The bolded MAC address is the address of PC1 on SW1's Fa0/11 port but here it is showing as Fa0/1 due to which the MAC table is in-stable.



Let’s take a look why BROADCAST STORM occurs:


O/p from Switch2:

Switch2#sh mac-address-table

          Mac Address Table

-------------------------------------------

Vlan    Mac Address       Type        Ports

----    -----------       --------    -----



   1    0030.f236.73b8    DYNAMIC     Fa0/23

   1    0050.0f67.55be    DYNAMIC     Fa0/23

   1    0060.2f5d.d701    DYNAMIC     Fa0/24

   1    0060.2f5d.d702    DYNAMIC     Fa0/23

   1    0090.0c31.164e    DYNAMIC     Fa0/24



Explanation for Broadcast storms: Let us assume that PC2 (10.0.0.3) is trying to connect to PC1 (10.0.0.1 and MAC: 0050.0F67.55BE). Now what happens is Switch2 receives the frame from PC2 and knows that it is trying to access PC1 whose MAC is: 0050.0F67.55BE.

            When switch2 examines it Mac table and it will forward the frame to Fa0/23 port on it and this packet will be received by switch1 on its Fa0/2 port. Now switch1 checks its MAC table and forwards the frame to Fa0/1 port and again the frame is forwarded to Fa0/24 port of Switch2 and again Switch2 checks the MAC table and as per the table it again forwards the frame to Fa0/2 port of Switch1 and again it will be forwarded to Fa0/1 port of Switch1 and loop continues and consumes all the CPU cycles and the final result is a Broadcast Storm.

Effect of Broadcast storm on topology in Packet tracer is shown below:


Due to this broadcast storm the entire network is down now and none of the PCs are able to communicate.

Here PC2 is trying to access PC1.Due to the effect of broadcast storm they are unable to communicate.


Duplicate frame delivery: If observed carefully we will come to know that the same frame is delivered to the ports of switch1 and switch2 repeatedly.

            So in order to minimize these effects Cisco has developed spanning tree protocol also called as 802.1d standard.
 
Next post will explain about STP (802.1d) and how it minimizes these problems.

No comments:

Post a Comment