Chapter 9: Computer Network Interfaces
Computer networks are categorized into local (covering a building or a group of buildings) and global. The Ethernet technology is currently almost totally dominant in the local network field. It offers three bandwidth rates—10, 100, and 1,000 Mbps—and 10 Gbps is not far off. Other technologies—local ARCNet, Token ring, 100VG-AnyLAN, as well as wireless and global—will not be considered.
9.1 Ethernet Standards and Interfaces
The Ethernet technology allows various transmission media to be used. Each of these media has a standard name of the type XBaseY, where X is the transmission speed in Mbps (10, 100, 1,000…), Base is a key word, which means unmodulated transmission, and Y is a conventional designation of the transmission media and the communication range. All modern Ethernet versions use twisted-pair or fiber optic cable and star-connected topology. The central unit in a star topology network is a repeater (also known as a hub) or a network switch. A network can also consist of two units connected in a point-to-point scheme. Old versions of networks implemented on coaxial cable were typically connected using bus topology, whose main shortcoming was low network reliability. There also is an exotic version of the passive optical bus 10BaseFP. Sometimes media converters are used in networks, which convert one type of interface to another. Most often, twisted-pair-to-optic converters are used, but one-mode-to-multi-mode fiber optic converters are also used.
The following standards exist for 10 Mbps Ethernet:
-
10Base5 is a bus topology network utilizing thick 50-ohm RG-8 coaxial cable; the maximum length of a cable segment is 500 meters. An adapter is connected to the network cable via a transceiver using the Media Attached Unit Interface (AUI; four shielded twisted-pair patch cables). It is not used for new networks as it is too expensive, bulky, inefficient, and has no future.
-
10Base2 is a bus topology network utilizing thick 50-ohm RG-8 coaxial cable; the maximum length of a cable segment is 185 meters. A network adapter is connected using an interface BNC connector (or AUI with a transceiver). This is the most inexpensive version of the network (in terms of equipment); it also has no future.
-
10BaseT network is built using category 3 and higher 2-pair twisted-pair cable; the length of a segment is up to 100 meters. (When using category 5 cables, the segment length may reach 500 meters, but it is not recommended.) A network adapter is connected via a RJ-45 connector (or AUI with a transceiver). This is a practical option for an entry-level network that allows the bandwidth be expanded by replacing hubs with switches. Speeds of up to 100 and even 1,000 Mbps can be achieved using category 5 and higher cables (with cards and hubs replaced).
-
10BaseF and FOIRL is a network built on 2-fiber fiber-optic cable. An adapter is connected via the AUI interface equipped with an optical transceiver. Inexpensive multimode transceivers with 850 nanometers wavelength and a transmission range of up to 1 kilometer are used. For long-distance transmissions—tens of kilometers using one-mode fiber—single-mode 1,310 nm transceivers are used; they can also work on multimode fiber cable over distances of up to 2 kilometers.
The following standards exist for 100 Mbps Fast Ethernet networks:
-
100BaseTX is a network built on a category 5 and higher 2-pair twisted-pair cable with segment length of up to 100 meters. The network adapter is connected via a RJ-45 connector. This is a popular and optimal option (in terms of value for the money) to connect nodes to a network. It allows up to 1,000 Mbps speed provided quality cabling and appropriate cards and hub replacements are used.
-
100BaseT4 is built on 4-pair category 3 and higher twisted-pair cable with segment length of up to 100 meters. Adapters are connected using RJ-45 connectors. This is a seldom-used version for networks.
-
100BaseFX uses 2-fiber fiber-optic cable. Single-mode 1,310 nm transceivers are used, which can also work with multimode optical fiber at distances of up to 2 kilometers. The communication range operating in the full-duplex mode is tens of kilometers.
-
100BaseSX is built on fiber-optic cable and uses inexpensive 850 nm transceivers; the transmission range is up to 300 m. It is compatible with the 10BaseF network and supports mode and speed negotiation (10/100).
The following standards exist for 1,000 Mbps Gigabit Ethernet networks:
-
1000BaseCX. Active equipment is connected using short (up to 25 meters) shielded twisted-pair (STP) or twinaxial cable.
-
1000BaseT. Equipment is connected using 4-pair category 5 or higher twisted-pair cable over distances of up to 100 meters; RJ-45 connectors are used.
-
1000BaseSX. Equipment is connected using multimode fiber cable; communication range is from 200 to 500 meters, depending on the quality of the fiber.
-
1000BaseLX. Equipment is connected using a pair of single-mode fibers; communication range is up to 50 kilometers, depending on the transceivers’ characteristics.
The length limitations for each physical connection in a network were described above; however, to ensure network operability (i.e., reliable functioning of the collision resolution protocol), certain conditions must be met. The task of reducing the diameter of the collision domain is solved by using switches, while the collision restrictions on the length of each connection are overcome by moving to the full-duplex communications mode (in which collisions as such do not exist). The following requirements must be complied with in 10 Mbps Ethernet networks:
-
For coaxial networks, the 5-4-3 rule must be obeyed: No more than five segments may connect no more than four repeaters; stations (adapters) may be connected in no more than three segments.
-
For twisted-pair and fiber-optic networks, no more than four hubs can be between any pair of nodes.
-
For any type of network, the diameter of the collision domain—the greatest distance (electrical length of cables between two nodes)—must not exceed 5 kilometers.
-
The number of nodes within a collision domain must be no greater than 1,024 (and in reality, there should be no more than 30-50 of them).
The limitations are stricter for Fast Ethernet networks:
-
The diameter of the collision domain must not exceed 205 meters.
-
The number of class II repeaters within the collision domain must be no greater than two, those of class 1 no greater than one.
Only switches are used in Gigabit Ethernet, so limitations apply only to the length of connections.
Various connectors (ST, SC, MT-RJ, and others) are used for optical connections. Coaxial connectors for thick and thin cables are different: N and BNC series, respectively. Each coaxial segment must end with 50-ohm terminators and be grounded at one point. The computer’s circuit ground is not galvanically coupled with the shield of the coaxial connector, so care must be taken not to accidentally touch the BNC connector to the computer case’s metal parts. Coaxial networks must be properly grounded; disregarding these rules is fraught with the danger of adapter burn-up.
For twisted-pair cables, RJ-45 connectors are used (Fig. 9.1); the functions of the net adapter connector contacts (port MDI) are listed in Table 9.1. Ports of the 10BaseT, 100BaseTX and 100BaseT4 hubs are of the MDIX type; their TX and RX signals are switched over. To connect terminal nodes to active equipment ports (MDI-MDIX connection ports, Fig. 9.2, a), straight cable is used (Fig. 9.3, a), while for direct connection of adapters (MDI-MID, Fig. 9.2, b) or two communications devices (MDIX-MDIX), a crossover, cable is used (Fig. 9.3, b). As a rule, one of the ports in communications devices is equipped with either an MDI-MDIX switch or an additional connector.
Local networks are usually built using stationary cables fitted with sockets at the ends, and patching cables. The contacts of the stationary cable sockets are connected directly. Patching cables can be straight and crossover. Only 100BaseT4 and 1000BaseTX networks need to have contacts 4, 5, 7, and 8 connected, but these connections do not interfere with 10BaseT and 100BaseTX networks, so all these networks can share the same cabling.
Only straight cables are used in Gigabit Ethernet 1000BaseTX. Universal ports are compatible with Fast Ethernet (i.e., they support auto negotiation). If two Gigabit Ethernet ports are connected using a crossover cable, they will negotiate to a 100BaseTX mode connection.
The twisted-pair Ethernet implementations mentioned above employ the mode autonegotiation protocol, which is executed every time when establishing a link after physical connection was made or after port initialization. The protocol is based on exchanging service impulses, which differ from the transmitted information. This protocol allows the ports that are being connected to choose the most effective mode available to both ports. The mode priorities, in descending order, are as follows: 1000BaseT, 100BaseTX full duplex, 100BaseT4, 100BaseTX half duplex, 10BaseT full duplex, and 10BaseT half duplex. The autonegotiation protocol may be disabled (or not implemented); in this case, the operating mode is forced when configuring the port; Ports’ ability to switch modes is reflected in their names (e.g., Fast Ethernet 10/100); the 100BaseT4 mode is not frequently supported.
An autonegotiation protocol for optical versions has also been developed, but its capabilities are limited by the possibility of mismatching the wavelengths employed in different modes. In fact, autonegotiation is not really needed here, as there are much fewer optical connections, they are designed carefully, and they are not reconfigured very often.
The Ethernet standard (10 Mbps) defines the Attachment Unit Interface (AUI) that is used to connect a transceiver for any transmission medium to the adapter. The transceiver contains the terminal circuits of the transmitter and receiver and the collision detector. The functions of the AUI contacts are shown in Table 9.2; the DB-15 connector is used (plug on the adapter, socket on the transceiver).
The Fast Ethernet standard contains the Media Independent Interface (MII). Using this interface, data for the receiver and transmitter are sent uncoded over 4-bit parallel buses (at 2.5 or 25 MHz clock speed for 10 or 100 Mbps, respectively) or serially encoded (for 10 Mbps). The interface has synchronization, receiver and transmitter control, and line status (carrier presence, collision) signals, as well as the System Management Interface (SMI) serial control interface (see Section 11.2), which is used to communicate with the transceiver’s control registers. A 40-contact, 2-row physical connector for connecting plug-in modules also is defined, but it is practically not used in PCs.
9.2 Network Adapters
PCs are interfaced to a network using network adapters or Network Interface Cards (NIC). Adapters have transmitting and receiving sections that must be independent from each other if full duplex support is required. Having received a data block and the transmission destination address from the central processor, the transmitting section must obtain access to the transmission medium and form, and transmit the frame (add the preamble and the CRC code), repeating the transmission attempt if a collision has been detected. The adapter must inform the processor whether the transmission has been successful or has failed. The receiving section scans the headers of all the frames going through the line and pulls the frames addressed to this node out of the flow in the unique, broadcasting, or group mode. The adapter can be programmed into the promiscuous mode, in which it will receive all frames regardless of their destination addresses. Frames are received into a buffer and are checked for errors (frame length, correct CRC). The processor is informed when a correct frame has been received and the frame is transferred from the local buffer to the computer’s system memory. Error frames, as a rule, are ignored, although the adapter may maintain statistics on their frequency. In practice, there are adapters that do not detect errors in damaged frames. It is not easy to perform diagnostics of a network containing such an adapter.
Network adapters for PC are produced for the ISA, EISA, MCA, VLB, PCI, and PC Card buses. There are adapters that are connected to the PC’s standard LPT port: Their advantage is that they do not require system resources (ports, interrupts, etc.), and are easy to connect (without opening up the system block). But they also have shortcomings: They load the processor significantly, and their transmission rates are low (10 Mbps is the ceiling). Adapters for the USB also exist. Some motherboards have network adapters integrated into them.
The effective network data exchange speed depends greatly on the architecture of the network adapters and, all else being equal, on the speed at which data are transferred between the adapter’s local memory and the computer’s system memory, as well as on whether the parallel execution of several operations is available. DMA channels, programmed I/O, or bus mastering are employed as the delivery vehicles for data exchange between the adapter and the computer memory. The standard 8-bit ISA DMA channels can reach speeds of up to 2 MBps; 16-bit channels can reach speeds of up to 4 MBps. A maximum length frame is sent over these channels in approximately 1.3 and 2.6 ms, respectively. Compared with the 12 ms needed to send a frame in the Ethernet environment, this is relatively little time.
However, for the Fast Ethernet environment, where the same frame is sent in 1.2 ms in the media, this transportation is too slow. The PIO mode provides higher exchange speed with the adapter’s buffer, but it completely loads the processor during the transmission. Smart ISA/EISA adapters with bus mastering are more efficient and provide relatively high speeds (up to 8 MBps for 16-bit ISA and up to 33 MBps for EISA). However, ISA bus throughput is not sufficient for speeds of 100 Mbps. Currently, PCI bus adapters are widely used; their throughput reaches up to 132 MBps for 32-bit interface at 33 MHz. However, even this is barely enough for Gigabit Ethernet. The PCI, though, has some reserves, namely going over to 66 MHz and 64-bit width; not all motherboards have these capabilities, however. Especially effective are active adapters for PCI bus that have their own processors: They execute the transfer at the PCI’s full speed, putting practically no load on the processor.
This property is especially important for servers. Parallel operation execution means full-duplex support: complete independence of the receiving and transmitting sections, as well as being able to simultaneously perform receiving a frame into the buffer, transmitting another frame, and exchanging data between the adapter’s buffer memory and the computer’s main memory. The efficiency of an ISA/EISA adapter is also affected by the size of the buffer memory: When the bus throughput is limited (comparing to the line speed), up to 64 KB of buffer memory is used, which is divided between the transmitter and receiver either evenly or with the transmitter getting the larger share. PCI bus adapters with efficient deliver methods (smart bus mastering) do not need buffers for speeds below 100 Mbps: 2 KB for both the receiver and transmitter is enough. However, Gigabit Ethernet adapters are again equipped with a substantial size buffer (256 KB).
Adapters can be divided into two categories: adapters for workstations and adapters for servers. The division is relative: Workstation adapters may have server features. It is not worth trying to use regular adapters in servers: They may become the network’s bottleneck and devour the processor’s resources.
Workstation adapters are simpler and cheaper: They do not require speeds over 100 Mbps (at least for the time being), full duplex is seldom encountered in them, and they do not make especially severe demands on the use of the processor time. Adapters that are software compatible with the NE2000 cards—16-bit unintelligent ISA bus cards from Novell-Eagle—have been used for many years. A series of PCI bus cards also are compatible with this model. The most handy and popular are the two-speed 10/100 Mbps cards: An optimal place for their connection can be easily found in modern networks. The cards usually have a socket for installing Boot ROM; modern cards also provide remote LAN wake-up and support the DMI and ACPI interfaces. For this, they have a special 3-wire interface: a cable with a connector that is connected to the motherboard. Over this cable, the ATX motherboard supplies stand-by power (+5 VSB) even when the main power is not supplied to the motherboard and other devices. This line feeds power to the stand-by receiver circuit, which is tuned up to receive a special format frame—Magic Packet—over the network interface. When the network adapter receives this frame, it sends the wake-up PME signal to the motherboard over this cable, and the motherboard issues a signal to turn the power supply on; the computer powers up and the operating system with the DMI support loads. Now, the network administrator can perform the planned work and when the work is finished, the computer’s operating system will turn the computer off.
Server adapters must have a high-efficiency bus. Currently, the PCI 32/64-bit bus at 33/66 MHz is used; earlier, the EISA or MCA bus was used. When engaged in data exchange, CPU loading is crucial to the server cards; therefore, they are equipped with smart capabilities to support bus mastering and parallel work of the adapter’s components. Full-duplex adapters must support flow control under the 802.3x specification. A series of advanced models support traffic prioritization under the 802.1p specification, multiaddress traffic filtration, tagged VLAN, Fast IP, and hardware IP packet checksum calculation. Tagged VLAN support allows the server connected to the switch by one line to be a member of several VLANs defined for the entire local network. In order to increase their reliability, server cards can support Resilient Links, in which a spare adapter and a communication line replace the main channel if it fails. The spare adapter is assigned the same MAC address as the main one, so that the network does not notice the switch. Resilient Links must be supported by software drivers, so that the switch will be also executed transparently for server applications. Self-Healing Drivers can automatically reset and reinitialize the adapter if an operational error is detected (hanging). As a rule, servers do not need remote boot and LAN wake-up. Adapters (together with drivers) can support the Simple Network Management Protocol (SNMP) and Remote MONitoring (RMON). Multiple port adapters (as a rule, with four ports) are also produced for servers; they are configured both for separate independent use, and for backing each other up. This type of card allows PCI slots to be saved (the slot economizing problem was not acute for the EISA bus). Today, typical server card speed is 100 Mbps; Gigabit Ethernet capabilities may be only required for the most powerful servers.
An adapter can have one or several interface connectors:
-
BNC—a coaxial connector for connecting to a segment of the 10Base2 network
-
AUI—a DB-15 socket for connecting external 10Base5, 10Base2, 10BaseT, 10BaseF) and FOIRL adapters (transceivers)
-
RJ-45—an 8-contact socket for connecting 10BaseT, 100BaseTX, 100BaseT, 100BaseT4, 1000BaseT concentrators (hubs or switches) using twisted-pair cable
-
SC (a pair), sometimes ST—optical connectors for connecting 100BaseFX, 1000BaseSX, 1000BaseLX concentrators
For 10 Mb adapters, combinations of BNC+AUI or RJ-45+AUI connectors arc typical; the most universal, known as “Combos”, have the entire 10-Mb set of BNC/AUI/RJ45 connectors. First model cards for 10 and 100 Mbps had a pair of RJ-45 sockets, one for each speed. Even if adapter has different connectors (a BNC and a RJ-45, for example), they are not used simultaneously: The adapter cannot work as a repeater. Most modern adapters have one RJ-45 socket and support standards: 10BaseT, 100BaseTX, and more powerful 1000BaseT. Multiport server cards have several independent adapters, each having its own interface.
Interface cards use the following computer system resources:
-
I/O space—as a rule, four to 32 adjacent addresses from the area addressed by a 10-bit (for ISA bus) or 16-bit (EISA, PCI buses) address. It is used to access the adapter’s registers during initialization, current operation control, status querying, and data transmission.
-
Interrupt request—one line (IRQ 3, 5, 7, 9, 10, 11, 12, or 15) triggered by receiving a frame addressed to a particular node, and also when a frame has been transmitted (successfully or unsuccessfully, depending on collisions). Network adapters cannot work without interrupts, and with incorrectly assigned interrupts adapters hang when accessing the network.
-
DMA channel—used in some ISA/EISA cards; only 16-bit channels 5-7 can be used for ISA bus mastering.
-
Adapter shared RAM—buffer for transmitted and received frames—for ISA cards, usually mapped onto the upper memory area in the A0000h-FFFFFh range. PCI cards can be located in any area of the address space not occupied by the computer main memory. Not all cards use shared memory.
-
Adapter ROM—an address area for ROM BIOS expansion modules—occupies 4/8/16/32 KB in the C0000-DFFFFh range. It is used for Boot ROM and antivirus protection.
The adapter configuration consists of allocating PC system resources and selecting the transmission medium. Depending on the type of card, configuration can be done in different ways:
-
Using jumpers that are installed on the card. This method is employed on adapters of the first generation ISA bus. All resources, as well as the transmission medium, are selected by its own group of jumpers.
-
Using nonvolatile configuration memory (NVRAM, EEPROM) installed on ISA bus cards. This type of cards are jumperless, but still are configured manually. A small utility specific to the concrete card model (family) is needed to configure these cards.
-
Using nonvolatile configuration memory installed on EISA or MCA bus cards and the system device configuration memory (ESCD for EISA). Resources are configured with the help of a special ESIA Configuration Utility (ECU).
-
Automatically using Plug and Play for ISA and PCI buses. Resources are allocated during the operating system loading stage.
The transmission media and speed can be selected manually (via software) or automatically. In some cases, it is sensible to assign resources explicitly, in order to avoid the surprises of the excessive automation. These surprises, as a rule, stem from insufficient coordination between adapters and their drivers. In such situations, the driver cannot correctly recognize the mode that has been set, and make use of its advantageous features. The automatic configuration inserts additional delays into the initialization process during the loading of the operating system, and may not work properly with some network equipment. Some cards with the 10Base2 interface (BNC connector) can be programmed into the extended mode, which increases the communication range to 305 meters from the regular 185 meters. If long segments are needed, this mode can be resorted to, but on the condition that it is available and enabled on all cards of the particular segment. Configuration utilities can offer other adjustments: client and server optimization, modem support, and some others. Their settings must conform to concrete applications.