Monday, March 17, 2008

SWITCHING


Ethernet switch operate at layer 2 of OSI reference model and having similar function to that of Ethernet bridges. An Ethernet switch learns the MAC address of the devices attached to its ports and store in a MAC database. When the Ethernet switch receive packet they concern to the MAC database for the right port to deliver. When a switch network includes loop for redundancy, an Ethernet switch prevent the duplicate frame from traveling over the redundant path if Spanning Tree Protocol (STP) is configured.

STP is used to up and down the switch or to avoid the switching loop or layer 2 loops or we can say that the ultimate goal is to block the port. The network composes of different segments. There are four states of spanning tree protocol, Blocking (10 Sec), Listening (10 Sec), Learning (15 Sec), and Forwarding (15 Sec). The port when shutdown is in blocking state, Listening states after blocking state include hearing to check for Bridge Protocol Data Unit (BPDU), this states indicate listening to all frames. When a port is in Learning sates it settle MAC address with the MAC address it hears on its ports. While in forwarding state the port is able to forward and receive the packets. The total time a port take to convert from Blocking state to Forwarding state is 50 minutes. The time it takes to convert from listening to learning or from learning to forwarding state is called Forward Delay. Assume we have two switches X and Y and X was elected as a Root Bridge, now lets say the switch X fails, switch Y will detect the missing BPDU from the Root Bridge. One of the spanning tree timers is called MAXAGE timer. When MAXAGE timer expire and a new BPDU has not been received from the neighbor, a spanning recalculation is calculated and after the network is converged (Convergence in the spanning tree protocol means a state where all the switches or bridges ports have transitioned to either blocking or forwarding state.), the switch Y becomes the root bridge and is then forwarding the traffic between the two segments.

Example: Refer to Fig no: 1, we have two segments and two switches are attached namely SW1 and SW2 through HUB. Suppose Computer A wants to send data to Computer B, so there is only one port on switch to enter the data and one port to leave the data similarly on SW2 one port for receiving and one port for forwarding as both of them are attached through HUB so it will always broadcast the data in circular from and a circular loop will be created and that is called switching loop. If we want to break the loop we have to switch off any one port of the switch using STP.

There are certain Conditions of STP which we have to follow while configuring the STP, i.e. One Root Bridge / Network, One Designated Port / Segment, and One Root Port / Non Root Bridge.

The selection of the Root Bridge, Non-Root Bridge, Designated Port, Root Port and Non-Designated Port are done on the basis of specific rules. Collectively Designated and Root port are called Forwarding Port and Non-Designated port is called Blocking port. The selection is done on Election keeping in view the Priority Number and Mac Address collectively called Bridge ID. Root Bridge is the most powerful unit in the network and will be only one in the whole network and the remaining ports will be Non-root Bridge. The one will be the Root Bridge having lowest priority number and this is the case in selection of designated port also, if two points have the same priority number then the election will be based on MAC address the one will be elected having lowest MAC address (48-bits). Let’s take an example and apply all the conditions.

Example: Refer to Fig No: 2, we have two segments namely 1 and 2. The S1 is attached to segment 1 and a computer is attached to it while the other S2 to S6 are attached to both segments and another computer is attached to segment 2. Now the selection for the root bridges and others are done as under:

Step # 1: When election is done for the Root Bridge (RB), so S1 is elected as a Root Bridge as it has the lowest priority number that is one while the remaining all points are termed as Non-root bridges (NRB).

Step # 2: Now election for the designated port on both the segments:

a) On segment 1 the S1 has the lowest priority number so it is declared Designated port (DP).
b) On segment 2 the S2 has the lowest priority number among all so it is declared designated port.

Step # 3: Now election for the Root Port (RP), those ports will be consider as a root port which have a direct path to the root bridge as in the given figure the upper ports will be called as a root port. Now there will be one Root Port per Non-root Bridge. If the S1 one port is Root Port and other is Designated Port then the second port of all other switches are termed as Non-Designated Port (NDP). So data will be forwarding from computer 1 attached to segment 1 to computer 2 attached to segment 2 through the following way:

Machine A----------S1--------------S2-----------------Machine B

Where S1 and S2 are declared Root Port and Designated Port while the second port of the remaining switches are declare Non-root bridges and will be turned off so there will be no switching loop while data is receiving and forwarding.

As I have discussed above if S1 fails then convergence process is take place and re-election is made and another switch having lowest priority number will be elected as a new root bridge and data then will be forwarding through that root.

4 comments:

ninest123 said...

prada handbags, nike outlet, chanel handbags, tory burch outlet, louboutin pas cher, ugg boots, replica watches, michael kors, longchamp pas cher, kate spade outlet, louboutin outlet, louis vuitton, louis vuitton outlet, ralph lauren pas cher, oakley sunglasses, oakley sunglasses, uggs on sale, nike air max, longchamp, nike air max, air max, louis vuitton, ugg boots, gucci outlet, air jordan pas cher, tiffany jewelry, oakley sunglasses, jordan shoes, longchamp outlet, louis vuitton outlet, tiffany and co, prada outlet, christian louboutin outlet, louboutin, sac longchamp, ray ban sunglasses, louis vuitton, polo ralph lauren outlet, burberry, oakley sunglasses, cheap oakley sunglasses, polo ralph lauren outlet, nike free, nike free, louboutin shoes, replica watches, ray ban sunglasses, nike roshe run, longchamp outlet, ray ban sunglasses

ninest123 said...

nike air max, timberland, north face, hollister pas cher, michael kors outlet, air force, replica handbags, lacoste pas cher, michael kors, nike roshe, michael kors outlet, hogan, ralph lauren uk, new balance pas cher, true religion jeans, michael kors outlet, coach outlet, michael kors, nike air max, nike air max, ray ban uk, vanessa bruno, north face, mulberry, burberry, ugg boots, ugg boots, true religion jeans, vans pas cher, nike free run uk, ray ban pas cher, converse pas cher, sac guess, abercrombie and fitch, burberry outlet online, hermes, tn pas cher, coach purses, michael kors, coach outlet, nike blazer, lululemon, michael kors outlet, true religion jeans, michael kors, true religion outlet, hollister, oakley pas cher, michael kors outlet, kate spade handbags

ninest123 said...

soccer jerseys, nike huarache, lululemon, ralph lauren, instyler, nike air max, hollister, new balance, nfl jerseys, wedding dresses, gucci, lancel, insanity workout, converse, hollister, nike roshe, soccer shoes, ferragamo shoes, converse outlet, beats by dre, north face outlet, chi flat iron, asics running shoes, mont blanc, nike trainers, vans shoes, babyliss, p90x workout, jimmy choo shoes, birkin bag, herve leger, iphone cases, valentino shoes, north face outlet, celine handbags, vans, mcm handbags, hollister, ghd, timberland boots, reebok shoes, longchamp, mac cosmetics, oakley, abercrombie and fitch, nike air max, bottega veneta, ray ban, baseball bats, louboutin

ninest123 said...

canada goose uk, canada goose outlet, swarovski crystal, toms shoes, moncler, pandora charms, ugg boots uk, coach outlet, moncler, swarovski, sac louis vuitton pas cher, moncler, moncler, montre pas cher, moncler outlet, bottes ugg, canada goose, canada goose, karen millen, marc jacobs, pandora jewelry, canada goose, supra shoes, ugg,ugg australia,ugg italia, doudoune canada goose, thomas sabo, moncler, moncler, canada goose outlet, louis vuitton, juicy couture outlet, ugg pas cher, ugg,uggs,uggs canada, pandora jewelry, pandora charms, moncler, hollister, wedding dresses, juicy couture outlet, louis vuitton, louis vuitton, links of london, replica watches, canada goose, louis vuitton