jump to navigation

LAN Switches August 10, 2005

Posted by Coolguy in Networks.
trackback
  • A typical network consists of:
  • Nodes (computers)
  • Connecting medium (wired or wireless)
  • Specialized network equipment like routers or hubs
  • Switches are another fundamental part of many networks because they speed things up
  • Switches allow different nodes (a network connection point, typically a computer) of a network to communicate directly with one another in a smooth and efficient manner
  • There are many different types of switches and networks. Switches that provide a separate connection for each node in a company’s internal network are called LAN switches
  • LAN switch creates a series of instant networks that contain only the two devices communicating with each other at that particular moment

The Problem with Hubs

In the most basic type of network found today, nodes are simply connected together using hubs. As a network grows, there are some potential problems with this configuration:

  • Scalability – In a hub network, limited shared bandwidth makes it difficult to accommodate significant growth without sacrificing performance
  • Latency – This is the amount of time that it takes a packet to get to its destination. Since each node in a hub-based network has to wait for an opportunity to transmit in order to avoid collisions, the latency can increase significantly as you add more nodes
  • Network failure – In a typical network, one device on a hub can cause problems for other devices attached to the hub due to incorrect speed settings
  • Collisions – Ethernet uses a process called CSMA/CD (Carrier Sense Multiple Access with Collision Detection) to communicate across the network. Under CSMA/CD, a node will not send out a packet unless the network is clear of traffic. If two nodes send out packets at the same time, a collision occurs and the packets are lost. Then both nodes wait a random amount of time and retransmit the packets. Any part of the network where there is a possibility that packets from two or more nodes will interfere with each other is considered to be part of the same collision domain. A network with a large number of nodes on the same segment will often have a lot of collisions and therefore a large collision domain

The Solution: Adding Switches

  • A vital difference between a hub and a switch is that all the nodes connected to a hub share the bandwidth among themselves,while a device connected to a switch port has the full bandwidth all to itself.
  • For example, if 10 nodes are communicating using a hub on a 10-Mbps network, then each node may only get a portion of the 10 Mbps if other nodes on the hub want to communicate as well
  • But with a switch, each node could possibly communicate at the full 10 Mbps
  • In a fully switched network, switches replace all the hubs of an Ethernet network with a dedicated segment for every node

Mixed Networks

  • Most networks are not fully switched because of the costs incurred in replacing all of the hubs with switches
  • Instead, a combination of switches and hubs are used to create an efficient yet cost-effective network. For example, a company may have hubs connecting the computers in each department and then a switch connecting all of the department-level hubs

Switches vs Routers

  • Switches usually work at Layer 2 (Data or Datalink) of the OSI Reference Model, using MAC addresses
  • Routers work at Layer 3 (Network) with Layer 3 addresses (IP, IPX or Appletalk, depending on which Layer 3 protocols are being used
  • The algorithm that switches use to decide how to forward packets is different from the algorithms used by routers to forward packets

Switch Configurations

Three popular configurations of switches are:

  • Shared memory – This type of switch stores all incoming packets in a common memory buffer shared by all the switch ports (input/output connections), then sends them out via the correct port for the destination node.
  • Matrix – This type of switch has an internal grid with the input ports and the output ports crossing each other. When a packet is detected on an input port, the MAC address is compared to the lookup table to find the appropriate output port. The switch then makes a connection on the grid where these two ports intersect.
  • Bus architecture – Instead of a grid, an internal transmission path (common bus) is shared by all of the ports using TDMA. A switch based on this configuration has a dedicated memory buffer for each port, as well as an ASIC to control the internal bus access

Transparent Bridging

  • Most Ethernet LAN switches use a very cool system called transparent bridging to create their address lookup tables.
  • Transparent bridging is a technology that allows a switch to learn everything it needs to know about the location of nodes on the network without the network administrator having to do anything.
  • The switch is added to the network, and the various segments are plugged into the switch’s ports
  • A computer (Node A) on the first segment (Segment A) sends data to a computer (Node B) on another segment (Segment C).
  • The switch gets the first packet of data from Node A. It reads the MAC address and saves it to the lookup table for Segment A. The switch now knows where to find Node A anytime a packet is addressed to it. This process is called learning
  • Since the switch does not know where Node B is, it sends the packet to all of the segments except the one that it arrived on (Segment A). When a switch sends a packet out to all segments to find a specific node, it is called flooding
  • Node B gets the packet and sends a packet back to Node A in acknowledgement
  • The packet from Node B arrives at the switch. Now the switch can add the MAC address of Node B to the lookup table for Segment C. Since the switch already knows the address of Node A, it sends the packet directly to it. Because Node A is on a different segment than Node B, the switch must connect the two segments to send the packet. This is known as forwarding
  • The next packet from Node A to Node B arrives at the switch. The switch now has the address of Node B, too, so it forwards the packet directly to Node B
  • Node C sends information to the switch for Node A. The switch looks at the MAC address for Node C and adds it to the lookup table for Segment A. The switch already has the address for Node A and determines that both nodes are on the same segment, so it does not need to connect Segment A to another segment for the data to travel from Node C to Node A. Therefore, the switch will ignore packets traveling between nodes on the same segment. This is filtering
  • Learning and flooding continue as the switch adds nodes to the lookup tables. Most switches have plenty of memory in a switch for maintaining the lookup tables; but to optimize the use of this memory, they still remove older information so that the switch doesn’t waste time searching through stale addresses. To do this, switches use a technique called aging. Basically, when an entry is added to the lookup table for a node, it is given a timestamp. Each time a packet is received from a node, the timestamp is updated. The switch has a user-configurable timer that erases the entry after a certain amount of time with no activity from that node. This frees up valuable memory resources for other entries. As you can see, transparent bridging is a great and essentially maintenance-free way to add and manage all the information a switch needs to do its job!

Advertisements

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: