IP Network Design

This chapter describes the conventions for internet addresses, then shows a sample network design. It is recommended that you understand the concepts described in this section before proceeding with the installation.

The installation of NetcomRouter is quite straight forward, if you understand how TCP/IP works first. Reading this and How IP Works may save you a great deal of time spent reinstalling the software and configuring your network.

The issues discussed here may be new to you, even if you have installed TCP/IP in a LAN environment before. New concepts are involved when you install a second interface in a system (when you have more than one network) and when you need to connect to someone else's network. For example, it is commonly known that a machine has a name and an IP address. When the same machine has more than one interface (for example, Ethernet, X.25, and Frame Relay), this is incorrect. Each interface has a unique name and IP address.

TCP/IP implementations and TCP/IP addressing conventions are the result of experience gained in the design and operation of the Internet. If during your design, you ignore or contravene an Internet convention, your network may not work.

Wide area network links and combinations of computers are also often referred to as networks which have nothing to do with the type of network that a TCP/IP operational context employs. To avoid confusion, this manual will refer to "X.25 network" or "WAN" to distinguish from a TCP/IP network.


Host and Network Addresses and Masks

The discussion presented here is a quick overview of Internet addresses. For full information, you should refer to one of the following RFCs:

Although people normally use names to identify network hosts, the network utility and protocol software use an internet address (rather than a name) for host identification. An internet address is a 32-bit number which is used to uniquely identify each host attached to a network. An internet address is written as a sequence of four eight-bit decimal numbers, separated by decimals (hence the term "dotted decimal format"). The following are some sample TCP/IP network addresses:

TCP/IP implementations consider these addresses as a two-part value: a network number and a host number. The rest of this topic describes network and host numbers, and how they are formed and used.

Network Classes

A network, in the context of the discussion of internets, is a collection of systems that have the same network number. There are three classes of internet networks defined for TCP/IP internets as illustrated in Figure 1.

Figure 1: Network classes
netdes01

Or, said another way:

For

the network
portion is

The first byte
can be between

Example

Class A networks

first byte

0 and 127

3.2.5.3

Class B networks

first two bytes

128 and 191

128.7.2.1

Class C networks

first three bytes

192 and 255

195.3.2.1

Class A Networks
Class A networks use the high order byte of the internet address for the network number. The remaining 3 bytes of address information define the host number on the network.

Class A networks always have the high order bit of the network number 0, to distinguish them from other network classes. Thus, there can only be 127 class A networks, but each network can have up to 16,777,215 hosts.

Class B Networks
Class B networks use two bytes for the network number and two bytes for the host number. The two high order bits of a class B network number are "10" to distinguish them from other network classes. Thus, there are up to 16,383 networks of up to 65,535 hosts each.

Class C Networks
Class C networks use three bytes for the network number and one byte for the host number. The two high order bits of the network number are "11" to distinguish the address from other network classes. Thus, there can be up to 4,194,303 networks of up to 255 hosts each.

Network Number, Host Number, and Broadcast Address Conventions

By convention, there are actually two fewer internet addresses than the quantities given above. Addresses of all 1-bits (255) or all 0-bits (0) are reserved, so they are not normally available as host or network addresses.

Network Numbers
A network number is an internet address with the host number all 0-bits. For example, the following are all network numbers:

Host Numbers
Host numbers are the converse of network numbers; the high order portion of the address is all 0-bits. Here are some sample host numbers:

Host numbers are rarely used without their accompanying network number.

Broadcast Addresses
Normally, an internet address refers to a single host. The broadcast address refers to all hosts on a network, and is an address with the host portion of the address all 1-bits. Applied to the network numbers in the previous example, we have the following broadcast addresses for each network:

When the network number of the broadcast address is also all 1 (255.255.255.255), the packet applies only to the local network. A broadcast address with a specific network number (such as those in the list above) refers to the network identified, which does not need to be connected directly to the local network.


How Internet Addresses Are Used

Each time a host attempts to deliver a data packet, it examines the network portion of the destination address stored in the packet. When the network number in the packet is the same as one of the networks to which the host is connected, the host delivers the packet directly, because the destination host is on the same network. If the network numbers are different, the destination of the packet is on another network, and the packet must be routed, or sent to an intermediate host for forwarding to its final destination. Hosts that perform routing are usually called gateways. See Figure 2.

Figure 2: Network with gateways
netdes02

A non-gateway host on a network has only one network interface. If packets sent by the host are destined for hosts on another network, the system administrator configures the host to send the packets to a gateway host. In the diagram above, all the systems labeled hostn have only one network interface. Gateway hosts have connections to more than one network, like gateway1 and gateway2 in the diagram. Gateways send packets either directly to the destination host on another network, or to another gateway. The hop count is the number of times that a packet passes between two gateways while traversing the path from source to destination.

All gateway hosts store connectivity information in a routing table. A gateway uses the destination network number to look up routing information in its routing table each time it receives a packet which must be transferred to another network interface.

For example, suppose gateway1 receives a packet from host2 destined for host6. It examines its routing table to determine that gateway2 connects to the same network as host6, and therefore forwards the packet to gateway2.

The remainder of this chapter is devoted to describing the steps involved in internet design:


Identify Hosts and Networks

The easiest way to plan your network is with a diagram, such as the one shown in Figure 3. The diagram does not need to reflect all of the hosts on a given network, but it should at least show the relationship between the various networks, and those hosts which provide network interconnection. In Figure 3, names have been assigned to the systems in the network because names are more convenient than strings of numbers. At this point, there has been no address designation or network identification.

Figure 3: Sample of a network diagram
netdes03

In this example, there are 8 systems. Three of the systems are connected to a Packet Switching Data Network by X.25 links. There are two Local Area Networks, denoted by the horizontal lines at the top and bottom edges of the diagram.

In the context of this example, both Scrooge and Dewey are acting as gateways, as they provide both X.25 and Ethernet connections, while Goofy and all the other Ethernet-connected systems are workstations, as they do not provide any cross-network connectivity.


Assign IP Addresses

If you are not connecting with the public Internet, you can select any address numbers you like for your systems, within these limitations:

For users who will not be connecting to the public Internet, subnets are an added level of complexity which is not required. If you will not be connecting to the Internet, the simplest configuration mechanism is to assign a separate network address of appropriate class to each network you are configuring. In this example, you could assign a Class C network address to each network, as follows:

If you are connecting to the public Internet, you will not have a choice of network number. All network numbers on the Internet are assigned.

The following are the rules for choosing IP addresses. To understand why these rules apply, see How IP Works.

Subnet Addresses

The problem associated with having a single network address for your intranet is that it does not contain just one network. You have a collection of networks that you want to interconnect.

Organizations use subnet addresses to distinguish internal physical network structures, while still providing a single network address to the outside world.

Network Addresses

There are actually three networks involved in the sample intranet discussed in this chapter: two Ethernets and an X.25 network. As shown in Figure 4, these networks are:

Figure 4: Network using subnet addresses
netdes04

Excluding broadcast addresses, all the hosts connected to e_top will have an address on network 192.44.44.0. All the hosts connected to wan will have addresses on network 192.25.25.0. All the hosts connected to e_bottom will have addresses on network 192.33.33.0.

Host Addresses

Working from left to right for the Ethernet networks, and top to bottom for the X.25 network, the host numbers are assigned as shown in the following table.

Network name

Network address

Host name Host address
e_top 192.44.44.0 Donald
Daisy
Scrooge
Daffy
192.44.44.1
192.44.44.2
192.44.44.3
192:44.44.4
wan 192.25.25.0 Wan_Scrooge
Goofy
Wan_Dewey
192.25.25.1
192.25.25.2
192.25.25.3
e_bottom 192.33.33.0 Huey
Dewey
Louie
192.33.33.1
192.33.33.2
192.33.33.3

Note that two of the hosts are known by two names and addresses. These are the gateway systems. Two names have been assigned by concatenating their network name with the host name so that when building routing tables manually, data paths can be identified easily and uniquely by name. The two gateways and their names are:


Build Routing Tables

Having assigned addresses as described previously, the revised sample network diagram is shown in Figure 5.

Figure 5: Network with IP address assignments
netdes05

The problem now is how to ensure that data from individual hosts travels to the correct destination. Some form of routing configuration is required.

Not all TCP/IP packages that work with NetcomRouter include routed (the routing daemon), which can be used to automate routing table administration. The manual alternative to using routed is the route command, which modifies entries in the system's IP packet routing table each time it is invoked. This section describes how to use the route command to implement the simple three-network internet just designed. If your networks are relatively simple, it is probably sensible to use route in preference to routed, especially if X.25 links are involved. NetcomRouter does not establish calls over X.25 to send broadcast packets, which is what routed uses to keep its routing table up to date. (Sending all broadcasts between sites would result in very expensive packet charges.)

The route and xroute commands can use /etc/hosts to translate names to addresses, and vice-versa. If you will be using names instead of addresses, you should already have those names in the files, otherwise route/xroute complains about the names they cannot find.

Workstation Routing Tables

In the example, each system connected only to Ethernet needs one entry in its routing table, to identify where the gateway is. For example, on each Ethernet-only connected workstation, we only need to invoke route once:

 
route add default Scrooge 1 (for Donald, Daisy, and Daffy)
route add default Dewey 1 (for Huey and Louie)

The route command adds the special entry "default" to the routing table. This tells each host where to send packets which are addressed to hosts not reachable directly by the local Ethernet.

For Goofy, the problem is not quite so simple. There are two machines, Wan_Scrooge and Wan_Dewey, that it can reach directly. Both of these are gateways to other networks, e_top and e_bottom, where most of the systems on the intranet reside. We could invoke route once for each of the hosts that do not have an X.25 link, as follows:

 
route add Donald Wan_Scrooge 1
route add Daisy Wan_Scrooge 1
route add Daffy Wan_Scrooge 1
route add Huey Wan_Dewey 1
route add Louie Wan_Dewey 1

Alternately, you can use:

 
route add net 192.44.44.0 Wan_Scrooge 1
route add net 192.33.33.0 Wan_Dewey 1

Gateway Routing Tables

There are two approaches to configuring gateways manually. In this example, it does not matter which you choose, because there are only a few hosts and networks. However, NetcomRouter is as applicable to large intranets as to small ones such as that described here. The conceptually simplest approach is to store all the connectivity information for the intranet in each gateway. The problem with this approach is that it is difficult to maintain. Each time a change is made, all the gateways in the intranet have to be updated to reflect the new configuration.

A somewhat more complex approach is to arrange a hierarchy of gateways, where individual gateways know how to route to neighbour networks and/or networks they commonly connect to, while having a default entry to provide a mechanism for handling packets for which they do not have a direct routes.

Since Scrooge is directly connected to two of the three networks (and therefore has information in /etc/hosts for both e_top and wan), you can enter the following to completely describe the intranet to Scrooge:

   route add Huey Wan_Dewey 1
route add Louie Wan_Dewey 1

Alternately, you can enter:

   route add net 192.33.33.0 Wan_Dewey 1
   

Because it has only a few hosts, this example is trivial, and using /etc/hosts and routing on the basis of the location of each individual host does not require much effort. However, if you consider an intranet with 25 or 30 hosts on each network, routing on a network basis makes your job as an administrator much easier.


Revision 6.1.0 (February 2003)

Copyright © 1997-2003 The Software Group Limited. All Rights Reserved.
® Netcom is a registered trademark of The Software Group Limited.