Configuring a TCP/IP Network— the Software Side Part 1

TCP/IP is software, and just like any software, it has to be installed. This topic describes the steps needed to get TCP/IP up and running. If you’re lucky, you might have no steps. Yet. After TCP/IP is installed — that’s the time you have to get to work and configure your system. Read on to see what to do, and to examine the contents of some network files that work for you behind the scenes.

If you’re using an operating system or TCP/IP product that’s different from the ones that our examples show, your files may vary slightly from what you see in the figures in this topic. Don’t worry. The steps you follow to set up your system are the same, regardless of how a window or command line may look. The files may be in a slightly different location, but the general content and the purpose of those files are the same, regardless of what folder or directory they’re stored in. The principle of RTFM—Read the Fishy Manual that came with your TCP/IP product — always applies.

Installing TCP/IP? Probably Not

First of all, do you need to install TCP/IP? Most computers come from the factory with basic TCP/IP already installed. So your first step is to check whether TCP/IP is installed; if it is, be sure you find out what version of IP (IPv4 or IPv6) is on your computer (more about that in a minute).

Detecting whether TCP/IP is installed

There are lots of ways to find out whether TCP/IP is installed on your computer, but here is the easiest way (in your authors’ opinion anyway).If not, take a look, because the existence of those commands tells you whether TCP/ IP is already installed. If you can’t find those commands, we’re so sorry — because that means you don’t have TCP/IP, and you need to check out the section "Installing TCP/IP from Scratch," later in this topic. If you do have those commands, Whoopee!; TCP/IP is already installed . . . "piece of cake"— TCP/IP layer cake that is.


Use the ipconfig command on any flavor of Windows. Use the ifconfig command on Linux, Unix, and Mac OS X. Figure 6-1 shows the output of the Mac OS X command ifconfig -a (equivalent to ipconfig/ all in Windows).

This Mac runs a dual protocol stack with both versions of IP.

Figure 6-1:

This Mac runs a dual protocol stack with both versions of IP.

Determining whether it’s IPv4, IPv6, or both

If TCP/IP is already installed (and it usually is), you need to discover which version of IP is running: IPv4 or the newer IPv6. It allows for billions more IP addresses to service all the computers, smart phones, video games, MP3 players, and all sorts of devices that have made computing so pervasive. To figure out which version of IP you have, look at the IP address in the ipconfig or ifconfig output. If the address is extra long (128 bits if you do the math), you have IPv6. If the address looks "normal" — that is, 4 sets of numbers in dotted decimal notation (for example, 192.168.5.1) — then you’re running IPv4.

Savoring TCP/IP right out of the box

Although almost all computers come with TCP/IP software, differences between operating systems exist. For example, your new computer might be supplied with IPv4 or IPv6 or both. This section lists several factoids about Mac, Windows, Linux, and Unix:

✓ Mac OS X:

• All Mac OS X systems have TCP/IP preinstalled.

• All Mac OS X systems have both versions of IP installed (IPv4 and IPv6) and active.

✓ Windows Vista, Windows 7, and Microsoft Windows Server 2008:

• All Windows Vista, Windows 7, and Windows Server 2008 systems have TCP/IP preinstalled.

• All Windows Vista, Windows 7, and Windows Server 2008 systems have a dual stack of both IPv4 and IPv6 preinstalled (both versions of IP, just like Mac OS X).

• You can’t uninstall IPv6 in Windows Vista, Windows 7, and Windows Server 2008, but you can disable it if you want to use IPv4 only.

Figure 6-2 shows an example from Windows Server 2008. In the Network and Sharing Center, open the Network Connections folder, select the properties of an adapter, select the Configuration tab, and look for the IPv6 information.

You can examine the IPv6 protocol from the Windows Server 2008 Network Connections folder.

Figure 6-2:

You can examine the IPv6 protocol from the Windows Server 2008 Network Connections folder.

✓ Linux and Unix:

• Most Linux and Unix distributions are IPv6 ready — all the IPv6 software is there, but you may or may not have to set up IPv6, depending on the distribution you’re using.

• Recent Linux and Unix distributions allow you to run IPv4 and IPv6 at the same time.

• The IPv6 module may or may not be automatically loaded at startup.

• If the IPv6 module is not automatically loaded, you can load it manually.

Six Steps to a Complete TCP/IP Configuration

If your computer comes with TCP/IP already installed, it doesn’t necessarily mean that the installation has all the settings you need. For example, if you’re the administrator for a large server, you probably need to assign a static address for your server and configure various services. If you’re setting up a small business network, you’ll probably want a DHCP server to lease addresses automatically to your clients. Even in a small home network, you need to decide on a couple of options. Plan ahead.

Follow the same steps in this software topic whether you’re working on a wired or wireless network. The software-side steps are the same. When you get to hardware and security, there are variations for wired versus wireless.

Follow these steps to configure TCP/IP:

1. Decide whether your computer is a client or a server.

Setting up a client is much simpler than setting up a server because you don’t need to configure server services — you’ll be getting those from the server.

2. Gather client information.

The installation procedure for your operating system usually asks you for the hostname. After you provide that vital bit of information, the installation program sets the domain name and IP address automatically. The bottom line is that if you’re configuring a TCP/IP client, it’s all been done for you automatically. Cheers.

3. Set up your NIC(s).

Installing the operating system usually takes care of this step too.

4. Decide on a static IP address or a DHCP leased address.

5. Choose how your host will translate names into addresses — either with a hosts file or with DNS (Domain Name Service).

6. Gather server (or multifunction router) information.

If your computer is a server or a router, you need to continue with optional configurations.

We discuss these steps in detail in the following sections.

Step 1: Determining whether your computer is a client or server or both

First of all, we don’t recommend setting up a host to be both a client and server. Just because something is possible doesn’t mean you should do it.

If you’re going to be a client, you’ll use services but not provide them. All you have to do is set up your NIC and your IP address. If you’re a DHCP client, you don’t even need to set up your IP address; the DHCP server leases you an address automatically.

If you’re setting up TCP/IP as a server, you need to know what service(s) to provide. Is your server going to be an HTTP server, FTP server, DHCP server, or what (the list goes on)?

Step 2: Gathering client information

Client information includes how the client will get its IP address and how a client will get other hosts’ addresses, either from a private list of hosts or from a DNS server.

Step 3: Setting up your NlC(s)

This step should already be done for you. But just in case it’s not, read on.

Your computer connects to a network through a NIC. (You already know this, right?) If you connect to more than one LAN, you need a NIC for each connection. In most cases, your computer recognizes your NIC when you install the operating system. If you add a NIC after installing the operating system, your computer (Windows, Mac, and most Linuxes and Unixes) recognizes the new NIC automatically.

The figures in this topic show Ethernet network adapters because all the NIC cards on our network, regardless of the operating system, are Ethernet adapters. While Ethernet is by far the most popular network architecture, don’t be surprised if you run into others (such as FDDI and token-ring). The handy-dandy command — okay, two versions of a command — to use when you want to see your NIC (and find out whether it’s Ethernet or another connection) is ipconfig or ifconfig.The ifconfig or ipconfig output varies depending on your operating system:

✓ On Microsoft Windows operating systems, the ipconfig output shows your NIC as

"Ethernet adapter Local Connection" for a wired network or "Ethernet adapter Wireless Network Connection".

✓ Mac OS X shows your Ethernet adapter(s) as "en0, en1" and so on for each NIC in your computer.

✓ Linux and Unix show your Ethernet adapter(s) as "eth0, ethl" continuing on for each NIC in your computer.

If you’re on a large network that uses FDDI, look for "fddiO, fddil", and so on.

If you’re a token-ring user, some of the names you see in the ifconfig output are "trO" for IBM AIX, "traO" for other Unix distributions.

Each Linux and Unix distribution seems to work a little differently when you add a NIC. Red Hat Linux, for example, has a program called Kudzu, which detects NICs. Then you configure the network settings for that new NIC. The procedure is similar with Ubuntu Linux. Usually Ubuntu recognizes the NIC and you configure the NIC settings by running SystemOAdminONetworking. Our advice is RTFM (Read the Funky Manual) to see how to add a NIC to your specific Linux or Unix distribution.

If you use more than one NIC, you need to set up protocols, services, and applications for each LAN.

To avoid confusion, it’s a good idea to rename each local area connection. Choosing descriptive names for each connection makes sense, such as ROOM1LAN and ROOM2LAN. Sometimes organizations have naming standards, and you have to name your local area connections something that is not meaningful like LAN0. Sorry.

Step 4: Deciding on a static IP address or a DHCP leased address

Usually small servers in small networks, such as a SOHO (small office home office), and all clients use DHCP addresses, which is the default in a TCP/IP setup. You don’t have to do anything to assign the IP addresses. The whole process is automatic. Hooray! If you’re configuring a larger server, of course, you have to fill in a static IP address for whatever interface you’re using. Also, sometimes you might have a special reason to assign a static IP address manually for a client or small server.

You can get your official IP address from your ISP. If you’re an ISP, you can get IP addresses from these Internet Registries:

✓ In America, from ARIN (American Registry for Internet Numbers) at www.arin.net/registration/index.html

✓ In Europe, from RIPE NCC (Reseaux IP Europeen) at www.ripe.net/rs/

✓ In Asia and Australia, from APNIC (Asia Pacific Registry) at www. apnic.net

Step 5: Choosing how your host will translate names into IP addresses

If you’re on a small private intranet, you might be fine with a simple hosts file.If you’re joining a large network, you need DNS to resolve names and addresses; without it, you’ll be constantly busy updating your hosts file. Be sure to get the IP address of the DNS server from your network administrator.If you decide to use DNS, you can still keep a local hosts file with name/ address translations for the sites you visit most often.

Step 6: Gathering server information

Configure the server software (such as e-mail, DHCP, NAT, FTP, Web, or DNS) that you provide.

Setting TCP/IP Client Properties

The operating system may vary, but the client configuration process is pretty much the same. Remember, you may not need to do anything. The sections and examples that follow show a few of the different steps and looks that you might encounter when you configure your client system.

"There’s more than one way to do it"— unknown Unix sage

There are as many ways to get to your Linux and Unix networking configuration windows as there are distributions of these operating systems. (Has anyone actually counted these?) Besides graphical interfaces, you can also use command-line interfaces to get started with your networking set up work. Here are just a few ways to get to a graphical Networks window:

✓ With Ubuntu Linux, the distribution we use for the Linux examples in this topic, choose SystemOAdministrationONetworking.

✓ RedHat Linux comes with the redhat-config-network utility, which provides both a graphical and a command-line interface.

✓ On Suse Linux, you can use the YAST or YAST2 utilities configure network.

✓ The Gnome graphical interface runs on most Linux systems and uses gnome-network-preferences.

✓ The KDE graphical interface also runs on most Linux and Unix systems. Select the Network Settings option in the KDE Control Center. Select the Network Interfaces tab to manage TCP/IP configuration.

Whenever you configure TCP/IP settings, be sure to log in to an account with Administrator privileges.

Keep in mind that if you want to change client properties after you configure TCP/IP, you do so in the same window where you set them. For example, if you want to change a DHCP address to a static IP address, open the window where you originally accepted DHCP, uncheck the DHCP option, and fill in the IP address you want the client to use.

Next post:

Previous post: