Interface Cards

team lib

The Network Interface Card (NIC) provides the physical connection to the network. Every computer attached to a LAN uses some sort of network interface card or chip. In most cases, the card fits into the expansion slot of the computer, although some cards are external units that attach to the computer through a serial or parallel port. Internal cards are generally used for PCs, Macs, and some workstations. Internal interface cards can also be used in minicomputers and mainframes. External boxes are often used for laptops. In some cases, the network circuitry is integrated onto the computer's motherboard.

The interface card takes data from the PC, puts it into the appropriate format, and sends it over the cable to another LAN interface card. This card receives the data, puts it into a form the PC understands, and sends it to the PC.

The interface card's role can be broken down into eight tasks : host-to-card communications; buffering, frame formation; parallel-to-serial conversion; encoding and decoding; cable access; handshaking; and transmission and reception . These steps get the data from the memory of one computer onto the cable, and reversing the steps gets the data off the cable and into the memory of another computer.

Before Transmission

The first step in transmission is the communication between the personal computer and the network interface card. There are three ways to move data between the PC's memory to the network interface card: I/O, direct memory access, and shared memory.

I/O is the simplest method. The most important types are memory-mapped I/O and program I/O. In a memory-mapped I/O transfer, the host CPU assigns some of its memory space to the I/O device, in this case the network interface card. Out of the possible 640KB of RAM that is available for DOS PCs, a few KB are allocated to the network card. This memory is then treated as if it were the PC's main memory. No special instructions in the CPU are needed to get data from the card since it is like taking data from one part of main memory to another.

With program I/O, the CPU is given a set of special instructions to handle the input/output functions. These instructions can be built into the chip or come with software. To send data, a request is sent from the network interface card to the CPU. The CPU then moves the data from the card over the bus to main memory. Because the CPU is required to handle the I/O process, it cannot perform other tasks while data is being transferred. This makes it slow. Also, I/O takes up PC memory.

Direct Memory Access (DMA) is another method. All Intel-based computers come with a DMA controller chip that takes care of transferring data from an input/output device to the PC's main memory so the PC's CPU does not have to get involved in the transfer. For DMA transfer, the controller or processor on the interface card sends a signal to the CPU indicating it wants to transfer information. The CPU then relinquishes control of the PC bus to the DMA controller.

Once the DMA controller has command of the bus, it takes the data from the card and places it directly in memory. The CPU had told it the appropriate memory address at which to begin putting data in memory. After all the data is in memory, the DMA controller returns control of the bus to the CPU and tells it how much data has been put in memory.

DMA is generally faster than I/O because the DMA controller removes work from the CPU, so the CPU can perform other functions while data transfer is taking place. The disadvantage is the CPU cannot access memory while the DMA controller is working.

In shared memory, part of host PC's memory is shared by the network interface card's processor. Shared memory is a very fast transfer method, since no buffering on the card is required. Because the card and the PC do their work on the data in the same place, no transfer is necessary. Although shared memory is the fastest method of moving data between the network interface card and the PC, it is more difficult to build than DMA or I/O. Shared memory takes more PC RAM than the other methods .

The second component of PC-to-NIC communication is buffering. The buffer is a storage place that holds data as it is moving into and out of the NIC. A buffer is necessary because some parts of data transfer are slower than others. For example, data comes into the card faster than it can be converted from a serial or parallel format, depacketized, read, and sent. This is true in both directions. To compensate for delays inherent in transmission, a buffer temporarily holds data either for transmission onto the cable or for transfer into the PC. While in the buffer, data may be acted on, such as put into frames , or it may simply wait while the NIC handles other things.

An alternative to buffering is to use PC RAM. This can be less expensive, but is usually slower and it requires memory.

The NIC's most important job is frame formation. Frames are the basic units of transmission. Files and messages are broken into frames for transmission. At the other end the frames are reassembled to form the file or message. A frame has three sections: header, data, and trailer. The header includes an alert to signal that the frame is on its way, the frame's source address, destination address, and other data. In some networks, headers also have preamble bits used for various purposes, like setting up parameters for transmission. They can also have a control field to direct the frame through the network, a byte count, and a message type field.

The data section contains the data being sent, for example, the numbers in a spreadsheet or words in a document. On some networks, the data section of a frame can be as large as 12KB. On Ethernet, it is 1,500 bytes. The upper size limits of most networks fall between 1KB and 4KB.

The trailer contains error checking information called a cyclical redundancy check (CRC). It is a number that is the result of a mathematical calculation the sending NIC does on the frame. When the frame arrives at its destination, the mathematical calculation is repeated. If the result is the sameall the ones and zeros are in the right placeno errors occurred in transmission. If the numbers don't match, an error has occurred and the frame must be retransmitted.

Transmission

Parallel-to-serial conversion is the next step in transmission. Data comes from the PC in parallel form, 8, 16, or 32 bits at a time, depending on the bus width. But it must travel over the cable in serial form, which is one bit at a time. Thus, the network interface card must convert between the two. A parallel-to-serial controller is responsible for this task. Once a frame is formed and changed from parallel to serial, it is nearly ready to be sent over the line. First it must be encoded, which means it must be converted into a series of electrical pulses that convey information.

Most network interface cards use Manchester encoding. Serial data is divided into bit periods. Each of these periods (or fractions of seconds) is divided in half, and the halves together represent a bit. From the first half to the second half of each bit period there is a change in the signal's polarity, from positive to negative, or vice versa. The change during each bit period represents the data. A change from negative to positive represents a one. A change from positive to negative represents a zero. Or vice versa depending on the network. Ethernet uses Manchester encoding. Token Ring uses another version called Differential Manchester encoding, in which the mid-bit transmission is used for clocking information. Either way, these ones and zeroes represent data.

Before data can be sent, however, the network interface card must have access to the cable. Token Ring and ARCnet use a token to grant network access. Ethernet lets any workstation transmit at will if it finds the cable unoccupied and senses collisions if two senders inadvertently transmit simultaneously . The access method protocol, circuitry, and firmware reside on the network access card.

After getting data from the PC, formatting it, encoding it, and getting access to the cable, the interface card for some types of networks has one more task before it can send data: handshaking. In order to send data successfully, a second NIC must be waiting to receive it. A short period of communication between two cards ensues before data is sent. During this period, the NICs negotiate the parameters for the upcoming communication. The transmitting card sends the parameters it wants to use. The receiving card answers with its parameters. Parameters include the maximum frame size, how many frames should be sent before an answer, timer values, how long to wait for an answer, and buffer sizes. The card with the slower, smaller, less complicated parameters always wins because more sophisticated cards can "lower" themselves while less sophisticated cards can't "raise" themselves .

Finally, everything is set. The only thing left is for the NIC's transceiver to put the data on the cable. The transceiver gives the data power to make it down the line. It actually puts the electrical signal out over the cable, making sure the data can get to the next NIC, repeater, amplifier , or bridge.

At the other end, a transceiver waits to accept the signal and begin the whole process in reverse, from modulated signal through decoding, serial-to-parallel conversion, and depacketizing the information into a format readable by the receiving device.

Pick A Card

More than any other LAN component, the network interface card determines the performance of the LAN. The speed of the disk drives , file servers, and network operating system are important, but the speed of the interface card and its software driver determine the network speed. [Editor's note: As NIC throughputs have progressed from 10Mbits/sec to 100Mbits/sec and even 1Gbit/sec, NICs have ceased to be a significant bottleneck in most networks.]

Choosing network cards is a difficult process. Nearly every vendor claims to have the fastest cards. Benchmarking, even when done by independent sources, measures a myriad of parameters. Look at the bus width (a card using a 32-bit bus is normally faster than one that uses an 8-bit bus), the bus type (Extended Industry Standard Architecture bus or Micro Channel is faster than Industry Standard Architecture bus), the type of memory transfer (shared memory is faster than I/O and DMA), and whether the card can perform bus mastering. But most important, test the speed of the network card driver.

Performance is one, albeit critical, factor. Reliability is essential. Speed is irrelevant if the card causes errors, loses frames, drops the line, or just doesn't work. Nothing is more frustrating than having to isolate network hardware problems. Evaluate the vendor's reputation, longevity in the business, and technical support services.

This tutorial, number 5, written by Aaron Brenner, was originally published in the December 1988 issue of LAN Magazine/Network Magazine.

 
team lib


Network Tutorial
Lan Tutorial With Glossary of Terms: A Complete Introduction to Local Area Networks (Lan Networking Library)
ISBN: 0879303794
EAN: 2147483647
Year: 2003
Pages: 193

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net