TweetFollow Us on Twitter

Apr 02 Networking

Volume Number: 18 (2002)
Issue Number: 04
Column Tag: Networking

Building a LAN

by Alec Peterson

Conceptually, building a LAN is very simple. Connect all your computers to a hub or switch, and then connect your internet connection to the same hub/switch. Everything works from there, and everybody is happy. This approach will work just fine for a low-traffic network with relatively few nodes, but as things begin to grow (and if all goes well they will grow) this approach can cause problems. It is best to introduce some structure to your LAN early in its life, so that growing is as pain-free as possible.

There are a few things that you should study before designing and building your LAN:

  • The difference between half duplex and full duplex
  • Basic information on the inner workings of Ethernet
  • The difference between a hub and a switch
  • Basic information about other layer 2 networks you will be using (802.11 wireless, for example).

We will cover these issues below.

Half Duplex vs. Full Duplex

A half duplex network is one where only one node may transmit at a given time. Standard ethernet networks have this property. The IEEE spec was updated to allow for full duplex operation, which means nodes may both transmit and receive at the same time. There is a restriction on this, which is that a full duplex segment may only have two nodes on it, or where the full duplex nodes are all connected to a switch.

How Ethernet works.

Ethernet is a layer 2, (originally) only half-duplex CSMA-CD network technology. Layer 2 describes where it falls in the OSI protocol stack (See the OSI Network Model sidebar). CSMA-CD means:

CS: Carrier Sense. This means that before sending any traffic on the network, any Ethernet node must listen on the network to sense if any traffic is already being transmitted. If it is, then the node must wait to send its traffic.

MA: Multi Access. An Ethernet network can have multiple nodes connected to it at the same time.

CD: Collision Detection. Due to the fact that network transmissions do not move across the network instantly, but with some latency it is possible that two nodes on a network might both detect at the same time that no traffic is being transmitted on the network, and thus start transmitting at the same time. When this happens, a collision is generated, which every node on the network hears. The nodes then use a random exponential backoff algorithm which defines how long the node must wait before transmitting again.

A collision can only occur while the ethernet header (preamble) is being transmitted. For Fast Ethernet this is actually the limiting factor in the length of a segment (this comes out to about 100 meters). For regular 10 Mbps ethernet the length of an ethernet segment is constrained by signal strength (this comes out to about 150 meters).

A collision domain is defined as a network that can only have one node transmitting at a time (or else a collision occurs).

Now, depending on what sort of a core your ethernet network is comprised of you may have just one collision domain, or you may have several. There are two types of devices that can serve this role, hubs and switches. Hubs are far less expensive than switches (although as is always the case with computer equipment those prices are dropping). When a hub receives an ethernet frame on an interface, it indiscriminately forwards said frame to all of its ports. A hub has no knowledge of which devices are connected to its ports, so it relies on the device itself to decide which traffic is its own. This means that every port on the hub is a part of the same collision domain. A switch is essentially a more intelligent hub. Switches have knowledge about which MAC addresses are connected to which switch port. Thus, unicast frames are only forwarded to the port that has the destination host on it (broadcast packets are still forwarded to all of the switch ports). In a switch, each port represents a different collision domain. This means that multiple nodes connected to a switch can be transmitting at the same time. However, if a switch port is operating in half-duplex mode, then the switch cannot transmit on a given port at the same time as another node on that same port. Note that you can connect multiple nodes to a single switch port by connecting a hub (or another switch) to a switch port, and you can also cascade switches (ie, connect switches to switches).

Collisions are a normal part of operation on a half-duplex ethernet network. However, the more active nodes you have on a network the more collisions you will have. Too many collisions can seriously degrade network performance. Based on this statement one might ask how many collisions is ‘too many'. The best way to see if collisions are causing a problem is to ping across the network (ie, ping one host on the network from another one). Latency across the Ethernet should typically be only a couple of milliseconds, and packet loss should be 0. If either of these is not the case, then you probably have too many players on the network, and something should be done.

Troubleshooting tip: When a network is setup incorrectly, you may notice the ‘late collision' counter incrementing on one or more of your ethernet devices. In a nutshell, this means that a collision occurred after the preamble of the ethernet frame. The most common cause of this is when you have one end of an ethernet connection running in half duplex mode, and the other end running in full duplex mode. In this case you will notice the late collision counter incrementing on the half duplex side, because the other side of the connection (which is full duplex) is expecting to be allowed to transmit and receive at the same time, hence it is ignoring collisions. A less common cause is when you have an ethernet network that is too long. Late collisions happen in this case because the beginning of the preamble has not reached the end of the network before the transmitting node has completed sending it, thus the transmitting node assumes that it is allowed to transmit the entire frame.

If your entire network is built using a single hub (or a series of hubs) then your first step should be to upgrade to a switch. This will reduce the number of devices on the same collision domain (by putting each node on its own collision domain). This in turn increases the number of nodes that can transmit at the same time (from 1 to n, where n is the number of active switch ports). Once you have a switch at the center of your network fabric you should not encounter many problems until you begin to run low on network ports. You can address this by either hanging hubs off of switch ports, or by stacking switches together. Many switches have their own proprietary trunking system for connecting them together. Others have gigabit ethernet ports for this purpose. Either method will work just fine.

Switches come in a variety of shapes and sizes. For example, you can get a managed switch, which allows you to hardwire ports to a specific duplex/speed setting among other things. Or you can get an unmanaged switch which theoretically takes care of this for you. If you want to run any full-duplex devices on your network the author strongly recommends getting a managed switch and hard-coding all ports that need to be full duplex to that setting. The protocol for auto-negotiating duplex very seldom works properly, even between devices that are made by the same vendor.

Other Layer 2 protocols

IEEE 802.11 is probably the most common non-ethernet LAN protocol being used today. Sometimes called wireless ethernet, IEEE 802.11 describes protocols that allow computers to communicate without physical wires between them. This protocol is a CSMA-CA protocol. You already know what the CSMA initials stand for. CA instead of CD means ‘collision avoidance' instead of ‘collision detection'. This means that on an 802.11 network collisions do not exist. Instead, the radios negotiate amongst themselves to decide who can speak at any given time.

802.11 relies on something referred to as an ‘access point' for nodes to talk to one another as well as other networks (such as a physical ethernet network). The access point has two primary responsibilities:

  1. Allow wireless nodes to talk to one another by acting as a central hub for all of the radios to register with.
  2. Allow wireless nodes to connect to other types of layer 2 networks by acting as a bridge.

All traffic on a wireless network will go through an access point, regardless of whether it is destined for a terrestrial network or for another radio on the same wireless network. This isn't much of a problem since the wireless network is a single half-duplex segment anyway.

Scaling wireless networks has to take into account your goals. Scalability is accomplished by distributing multiple access points in an intelligent manner, based on your goals. You can use multiple access points in a given area because of the fact that 802.11 defines 13 channels that can all be used simultaneously on top of each other. If you intend to have a large number of radios in a small physical area, then you would want to have multiple access points in that same area, running on different channels. Should you need more than 13 access points, you can reuse channels as long as any two access points running on the same channel are not within range of each other. Access points distributed in this manner are typically all given their own ethernet connection to the LAN. It is possible using certain access points to have some radios act as repeaters (cisco/Aironet are known to the author to support this). This technique should only be used as a last resort to get some extra coverage, since it requires that the repeater radio run on the same channel as the one it connects to on the ethernet, thus it does not give you more wireless bandwidth.

Troubleshooting tip: If you are experiencing poor performance on your wireless network, do not automatically assume that the problem lies in the congestion of the wireless network itself. Remember that the access point is communicating using CSMA-CD to the ethernet network. So if it is receiving traffic from the ethernet and wireless networks at the same time, it needs to buffer data before it can be transmitted. Some access points only have the ability to speak half-duplex over their ethernet ports, and since they act as bridges they have implemented a very aggressive collision backoff algorithm (which means they give up trying to send a packet over the ethernet a lot more quickly than some other ethernet devices would). If you have this problem investigate whether you can get your access point to support full-duplex ethernet. Should that not work then you will want to distribute more access points on different channels to cover the same physical area.

However, if your scaling goals involve covering wide physical areas with relatively few wireless nodes, then you should look into getting a high gain omnidirectional antenna for your access point. This will significantly increase the range that a single access point can cover.

Since 802.11 has become so popular recently, there are now many vendors selling access points for over a large price range. The products that are billed as residential products can certainly be used in a commercial environment, however you do get what you pay for. Read the fine print when purchasing such devices, as some of them have a very low limit on the number of radios that may be connected to the access point at a given time. The best advice is to evaluate your needs and then make sure you know everything you need to know about a product before purchasing it. Note that should you want to setup a repeater radio somewhere in your network you will probably need to purchase a high-end access point for both the repeater radio as well as the one connected to the physical network.

It is also possible to use 802.11 for point to point bridging, by using directional antennas. However, such implementations are beyond the scope of this article.

Conclusion

As with most things in life, LANs get more complicated the larger they get. If you have a specific network design in mind when getting started on your LAN it will make growing it a much less painful task


Alec Peterson is the Chief Technology Officer for Catbird Networks (http://www.catbird.com). Catbird provides performance and integrity services to businesses that have public-facing infrastructure and want to ensure that their Internet presence is always available and not defaced. Alec has extensive experience building and operating large networks, and is actively involved in Internet address allocation policy. He is currently chair of the American Registry for Internet Numbers Advisory Council.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Recruit two powerful-sounding students t...
I am a fan of anime, and I hear about a lot that comes through, but one that escaped my attention until now is A Certain Scientific Railgun T, and that name is very enticing. If it's new to you too, then players of Blue Archive can get a hands-on... | Read more »
Top Hat Studios unveils a new gameplay t...
There are a lot of big games coming that you might be excited about, but one of those I am most interested in is Athenian Rhapsody because it looks delightfully silly. The developers behind this project, the rather fancy-sounding Top Hat Studios,... | Read more »
Bound through time on the hunt for sneak...
Have you ever sat down and wondered what would happen if Dr Who and Sherlock Holmes went on an adventure? Well, besides probably being the best mash-up of English fiction, you'd get the Hidden Through Time series, and now Rogueside has announced... | Read more »
The secrets of Penacony might soon come...
Version 2.2 of Honkai: Star Rail is on the horizon and brings the culmination of the Penacony adventure after quite the escalation in the latest story quests. To help you through this new expansion is the introduction of two powerful new... | Read more »
The Legend of Heroes: Trails of Cold Ste...
I adore game series that have connecting lore and stories, which of course means the Legend of Heroes is very dear to me, Trails lore has been building for two decades. Excitedly, the next stage is upon us as Userjoy has announced the upcoming... | Read more »
Go from lowly lizard to wicked Wyvern in...
Do you like questing, and do you like dragons? If not then boy is this not the announcement for you, as Loongcheer Game has unveiled Quest Dragon: Idle Mobile Game. Yes, it is amazing Square Enix hasn’t sued them for copyright infringement, but... | Read more »
Aether Gazer unveils Chapter 16 of its m...
After a bit of maintenance, Aether Gazer has released Chapter 16 of its main storyline, titled Night Parade of the Beasts. This big update brings a new character, a special outfit, some special limited-time events, and, of course, an engaging... | Read more »
Challenge those pesky wyverns to a dance...
After recently having you do battle against your foes by wildly flailing Hello Kitty and friends at them, GungHo Online has whipped out another surprising collaboration for Puzzle & Dragons. It is now time to beat your opponents by cha-cha... | Read more »
Pack a magnifying glass and practice you...
Somehow it has already been a year since Torchlight: Infinite launched, and XD Games is celebrating by blending in what sounds like a truly fantastic new update. Fans of Cthulhu rejoice, as Whispering Mist brings some horror elements, and tests... | Read more »
Summon your guild and prepare for war in...
Netmarble is making some pretty big moves with their latest update for Seven Knights Idle Adventure, with a bunch of interesting additions. Two new heroes enter the battle, there are events and bosses abound, and perhaps most interesting, a huge... | Read more »

Price Scanner via MacPrices.net

May 2024 Apple Education discounts on MacBook...
If you’re a student, teacher, or staff member at any educational institution, you can use your .edu email address when ordering at Apple Education to take up to $300 off the purchase of a new MacBook... Read more
Clearance 16-inch M2 Pro MacBook Pros in stoc...
Apple has clearance 16″ M2 Pro MacBook Pros available in their Certified Refurbished store starting at $2049 and ranging up to $450 off original MSRP. Each model features a new outer case, shipping... Read more
Save $300 at Apple on 14-inch M3 MacBook Pros...
Apple has 14″ M3 MacBook Pros with 16GB of RAM, Certified Refurbished, available for $270-$300 off MSRP. Each model features a new outer case, shipping is free, and an Apple 1-year warranty is... Read more
Apple continues to offer 14-inch M3 MacBook P...
Apple has 14″ M3 MacBook Pros, Certified Refurbished, available starting at only $1359 and ranging up to $270 off MSRP. Each model features a new outer case, shipping is free, and an Apple 1-year... Read more
Apple AirPods Pro with USB-C return to all-ti...
Amazon has Apple’s AirPods Pro with USB-C in stock and on sale for $179.99 including free shipping. Their price is $70 (28%) off MSRP, and it’s currently the lowest price available for new AirPods... Read more
Apple Magic Keyboards for iPads are on sale f...
Amazon has Apple Magic Keyboards for iPads on sale today for up to $70 off MSRP, shipping included: – Magic Keyboard for 10th-generation Apple iPad: $199, save $50 – Magic Keyboard for 11″ iPad Pro/... Read more
Apple’s 13-inch M2 MacBook Airs return to rec...
Apple retailers have 13″ MacBook Airs with M2 CPUs in stock and on sale this weekend starting at only $849 in Space Gray, Silver, Starlight, and Midnight colors. These are the lowest prices currently... Read more
Best Buy is clearing out iPad Airs for up to...
In advance of next week’s probably release of new and updated iPad Airs, Best Buy has 10.9″ M1 WiFi iPad Airs on record-low sale prices for up to $200 off Apple’s MSRP, starting at $399. Sale prices... Read more
Every version of Apple Pencil is on sale toda...
Best Buy has all Apple Pencils on sale today for $79, ranging up to 39% off MSRP for some models. Sale prices for online orders only, in-store prices may vary. Order online and choose free shipping... Read more
Sunday Sale: Apple Studio Display with Standa...
Amazon has the standard-glass Apple Studio Display on sale for $300 off MSRP for a limited time. Shipping is free: – Studio Display (Standard glass): $1299.97 $300 off MSRP For the latest prices and... Read more

Jobs Board

Liquor Stock Clerk - S. *Apple* St. - Idaho...
Liquor Stock Clerk - S. Apple St. Boise Posting Begin Date: 2023/10/10 Posting End Date: 2024/10/14 Category: Retail Sub Category: Customer Service Work Type: Part Read more
*Apple* App Developer - Datrose (United Stat...
…year experiencein programming and have computer knowledge with SWIFT. Job Responsibilites: Apple App Developer is expected to support essential tasks for the RxASL Read more
Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.