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

Tokkun Studio unveils alpha trailer for...
We are back on the MMORPG news train, and this time it comes from the sort of international developers Tokkun Studio. They are based in France and Japan, so it counts. Anyway, semantics aside, they have released an alpha trailer for the upcoming... | Read more »
Win a host of exclusive in-game Honor of...
To celebrate its latest Jujutsu Kaisen crossover event, Honor of Kings is offering a bounty of login and achievement rewards kicking off the holiday season early. [Read more] | Read more »
Miraibo GO comes out swinging hard as it...
Having just launched what feels like yesterday, Dreamcube Studio is wasting no time adding events to their open-world survival Miraibo GO. Abyssal Souls arrives relatively in time for the spooky season and brings with it horrifying new partners to... | Read more »
Ditch the heavy binders and high price t...
As fun as the real-world equivalent and the very old Game Boy version are, the Pokemon Trading Card games have historically been received poorly on mobile. It is a very strange and confusing trend, but one that The Pokemon Company is determined to... | Read more »
Peace amongst mobile gamers is now shatt...
Some of the crazy folk tales from gaming have undoubtedly come from the EVE universe. Stories of spying, betrayal, and epic battles have entered history, and now the franchise expands as CCP Games launches EVE Galaxy Conquest, a free-to-play 4x... | Read more »
Lord of Nazarick, the turn-based RPG bas...
Crunchyroll and A PLUS JAPAN have just confirmed that Lord of Nazarick, their turn-based RPG based on the popular OVERLORD anime, is now available for iOS and Android. Starting today at 2PM CET, fans can download the game from Google Play and the... | Read more »
Digital Extremes' recent Devstream...
If you are anything like me you are impatiently waiting for Warframe: 1999 whilst simultaneously cursing the fact Excalibur Prime is permanently Vault locked. To keep us fed during our wait, Digital Extremes hosted a Double Devstream to dish out a... | Read more »
The Frozen Canvas adds a splash of colou...
It is time to grab your gloves and layer up, as Torchlight: Infinite is diving into the frozen tundra in its sixth season. The Frozen Canvas is a colourful new update that brings a stylish flair to the Netherrealm and puts creativity in the... | Read more »
Back When AOL WAS the Internet – The Tou...
In Episode 606 of The TouchArcade Show we kick things off talking about my plans for this weekend, which has resulted in this week’s show being a bit shorter than normal. We also go over some more updates on our Patreon situation, which has been... | Read more »
Creative Assembly's latest mobile p...
The Total War series has been slowly trickling onto mobile, which is a fantastic thing because most, if not all, of them are incredibly great fun. Creative Assembly's latest to get the Feral Interactive treatment into portable form is Total War:... | Read more »

Price Scanner via MacPrices.net

Early Black Friday Deal: Apple’s newly upgrad...
Amazon has Apple 13″ MacBook Airs with M2 CPUs and 16GB of RAM on early Black Friday sale for $200 off MSRP, only $799. Their prices are the lowest currently available for these newly upgraded 13″ M2... Read more
13-inch 8GB M2 MacBook Airs for $749, $250 of...
Best Buy has Apple 13″ MacBook Airs with M2 CPUs and 8GB of RAM in stock and on sale on their online store for $250 off MSRP. Prices start at $749. Their prices are the lowest currently available for... Read more
Amazon is offering an early Black Friday $100...
Amazon is offering early Black Friday discounts on Apple’s new 2024 WiFi iPad minis ranging up to $100 off MSRP, each with free shipping. These are the lowest prices available for new minis anywhere... Read more
Price Drop! Clearance 14-inch M3 MacBook Pros...
Best Buy is offering a $500 discount on clearance 14″ M3 MacBook Pros on their online store this week with prices available starting at only $1099. Prices valid for online orders only, in-store... Read more
Apple AirPods Pro with USB-C on early Black F...
A couple of Apple retailers are offering $70 (28%) discounts on Apple’s AirPods Pro with USB-C (and hearing aid capabilities) this weekend. These are early AirPods Black Friday discounts if you’re... Read more
Price drop! 13-inch M3 MacBook Airs now avail...
With yesterday’s across-the-board MacBook Air upgrade to 16GB of RAM standard, Apple has dropped prices on clearance 13″ 8GB M3 MacBook Airs, Certified Refurbished, to a new low starting at only $829... Read more
Price drop! Apple 15-inch M3 MacBook Airs now...
With yesterday’s release of 15-inch M3 MacBook Airs with 16GB of RAM standard, Apple has dropped prices on clearance Certified Refurbished 15″ 8GB M3 MacBook Airs to a new low starting at only $999.... Read more
Apple has clearance 15-inch M2 MacBook Airs a...
Apple has clearance, Certified Refurbished, 15″ M2 MacBook Airs now available starting at $929 and ranging up to $410 off original MSRP. These are the cheapest 15″ MacBook Airs for sale today at... Read more
Apple drops prices on 13-inch M2 MacBook Airs...
Apple has dropped prices on 13″ M2 MacBook Airs to a new low of only $749 in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, now available for $679 for 8-Core CPU/7-Core GPU/256GB models. Apple’s one-year warranty is included, shipping is free, and each... Read more

Jobs Board

Seasonal Cashier - *Apple* Blossom Mall - J...
Seasonal Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Seasonal Fine Jewelry Commission Associate -...
…Fine Jewelry Commission Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) Read more
Seasonal Operations Associate - *Apple* Blo...
Seasonal Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Read more
Hair Stylist - *Apple* Blossom Mall - JCPen...
Hair Stylist - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom 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.