dacs.doc electric

 

Networking Fun(damentals)
Part 2 - Network Interface Cards

by Bruce Preston

 

Last time I described CAT-5 cables, hubs, switches and routers. As promised, this segment will talk about Network Interface cards, and how to configure and test your client machine’s connection.

The network interface card (or NIC) and its associated software (drivers and protocol stack) perform several functions:

  1. It takes digital data in your computer and converts it to an electronic signal suitable for placing on the cable or the reverse process.
  2. It wraps the data in a ‘packet’ which includes addressing and error correction information.

NICs come in several physical forms. With the greatly reduced cost of chipsets, they are often integral to the motherboards of desktop machines or notebooks. For older desktop machines they may be an adapter board (PCI card). Notebook machines often make use of PCMCIA (or PCcard) adapters. Wireless NICs are also available but will be discussed in a separate column.

Protocols

We live with many protocols and don’t think about them. For example, when you answer the telephone, you typically say “Hello.”. A business will usually identify itself. It is generally considered good form for the caller to identify him/herself as well. In the same way, there are protocols or conventions established for computer-to-computer communications. Computer communications have several transport protocols, the most common of which is Ethernet. Other, less-often seen protocols are Local Talk, Token Ring, FDDI, ATM, and ARCnet. Ethernet supports multiple topologies and media – the way to physically interconnect the devices. For wired media, the Cat-5 cable discussed in part 1 - 10base-T and 100base-T is the most commonly seen, but occasionally you might see an installation that makes use of coaxial cable. Ethernet makes use of an access method called CSMA/CD (Carrier Sense Multiple Access/Collision Detection). With this access method, each network card listens for packets addressed to it, and if it needs to send, waits for a quiet interval before it transmits. However, there will always be situations when two devices try to begin transmission at the same instant. In this case, they detect the collision, and each wait a small, random delay before trying to transmit again. Since they delay different amounts one or the other will get a clear transmission and the other will wait. This is all handled by the processor on the NIC.

The data that is moved across an Ethernet connection also follows a protocol – the most common of which is TCP/IP (Transmission Control Protocol / Internet Protocol ) – the standard protocol of the internet. TCP/IP is primarily a point-to-point protocol – geared for connecting two specific devices, rather than broadcasting from one device to many. It works with ‘packets’ – strings of information, each of which have identifying information in headers containing addressing information and data content identifiers as well as trailers which contain error detection information.

TCP/IP requires that each device have an absolutely unique identifying address, known as an Internet Protocol (or IP) address. Currently an IP address is 32 bits long (combination of 1’s and 0’s) which is much easier to describe by breaking into 4 sets of 8 bits, which in turn can be represented by numbers in the range of 0 to 255. These 4 sets of numbers are traditionally written in what is known as dotted decimal. Thus the 32-bit IP address associated with the DACS web site is written as 66.181.192.63

Those 32 bits of the address are not just randomly selected. There is a structure much like that of a phone number. If you look at a phone number such as (555) 321-9876 you recognize the digits 555 as an area code. You might even recognize 321 as an exchange, and 9876 as a subscriber within the exchange. With an IP address, the left-most bits of the address identify a network, and the right-most bits identify a computer (“host”) within that network. Unlike the phone number structure, however, the number of bits used to define the network identifier and the number of bits used to define the host identifier varies. This allows for a few networks to have a very large number of hosts, and a large number of networks have a relatively small number of hosts.

When an IP address is assigned to a host, such as 66.181.192.163, it is necessary to also provide a “subnet mask”. A typical subnet mask is 255.255.255.0. If you convert the decimal number 255 to bits, it would be 8 bits of 1’s. So 255.255.255.0 is 24 consecutive 1 bits, followed by 8 consecutive 0’s.

When a computer puts a packet on the network, the TCP/IP packet has both the IP address of the sender and the receiver. Every other network card on the network segment typically ‘sees’ the packet (remember, they are listening for packets addressed to them, as well as for a quiet interval to see if they may transmit). When a card sees a packet, it examines the address packet to see if the packet is addressed to it. If it isn’t, it ignores it. If it is, it accepts the packet and acknowledges it.

How does a packet destined for a distant host get there? The sending computer can determine that an address is ‘local’ or ‘remote’ by comparing its own address and the target address for the length of the subnet mask. If they match, it is local and it puts the packet on the local network cable where it will be picked up by the local device. However if it isn’t local, it wraps the packet in another packet that it addresses to a ‘gateway’ device and hands the packet to the gateway with the implied request that it be delivered. If you have a broadband connection, your gateway is your Cable or DSL modem, or your Cable/DSL Router. The gateway accepts the data packet from the sender and using its tables forwards the data packet towards the destination. Note that the router need not know exactly where the destination is, it just needs a table that tells it in which direction to send it. For a home network with a broadband connection (or even a dial-up connection) the router table is very simple – send it to the device at the other end of the connection. If that device is your ISP, they have a router sitting there with a much more complex routing table.

Configuring Your
Network Adapter

There are two ways to configure your network card. The original method required (and still does) that you manually enter an IP address and subnet mask to be used by your network card. This is called “static IP addressing” – the number is entered and it stays the same. As it happens, it turns out that there are a lot more computers and other devices than there are available IP addresses, and most of the time they aren’t in use. When most people accessed the internet via dial-up connections, it would not have made sense to assign an IP address to each device that might connect to the internet, so a mechanism called DHCP was developed. DHCP provides an IP address upon demand which is used for the duration of the connection, and then released to be used by another. So the other option for configuring a network card is DHCP – to ‘obtain an IP address automatically’. Of course, this implies that there is a DHCP server out there waiting for a request for an IP address lease. When you establish your account, your provider will tell you whether you have a static IP address (and tell you your subnet mask) or to use dynamic IP assignment.

Within Windows, you set the IP address different ways depending upon which release of Windows you are using. For early Windows (95, 98, etc. “old Windows”) you right-click Network Neighborhood and select the Properties page. On that page will be a list of networking components, such as Clients, Services, Adapters and Protocols. One of your protocols (often the only protocol) will be TCP/IP – if you select it and press the associated Properties button you will get to a page where you may set the IP address mechanism (static or dynamic) and if static, set the IP address, subnet and gateway.

For newer versions of Windows (2000, XP – “new Windows”) it can vary depending upon your ‘theme’ – but you are usually safe by starting in Control Panel and then opening Network Connections. You will see one or more connections – the one you want is probably either a Dial-up or Local Area Connection. Right click and select Properties and proceed as above.

Name Resolution

Quick – what’s the IP address for the DACS web site? You read it just a few minutes ago, but you probably don’t remember it, do you? We much prefer working with names rather than numbers. There are servers on the internet whose sole purpose is to convert a request for a named entity, such as www.dacs.org to an IP address. These are called DNS (Domain Name Server) machines. When you sign up with an ISP, in addition to telling you whether you have a static or dynamic IP address, they will provide you with one or more IP addresses for DNS. These numbers are entered into the property page(s) in similar fashion to specifying your IP address.

Checking Things

There are several utilities available for checking that your settings are correctly established. Again, how you get to them varies depending upon your Windows release.

For “old Windows” there is a GUI program named WINIPCFG. The easiest way to get to it is to click START then RUN, then type WINIPCFG and click OK. It will show you your IP address (note: there is a drop down field, it may point to a PPP adapter which is used for dial-up networking. If you are looking for your LAN NIC, adjust the drop down field to point to your network adapter.) It will show your IP address, subnet mask, gateway and (via another button) your DNS settings.
For “new Windows” click START / RUN / type CMD and press Enter. In the command window type IPCONFIG /ALL and you will get the same information as above.

Options on these programs may be used to release or renew a dynamically assigned IP address.

Once you have confirmed that you have an IP address, the next thing to check is to see if you have a connection. This is done with the PING utility. PING sends out a very small probe to a remote site and asks that the probe be ‘echoed’ back. PING is accessed only from a command line prompt. To get to a command prompt:
Old Windows: START then RUN then COMMAND then OK

New Windows: START then RUN then CMD then OK

Once you have a command prompt, type PING followed by the IP address that you want. You might start by pinging your gateway.
You should get responses immediately. If you do, it is very likely that your computer’s network settings are correct. Next ping some site just beyond your gateway, such as a DNS server. Again, you should get a response immediately. HOWEVER, be aware that many sites do not respond to pings, so you may have to try several addresses. The good news is that in the next step we will use a method that doesn’t require that you remember an IP address.

Test your DNS

Open a command window as above and then type

ping host.domain

Where host.domain is some system that will respond to a ping request. For example, while writing this I tested ping yahoo.com and got responses from a site at IP address 66.94.234.13. Where did that come from? Well, ping made a request to my DNS for a name resolution, and my DNS returned the address of yahoo.com back to ping, which then converted the request to be ping 66.94.234.13 for me. So this test not only tested the network connection, but also confirmed that my DNS is working.

If you got this far you are in excellent shape – all of your low level networking components are working properly and you have a foundation upon which you can run browsers, ftp, e-mail, etc.

Let’s put one more utility in our toolbox. Open a command window as above, and then type

TRACERT host.domain

TRACERT (Trace Route) is a utility which displays to you the various legs of the journey (hops) between you and the remote site. For example, when writing this I did a tracert to yahoo.com and got the identifiers of the 16 locations that I passed through to get to Yahoo! With practice you can recognize carriers and locations – for example from here in western Connecticut my path went to Boston first, then to New York, and then to San Jose. As an aside, nodes are often given names that match airport abbreviations – JFK, EWR for Newark, ORD for Chicago, LAX for Los Angeles, etc. In addition to the routing, you will see how long it took for the message to get to a particular node (in milliseconds.) If you see a high number in the milliseconds column then you have identified a network bottleneck.

Next time: More about the functions of your Cable/DSL Router such as NAT, Firewall, Virtual Server, etc.


Bruce Preston is president of West Mountain Systems, a consultancy in Ridgefield, CT specializing in database applications. A DACS director, Bruce also leads the Access SIG. Members may send tech queries to Bruce at askdacs@dacs.org.

BackHomeNext