Digital PDFs
Documents
Guest
Register
Log In
AA-ME97A-TE
May 1988
60 pages
Original
2.2MB
view
download
Document:
ULTRIX-32 Guide to Networking
Order Number:
AA-ME97A-TE
Revision:
000
Pages:
60
Original Filename:
OCR Text
ULTRIX-32 Guide to Networking Order No. M-ME97A-TE ULTRIX-32 Operating System, Version 3.0 Digital Equipment Corporation Copyright © 1987, 1988 Digital Equipment Corporation All Rights Reserved. The information in this document is subject to change without notice and should not be construed as a commitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no responsibility for any errors that may appear in this document. The software described in this document is furnished under a license and may be used or copied only in accordance with the terms of such license. No responsibility is assumed for the use or reliability of software on equipment that is not supplied by DIGITAL or its affiliated companies. The following are trademarks of Digital Equipment Corporation: DEC DECnet DEC US MASS BUS MicroVAX PDP Q-bus RT ULTRIX ULTRIX-11 ULTRIX-32 UNIBUS VAX VAXstation VMS VT UL TRIX Worksystem Software ~amaama UNIX is a registered trademark of AT&T in the USA and other countries. IBM is a registered trademark of International Business Machines Corporation. MICOM is a registered trademark of Micom System, Inc. This manual was written and produced by the ULTRIX Documentation Group in Nashua, New Hampshire. Contents About This Manual Audience ........ .. .......... .. .. ...... .. ... .. ... ... .. .............. .. .............. ....... .. ....... . ............. . vii Organization ....... .......................... ...... ..... ........... .. ........... .................. .............. vii Related Documents ........................................................................................ viii Conventions ..................................................................................................... viii 1 Overview of Local Area Networks 1.1 Local Area Networks .............................................................................. 1-1 1.1.1 Components and Uses ................................................................ 1.1.2 Internet Addresses ...................................................................... 1-1 1-2 1.1.2.1 The Common Internet Address Notation ............................. 1.1.2.2 The Alternate Internet Address Notation ............................ 1-3 1-4 1.1.3 Network Classes .......................................................................... 1-5 1.1.3.1 Determining a Network Class ................................................ 1-6 1.1.4 Internet Broadcast Addresses .................................................... 1.1.5 Routing Decisions ........................................................................ 1-7 1-8 1.1.5.1 A Simple Local Area Network Routing Exercise ................ 1-8 1.1.6 Internet Networks ....................................................................... 1-9 1.1.6.1 Setting Up a Gateway (Example) ........................................ 1-10 1.1.6.1.1 Edit the /etc/hosts File ........................................................ 1-12 1.1.6.1.2 Inform the System of the New Route .............................. 1-13 1.1.6.2 Updating the Internal Routing Tables .................................. 1-14 1.1.6.2.1 Edit the /etc/networks File .................................................. 1-15 1.1.6.2.2 Update the Routing Tables .................................................. 1-15 1.1.6.3 Using a Gateway ...................................................................... 1-16 1.2 Subnet Routing ....................................................................................... 1-16 1.2.1 Using Subnet Masks .................................................................. 1-17 1.2.1.1 Subnet Routing on a Class A Network (Example) ............ 1-19 1.2.1.2 Subnet Routing on a Class B Network (Example) ............ 1-20 1.2.1.3 Setting Up Subnetworks (Example) ..................................... 1-21 1.2.1.3.1 Edit the /etc/hosts File ........................................................ 1-22 1.2.1.3.2 Inform the System of the New Routes ............................ 1-23 1.3 Local Area Network Files ..................................................................... 1-24 1.3.1 The /etc/inetd.conf File ............................................................... 1.3.2 The /etc/protocols File ................................................................ 1.3.3 The /etc/services File .................................................................. 1.3.4 The /etc/networks File ................................................................ 1.3.5 The /etc/re and /etc/re.local Files .............................................. 1.3.6 The /etc/hosts File ...................................................................... 1.3. 7 The /etc/hosts.equiv File ............................................................. 1.3.8 The .rhosts File ........................................................................... 1.3.9 The /usr/hosts Directory ............................................................. 1.3.10 The /usr/spool/mqueue Directory ............................................. 1.3.11 The /usr/spool/rwho Directory .................................................. 1-25 1-25 1-26 1-26 1-26 1-27 1-28 1-28 1-29 1-29 1-30 1.4 Network Maintenance Commands ......................................................... 1-30 2 Setting Up a loca I Area Network 2.1 Adding Your System to an Existing Local Area Network 2-1 2.1.1 Prerequisite Information ............................................................. 2-2 2.1.1.1 Run the netsetup Command .................................................. 2.1.1.2 Reboot System to Effect Changes ........................................ 2-2 2-3 2.2 Setting Up a Local Area Network ....................................................... 2-3 2.2.1 Prerequisite Information ............................................................. 2-4 2.3 Setting Up an Internet Network with Gateways ............................... 2-4 2.3.1 Set Up a Local Area Network ................................................. 2.3.2 Establish a Host as a Gateway ................................................ 2-5 2.4 Setting Up a Local Area Network With Subnet Routing ................ 2-5 2.4.1 Prerequisite Information ............................................................. 2-6 2.5 Updating Your Local Area Network .................................................... 2-6 2-4 Index Figures 1-1: A Local Area Network ........................................................................ 1-2 1-2: Two Networks and Several Hosts ..................................................... 1-10 1-3: Two Networks Connected by a Gateway Host (alto) .................... 1-11 1-4: Interpreting a Class A Subnet Mask and Internet Address 1-20 1-5: Interpreting a Class B Subnet Mask and Internet Address 1-21 1-6: Subnetwork Configuration with Point-to-Point Links ...................... 1-22 Tables 1-1: Network Number Ranges 1-4 1-2: Internet Address Format 1-6 1-3: Binary and Decimal Ranges for the Three Network Classes ....... 1-6 1-4: Host oboe's /etc/hosts File - Simple Configuration ....................... 1-9 1-5: Host alto's /etc/hosts File - Internet Configuration ...................... 1-11 1-6: Host alto's Modified /etc/hosts File - Internet Configuration ...... 1-12 1-7: Host alto's Internal Routing Table - Internet Configuration ....... 1-14 1-8: Common Interface Names .................................................................. 1-14 1-9: Host flute's Updated /etc/hosts File ................................................. 1-23 1-10: Host flute's Updated Internal Routing Table ................................ 1-23 About This Manual The objective of this guide is to provide introductory, setup, and maintenance information for a Local Area Network (LAN) . This guide will also assist you in developing local area network management procedures. It presents guidelines from which you can develop specific procedures for your site. Audience This guide is meant for the person responsible for maintaining networks on an ULTRIX-32 operating system. This person is usually the system manager, but could be a network manager or the system manager who is also a user of a MicroVAX processor running the ULTRIX-32 operating system. This guide assumes that the reader is familiar with the ULTRIX32 system commands, the system configuration, the naming conventions and an editor, such as vi or ed. It also assumes the reader knows the names and addresses of the other systems on the network, if a local area network already exists. Organization This manual consists of two chapters and an index. The chapters are: Chapter 1: Introduction This chapter introduces the local area network. It provides the background information needed to, set up and run a local area network on your system. It describes basic local area network concepts. Chapter 2: Setting Up a Local Area Network This chapter describes how to use the netsetup command to automatically set up and update a local area network on your system. A description of the manual procedure is included for those who want to understand how local area networks operate and which files are affected by the network. Subnetwork routing is described and network management methods are provided. Related Documents You should have available the related hardware documentation for your system. You also should have the other documents in the ULTRIX-32 documentation set. Conventions The following conventions are used in this manual: special In text, each mention of a specific command, option, partition, pathname, directory, or file is presented in this type. command(x) In text, cross-references to the command documentation include the section number in the reference manual where the commands are documented. For example: See the cat(1) command. This indicates that you can find the material on the cat command in Section 1 of the reference pages. literal In syntax descriptions, this type indicates terms that are constant and must be typed just as they are presented. italics In syntax descriptions, this type indicates terms that are variable. [ ] In syntax descriptions, square brackets indicate terms that are optional. In syntax descriptions, a horizontal ellipsis indicates that the preceding item can be repeated one or more times. fun ct i on In function definitions, the function itself is shown in this type. The function arguments are shown in italics. UPPERCASE The ULTRIX- 32 system differentiates between lowercase and uppercase characters. Enter uppercase characters only where specifically indicated by an example or a syntax line. example In examples, computer output text is printed in this type. example In examples, user input is printed in this bold type. % This is the default user prompt in multiuser mode. # This is the default superuser prompt. >>> This is the console subsystem prompt. In examples, a vertical ellipsis indicates that not all of the lines of the example are shown. <KEYNAME > In examples, a word or abbreviation in angle brackets indicates that you must press the named key on the terminal keyboard. <CTRL/x> In examples, symbols like this indicate that you must hold down the CTRL key while you type the key that follows the slash. Use of this combination of keys may appear on your terminal screen as the letter preceded by the circumflex character. In some instances, it may not appear at all. Overview of Local Area Networks 1 This chapter provides an overview of local area networks and subnetworks (subnet routing) . It also discusses the files related to local area networks and provides information on how to maintain them. Each of the topics discussed builds upon the principles of the previous topics: • Overview of local area networks • Subnet routing • Local area network files • Network maintenance commands 1.1 Local Area Networks You should understand how local area networks operate before you install them on your system. The next seven sections discuss: • Components and uses • Internet addresses • Net work classes • Internet broadcast addresses • Routing decisions • Internet networks • Updating the internal routing tables 1.1.1 Components and Uses A local area network (LAN) is a group of two or more computer systems connected by a transmission medium such as an Ethernet cable. Each computer system is connected to the transmission medium by a hardware interface such as a DEUNA. The systems connected to the network are usually in the same building or cluster of buildings and are usually under the same system administration. A local area network is useful for transferring data and sharing resources across systems. Figure 1-1 illustrates a local area network with three hosts connected to an Ethernet wire. Host oboe Host alto Network 98 Host violin ZK-0035U-HC Figure 1-1: A Local Area Network Each local area network has a unique network number. Each computer system connected to the network is called a host and has a unique number identifying it. In Figure 1-1, the network number is 98. The combination of the network number and the host number is called the Internet address. The /etc/hosts file lists each of the hosts that your system recognizes, including each host's Internet address and name, and any alias host names. The /etc/networks file lists each of the networks that your system recognizes, including their names, network numbers, and any aliases. Data is transferred over a local area network in two ways: • A broadcast message • A direct message Daemons on each host, such as rwhod, broadcast data on a regular basis. Broadcast data is received by all the hosts on that network. In general, data that is sent directly to a host is not received by any other host on the network. 1.1.2 Internet Addresses For a host to communicate with a remote host, it must know the remote host's Internet address. This section describes the Internet address and its parts. Because the Internet address defines the network class, network classes are also described briefly in this section, and in detail in the following section. Each host has its own Internet address that uniquely identifies it from any other host on the network. The Internet address is made up of two parts, thP, TIP,twork n11mhPr ()1" ~rlrlrA\;l\;l ~nrl thA hnC!t n11mha... o .... rl l-.n ... n +,,.+ .... 1 .... ~ 32 bits (four bytes). The network part of the Internet address specifies the network class (Class A, Class B, or Class C) as well as the network address. There are two types of notation for an Internet address. The more common notation is four fields separated by periods. The alternate notation expresses the entire host part of the Internet address as one field. 1.1.2.1 The Common Internet Address Notation - A 32-bit Internet address is divided into two parts, the network and the host. The network part of the address must be the same for all hosts connected to the same network. No two networks can have the same network number if they are connected in any way, for example, by a cable or gateway. A gateway allows systems on one network to communicate with systems on another network. The host part of the address must be a number unique to that specific network. No two hosts on the same network can have the same host number. Note If you are planning to set up a local area network, it is wise to obtain a registered Internet address, even if you do not intend to connect your network to an outside one. Then, if you choose to connect to another network in the future, such as the Arpanet, you will not need to change all your Internet Protocol (IP) addresses. To obtain a registered IP address application, call the Network Information Center at 800-235-3155 or 415-859-3695. If you have access to the Arpanet, you can send mail to: nic@sri-nic.arpa The more common of the two methods for notating an Internet address uses four fields to describe the 32 bits in this format: fie ldl. fie ld2. fie ld3. fie ld4 Each field ranges from 0 to 255 decimal, for example, 98.0.2.65. For a Class A network, the first (left-most) of the four fields specifies the network number and class. The remaining three fields specify the host number and subnet address, if subnetworks are being used. The first field can be from 1 to 126, inclusive. Note By convention, 127 is reserved as the loopback address, which is defined in the /etc/networks and /etc/hosts files. For a Class B network, the first two fields specify the network number and class, and the remaining two fields specify the host number and subnet address, if subnetworks are being used. The first field can be from 128 to 191 and the second field can be from 1 to 254. For a Class C network, the first three fields specify the network number and class, and the remaining field specifies the host number. The first field can be from 192 to 223, the second field can be from 0 to 255, and the third field can be from 1 to 254. Table 1-1 shows the ranges of the network numbers for the three network classes. Table 1e1: Network Number Ranges Class Number A B C 1 through 126 128.1 through 191.254 192.0.1 through 223.255.254 An example of an Internet address for a host named oboe on a Class A network that does not have subnetworks is 98.65. The network part of the address is 98, and the host part of the address is 65. 1.1.2.2 The Alternate Internet Address Notation - The alternate Internet address notation conveys the same information as the common method. It has two parts: the network and the host. The network part is notated exactly as described in the previous section. However, the host part is always made up of only one field, which consists of a decimal value of the host fields described above. For example, the IP address of 72.0.5.4 on a Class A network can be expressed in alternate notation as 72.1284. The IP address of 128.45.2.8 on a Class B network can be expressed in alternate notation as 128.45.520. See inet( 3n) in the ULTRIX Reference Pages for a discussion of the Internet address. Note that jf you have an IP address where the middle two fields are zero on a Class A network, you can obtain the alternate notation by dropping the two middle fields. For example, the IP address of 48.0.0.5 can be expressed as 48.5. Another example of an Internet address of a host on a Class A network is 98.0.10.65. This Internet address could also be notated as 98.2625. The host part of the alternate notation ( 2625) is arrived at by the following calculation: (10 1.1.3 x 256) + 65 = 2625 Network Classes There are three types of networks: Class A, Class B, and Class C. The class type depends upon how the network is configured. To understand how the dnferent classes are determined, view the Internet address as a 32-bit number that defines the class type, network number, and host number. There are two fields in the 32-bit Internet address number: network host The network field provides two kinds of information: the network class and the network number. The high-order bits in the network number designate the network class of the Internet address, such as Class A. Class A networks are determined when the first high-order bit is 0, Class B networks are determined when the first two high-order bits are 10. Class C networks are determined when the first three high-order bits are 110. The bits in the network field designate the network number, such as 98, and the bits in the host field designate the number of the host, such as 65. Table 1-2 shows how the bits of an Internet address are divided for each of the three network classes. In Table 1-2, the first one, two, or three bits of the network field, depending upon the network class, are also interpreted as the class type. The total number of bits, regardless of the network class, is 32. In the table, n represents one bit in the network part of the address, and h represents one bit in the host part of the address. Note that the information in Table 1-2 applies whether you use the common or alternate notation. Table 1-2: Internet Address Format Class Class-Type/Network Host A B C O/nnnnnnn 10/nnnnnn nnnnnnnn 110/nnnnn nnnnnnnn nnnnnnnn hhhhhhhh hhhhhhhh hhhhhhhh hhhhhhhh hhhhhhhh hhhhhhhh For example, assume a host has an Internet address of 98.65. The ClassType and Network fields share the value 98, and the Host field uses all the bits in the value 65. The system translates the Internet address of 98.65 into binary notation, the result of which is 01100010.01000001. This binary number can be placed in the same format as shown in Table 1-2: A 01100010 01000001 Because the first number in the Class-Type/Network field is 0, the Internet address 98.65 is on a Class A network. Another example is network 130. In binary notation, decimal 130 is 10000010. Because the first two numerals are 10, network 130 is a Class B network (see Table 1-1). 1.1.3.1 Determining a Network Class - Table 1-3 shows the binary and decimal number ranges for the first byte of the network address for each of the three network classes. Table 1-3: Binary and Decimal Ranges for the Three Network Classes Class Binary Range Decimal Range A B 00000000-01111111 10000000-10111111 11000000-11011111 0-127 128-191 192-223 c From Table 1-3, you can see that any network number with the first byte in the decimal range 0 through 127 is a Class A network, and the network number consists of one byte. Any network number with the first byte in the range 128 through 191 is a Class B network, and the network number consists of two bytes. Any network number with the first byte in the range 192 through 223 is a Class C network, and the network number consists of three bytes. To determine which network class is best for a particular site, you need to know the network environment, including how many hosts will be on the network and how many networks there will be. For sites with few networks but numerous hosts, a Class A network is best suited, because it has 24 bits in the host part of its Internet address. The 24 bits allow for the most host-number combinations. There are seven usable bits in the network part of the Internet address, which leaves 126 usable network-number combinations. This takes into account the reserved network numbers of 0 and 127. The Class B network is between the Class A and Class C networks in terms of how the bits are divided for the Internet address. The Class B network is best when the number of networks is about equal to the number of hosts. The 32 bits of the Internet address are evenly divided between the network and host parts of the address. The Class C network is ideal for sites with numerous networks but few hosts. This is because the Class C network has 21 usable bits in the network part of its Internet address. The 21 bits allow up to 16,777,216 network-number combinations. There are eight bits in the host part of the Internet address, which leaves 254 possible host-number combinations. This takes into account some host numbers that are reserved for special purposes. For example, you cannot use all ones ( 1) or all zeros ( 0), because these numbers are reserved for the broadcast address. See Section 1.1.4 for further information about Internet broadcast addresses. Remember that each host number must be unique on its network. The Class C network is ideal for sites with numerous point-to-point links. A point-to-point link is one in which only two systems, one on each end of the link, can be connected at one time. An Ethernet, on the other hand, can be shared by numerous systems at any given time. 1.1.4 Internet Broadcast Addresses An Internet broadcast address is the address used to send messages to all the hosts on a network. For example, a program such as rwhod, broadcasts information such as the list of users on a particular host. Every other host on the network receives this information. The default format of the Internet broadcast address consists of the network number followed by all ones ( 1) . The network number includes the subset, if there is one. "All ones" means all of the bits in the host field are set to one. For example, a broadcast address for a host on a Class B network is: 129.39.255.255 Each host on a network must have the same Internet broadcast address. It may be necessary to alter the Internet broadcast address to all zeros ( 0) for compatibility reasons. Some operating systems, such as 4.2BSD and the ULTRIX-32 operating systems prior to Version 1.2, used all zeros for their broadcast address. The industry standard default is all ones, and the ULTRIX-32 operating system follows this standard. Problems can occur when systems using all zeros coexist on the same network as systems using all ones. If each system uses its default broadcast address (one system has all zeros, the other has all ones), then the two UNIX operating systems may not be able to interpret each other's broadcast messages. In this situation, you can use the ifconfig command to alter the Internet broadcast address. 1.1.5 Routing Decisions Data can be sent by numerous routes. When a request to send data is made, the system must make routing decisions to determine a path for the data. The routing decisions are based on the network numbers listed in the internal routing tables that are kept in the kernel. The internal routing tables contain information on how to reach each host and network the system knows about. The following section illustrates how a routing decision is made. 1.1.5.1 A Simple Local Area Network Routing Exercise - Assume the source host is oboe and the destination host is violin. The contents of oboe's routing table are the value 98 for the network address and deO for the interface to be used to reach network 98. Table 1-4 shows the contents of oboe's /etc/hosts file. Table 1-4: Host oboe's /etc/hosts File - Simple Configuration Host Address oboe violin alto 98.65 98.70 98.42 Assume a user on oboe wants to perform a remote login to violin using the rlogin command. The user types: 3 r I og in vi o I in Here are the steps oboe follows to make the connection: 1. 2. 3. 1.1.6 The source host (oboe) needs to make a routing decision. Host oboe learns from the /etc/hosts file that the final destination address is on network 98. Therefore, oboe checks its internal routing tables to find a route to network 98 and learns that network 98 is connected to the Ethernet interface deO. Because oboe is also connected to network 98, the data is put directly onto the network wire, by way of the Ethernet. Host violin picks up the data because it recognizes its own address in the data packet. Internet Networks This section discusses a more complex network scheme called an Internet network. An Internet network consists of two or more local area networks connected together by a host acting as a gateway. This section explains how to set up an Internet network. Figure 1-2 shows two networks and several hosts. Host alto Host oboe Network 98 Host violin Network 100 Host cello Host guitar ZK-0036U-HC Figure 1-2: Two Networks and Several Hosts An Internet network configuration operates in much the same manner as a local area network with one Ethernet wire, except that a gateway is needed. A gateway is a connection between two or more networks and allows data to be transferred from a host on one network to a host on a separate network. The following three sections illustrate how to set up a gateway and use a gateway to transfer data over an Internet network. 1.1.6.1 Setting Up a Gateway (Example) - Assume a user on alto wants to execute a command on the remote host guitar. The user enters: 3 rsh guitar Is -als The first step for alto is to look in its /etc/hosts file to obtain the Internet address for guitar. Table 1-5 shows alto's /etc/hosts file. Table 1-5: Host alto's /etc/hosts File - Internet Configuration Host Address oboe violin alto guitar cello 98.0.0.65 98.0.0.70 98.0.0.42 100.0.0.35 100.0.0.37 From the /etc/hosts file, alto learns that guitar is on network 100. The host alto's internal routing tables only have a route to network 98. Because there is no physical connection between network 98 and network 100, a second interface is needed on host alto connecting alto to network 100. Then alto would be a gateway. Figure 1-3 shows how the two networks would look after the gateway is established. Host oboe Network 98 Host alto Network 100 Host cello Host guitar ZK-0037U-HC Figure 1-3: Two Networks Connected by a Gateway Host (alto) Note Each hardware interface is connected to only one network. This example assumes there are two hardware interfaces installed on alto: one for network 98 and one for network 100. This example shows how to set up alto as a gateway. steps: There are two 1. Modify the /etc/hosts file to include the new name for the connection between alto and network 100. 2. Inform the system of the new route to network 100, using the ifconfig command. 1.1.6.1.1 Edit the /etc/hosts File - The /etc/hosts file needs to be updated to include an entry for the gateway's (alto) name and network number. Table 1-6 shows the modified /etc/hosts file. Table 1-6: Host alto's Modified /etc/hosts File - Internet Configuration Host Address oboe violin alto alto2 guitar cello 98.0.0.65 98.0.0.70 98.0.0.42 100.0.0.42 100.0.0.35 100.0.0.37 Note that the host part of the address for alto2 is the same as the host part for alto ( 42) . This is because alto2 and alto are the same host, but one entry is on network 98 and the other is on network 100. Note It is not necessary for the host numbers associated with the different interfaces to match, but it helps make the /etc/hosts file more understandable. Now the connection can now be made from alto to guitar in the same manner as outlined in Section 1.1.5.1: 1. Host alto learns from the /etc/hosts file that the final destination address is on network 100. Therefore, alto checks its internal routing tables to find a route to network 100. It learns that network 100 can be reached by the del interface. 2. Because alto knows it is connected to network 100, it puts the data directly onto the wire. 3. The destination host guitar picks up the data, because guitar recognizes its own address. 1.1.6.1.2 Inform the System of the New Route - In this example, alto is physically connected to network 100 as well as to network 98. To inform the system of this information, the routing tables need to be updated to include the route to network 100 by means of the new interface. Use the ifconfig command to inform the system of the network, using this format: ifconfig device-name name. The ifconfig command uses the name to determine the network number of the network to which the device is connected. If no broadcast address is specified with the ifconfig command, the default broadcast address of the network number followed by all ones ( 1) is assumed. See ifconfig( 8c) in the UL TRIX Reference Pages for further information about the ifconfig format. In this example, a new name needs to be created that has 100 as the network part of its Internet address. This host name will be added to the /etc/hosts file. The ifconfig command can then use the name to obtain the network number of the new connection to network 100. The following example shows how to execute the ifconfig command, using alto2 to establish a route to network 100: # /etc/ifconf ig del alto2 Table 1-7 shows alto's modified routing table. Table 1-7: Host alto's Internal Routing Table - Internet Configuration Network Interface 98 100 deO del Table 1-8 shows some of the common interface names. Table 1-8: Common Interface Names Name Controller de DEUNA or DELUA (Ethernet) DMR-11 or DMC-11 (point-to-point) Q-bus (point-to-point) DEQNA or DELQA (Ethernet) DES VA (Ethernet) dmc dmv qe se ni scs DEBNT or DEBNA (Ethernet) pseudo device scsnet 1.1.6.2 Updating the Internal Routing Tables - The ifconfig command updates the routing tables for the hosts where the interfaces reside. It does not update the internal routing tables for the other hosts on the networks that may need to know about the new gateway. Therefore, the system manager on each host should follow these steps to update the routing tables: 1. Edit the /etc/networks file. 2. Start the routed daemon or execute the route command to update the routing tables. 1.1.6.2.1 Edit the /etc/networks File - Some of the network utility commands, such as netstat, use the information contained in the /etc/networks file. Here is what oboe's /etc/networks file should contain after it is edited: # # Internet networks # loop ethernetl ethernet2 127 98 100 loopback doconet devonet The first field is the network name. For example, network 98 is also known as ethernet1. The second field is the network number, and the third field specifies network alias names. 1.1.6.2.2 Update the Routing Tables - The internal routing tables should be updated each time the system is brought to multiuser mode. To do this automatically, be sure the following entry is in the /etc/re. local file: if [ -f /etc/routed]; then /etc/routed & echo -n ' routed' >/dev/console f i This entry ensures that the tables are updated each time a host on the network broadcasts pertinent information. This entry is executed each time the system is brought to multiuser mode. If this entry does not exist in the /etc/re.local file, you should edit /etc/re.local and add it. The tables are updated automatically the next time the system is booted. To update the tables in the meantime, use the route command. Note If the routed daemon is already running on both systems and on any needed gateways, there is no need to execute the route command. The following shows how to add the route to network 100, also known as ethernet2, to oboe's internal routing tables, using the route command: # /etc/route add ethernet2 alto 1 In this example, you can specify either 100 or ethernet2. Note the number 1 at the end of the entry. This is the metric value that corresponds to the number of gateways needed to access the destination host. A metric value must always be specified. The metric value indicates the number of hops to the destination host, alto in this example. A metric value of zero ( 0) indicates a direct connection with no 1:rntP.w::ivi;: between the source host and the destination host. In this example, there is only one gateway; therefore, the metric value is 1. 1.1.6.3 Using a Gateway - This section explains how to use a gateway and builds upon examples used in Section 1.1.6.1. Now that alto is established as a gateway, assume a user on oboe wants to execute a remote command on guitar. The user enters: % rsh guitar date Assume that the contents of alto and oboe's /etc/hosts files are the same (see Table 1-6). Here are the steps oboe takes: 1. Host oboe learns from the /etc/hosts file that the final destination address is on network 100. Therefore, oboe checks its internal routing tables to find a route to network 100 and learns that alto is a gateway to network 100. When an entry exists in the internal routing tables, oboe knows to send the data to alto, which is also connected to network 100. Host alto then picks up the data. 2. Host alto learns from the address part of the message that the final destination address is on network 100. Therefore, alto checks its internal routing tables to find a route to network 100 and learns that network 100 can be reached by the del interface. 3. Because alto knows it is connected to network 100 by way of the del interface, alto puts the data directly onto the wire. 4. The destination host guitar picks up the data, because guitar recognizes its own address. 1.2 Subnet Routing Subnet routing allows numerous networks (subnetworks) to exist within a given network. For example, network 98 could be made up of several subnetworks. A host on a separate network could access all the hosts on network 98 by going through the gateway connected to that network. From there, the data is routed to the appropriate subnetwork, where the destination host ultimately picks up its data, because it recognizes its own address. Subnetworks are useful for organizing hosts within a network into logical groups. They expand the network name space of an Internet address and allow several Ethernets to exist in the same logical network. For example, if there are 10 hosts on one network, and three of the hosts are related to research, three of the hosts are related to personnel, and four of the hosts are related to marketing, it may be desirable to have three subnetworks within the overall network. Subnetworks can save bits in the network part of the Internet address, which is advantageous for a site with numerous point-to-point links. Subnet routing requires a slightly different interpretation of Internet addresses. The bits in the host field of the Internet address are divided into two groups: subnetwork and host. Instead of only two fields in the Internet address, there are three: network, subnetwork, and host. By taking bits from the host part of the address to make up the subnetwork part, you can organize the bits so that the Internet addresses more closely match your network environment. The system does not know which bits in the host field are to be interpreted as the subnetwork part of the Internet address, so a subnet mask is needed. 1.2.1 Using Subnet Masks The subnet mask is used to inform the system which bits of the Internet address to interpret as the network and subnetwork addresses and which bits to interpret as the host address. A subnet mask is a 32-bit number. There is a one-to-one correspondence between each of the 32 bits in the subnet mask and each of the 32 bits in the Internet address. For each bit in the subnet mask that is turned on (binary 1), the corresponding bit position in the Internet address is interpreted as part of the network and subnetwork address. For example, the decimal number 255 is 11111111 in binary notation, which means the entire 8-bit field is turned on. If the subnet mask bit position is part of the host field and is turned on, then the corresponding bit in the Internet address is interpreted as part of the subnetwork address. If the subnet mask bit position is part of the host field and is turned off, then the corresponding bit in the Internet address is interpreted as part of the host address. Each bit in the first (left-most) field of the subnet mask must be turned on (decimal value of 255, binary value of 11111111), because the first field of the Internet address must always be interpreted as the network address, regardless of whether there are subnetworks. If a bit in the first field of the subnet mask were turned off, then part of the network field of ~he Internet address would be interpreted as part of the host address. This would cause errors, because each host must reside on a network. The following two subnet masks are illogical. Note that a netmask entry defines the subnet mask. The first entry interprets the entire Internet address as the network address, leaving no bits to be interpreted as the host address. The second entry interprets the entire Internet address as the host address, leaving no bits to be interpreted as the network address: netmask 255.255.255.255 netmask 0.0.0.0 Note For each bit in the subnet mask that is turned off (binary 0), the corresponding bit position in the Internet address is interpreted as part of the host address. The decimal number 0 is 00000000 in binary notation. This means the entire 8-bit field is turned off, because each bit position is a 0. In general, the entire 8-bit field is turned either on ( 255) or off ( O). This makes it easier for users to distinguish among the network, host, and subnetwork fields. Using the values 255 and 0 allows the fields to be divided evenly (into 8bit groups) between the subnetwork and host parts of the Internet address. Values other than 255 and 0 do not divide evenly and, therefore, make the host and subnetwork parts of the address more difficult to understand. The first field of the subnet mask is always 255, so the system can interpret the network number. The fourth field is usually 0, so the system can interpret the host address. The second and third fields are usually 255 or 0, depending upon how the Internet address is to be interpreted. Listed here are the valid values in decimal and binary notation for the two middle fields of the network mask: Decimal Binary 255 254 252 248 240 224 192 128 0 11111111 11111110 11111100 11111000 11110000 11100000 11000000 10000000 00000000 Here are the most frequently used subnet mask values: netmask 255.255.255.0 netmask 255.255.0.0 netmask 255.0.0.0 The way each of the fields is interpreted depends upon the network class, as shown in Sections 1.2.1.1 and 1.2.1.2. Note Subnetworks are not appropriate for a Class C network, because only eight bits are allocated for the host part of the Internet address. Eight bits may not be enough to divide between a subnetwork address and a host address. 1.2.1.1 Subnet Routing on a Class A Network (Example) - Assume you have a subnet mask of 255.255.255.0 and assume the Internet address is 98.0.1.65. The first digit of 98 in binary notation is 0 ( 98 in binary is 01100010), and 98 is in the range 0 through 127, so the Internet address is on a Class A network. In this example, the first three fields of the Internet address ( 98.0.1) are interpreted as the network and subnetwork parts, and the fourth field ( 65) is interpreted as the host part. Remember: only the host bits can be used to represent a subnet number. Figure 1-4 shows how the Internet address is interpreted in this example. Subnet Mask l Class-Type Network Decimal Binary I I I I I I I ! Subnetwork 255 255 11111111 11111111 Host 255 0 11111111 00000000 Internet Address I I Decimal 98 : 0 I I Binary 01100010 I l 00000000 : 65 I I I 00000001 : 01000001 I ZK-0032U-HC Figure 1-4: Interpreting a Class A Subnet Mask and Internet Address The subnet mask and the Internet address in this example allow 8 bits to define the network part, 16 bits to define the subnetwork part, and 8 bits to define the host part of the Internet address. Therefore, the network number is 98, the subnet number is 0.1, and the host address is 65. 1.2.1.2 Subnet Routing on a Class B Network (Example) - Assume you have a subnet mask of 255.255.255.0, and assume the Internet address is 128.0.2.42. The first two digits of 128 in binary notation are 10 ( 128 in binary is 10000000), and 128 falls in the range 128 through 191, so the Internet address is on a Class B network. In this example, the first two fields of the Internet address ( 128.0) are interpreted as the network part. The third field ( 2) is interpreted as the subnetwork part and the fourth field ( 42) is interpreted as the host part. Figure 1-5 shows how the Internet address is interpreted in this example. Subnet Mask Class-Type Network Subnetwork Host Decimal 255 255 255 0 Binary 11111111 11111111 11111111 00000000 Decimal 128 0 2 42 Binary 10000000 00000000 00000010 00101010 Internet Address ZK-0034U-HC Figure 1-5: Interpreting a Class B Subnet Mask and Internet Address The subnet mask and Internet address in this example allow 16 bits to define the network, 8 bits to define the subnetwork, and 8 bits to define the host of the Internet address. Therefore, the network number is '128.0, the subnet number is 2, and the host number is 42. 1.2.1.3 Setting Up Subnetworks (Example) - This example, Figure 1-6, shows how to connect two Ethernet subnetworks together by way of a point-to-point link. The netmask parameters, which specify the subnet mask in the ifconfig command, are introduced. Assume the source host is flute and the destination host is piano, they are connected to the local area network number 75, and the subnet mask is 255.255.0.0. 75.1 (subnetwork) deO flute 75.1.0.11 flute dmcO flute 2 75.3.0.11 piano IdeO piano 75.2.0.15 75.2 (subnetwork) ZK-0031 U-HC Figure 1-6: Subnetwork Configuration with Point-to-Point Links Before flute can send data to piano, flute's /etc/hosts file and internal routing table must be updated to contain the information about piano. 1.2.1.3.1 Edit the /etc/hosts File - Host flute's /etc/hosts file needs to be updated to include an entry for the name of the connection to subnet 75.3 ( flute2). Table 1-9 shows the updated /etc/hosts file. Table 1-9: Host flute's Updated /etc/hosts File Host Address flute piano flute2 piano2 75.1.0.11 75.2.0.15 75.3.0.11 75.3.0.15 1.2.1.3.2 Inform the System of the New Routes - In this example, flute is physically connected to network 75.3 as well as to network 75.1. Use the ifconfig command to update the routing tables to include the interfaces and hosts. In the following commands, flute2 is the name of the connection to subnetwork 75.3: # /etc/ifconfig deO flute broadcast 75.1.255.255 netmask 255.255.0.0 # /etc/ifconf ig dmcO flute2 piano2 netmask 255.255.0.0 Subnetwork 75.3 consists of two hosts connected by a point-to-point link. Because point-to-point links always connect two hosts directly together, the ifconfig command needs to include the two connected host names, but does not need to include a broadcast address. For further information, see ifconfig( 8c) in the ULTRIX Reference Pages Table 1-10 shows flute's updated internal routing table. Table 1-10: Host flute's Updated Internal Routing Table Network Interface Gateway 75.1 75.3 75.2 deO dmcO dmcO piano The last entry in Table 1-10 is for the route to network 75.2, which flute learned of from the /etc/routed daemon. The ifconfig command is used to supply the system with the subnet mask. Data can now be transferred from flute to piano in exactly the same manner as outlined in Section 1.1.5.1: 1. Host flute checks its /etc/hosts file to obtain the Internet address for piano. From the /etc/hosts file, flute learns that it is on network 75.1 and that piano is on network 75.2. Although flute and piano are on different subnetworks, flute is set up as a gateway to subnetwork 75.3. This example assumes that the system manager on piano previously set up piano as a gateway. Note For point-to-point links, such as are needed by DMR-11 interfaces, both ends of the link must be set up as gateways. 2. Host flute checks its internal routing tables to find a route to subnetwork 75.3, and learns that subnetwork 75.3 can be reached by the dmcO interface. 3. Because flute knows it is connected to subnetwork 75.3, it passes the data directly to the DMR-11 interface. 4. The destination host piano picks up the data. 1.3 Loca I Area Network Files This section describes the files that are created when you install a local area network. The files are: • • • • • • • • • • • /etc/inetd.conf /etc/protocols /etc/services /etc/networks /etc/re /etc/hosts /etc/hosts.equiv .rhosts /etc/re.local /usr/hosts /usr/spool/rwho 1.3.1 The /etc/inetd.conf File The /etc/inetd.conf file contains information regarding the standard services that inetd processes by opening sockets and listening for requests. You do not need to modify the /etc/inetd.conf file unless you want to add a nonstandard service or remove a service from your local area network. As distributed, the /etc/inetd.conf file contains entries for the standard services, with the following services enabled: • login • shell • exec • talk • • time ftp The services that you should include in /etc/inetd.conf and use on your system depend on the size of your system configuration. On most systems, however, the minimum services are: login or telnet, shell, exec, and talk. On systems with sufficient memory, you can, in order of their importance, include: time, ftp, and tfpt. Note Because tftp does not require user authentication, it is not very secure. Therefore, you should include it in /etc/inetd.conf only if it is needed. To add a nonstandard service, edit the /etc/inetd.conf file and create a new entry. To comment out an existing service, edit the /etc/inetd.conf file and insert a comment character ( #) at the beginning of the appropriate entry. For the format of the /etc/inetd.conf file, see inetd.conf( 5) in the ULTRIX Reference Pages. 1.3.2 The /etc/protocols File The /etc/protocols file contains information regarding the known protocols used in the Internet. You do not need to modify the /etc/protocols file unless you want to add a nonstandard Internet protocol to your local area network. See protocols( 5) in the ULTRIX Reference Pages for information on the format of the /etc/protocols file. 1.3.3 The /etc/services File The /etc/services file contains information regarding the known services available in the Internet. You do not need to modify the /etc/services file unless you want to add a nonstandard Internet service to your local area network. See services( 5) in the ULTRIX Reference Pages for information on the format of the /etc/services file. 1.3.4 The /etc/networks File The /etc/networks file contains information regarding the known networks that compose the Internet. You do not need to modify the /etc/networks file unless you want to add or remove a network from your system. See networks( 5) in the ULTRIX Reference Pages for information on the format of the /etc/networks file. 1.3.5 The /etc/re and /etc/re.local Files As distributed, the /etc/re and /etc/re.local files list a number of entries that are used to set up the network when the system is brought to multiuser mode. More specifically, the /etc/re and /etc/re.local files: • • Initialize the loopback device Initialize the network device • Start network daemons If you are using the network, the /etc/re and or /etc/re.local file starts these daemons: • • • • • syslog routed inetd rwho send mail As it starts up each daemon, the /etc/re or /etc/re.local file echoes to the console the name of the daemon. Therefore, while your system is going to multiuser mode, your console lists those daemons that currently are up and running. As distributed, the /etc/re.local file does not set the date and time from the network. If you want the date and time to be set, edit the /etc/re.local file and remove the comment character ( #) from the beginning of the line that lists the /etc/rdate entry. If you have a number of systems on your network, you can turn off the performance. In addition, if you are using a single wire network, you can turn off the routed daemon. In any case, the minimum network daemons to be started from the /etc/re and /etc/re.local files are: • syslog • inetd • send mail Your system can be connected to more than one network. The /etc/re.local file contains initialization information regarding the various networks to which your system is connected. The first entry in the re. local file should be for the primary network interface. If you add a network interface, such as a DEUNA, then you need to add an ifconfig line to the /etc/re.local file. The re.local file also needs an entry for the loopback interface, which usually follows all the network interface entries. The loopback interface allows connections between programs on the same host. The following are example lines from an /etc/re.local file specifying two DEUNA interfaces, a DMR-11 interface, and a loopback interface: /etc/ifconfig /etc/ifconfig /etc/ifconfig /etc/ i fconf i g deO '/bin/hostname' broadcast 128.45.255.255 netmask 255.255.0.0 dmcO oboe2 piano2 netmask 255.255.0.0 del oboe3 broadcast 98.1.255.255 netmask 255.255.0.0 I oO I oca I host Note that the entries configure systems on two different network classes. You can tell this by the network addresses ( 128.45.255.255 is on a class B network, 98.1.255.255 is on a class A network). Note that oboe now has three hardware interfaces and one software (loopback) interface. Because the first device to be configured becomes the default network device for sockets, it is important that the loopback driver be configured after the real network devices. In most cases, the default network should not be the local loopback pseudodevice. 1.3.6 The /etc/hosts File The /etc/hosts file contains a list of the known hosts on the Internet network. It contains the official system names, identification numbers, and nodes. To add a host system to your local area network, add an entry for that system to the /etc/hosts file. Likewise, to remove a host system from your local area network, delete that system's entry from the /etc/hosts file. See hosts( 5) in the ULTRIX Reference Pages for information on the format of the /etc/hosts file. 1.3. 7 The /etc/hosts.equiv File The /etc/hosts.equiv file allows the general users (not root) of a remote system to log in to your system without supplying a password, provided the remote system has an entry in hosts.equiv and the user has an account on your system. The /etc/hosts.equiv file lists, one system name per line, all the systems that are considered logically equivalent to your local system. For security reasons, the logically equivalent systems are usually run by the same administration. A system included in the /etc/hosts.equiv file is treated exactly the same as the local system is treated. This means the logically equivalent system has all the privileges that the local system has. Note that the /etc/hosts.equiv file has impact on the destination system only. That is, the access is always checked on the destination system. Thus, it is possible for systema to be logically equivalent to systemb, although systemb is not logically equivalent to systema. The /etc/hosts.equiv file allows all the users of a remote system to log in to your system without supplying a password, except for the superuser and those users who do not have an account on your system. You can grant the login privilege to a small number of users, including the superuser, on a remote site by using the . rhosts file. 1.3.8 The .rhosts File The .rhosts file can exist in each user's home directory. It allows an individual user from a remote system to log in to your system without supplying a password. You must first create an account for the remote user on your system. The user then needs to put a . r~osts file in his or her home directory on the remote system. The format of the . rhosts file is: hostname user-id The host name is the name of the remote system (the user's local system), and the user ID is the user's login name. For example, the proper entry for a person from systema with a login name of guest is: systema guest If no user ID is specified on the line, then the user must have the same login name on the remote system as on the local system. Note Although it is not a recommended practice, you can allow the superuser of a remote system to log in to your system without password protection by having a . rhosts file in the root ( !) directory. In addition to having a .rhosts file, the superuser needs a secure terminal entry in the /etc/ttys file for each pseudoterminal configured in the system. The entry for the superuser should be something like this: ttyp3 none network secure See ttys( 5) in the ULTRIX Reference Pages for information about the /etc/ttys file. 1.3.9 The /usr/hosts Directory If the /usr/hosts directory is included in a user's search path in the .login or .profile file, the user can log in to a remote host by typing only the name of that system instead of: # rlogin host For example, assuming there is an entry in the /usr/hosts directory for flute and assuming the user has this directory included in the search path, the user can type the following to log in to the remote system flute: 3 flute For a user to be able to log in to a remote host without using the rlogin command, the superuser (root) must execute the /usr/hosts/MAKEHOSTS command after the network has been set up and is operational. In addition, the superuser must execute the /usr/hosts/MAKEHOSTS command each time a new host is added to the network. 1.3.10 The /usr/spool/mqueue Directory The /usr/spool/mqueue directory contains the network syslog files. Each syslog file ·contains the daemon error messages and information from utilities such as sendmail, the remote installation, Ethernet remote node maintenance functions, and so forth, that occurred during a day's operation. The syslog files are automatically maintained by the /usr/adm/newsyslog program, which is executed once a day by /etc/cron. Normally, you do not have to alter the times when /usr/adm/newsyslog is executed. However, if you want to run /usr/adm/newsyslog more often or less often, edit /usr/lib/crontab and make the appropriate time changes. See cron( S) in the ULTRIX Reference Pages for information on the format of the /usr/lib/crontab file. 1.3.11 The /usr/spool/rwho Directory The /usr/spool/rwho directory contains a file named whod.system-name for each system connected to your local area network. The data for the rwho and ruptime commands is saved in this directory. If you remove a system from your local network, you should remove that system's file from the /usr/spool/rwho directory. This clears the directory of unneeded files and helps keep the rwho and ruptime information up to date. 1.4 Network Maintenance Commands These commands are helpful in the event that you encounter problems with the network: arp Displays and modifies the Internet-to-Ethernet address translation tables that the address resolution protocol uses. For further information, see arp( 4p) and arp( Sc) in the ULTRIX Reference Pages. ifconfig Assigns an address to a network interface and/or configures the network interface parameters. You can use ifconfig to redefine an interface's address, but you should not change the addresses while the system is running. For further information, see ifconfig( Sc) in the ULTRIX Reference Pages. netstat Displays the contents of various network-related data structures. If no options are specified, netstat displays the state of all active sockets from those using any of the protocols listed in the /etc/protocols file. For further information, see netstat( 1) in the ULTRIX Reference Pages. Setting Up a Local Area Network 2 This chapter describes how to set up your system on a local area network (LAN) and how to update the /etc/hosts and /etc/hosts.equiv files using the netsetup command. The steps described here assume you are familiar with local area networks. If you need further information about local area networks, see Chapter 1. The setup procedures described in this chapter are: • Adding your system to an existing local area network • Setting up a local area network • Setting up an Internet network with gateways • Setting up a local area network with subnet routing • Updating your local area network Note If you are already running YP on your system, read the Guide to the Yellow Pages Service for information on how to modify YP maps before you run the netsetup command. You will need to modify the hosts, hosts.equiv, networks, and protocols files manually. You can use the Berkeley Internet Name Domain (BIND) service to obtain host names and addresses from BIND servers, and to replace or supplement the host table mapping provided by the local /etc/hosts file or the Yellow Pages ( YP) service. See the ULTRIX-32 Guide to the BIND Service for detailed information and procedures. 2.1 Adding Your System to an Existing Local Area Network This section describes how to add your system to an existing local area network using the netsetup command. 2.1.1 Prerequisite Information Before executing netsetup, you must know the answers to the following questions. The network manager for the local area network should provide you with this information: • • What is your system's Internet address? Which part of your Internet address is the network address ( network number), and which part is the host address (host number)? If you know the network class of the local area network, you can calculate the network and host addresses from the Internet address, as described in Chapter 1. • What is your Internet Protocol (IP) broadcast address? Does the existing local area network use all zeros ( 0) or all ones ( 1)? See Chapter 1 for information about IP broadcast addresses. • Does the existing local area network use subnet routing? If the answer is yes, then how many bits of the host part of the Internet address are used to specify the subnet part of the network address? • What are the host name and Internet address of the other hosts on the existing local area network? When you have the answers to these questions, you are ready to set up your local area network. 2.1.1.1 Run the netsetup Command - Run the netsetup command with the install option: # /etc/netsetup instal I The word install tells netsetup that this is a first-time installation. When netsetup is running, it prints the following information and prompt: You wi I I be asked a series of questions about your system. Default answers are shown in square brackets ([]). To use a default answer, press the RETURN key. Your system's name is 11 systeml 11 • Is this correct [yes]? In this example, system1 is the name of the host. The host name displayed should be the system name declared when your system was installed. If this is the case, answer yes or press the RETURN key. If this is not your host name, answer no. The netsetup program then prompts for your correct host name. The netsetup command asks a series of questions about your local system and the network. You should supply the answers you obtained from the network manager. When netsetup has completed making the required modifications, it prints this informational message: ***** NETWORK SETUP COMPLETE ***** Note If you need to terminate the netsetup command before it has completed, you can press CTRL/C. However, some of the network files may already be modified. You should run netsetup again, to completion, so you have a known state of the network files and directories. 2.1.1.2 Reboot System to Effect Changes - If you add your system to a local area network with the netsetup command while the system is in multiuser mode, your system will not be established on the network until the system is brought to multiuser mode again by rebooting the system. 2.2 Setting Up a Local Area Network This section describes how to set up a new local area network using the netsetup command. If you want the simplest network configuration, then select the following options: • Choose a Class A network • Do not use subnetworks • Use an Internet broadcast address of all ones Note It is wise to obtain a registered Internet address, even if you do not intend to connect your network to an outside one. Then, if you choose to connect to another network in the future, such as the Arpanet, you will not need to change all your IP addresses. To obtain a registered IP address application, call the Network Information Center at 800-235-3155 or 415-859-3695. If you have access to the Arpanet, you can send mail to: nic@sri-nic.arpa 2.2.1 Prerequisite Information Before executing netsetup, you must know the answers to the following questions. If you are creating your own local area network, you can choose any Internet address, network number, and host number you like, provided that your numbers comply with the networking requirements described in Chapter 1. • What is your system's Internet address? • What part of your Internet address is the network address (network number), and which part is the host address (host number)? • What is your Internet Protocol (IP) broadcast address? You should use all ones ( 1). See Chapter 1 for information about IP broadcast addresses. • Will your local area network be using subnet routing? To keep your network simple, do not use subnet routing unless necessary. What are the host names and Internet addresses of the other hosts you will be adding to the local area network? After you have the answers to these questions, you are ready to set up your local area network. Follow the four steps described in Section 2.1.1. 2.3 Setting Up an Internet Network with Gateways An Internet network is two or more local area networks connected. The Internet network uses some of the hosts as gateways. To set up a new local area network with gateways, you must do two things: 1. 2. Set up a new local area network Establish a host as a gateway You must know which host will be the gateway. If a host on a different local area network will be acting as the gateway to your local area network, you must know this in advance. 2.3.1 Set Up a Local Area Network To set up a basic local area network, follow these steps: 1. Bring the system to single-user mode 2. Mount the /usr partition 3. Run the netsetup command These steps are described in Sections 2.1.1.1, 2.1.1.2, and 2.1.1.3. However, do not execute the step described in Section 2.1.1.4, "Bring the System to Multiuser Mode" when netsetup is completed. Instead, go to Section 2.3.2. 2.3.2 Establish a Host as a Gateway If a host other than your own system will be acting as the gateway, be sure there is an entry in your /etc/hosts file for that host. You probably already made the entry when you created your local area network with the netsetup command. If you did not, you can edit /etc/hosts manually. Then, reboot your system and the task is complete. To set up your own system as a gateway, follow these steps: 1. Inform your system of the new route Your system must be physically connected to two or more networks. However, it only knows about the network number you entered while using the netsetup command. Because a host cannot be connected to more than one network, you must choose a pseudohost name. For example, if your system's name is alto, you might choose A2. as its pseudohost name. You should obtain the network number of the other local area network from the network manager. To inform your system of the new route, use this form of the ifconfig command: /etc/ifconfig device-name pseudohost-name For example, to set up A2. as a pseudohost on a DEUNA, type: # 2. /etc/ifconfig del A2 Edit the /etc/hosts file. Add an entry for the gateway host, specifying the pseudohost name and network number. 3. Bring the system to multiuser mode. When the system is brought to multiuser mode, the gateway is established. To bring the system to multiuser mode, press CTRL/D: # cd I # /etc/umount /usr # <CTRL/D> For further information about setting up gateways, see Chapter 1. 2.4 Setting Up a Local Area Network With Subnet Routing A local area network with subnetworks is similar to a local area network with gateways. However, unlike the hosts on an Internet network, each of the hosts on a network with subnet routing has the same network number. This section describes how to use the netsetup command to set up a new local area network with subnet routing. If you are setting up a new local area network, choose either a Class A or Class B network. Class C networks rarely use subnet routing. In addition, use an Internet broadcast address of all ones. 2.4.1 Prerequisite Information Before executing netsetup, you must know the answers to the following questions. If you are creating your own local area network, you can choose any Internet address, network number, subnet number, and host number you like, provided that your numbers comply with the networking requirements described in Chapter 1. • What is your system's Internet address? • What part of your Internet address is the network address (network number), the host address, and subnet address (host number)? When you supply the host address to netsetup, be sure that you include the subnet address. • What is your Internet Protocol (IP) broadcast address? You should use all ones ( 1). See Chapter 1 for information about IP broadcast addresses. • Will your local area network be using subnet routing? yes. • How many bits of the host part of the Internet address are used to specify the subnet part of the network address? If you plan to use the common method of notating the Internet address, you may want to use 8 bits, but this depends on how you plan to use your local area network. See Chapter 1 for further information about Internet addresses. The answer is What are the host names and Internet addresses of the other hosts you will be adding to the local area network? After you have the answers to these questions, you are ready to set up your local area network. Follow the four steps described in Section 2.1.1. 2.5 Updating Your Local Area Network If a local area network is already set up on your system and you want to add a new host or new trusted host, run the netsetup command with no options: # /etc/netsetup By omitting the word install, netsetup updates the existing /etc/hosts and /etc/hosts.equiv files. When netsetup is running, it prompts for the new host names to be added to the /etc/hosts and /etc/hosts.equiv files. If you need to make any modifications to network files other than adding hosts or trusted hosts, you need to edit the appropriate file as explained in Chapter 1. Note There is no need to bring your system to single-user mode before running netsetup to update the /etc/hosts and /etc/hosts.equiv files. If your system is running YP, see the Guide to the Yellow Pages Service. before you run the netsetup command. This guide describes how to modify the hosts, hosts.equiv and other network-related files. Index c Class A network network class, 1-7 specifying, 1-3 Class B network network class, 1-7 specifying, 1-4 Class C network network class, 1-7 specifying, 1-4 G gateway defined, 1-10 establishing your system as, 2-4 point-to-point links and, 1-23n setting up, 1-10 to 1-14 using, 1-16 H host See also pseudohost defined, 1-2 hosts directory, 1-28 hosts.equiv file See also .rhosts file description, 1-27 hosts file adding host system, 1-27 contents, 1-2 removing host system, 1-27 specifying subnetwork, 1-22 inetd.conf file default entries, 1-24, 1-25 modifying, 1-24 tftp and, 1-25n internal routing table adding subnetwork, 1-22 updating, 1-14 to 1-16 Internet address, 1-2 to 1-5 See also Internet broadcast address alternate notation, 1-4 to 1-5 common notation, 1-3 to 1-4 defined, 1-2 format, 1-5t registering, 1-3n, 2-3n Internet broadcast address default format, 1-8 defined, 1-8 Internet network compared to local area network, 110 defined, 1-9 setting up, 1-9 to 1-14, 2-4 to 2-5 IP address See Internet address L LAN See local area network local area network adding host, 2-6 adding your system, 2-1 to 2-3 defined, 1-1 introduction, 1-1 to 1-16 overview, 1-1 to 1-30 related files, 1-23 to 1-30 routing decisions, 1-8 routing example, 1-9 setting up, 2-1 to 2-6 setting up with subnet routing, 2-5 to 2-6 simple configuration, 1-2f loopback address reserved, 1-4n M mqueue directory, 1-29 N netmask See subnet mask netsetup command running, 2-6 terminating, 2-3n YP and, 2-ln network maintenance commands, 1-29 network class binary range, 1-6t decimal range, 1-6t determining, 1-5 to 1-8 network field defined, 1-5 networks file contents, 1-2 modifying, 1-25 updating, 1-15 newsyslog program setting execution time, 1-29 p point-to-point link defined, 1-8 protocols file modifying, 1-25 pseudohost establishing, 2-5 R re file, 1-25 to 1-27 default entries, 1-25 modifying, 1-25 re.local file, 1-25 to 1-27 adding loopback interface, 1-26 adding network interface, 1-26 default entries, 1-25 modifying, 1-25 remote host logging in, 1-28 .rhosts file See also hosts.equiv file creating, 1-28 remote system superuser and, 128n rwho directory contents, 1-29 s services file modifying, 1-25 subnet mask, 1-17 to 1-23 Class A network and, 1-19 to 1-20 Class B network and, 1-20 Class C network and, 1-19n frequently used values, 1-18 point-to-point links and, 1-21 to 123 subnet routing introduction, 1-16 to 1-23 syslog file contents, 1-29 system date setting, 1-26 system time setting, 1-26 HOW TO ORDER ADDITIONAL DOCUMENTATION DIRECT TELEPHONE ORDERS In Continental USA and New Hampshire, Alaska or Hawaii In Canada call 800-267-6215 call 800-DIGITAL DIRECT MAIL ORDERS (U.S. and Puerto Rico*) DIGITAL EQUIPMENT CORPORATION P.O. Box CS2008 Nashua, New Hampshire 03061 DIRECT MAIL ORDERS (Canada) DIGITAL EQUIPMENT OF CANADA LTD. 100 Herzberg Road Kanata, Ontario K2K 2A6 Attn: Direct Order Desk I INTERNATIONAL I DIGITAL EQUIPMENT CORPORATION PSG Business Manager c/o Digital's local subsidiary or approved distributor Internal orders should be placed through the Software Distribution Center (SDC), Digital Equipment Corporation, Westminster, Massachusetts 01473 •Any prepaid order from Puerto Rico must be placed with the Local Digital Subsidiary: 809-754-7575 ULTRIX-32 Guide to Networking AA-ME97A-TE Reader's Comments Note: This form is for document comments only. DIGITAL will use comments submitted on this form at the company's discretion. If you require a written reply and are eligible to receive one under Software Performance Report (SPR) service, submit your comments on an SPR form. Did you find this manual understandable, usable, and well-organized? Please make suggestions for improvement. - - - - - - - - - · - - - - - - - - Did you find errors in this manual? If so, specify the error and the page number. Please indicate the type of user/reader that you most nearly represent. 0 0 0 0 D 0 Name Assembly language programmer Higher-level language programmer Occasional programmer (experienced) User with little programming experience Student programmer Other (please s p e c i f y ) - - - - - - - - - - - - - - - - Date------------- Organization---------------------------- Zip Code I I I I I I I ·----Do Not Tear· Fold Here and T a p e - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - . . . 1 111111 No Postage Necessary if Mailed in the United States BUSINESS REPLY MAIL FIRST CLASS PERMIT N0.33 MAYNARD MASS. POSTAGE WILL BE PAID BY ADDRESSEE Digital Equipment Corporation Documentation Manager ULTRIX Documentation Group ZK03-3/X18 Spit Brook Road Nashua, N.H. 03063 ·----Do Not Tear· Fold Here and T a p e - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ULTRIX .. 32 Guide to Networking AA-ME97A-TE Reader's Comments Note: This form is for document comments only. DIGITAL will use comments submitted on this form at the company's discretion. If you require a written reply and are eligible to receive one under Software Performance Report (SPR) service, submit your comments on an SPR form. Did you find this manual understandable, usable, and well-organized? Please make suggestions for improvement. - - - - - - - - - - - - - - - - - - - Did you find errors in this manual? If so, specify the error and the page number. Please indicate the type of user/reader that you most nearly represent. D D D D D D Name Assembly language programmer Higher-level language programmer Occasional programmer (experienced) User with little programming experience Student programmer Other (please s p e c i f y ) - - - - - - - - - - - - - - - - Date------------ Organization---------------------------- Zip_s;ode I I I I I I I ----Do Not Tear- Fold Here and T a p e - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - . . J 111111 No Postage Necessary if Mailed in the United States BUSINESS REPLY MAIL FIRST CLASS PERMIT N0.33 MAYNARD MASS. POSTAGE WILL BE PAID BY ADDRESSEE Digital Equipment Corporation Documentation Manager ULTRIX Documentation Group ZK03-3/X18 Spit Brook Road Nashua, N.H. 03063 ----Do Not Tear· Fold Here and T a p e - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies