Wednesday, January 6, 2010

Network Interface Cards

Role of NICs
Network interface cards (NICs) are known by a variety of names including network adapters or cards, network adapter boards, and media access cards. Regardless of their name, they share a common set of functions in enabling computers to communicate across a network. Network interface cards are often defined by:
  • The type of Data Link protocol they support, such as an Ethernet adapter or a Token Ring adapter
  • The type of media they connect to
  • The data bus for which they were designed
In order to interact with the computer where it is installed, the network adapter, like any other peripheral device, must have a software driver installed. This driver allows the operating system and higher level protocols to control the functions of the adapter.
The NIC performs the following functions:
  • Translates data from the parallel data bus to a serial bit stream for transmission across the network.
  • Formats packets of data in accordance with protocol.
  • Transmits and receives data based on the hardware address of the card.
Translating from Parallel to Serial
The network adapter, like any device installed in a system, is attached to the CPU via a parallel data bus, such as an ISA or PCI bus. These parallel buses move data quickly between devices internal to the system. Network transmission, on the other hand, relies on a serial data stream in order to transmit messages. Therefore, all data coming into the network card from the bus must be transformed into a serial data stream before transmission.
Formatting Packets
Data transmission within a network interface card has two characteristics. The first of these is the transmission of binary bits across the network medium. A Physical Layer protocol defines the voltages and signal standards used to represent binary data on the network. This is built into the hardware on the card. In addition, the Data Link protocol supported by the card defines a packet structure for sending and receiving data. This structure includes fields for addressing and control information as well as the data. This function is implemented by the card and its software driver.
Transmitting and Receiving Data
The primary function of the network adapter is to transmit and receive data between other network interface cards across the network media. It does this based on the fact that each card has an address, known as the MAC (media access control) address or hardware address. This address is generally built into the card by the manufacturer, and includes portions that identify the brand, as well as uniquely identifying the card itself. Each card is designed to pick out messages on the network destined for their hardware address as well as broadcast messages.
Configuration Settings
Configuration of a network interface card is a two-step process that involves:
  1.  Setting the configuration parameters on the card itself 
  2. Configuring the network driver to match the settings on the card
Setting parameters on a network adapter has traditionally been performed using jumpers on the card. These jumpers are rows of pins on the card that are jumpered by plugging small receptacles over two pins, which closes a circuit between them. In some cases, DIP switches are used instead of jumpers, These small switches, in a dual-inline-pin (DIP) configuration, are opened or closed as appropriate for the jumper setting. More recently, software-configurable adapters have rendered these jumpers obsolete. Software-configurable adapters use a software configuration utility to set parameters, which allows them to be reconfigured without accessing or removing them from the system. Software-configurable adapters also support plug-and-play operating systems that dynamically assign these parameters.
The parameters that typically need to be set include:
  •  I/O base address  The I/O base address, IRQ, and DMA channel are common parameters that may need to be set for many types of peripheral devices. The I/O base address refers to the starting address for a series of registers used to control the card. A common I/O address for a network card is 300h. Care must be taken to ensure that this address in not already in use by another device or the adapter will fail.
  • IRQ  The IRQ (interrupt request line) is used by the device to interrupt the processor and request service. There are sixteen IRQ lines, many of which are routinely committed to devices such as the disk controllers, serial and parallel ports, and others. A common configuration for a network card may use IRQ 3, which is also used by the serial port COM2, IRQ 5, or IRQ 10. Like the I/O address, the IRQ must be chosen so the card does not conflict with another device. 
  • DMA channel  DMA (direct memory access) is a process whereby some devices can directly access memory on the system without the intervention of the CPU. This offloads the processor from having to handle these data transfers, and speeds the transfer process. Any device with DMA capability is a DMA channel, which it uses to control direct memory access. Since many hardware devices do not use this feature, there is more flexibility in configuring this setting. 
  • Base memory address  The base memory address may be a configurable parameter on those cards that make use of system RAM. The base memory address refers to a section of memory set aside for use as buffer space. If a network card does not have this setting, it may not need any system RAM for buffer space, or the parameter may not be configurable. 
  • Transceiver type   The transceiver type setting is required for network adapters that are capable of attaching to more than one media type. Typical cards of this nature include Ethernet cards that have both twisted pair and coaxial connectors. This is one of the more common oversights in configuring a network interface card, and renders the card nonfunctional if configured for the wrong media connection. To alleviate this problem, some cards of this type have an auto setting that causes the card to search for the transceiver that has media connected to it.

 Transceiver Types
Transceivers are that portion of the network interface that actually transmit and receive electrical signals across the transmission media. They are also the part of the interface that actually connects to the media. Transceiver types can be classified as being either on-board or external.
  1. On-Board Transceivers  On-board transceivers are built onto the network interface card. With these types of transceivers, the media connector is built right on the back of the NIC. Common examples of this include RJ-45 receptacles for twisted-pair and BNC connectors for thinwire coaxial cable.
  2. External Transceivers With an external transceiver, the actual media connection is made external to the network interface card using a small device that attaches via an extension cable to the network interface card. These types of connections use an AUI (adapter unit interface) connector, also called a DIX (Digital-Intel-Xerox) connector, on the back of the network interface card. The AUI connector is a female 15-pin D connector that looks very much like a joystick port. An AUI connector allows a network card to be used with multiple types of media. A common implementation is to use this configuration for an Ethernet card that can be attached to twisted-pair, thickwire or thinwire coax by just changing the external transceiver type.  
 Configuration
 The transceiver type configuration is set using jumpers, DIP switches, or configuration software, in the same way that the I/O base address and other parameters are set on the card. Most cards have at most two types of transceivers. During configuration, these may be referred to in the following ways:
  1. Internal vs. External, where the card has an AUI port and an onboard twisted-pair or coaxial connector
  2. DIX or AUI indicating the use of an external transceiver
  3. Coax, 10Base2, or BNC indicating the onboard thinwire Ethernet connection
  4. TP, UTP, or 10BaseT indicating the on-board twisted-pair connection
  5. The auto setting may be available if the card can autosense the connected media  
 Data Bus Compatibility 
The network interface card has to be connected in two places for it to function. It has to be connected to the network media through a transceiver, either internal or external. It also has to be connected to the processor in which it is installed via a data bus. This data bus provides power, control information, and data to the card.
Network interface cards are designed to plug into and operate with a specific data bus type. These types include:
  • ISA  IBM developed the ISA (Industry Standard Architecture) bus for use on their PCs. Originally an 8-bit bus, it was later extended to 16 bits using a connector strategy that retained compatibility for the older 8-bit cards. This is still one of the most common buses in use, particularly for general purpose workstation PCs. Network cards for ISA buses are the least expensive but lowest performance cards due to the limitations of the 16-bit architecture. 
  • MCA  Recognizing the speed limitations of the 16-bit bus, both IBM and other companies released new bus architectures in 1988. IBM’s 32-bit data bus was called MCA (Microchannel Architecture). It was released with IBM’s PS/2 product line, and was a totally new architecture that was not backward compatible with ISA cards. MCA adapters were predictably more expensive and offered higher performance than an ISA adapter. IBM has since phased out MCA and these types of adapters have become increasingly difficult to obtain.
  • EISA EISA (Extended Industry Standard Architecture) is an alternate 32-bit bus architecture that was designed by a consortium of companies, including Hewlett-Packard and Compaq. It was designed to be backward compatible with ISA devices and is the data bus of choice for PC servers in non-IBM environments for high performance and throughput. They are also higher in terms of cost and performance than ISA cards. 
  • PCI PCI (peripheral component interconnect) is the current favorite for high-speed bus interfaces. It is supported by the latest Intel-based and Apple computers. It is a 32-bit bus often called a local bus, and was first used for video adapter cards to increase their speed in graphics rendering. It has since been adopted for use by devices that need high throughput, such as disk controllers and network interface cards. This is the data bus preferred for network interface cards in high-capacity servers today.
  • PC Card or PCMCIA  The PC card bus, formerly known as PCMCIA, is an architecture designed primarily for laptops and other portable computers. Adapters for this bus are sometimes called credit card adapters after their size and shape, which is roughly equal to the size of a credit card. Because of their small size, most have a receptacle to which an external adapter must be connected for attachment to the media. These network interface cards are also sometimes combined with a modem in a single card called a combo card. 
Connectors
 The types of transceivers and media that can be served by a network interface card determine the appropriate connector. Each media type has a typical connector type or connection method.

  •  Thickwire Coax  Thickwire, or standard Ethernet coax, uses a connection method that typically involves an external transceiver connected to the adapter’s AUI port. This external transceiver has a connection called a vampire tap. To attach a thickwire transceiver to the media, you must drill a hole in the cable using a special drilling jig that controls the depth of the hole. This jig prevents the drill from drilling through and severing the center conductor.  The vampire tap consists of a pin that is inserted into the hole drilled in the cable, and a clamp that holds the tap onto the cable. One of the challenges of this type of connection is to position the tap so it contacts the center conductor without shorting to the shield surrounding it. These difficulties, as well as the cost and size of thickwire cable, have rendered it largely obsolete, although it may occasionally be found in existing installations.
  • Thinwire Coax Thinwire coax can be attached directly to an adapter if an on-board transceiver is used. In this case, a connector called a BNC or barrel connector on the network card attaches to a T-connector. The T-connector has a female fitting that attaches to the card, as well as two additional male fittings that attach to cable segments or a terminator. Each end of a thinwire Ethernet segment must be terminated, so the last node on each end may have a terminator attached to the side of the T-connector opposite the inbound cable. All other nodes use T-connectors with cable segments attached to both sides, just like Christmas tree lights. A thinwire segment cannot be attached directly to the BNC connector on the network adapter, but must use a T-connector.  An alternative connection method can use the AUI connector with an external thinwire transceiver. In this case, the cable attachment to the transceiver is still made through a T-connector.
  • Twisted-Pair Wiring The typical connector for a twisted-pair connection is called an RJ-45 connector. The RJ-45 connector looks like an oversized phone connector. The reason for the difference in size is that a phone connector has four wires, while the RJ-45 is an 8-wire connector.  An RJ-45 patch cable can be plugged directly into the back of a twisted-pair network adapter or, less commonly, it can be attached to an external transceiver. The patch cable usually runs to a wall receptacle, which is wired back to a patch panel, and ultimately back to a wiring hub.
  • Fiber-Optic Cabling Fiber-optic adapters generally have two connectors, one each for incoming and outgoing fiber cables. The mechanical connectors that join the cable are called ST connectors, and are designed to pass light seamlessly across the joined fiber segments. For this reason, these connectors must be made with great precision. Fiber-optic runs are generally made back to a concentrator that performs a hub function.  In many situations, fiber-optic cabling is used to connect high-speed computers, and to provide a high-speed backbone to which slower speed LANs are attached. The LANs might connect copper media, such as twisted-pair or coaxial cable, to a set of hubs that are then bridged to the fiber-optic backbone for high-speed data transfer between LANs.  
 Server NICs vs. Client NICs
The speed and capacity of an NIC depends on a wide range of factors. First among them is the data transfer rate for the Data Link protocol. That is, a 16MB Token Ring card is faster than a 10MB Ethernet card. In addition, as discussed earlier, the data bus connecting the card to the CPU is a determinant of potential speed. There may also be design features of the card that speed up its ability to process and transfer data. In choosing a network adapter for use in a network node, it is important to consider the role of the machine, and the resultant demands placed on its network card.
Difference in Capacity Requirements
In contrasting NICs in servers with those in workstations, the patterns of traffic determine the performance characteristics needed. For a client workstation, there is a single user generating network traffic with a single or limited number of servers. The size and frequency of file transfers initiated by the client determines the requirements for a NIC card in this situation. In most cases, the demands on a client workstation NIC are relatively modest. There are also compelling economic reasons for not putting high-performance NICs in hundreds or thousands of client machines unless they are absolutely necessary.
By contrast, a server is constantly processing requests from multiple users, and might be servicing hundreds of user connections at a given time. In this situation, speed is very important, since a slow NIC impacts every user waiting to be processed by the server. Unless the network is very small, the server specification will certainly include a high-performance network adapter.
Matching the Function with Appropriate NIC Features
We have already discussed the impact of data bus type on the performance of the network interface card. 32-bit bus architectures like EISA and PCI support faster transfer rates than a 16-bit ISA bus. In addition, there are other design features that may improve the performance of the processor.
Shared memory between the NIC and the system processor may improve speed and throughput. This shared memory may reside in system RAM, or may be on the network adapter card.
Offloading the system processor by using DMA or bus mastering for transfers to memory may also increase performance. Bus mastering is a process by which the network card assumes temporary control of the data bus instead of the system processor, and is a feature of both EISA and MCA buses. Including an on-board processor on the NIC also reduces demand on the system processor and increase speed.
Buffering data using RAM on the network adapter may also speed performance by allowing the card to accept data faster than it can process it. The buffers store the excess data until the card can service it.
Specialized NICs
There are network interface cards available for a wide variety of situations and environments. Two of these are NICs for wireless media and network adapters used in diskless workstations.
  1.  Wireless NICs  There are a variety of wireless media that involve the use of radio frequency transmission, or light transmission via laser or infrared. Wireless NICs are used to accommodate these transmission methods. The main difference between a wireless NIC and a more traditional cabled NIC lies in the transceiver. In the case of radio frequency NICs, the transceiver performs the functions of a radio transceiver, and generally has an antenna attached. These may interact directly with other wireless nodes, or may attach to a wired LAN via a wireless concentrator.  In the case of an optical transmission method such as infrared, the transceiver uses LEDs and photosensitive devices to generate and recognize the data stream. These transmission methods generally require "line-of-sight" alignment between communicating nodes.
  2. Remote Boot PROMs  The diskless workstation is a concept that has been around for some time. Designed for use in fairly large environments, it originally had two goals. The first was to enhance security on the network by removing local storage from the end user, and requiring that all data and applications be stored on servers. By managing user access to this information via server permissions, the LAN administrator could more effectively control the environment. The second goal of diskless workstations was the cost of mass storage. By removing the cost of local storage, particularly as workstation populations increased, companies could save costs. This has become less of an issue as the cost of mass storage has declined.  The challenge of using diskless workstations is how to boot them. Normally, a system at startup looks for a hard disk that is bootable in order to start the operating system. This specifically involves looking for a Master Boot Record that tells the system where to find the boot files. In the case of a diskless workstation, there is no disk available to perform this function, since all storage is accessed through the network adapter. A remote boot PROM can be added to a network adapter to allow the system to boot using files stored on the network. An adapter capable of doing remote boot has an empty socket that can be populated with a boot PROM. Once installed and configured, this boot PROM directs the system to the network location of the boot files.  
 NDIS and Novell ODI Network Drivers
The process of adding devices to a computer involves not only the physical installation of the devices, but also the installation of appropriate software to allow the system to control the device. This software is the device driver. Similarly, network interface cards require network drivers to function.
NIC Drivers
The function of the network driver is to act as an intermediary between the hardware components on the network adapter and the higher levels of software that need access to the card. On the low end, a network driver directly accesses the hardware registers and memory space used to pass instructions and data to the card. On the high end, the driver must connect with, or bind to a transport protocol, such as TCP/IP, that performs high-level functions such as routing, error checking, and session establishment across the network. From the standpoint of a network operating system, installing an adapter means installing the network driver that controls the adapter.
Purpose of NDIS and ODI Architectures
The first network drivers were designed so that the driver included not only the Data Link protocol, but also the high-level protocols used by the network. This monolithic approach to driver design was adequate for proprietary networks, where the protocols at all levels were consistent and predefined. With the rise of multi-vendor networks, this driver design became a problem, since it could only accommodate one protocol at a time.
Both NDIS (Network Device Interface Specification) and Novell’s ODI (Open Driver Interface) were designed to overcome this limitation and allow multiple protocols to be used with the same network card. Both standards achieve this by adding a layer of software that provides a common interface on the bottom end to which any compliant driver can attach, and a common interface on the top to which multiple compliant protocols can be attached. This layer is called the NDIS wrapper or, in the case of ODI, the Link Support Layer. In addition to providing these compatible interfaces, this software layer also provides a routing function to match incoming messages to the appropriate protocol stack.
Placement in OSI Model
The placement of the network interface card and its associated driver reside at the lowest two levels of the OSI model. The Physical Layer functions of transmitting bits are incorporated into the hardware design of the card. The Data Link functions involving point-to-point data transmission are handled by the network driver. NDIS or ODI components reside at the top end of this layer, where the Data Link protocol such as Ethernet meets the network protocol, such as IP or IPX.
Binding Drivers to Protocols
Each network software component must be joined to those below and above it in order for the software layers to interact. This process is called binding. The network interface driver must be bound to the network and transport protocols above it, and these in turn must be bound to the services that use them. These bindings may be configured manually, or may be automatic. In the case of Windows NT, all network software components are bound by default. Manual configuration requires unbinding components that do not need to interact.
Another issue with bindings concerns binding order. Because of the functionality of NDIS and ODI, a network adapter may operate using several protocols. Where multiple protocols are bound to the adapter, the most commonly used protocol should be listed first in the client’s binding order. The reason for this is that the system may attempt to communicate on each protocol until it gets a response. Less traffic and time is wasted if the first protocol it tries is the one that succeeds.
Installing and Configuring Network Adapters
The process of installing a network adapter involves two activities. The first of concerns the physical installation of the card into the computer. The second involves installing and configuring the software driver, and possibly setting up the high-level protocol software to which it will be bound.
 Physical Installation
  • Before beginning the physical installation of the network adapter, the following issues should be addressed: 
  • Ensure that the adapter is compatible with the data bus, the protocol, the media, and the network operating system.
  • Ensure that there is an open bus slot on the machine in which to install the adapter.
  • Ensure that there are system resources, including an IRQ level, base I/O address, and DMA channel available to be assigned to the adapter. Choose and record parameters from available settings, unless the adapter will be configured automatically through plug and play.
  • Ensure that the adapter includes all items necessary for installation. These may include external transceivers or adapters. It may also include such items as a T-connector for a thinwire Ethernet adapter and product documentation. Software, including the network driver and utilities for testing and configuring the adapter, should also be included.
  • If a software driver is not provided, a driver may be included with operating system installation media. If not, drivers and driver updates may be available for download from the adapter manufacturer via the Internet or a bulletin board service.
  • Remember that the network adapter cannot do any useful work until high-level protocols and network services have also been installed and configured.  
 Installation Process
 To install a network adapter, take the following steps:
  1. Review the installation instructions included in the documentation. This can help you avoid unnecessary problems and make the installation more efficient.
  2. If necessary, configure selected settings on the network adapter, using either jumper plugs or DIP switches. If this is required, make sure that all settings are completed before installing the card or it will have to be removed again. With a software-configurable adapter, this configuration occurs after the physical adapter is installed.
  3. Power down the computer and remove the outer case. The system chassis and the installing technician should be grounded using ESD (electrostatic discharge} protection, such as wrist strap or static mat. This prevents damage to the adapter from static electricity.
  4. There may also be a cover plate on the back of the system chassis, over the chosen bus slot, that must be removed to allow access to the card. Retain the screw holding on this plate and reuse it to secure the adapter card once it is installed.
  5. Insert the network adapter into the chosen data bus slot and make sure it is securely seated in the slot. Care should be taken during this process so that the adapter and adjacent cards are not inadvertently damaged or shorted to each other. Make sure that the rear connectors on the adapter are properly aligned, so that they are not damaged or partially obstructed by the computer chassis. Once properly positioned, secure the card using the screw retained in step 4.
  6. Finally, replace the outer cover on the system and make the external connections to the adapter, including the media or the external transceiver and media. 
Testing
Once the network adapter is physically installed in the machine, it may be possible to use the supplied diagnostics to test it. Alternatively, testing may occur as part of the driver installation. The adapter may also have some status LEDs that show when it is operating. These may not function, however, until the driver installation and configuration are complete.
With a plug-and-play operating system restarting the system may cause it to discover the card, identify it, and prompt for the driver software. If this driver is available on the hard disk and can be found, it may be loaded automatically. Remember to attach the network interface card to the media or it may report an error.

No comments:

Post a Comment