The Solaris Network EnvironmentIn the ISO/OSI model, services that are required for communication are arranged in seven layers that build on one another. Think of the layers as steps that must be completed before you can move on to the next step and ultimately communicate between systems. Table 24 describes the function of each individual layer. Network Definitions and HardwareFollowing are some network definitions and descriptions of networking hardware components:
Network ClassesThere are five classes of IP addresses: A, B, C, D, and E. The following is a brief description of each class. Class A NetworksClass A networks are used for large networks with millions of hosts, such as large multinational businesses with offices around the world. A class A network number uses the first 8 bits of the IP address as its network ID. The remaining 24 bits comprise the host part of the IP address. The values assigned to the first byte of class A network numbers fall within the range 0127. For example, consider the IP address 75.4.10.4. The value 75 in the first byte indicates that the host is on a class A network. The remaining bytes, 4.10.4, establish the host address. The Internet registries assign only the first byte of a class A number. Use of the remaining three bytes is left to the discretion of the owner of the network number. Only 127 class A networks can exist; each of these networks can accommodate up to 16,777,214 hosts. Class B NetworksClass B networks are medium-sized networks, such as universities and large businesses with many hosts. A class B network number uses 16 bits for the network number and 16 bits for host numbers. The first byte of a class B network number is in the range 128191. In the number 129.144.50.56, the first two bytes, 129.144, are assigned by the Internet registries and comprise the network address. The last two bytes, 50.56, make up the host address and are assigned at the discretion of the network's owner. A class B network can accommodate a maximum of 65,534 hosts. Class C NetworksClass C networks are used for small networks containing fewer than 254 hosts. Class C network numbers use 24 bits for the network number and 8 bits for host numbers. A class C network number occupies the first three bytes of an IP address; only the fourth byte is assigned at the discretion of the network's owner. The first byte of a class C network number covers the range 192223. The second and third bytes each cover the range 0255. A typical class C address might be 192.5.2.5, with the first three bytes, 192.5.2, forming the network number. The final byte in this example, 5, is the host number. A class C network can accommodate a maximum of 254 hosts. Class D and E NetworksClass D addresses cover the range 224239 and are used for IP multicasting as defined in RFC 988. Class E addresses cover the range 240255 and are reserved for experimental use. Classless Internet and Classless Inter Domain Routing (CIDR)CIDR, also called supernetting, uses (typically) the first 18 bits of an IPv4 address as the network portion, leaving 14 bits to be used for the host. This implementation has meant that networks can be aggregated by routers for ease of delivery, in the same way as the telephone system uses area codes to route telephone calls. The Internet now operates in a classless mode, and has greatly increased the number of IPv4 addresses that are available. There will not be any questions in the exam on CIDR. This is included for information only. Configuring Network InterfacesYou can configure additional interfaces at system boot or modify the original interface by having an understanding of only three files: /etc/hostname.<interface>, /etc/inet/hosts, and /etc/inet/ipnodes. /etc/hostname.<interface>This file defines the network interfaces on the local host. At least one /etc/hostname.<interface> file should exist on the local machine. The Solaris installation program creates this file for you. In the filename, <interface> is replaced by the device name of the primary network interface. The file contains only one entry: the hostname or IP address associated with the network interface. For example, suppose hme0 is the primary network interface for a machine called system1. The file would be called /etc/hostname.hme0, and the file would contain the entry system1. An entry for system1 should also exist in the /etc/inet/hosts file. /etc/inet/hostsThe hosts database contains details of the machines on your network. This file contains the hostnames and IPv4 addresses of the primary network interface and any other network addresses the machine must know about. When a user enters a command such as ping xena, the system needs to know how to get to the host named xena. The /etc/inet/hosts file provides a cross-reference to look up and find xena's network IP address. For compatibility with BSD-based operating systems, the file /etc/hosts is a symbolic link to /etc/inet/hosts. Each line in the /etc/inet/hosts file uses the following format: <address> <hostname> [nickname] [#comment] Each field in this syntax is described in Table 25.
/etc/inet/ipnodesThe ipnodes database also contains details of the machines on your network. This file contains the hostnames and IPv4 or IPv6 addresses of the primary network interface and any other network addresses the machine must know about. You should note that, unlike the /etc/hosts file, which is a link to /etc/inet/hosts, there is no /etc/ipnodes link. The syntax for the ipnodes file is the same as the hosts file. Changing the System HostnameTo manually change the hostname of a system, modify the following four files and reboot:
You can also use the sys-unconfig command to change the system hostname. This method actually requires you to re-enter most of the system identification that was entered when the Solaris Operating Environment was initially installed. When you run sys-unconfig, the system automatically shuts down. When it is next started, you are prompted to enter the information for IP address, hostname, network mask, time zone, name service, and the root password. |