Ethernet

Ethernet on the mainboard or through a plug in card connects the computer to other computers and to the internet. Wireless Ethernet is convenient but has a lower maximum speed than wired.

Ethernet has become a standard feature of every mainboard, because it is the preferred connection to DSL from the phone company or cable modems from Comcast. New mainboards support Gigabit Ethernet, but there are still some older devices that have 100 megabit top speed. While you can attach one computer directly to the DSL or cable modem, for $30 you can buy a router and connect all the computers in your house to Internet services. In the process, you will have connected all your computers to each other.

What is Ethernet? Ethernet today has almost nothing to do with the ideas of the researchers at Xerox who invented it. The first Ethernet was just a thick copper wire encased in a protective sheath. Each computer would drill into the wire with a special tap. Since there was just the one piece of copper, any data transmitted by any computer would be received by all the other computers connected to the same wire.

Wire is cheap and dumb. However, the equipment needed to connect to the wire was expensive. Twenty years ago the card that connected a minicomputer to the Ethernet cost $2000, while a bridge (a two port switch to connect two separate Ethernet wires to each other) cost $7000. Then chips got cheaper. Today an Ethernet adapter is $15 and an eight port switch costs $28.

The change in technology and economics transformed the Ethernet physically. It no longer made sense to have a single big dumb piece of copper. With cheap smart circuits, the network could be made simpler and cheaper by connecting computers to central switches over ordinary (although high grade) phone wires.

Your home telephone connects to the phone company over one pair of copper wires. This one pair of wires both sends whatever you say and receives whatever is said by the person at the other end. However, in most cases both of you don’t try to speak at the same time, and voice is a relatively small amount of data.

Ethernet operating at speeds up to 100 megabits uses two pair of copper phone wires. Data transmitted by a computer goes out one set of wires, while data received from all other computers (and from the Internet) comes in the other set of wires. Gigabit Eithernet uses four pair of wires and transmits in both directions on all pair.

Cables and Jacks

An ordinary telephone uses the small size standard phone company jack called an “RJ11”. It supports four wires. The phone company also has a larger standard jack called an “RJ45” with room for eight wires. Normally the larger jack is used for corporate systems with many lines. Ethernet standardized on the larger jack even when it only uses four wires. If nothing else, it is useful for distinguishing the network jack from the smaller modem phone line jack on most laptops.

At speeds of 10 or 100 megabits, the Ethernet devices at each end of the wire (the computer and the switch) each expect to transmit its data on one pair of wires and receive its data on another pair. They have to choose pairs that match. This is achieved in several ways:

  • Computers and printers are all wired to transmit on one designated pair. Switches, routers, and modems, on the other hand, expect to receive data from that pair and transmit through the pair computers receive on. So an ordinary cable can connect a computer to a port on a switch.
  • Sometimes you want to connect similar devices directly to each other. For example, you can create an “Ethernet” simply by connecting two computers to each other. However, since the two Ethernet ports are wired identically, you need a “Crossover” cable. This cable connects each pair of wires to one position  on the plug at one end, and the opposite position on the plug at the other end. What one computer regards as transmit, the other regards as receive.
  • When one switch is full, you get additional ports by connecting it to another switch. You could connect the two switches with a special Crossover cable. However, this is such a common requirement that one port on each 10/100 megabit switch is specially wired as the downlink port. That port is wired like a computer instead of the normal switch port. So an ordinary cable can be connected from the downlink port of the switch to any standard port on another switch.

When you move to Gigabit Ethernet, however, there are no dedicated wires. Each wire pair has to carry 250 megabits per second of the aggregate 1 Gigabit load. That means that every pair has to be able to both transmit and receive data. When a Gigabit Ethernet device (computer or switch) is connected to an older 100 megabit device, they not only sense the slower speed but also sense which pair of wires to use as transmit and which as receive.

The original Ethernet standard operated at 10 megabits per second. When run over twisted pair wire, this standard is called “10BaseT”. The speed is “10” (megabits/sec), the “T” is for “telephone twisted pair”. “Base” standards for a “baseband” signal. In the popular press, “broadband” has been used as a synonym for “high speed”. In technical standards, however, “broadband” means that the data is transmitted over a frequency, such as a channel in a Cable TV system. The phone company transmits DSL over the same pair of wires that carries your voice call, but the data is carried at a much higher frequency than the human ear can hear.

The current standard supports 100 megabits over the same type of cable, so it is called “100BaseT”. Actually the quality of the cable is slightly higher for 100BaseT than for 10BaseT. Cable quality is designated as Category 3, 4, 5, or 6. Normally this is shorted to “Cat” and you will sound more impressive if you ask for “Cat 5” cable. The cable gets better with every higher number. Higher quality cable may cost a few cents more, but as everyone with a closet full of power cords can testify, wire lasts for decades while technology changes.

The highest current standard is Cat 5E or Cat 6 cable. This is physically different from all the previous generations of Ethernet because it contains four twisted pair of wire that connect to all eight pins on the RJ45 plug. It supports 10 and 100 megabit transmission, but it also support the emerging standard for Gigabit Ethernet or 1000BaseT.

Packets and Hardware Addressing

Today Internet protocols are used for everything. Ethernet, however, predates the Internet and has its own conventions for device addressing and packet formation. Ethernet conventions extend only as far as the wire. An Ethernet may connect devices in your home, but to communicate outside your house you need Internet support.

When an Ethernet was formed from one shielded copper wire, the maximum size for each packet of data was set to be 1500 bytes. Anything bigger has to be broken down into multiple packets. After a device sends one packet it must pause before sending the next packet. All this made sense when devices shared the same wire, but with modern equipment these conventions just slow down large file transfer.

Every Ethernet adapter is assigned a unique six byte number called its “MAC” address. Every packet of data has a source MAC address, of the adapter that sent it, and a destination MAC address. Normal data is sent to one machine, but a packet can be given a “broadcast” address and it will be duplicated by the switches and sent to every computer in the local network. The adapter card in every computer checks the destination MAC address in every packet it receives. It accepts packets addressed to it or containing a broadcast address. It discards all data addressed to another machine.

Modern switches watch the packets that pass through them and learn the port to which each MAC address is connected. However, a residue of the old days when the Ethernet was just a dumb piece of copper is the convention that all packets could be broadcast to all computers and the adapters would ignore packets not addressed to them. The ability of switches to filter out and direct traffic aids performance, but it is not required for the system to work.

Internet protocols were added on top of this system of Ethernet packets. Each Internet device has an IP address. Internet packets are directed to the IP address. Each computer or router maintains a table that maps IP addresses to Ethernet MAC addresses. Traffic to other computers on the local network is sent directly. Traffic to other computers goes out through the gateway router connected to the modem.

The maximum packet size of 1500 bytes reflected a physical limitation of a type of wiring that hasn’t been used in 10 years. However, for compatibility purposes, it is still the default maximum packet size on modern equipment. Gigabit Ethernet is slowed down by the requirement to send lots of data over such a small packet size. Gigabit Ethernet devices have the ability to use “Jumbo” packet sizes, typically up to 9000 bytes. If you transfer large files between computers on a home network, enabling Jumbo packets should improve performance. However, you need to buy a $30 Ethernet switch that supports Jumbo packets and not a $30 Ethernet switch that doesn’t support them.

Switches, Routers, Gateways, and Firewalls

A DSL or Cable modem frequently comes with an Ethernet adapter for a PC and a cable. Put the adapter in the PC, connect it through the cable to a jack in the modem, install the software, and the computer is connected to the Internet. This creates a simple Ethernet with just two devices.

To share the Internet connection or other devices between two or more PCs, you need a switch or router.

A “switch” is a device typically costing $30 to $50 with a row of jacks. Connect each computer to the switch through phone wire cable. Any data sent by any computer goes through the switch and arrives at the computer or device to which it was directed. A switch knows nothing about Internet protocols. Data move through the switch, but the switch itself neither generates nor receives messages.

A “router” is a slightly more expensive and more intelligent device. Home users typically purchase a router that controls the DSL or Cable modem connecting to the Internet. A router knows Internet protocols. It has an address just like the computers. Modern routers frequently have a built in Web Server and can be controlled from a PC Web Browser.

To clarify obsolete terminology, a “hub” is an older device that does a subset of the functions of a modern switch. Given current prices, it makes no sense today to use hubs.

A switch has memory to hold some amount of data from each device. This allows different computers to connect to the same switch at different speeds. For example, a very old printer could connect to the switch at 10 megabits per second,  while an old computer connects at 100 megabits per second, and a current computer connects at Gigabit speed. The switch receives the data at whatever speed the device can send, then turns around and sends the data on at whatever speed the receiver can support. Gigabit data is retransmitted at 10 megabits per second if it goes to the printer.

The switch negotiates speed with each device and learns its MAC address. Ethernet packets have an address field that contains the MAC value of the intended receiver. Switches will forward data only to its intended recipient.

Ethernet was developed by Xerox back in the 1970’s. The Internet became widely used in the middle of the 1990’s. Today most Ethernet traffic uses Internet protocols, but they are really two different communications systems. Internet uses IP addresses and can transmit data around the world. Ethernet uses Mac addresses and can transfer data around your living room (or around your house if you run the wires that far). Switches operate on the Ethernet level and look at Mac addresses.

One device in your home will probably take all the Ethernet traffic and connect it to the Internet through your DSL or cable modem. It is called a Router. A Router operates on IP addresses and the world wide Internet protocols.

The Router that you buy for $40 is actually a little computer. In many cases, it runs a special version of the Linux operating system. Companies that modify Linux have to publish the source to their changes, so programmers have modified this source and offer different versions of the firmware for popular Router devices. Some Routers will also connect to and share printers or disks. Almost every Router has a firewall that prevents programmers in Romania from trying to hack into your home computers.

A typical Router has a four port Ethernet switch to connect your home computers, but if you have more than four computers you can simply connect one port of the built in switch to a second external switch and add the extra computers to it. Since the Router connects to a DSL or cable modem, there is no particular reason for it to run faster than 10 Megabits, but with modern equipment it is more convenient if the built in switch supports Gigabit speeds and Jumbo packets. If it doesn’t, then just get an external switch that does.

For a few dollars more, you can get a Wireless Router than also supports Wireless Ethernet connection from laptops and handheld devices.

Internet Addressing

Ethernet delivers packets based on the MAC address. Internet protocols require a second address number called the “IP Address”. The IP address is a four byte number, and by convention it is represented as the decimal numeric value of each byte (0 to 255) separated by periods. Yale University, for example, has IP addresses beginning with 130.132.*.* and the machine on which PCLT is hosted at the time this is being written has address 130.132.51.8. Every source or destination of messages on the Internet has to be assigned one of these numbers. There are enough consumers who cannot set the clock on their microwave oven, so expecting them to correctly enter a number like this into the system is unreasonable. Most of the time the number is provided automatically over the network.

The phone company will have assigned one IP address to your DSL modem, or the Cable TV company will have assigned an IP address to your cable modem. Unless you have purchased an extra cost business service, the IP address you have been assigned can change from day to day. They have a pool of available addresses, and when you begin to use the service they assign an unused number from the pool for your temporary use. If you use a dial up phone line to connect to the Internet, the Internet Service Provider gives you a phone number to dial and an id and password to logon to their system. During the logon the ISP passes back to your machine an IP address it should use during the connection.

The same approach is used when a high speed DSL or Cable modem is connected to a home network through an Ethernet Router box. The router is provided with a node name, userid, or password to logon to the ISP network. The ISP passes back an IP Address value that the Router box then uses to communicate with the outside world.

In either case, the IP address provided by the ISP, even temporarily, allows one computer or the one Router box to communicate with any mail, Web, or other server anywhere in the world. This still leaves the question of how computers inside your home talk to each other or to the Router box. The answer is a trick that Routers know called “NAT” (Network Address Translation).  The NAT function in the Router translates all messages from other computers so that they look, to the outside world, like programs running inside the Router itself. Therefore, other computers in the home network don’t have to be assigned addresses that are meaningful outside the home.

The Internet reserves sets of IP Addresses for non-public use. These numbers can be assigned to machines that are isolated from the public network and either do not communicate at all or else only communicate through gateways. A popular range reserved for non-public use are the addresses beginning 192.168.1.*.

The simplest way to assign IP Addresses to all the computers of a home network is to let the Router box that provides connectivity to the Internet assign numbers on request to any machine that asks for one. By default, the Linksys Router assigns itself the address 192.168.1.1 in the home network. It then skips numbers 2-99 and assigns numbers as requested by computers starting at 192.168.1.100. The protocol for serving up IP Address values on request is called DHCP. All of these values can be configured in the advanced control panels of the Router, but there typically is no reason to change them.

So having explained how this all works, the equipment and services are generally configured so you don’t need to know the details.

The ISP will provide you with a DSL or Cable modem, some software for a computer, and the names and passwords needed to access the system. Since some ISP agreements don’t allow multiple machines in a home network to share the same line, it may be a good idea while the installer is in the house to hide any Router in a closet and install and test everything on one computer.

After the ISP equipment has been tested, replace the single computer with the Router box and connect at least one computer Ethernet adapter to the Router. The computer should be set to pick up its IP Address automatically from the network, and if it is the same computer used to test the modem it should probably be rebooted so it picks up a new address from the Router. Now follow the instructions in the Router manual to configure the Router with the same ID and password that the ISP provided to make the previous connection. It may be helpful to know the buzzword that identifies the particular type of logon protocol used by the ISP (for example, “PPoE” is a popular choice) since this has to be selected from a menu of options in the Router.

Once the Router logs on successfully to the ISP, computers connected to it through Ethernet should be able to access Web sites. The IP addresses vended by the Router also allow the computers to talk to each other to share files and printers.

Wireless

a, b,  g, and n

The FCC in the US and its international counterparts license various frequencies to radio, TV, military, and other users. Specific bands of frequency are assigned for “unlicensed” use by household devices. The first devices to use these frequencies were cordless telephones. Computers quickly followed.

The first unlicensed frequency range was 900 MHz. There are still wireless phones in this frequency, but an initial generation of non-standard wireless computer cards has now been phased out. A second band of frequencies was opened at 2.4 GHz. This is the most popular choice for wireless phones and the current standard “802.11b” and “802.11g” (“WiFi”) wireless Ethernet equipment. A new band of frequencies at 5 GHz is now becoming available. It is used for new “802.11a” wireless Ethernet equipment, but there are no wireless phones currently operating in this range.

The 2.4 GHz frequency (b and g) is preferred by wireless phones because it has good performance, long range, and some ability to pass through the walls of a house. Its disadvantage is that the frequencies are crowded with devices, and they are subject to interference from microwave ovens.  The 5 GHz devices (a) are free from interference, but they don’t stretch as far and have serious problems passing through walls. In fact, the a devices operate over such short distances and limited environments that they are almost worthless.

The b standard runs at 11 Megabits per second. The g standard nominally runs at 54 megabits per second, but vendors have come up with ways to use two channels inside the frequency to double this to 108 Mb/s.

Obviously the next step is to take over all the frequencies that a device can get access to and to crank the speed up as high as possible. This idea is being explored in a new standard called 802.11n. This is a fine idea if you compute in a cabin in the woods, but it will not work well in an apartment where five of your neighbors are already using all the available channels. Some equipment is “dual band” and uses both the 2.4 and 5 GHz bands to transfer as much data as quickly as possible.

WEP

Wireless Ethernet broadcasts data for at least a hundred feet. The signal may go much farther if the recipient uses more sensitive professional equipment. To provide even the most basic elements of privacy, the data should be encrypted.

Wireless standards provide for data encryption called ‘WEP”. WEP comes in 64, 128, and 152 bit versions. The larger number is better, but it must be supported by all of the devices in the network. It is generally agreed that 64 bit WEP is not particularly good, but it is still better than nothing. Use at least 128 bit if possible.

WEP is driven by an encryption key. You can generate the key manually, but there is typically an algorithm that will generate a key from a password. The key is initially generated on the Access Point. It must then be entered into the configuration panels of every computer that you want to connect to the Access Point. Since it is very easy to get this wrong the first time you try to do it, make sure that there is at least one Wired Ethernet computer that can connect to the Access Point and run the configuration panels. Otherwise, if something goes wrong you may not be able to get back to the Access Point with any Wireless device to check or change the WEP configuration.

Infrastructure

Wireless Ethernet adapter cards can be configured to run in “ad hoc” or “infrastructure” modes. The “ad hoc” mode allows any two computers that come within range of each other to begin communicating. This is not, however, an easy configuration to debug. Furthermore, low level Ethernet connectivity has already been shown to be useless without also getting an IP Address. Since “ad hoc” operation requires manual configuration of IP, it is difficult to set up.

Normally the adapter is configured for “infrastructure” mode. It then searches not for another computer, but for Wireless Router or “Access Point” such as the devices listed in the previous table.

A 2.4 GHz device (b or g) has a range of 100 to 150 feet indoors, less through thick walls. A 5 GHz device has a range of 25 to 75 feet and generally cannot penetrate a real wall. To provide full coverage, a company may scatter Access Points around a building. By luck, somebody is going to be located midway between two Access Points with the opportunity to connect to either.

Access Points are configured with a network identifier (SSID) and a channel number (recommended to be 1, 6, or 11). Access points that cover adjacent territory should be assigned to different channels so their signals do not interfere with each other. Generally, Access Points shared by workers in the same company, or Access Points at opposite ends of a really big home, will have the same SSID. You can configure the Access Point to either broadcast the SSID or to be quite. Broadcast SSID makes it easy to select particular Access Points when there are several networks close to each other, but keeping the SSID a secret improves security.

If you live in an apartment building, it is possible that the signal from a neighbor’s Access Point will leak into your apartment. It would then be strongly recommended that you choose a different SSID and a different channel.

When you install a Wireless Ethernet adapter in a computer and set it up for “infrastructure” mode, the Windows support will display the SSID of all the Access Points close enough to read their broadcast. The user must select one Access Point, and if it is secured must provide a WEP Key.