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

Top Mobile Game Discounts
Every day, we pick out a curated list of the best mobile discounts on the App Store and post them here. This list won't be comprehensive, but it every game on it is recommended. Feel free to check out the coverage we did on them in the links... | Read more »
Price of Glory unleashes its 1.4 Alpha u...
As much as we all probably dislike Maths as a subject, we do have to hand it to geometry for giving us the good old Hexgrid, home of some of the best strategy games. One such example, Price of Glory, has dropped its 1.4 Alpha update, stocked full... | Read more »
The SLC 2025 kicks off this month to cro...
Ever since the Solo Leveling: Arise Championship 2025 was announced, I have been looking forward to it. The promotional clip they released a month or two back showed crowds going absolutely nuts for the previous competitions, so imagine the... | Read more »
Dive into some early Magicpunk fun as Cr...
Excellent news for fans of steampunk and magic; the Precursor Test for Magicpunk MMORPG Crystal of Atlan opens today. This rather fancy way of saying beta test will remain open until March 5th and is available for PC - boo - and Android devices -... | Read more »
Prepare to get your mind melted as Evang...
If you are a fan of sci-fi shooters and incredibly weird, mind-bending anime series, then you are in for a treat, as Goddess of Victory: Nikke is gearing up for its second collaboration with Evangelion. We were also treated to an upcoming... | Read more »
Square Enix gives with one hand and slap...
We have something of a mixed bag coming over from Square Enix HQ today. Two of their mobile games are revelling in life with new events keeping them alive, whilst another has been thrown onto the ever-growing discard pile Square is building. I... | Read more »
Let the world burn as you have some fest...
It is time to leave the world burning once again as you take a much-needed break from that whole “hero” lark and enjoy some celebrations in Genshin Impact. Version 5.4, Moonlight Amidst Dreams, will see you in Inazuma to attend the Mikawa Flower... | Read more »
Full Moon Over the Abyssal Sea lands on...
Aether Gazer has announced its latest major update, and it is one of the loveliest event names I have ever heard. Full Moon Over the Abyssal Sea is an amazing name, and it comes loaded with two side stories, a new S-grade Modifier, and some fancy... | Read more »
Open your own eatery for all the forest...
Very important question; when you read the title Zoo Restaurant, do you also immediately think of running a restaurant in which you cook Zoo animals as the course? I will just assume yes. Anyway, come June 23rd we will all be able to start up our... | Read more »
Crystal of Atlan opens registration for...
Nuverse was prominently featured in the last month for all the wrong reasons with the USA TikTok debacle, but now it is putting all that behind it and preparing for the Crystal of Atlan beta test. Taking place between February 18th and March 5th,... | Read more »

Price Scanner via MacPrices.net

AT&T is offering a 65% discount on the ne...
AT&T is offering the new iPhone 16e for up to 65% off their monthly finance fee with 36-months of service. No trade-in is required. Discount is applied via monthly bill credits over the 36 month... Read more
Use this code to get a free iPhone 13 at Visi...
For a limited time, use code SWEETDEAL to get a free 128GB iPhone 13 Visible, Verizon’s low-cost wireless cell service, Visible. Deal is valid when you purchase the Visible+ annual plan. Free... Read more
M4 Mac minis on sale for $50-$80 off MSRP at...
B&H Photo has M4 Mac minis in stock and on sale right now for $50 to $80 off Apple’s MSRP, each including free 1-2 day shipping to most US addresses: – M4 Mac mini (16GB/256GB): $549, $50 off... Read more
Buy an iPhone 16 at Boost Mobile and get one...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering one year of free Unlimited service with the purchase of any iPhone 16. Purchase the iPhone at standard MSRP, and then choose... Read more
Get an iPhone 15 for only $299 at Boost Mobil...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering the 128GB iPhone 15 for $299.99 including service with their Unlimited Premium plan (50GB of premium data, $60/month), or $20... Read more
Unreal Mobile is offering $100 off any new iP...
Unreal Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering a $100 discount on any new iPhone with service. This includes new iPhone 16 models as well as iPhone 15, 14, 13, and SE... Read more
Apple drops prices on clearance iPhone 14 mod...
With today’s introduction of the new iPhone 16e, Apple has discontinued the iPhone 14, 14 Pro, and SE. In response, Apple has dropped prices on unlocked, Certified Refurbished, iPhone 14 models to a... Read more
B&H has 16-inch M4 Max MacBook Pros on sa...
B&H Photo is offering a $360-$410 discount on new 16-inch MacBook Pros with M4 Max CPUs right now. B&H offers free 1-2 day shipping to most US addresses: – 16″ M4 Max MacBook Pro (36GB/1TB/... Read more
Amazon is offering a $100 discount on the M4...
Amazon has the M4 Pro Mac mini discounted $100 off MSRP right now. Shipping is free. Their price is the lowest currently available for this popular mini: – Mac mini M4 Pro (24GB/512GB): $1299, $100... Read more
B&H continues to offer $150-$220 discount...
B&H Photo has 14-inch M4 MacBook Pros on sale for $150-$220 off MSRP. B&H offers free 1-2 day shipping to most US addresses: – 14″ M4 MacBook Pro (16GB/512GB): $1449, $150 off MSRP – 14″ M4... Read more

Jobs Board

All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.