• Aucun résultat trouvé

Network Cards

Dans le document Setting Up LAMP: (Page 139-142)

The network card is the device, usually installed in a computer, that connects you to a network.

Network cards can have two types of connections: coaxial, which is similar to a cable TV wire, or unshielded twisted pair (UTP), which contains pairs of copper wires. Category 5 (CAT5) is the most common twisted pair and uses an RJ-45 connector on both ends. The coaxial is used for 10Base2 connections, whereas a CAT5 cable is used for 10/100/1000Base-T connections. Your network card is most likely installed internally on your computer in a Peripheral Component Interconnect slot (PCI), or in the case of older computers it might be plugged into an Industry Standard Architecture slot. Newer motherboards now come with network devices built in and might have one or two ports already available.

In addition to internal cards, there are external as well. Some of them might use a USB con-nection, and others might use FireWire or a different technology.

Regardless of the type of card, they all perform the same function of connecting you to one or more networks. You will also hear these cards referred to as NICs, or network interface cards.

The bottom line is, any computer that needs to connect to a network must have one of these cards unless it will be accessing a network only via model or serial connection.

4337Book.fm Page 117 Saturday, June 19, 2004 5:24 PM

NICs are available in different speeds. A 10Base-T connection is capable of transferring 10 megabits per second (Mbps). This is relatively low by today’s standards. Most cards available today and those that are built in to motherboards are 10/100Base-T. This means they can oper-ate on 10Base-T and 100Base-T networks. You can now find, however, 10/100/1000Base-T technology; if everything on your network is capable, you can hit speeds of up to 1 gigabit per second (Gbps). Not many networks have this implemented yet, and hardware that implements gigabit technology is still a little pricey. In the future, even cable modem and DSL access will be available in gigabit speeds. Limited systems are already being tested in limited communities.

Hubs

Hubs are passive network devices that share all packets transferred in the network with all other connected devices. Hubs come in different sizes and types for different applications:

Stand-alone hubs Stand-alone hubs are usually for networks with fewer than 12 devices.

These are the cheapest solutions and are usually found in home networks or small offices.

Stackable hubs Stackable hubs are almost identical to stand-alone hubs, except you can stack (or connect) them to expand the total number of allotted devices. When these hubs are connected, they act as one modular hub.

Modular hubs A modular hub is usually a specialized case that allows for multiple hub cards to be added as need be. This offers a slight performance increase over a stackable hub because each hub card is connected via a backplane-type application (similar to a mother-board) and allows higher transfer speeds. A modular hub system comes with a management option as well so that different cards can be linked together while remaining separate from other hubs that are linked together.

Hubs definitely have their advantages. You can find an eight-port hub for under $50, and there is no configuration necessary at all. Simply plug everything in and you are ready to go.

The problem with using hubs is, you have every device on your network sending traffic to everyone else all at once. If two machines try to send data at the same time, a collision will occur.

A collision results in both packets being dropped. This is when, from our earlier examples, TCP would take over and ask for the packets to be re-sent. Although this is not a problem when it occurs infrequently, collisions can cause larger networks to suffer from serious degradation of services and to fail to operate anywhere near optimal levels. If this is the case, switches and routers need to be considered.

Switches

A switch, unlike a hub, is an active network appliance. It separates each of the devices that are con-nected to it into separate collision domains, or nodes, in order to drastically reduce the number of collisions. Each packet when received is analyzed, and the destination is determined by the

119

Setting Up Hardware

MAC address. A switch also stops bad or misaligned packets from being transferred throughout the network. Because the packets are regenerated from the switch, it also allows for greater trav-eling length to its next hop within the network without using bridges. (We’ll discuss bridges in more detail later in this section.)

Switches are also capable of linking to each other in order to provide higher amounts of bandwidth to more important or higher-trafficked servers. When a network uses multiple switches linked together, it is often referred to as a collapsed backbone network.

It is also possible for some switches to run in full duplex mode. This will, if the client machines also have full duplex enabled, double the connection speed by allowing data to flow in both directions at maximum speed. This would bring a Fast Ethernet network (100Base-T) up to a combined 200Mbps.

Switches vary on ease of use depending on type and manufacturer. Almost all switches today have the capability to “learn” your network. After it is installed, the switch learns the location of each network device, depending on its connection and by building a table that it saves internally.

As packets come in, the switch uses this table to determine where to send the packet. While they are, for the most part, easy to set up, switches can require a significant amount of customization and configuration for more advanced networks.

A switch is generally three to five times the cost of a hub and has the same number of ports, which is one of the reasons it is not generally used in small networks. However, the main reason they are not used is because the packet processing time is greater than that of a hub. A hub does not take any time to analyze a packet before sending it on; it simply duplicates the packet on all connected ports. A switch reduces the number of collisions on a network but increases the amount of time each packet takes to be processed. The performance gain versus cost compar-ison does not match up, so if you have a small network, a hub is most likely your best solution.

Routers

A router works in a similar manner to a switch but defines separate networks logically instead of physically. It uses IP addresses instead of MAC addresses to determine what packets go where.

Because it uses IP addresses, a router falls into the Network layer rather than the Data-Link layer. Routers do not need to be a stand-alone network appliance either; they can be a computer set up with at least two network cards. Your Linux machine is capable of acting like a router.

Most routers also have the capability to use filtering. Filtering is, at its base level, a firewall action. Filtering allows packets of information, based on their IP and destination port, to be forwarded or dropped. This prevents unwanted or mischievous packets from entering one net-work from another. A router’s efficiency is measured by its latency, or lack thereof. The less time it takes to process a packet, the faster your network will be. You might sometimes hear the term PPS, which stands for packets per second.

4337Book.fm Page 119 Saturday, June 19, 2004 5:24 PM

NOTE There aren’t necessarily any advantages or disadvantages to a router. Simply stated, if you need one, you need one.

Dans le document Setting Up LAMP: (Page 139-142)