Apply Your Knowledge
The following exercises require that you have two hosts connected via an Ethernet network, one named hostA and the other named hostB.
8.1. Obtaining Network Information
In this exercise, you'll use the various network commands and utilities to obtain information about your system and network.
Estimated time: 15 minutes
Log in as root on hostA. Make sure you have an entry in your /etc/inet/hosts file for hostB.
As root, use the ifconfig
command to display information about your network interface:
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4>,VIRTUAL mtu 8232 index 1\
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 2\
inet 192.168.1.106 netmask ffffff00 broadcast 192.168.1.255
utility shows that the Ethernet address of the hme0
interface is 8:0:20:a2:63:82
. The first half of the address is generally specific to the manufacturer. In this case, 8:0:20
is Sun Microsystems. The last half of the address, in this case a2:63:82
, is unique for every system.
to send ICMP echo requests from hostA
, use the rpcinfo
utility with the -p
option to list the registered RPC programs:
Look for the sprayd
service on your system:
Stop the sprayd
service on your local system, as follows:
Verify that the sprayd
service has been unregistered from RPC:
Restart the sprayd
service by issuing the svcadm restart
command, as follows:
Verify that the sprayd
service now registered with RPC
8.2. Using snoop to Display Network Information
In this exercise, you'll use the snoop, spray, and ping commands to obtain information from your network.
Estimated time: 10 minutes
, log in to an X Window session (CDE, Gnome, or Java Desktop System [JDS]) as root. In one window, start up the snoop
utility, as follows:
shows what actually happens when hostA
uses the ping
command to communicate with hostB
In a second window on hostA
, type the following:
Watch the information that is displayed in the first window that is running snoop
Issue the spray
command to send a one-way stream of packets to hostB
Watch the information that is displayed in the first window that is running snoop.
Name and provide a brief description of each layer of the seven-layer OSI model.
Name and provide a brief description of each layer of the five-layer TCP/IP model.
In TCP/IP, a packet that contains a header from the physical layer, followed by a header from the network layer (IP), followed by a header from the transport layer (TCP), followed by the application protocol data would be referred to as what?
What other name refers to a host's unique Ethernet address?
When you are setting up at least one network interface, which of the following network configuration files does the Solaris installation program always set up? (Choose all that apply.)
Which command lists the network services and their current state?
What is TCP/IP?
A general name for a set of protocols that allow computers to share resources across the network
A network security specification used widely on the Internet
One of the services provided by DNS
Transfer Control Protocol/Information Protocol
Which of the following statements about IP addresses are true? (Choose all that apply.)
IP addresses are written as four sets of numbers separated by periods.
IP addresses provide a means of identifying and locating network resources.
IP addresses are divided into three unique numbers: network, class, and host.
The IP address identifies the machine to its peers on the network.
Which of the following statements is true about the /etc/hostname.xxy file?
It is a system script file.
It is a Sparc executable file.
It contains the hostname of the local host.
It identifies the network interface on the local host.
Which of the following is a network component that forwards Ethernet packets from one network to another?
Which of the following contains the IP addresses and hostnames of machines on a network?
Which of the following address classes is for medium-sized networks such as campuses and large businesses with many hosts?
Which of the following are files that have to be edited when you manually change the hostname on a Solaris system? (Choose all that apply.)
Which of the following commands is used to monitor the system's TCP/IP network activity?
Which command is used to determine the information that is flowing between systems across a network?
Answers to Exam Questions
Layer 1, the physical layer, describes the network hardware, including electrical and mechanical connections to the network.
Layer 2, the data link layer, splits data into frames for sending on the physical layer and receives acknowledgement frames. It performs error checking and retransmits frames that are not received correctly.
Layer 3, the network layer, manages the delivery of data via the data link layer and is used by the transport layer. IP is the most common network-layer protocol.
Layer 4, the transport layer, determines how to use the network layer to provide a virtually error-free, point-to-point connection so that Host A can send messages to Host B and they will arrive uncorrupted and in the correct order.
Layer 5, the session layer, uses the transport layer to establish a connection between processes on different hosts. It handles security and the creation of the session.
Layer 6, the presentation layer, performs functions such as text compression, code, or format conversion to try to smooth out differences between hosts. The presentation layer allows incompatible processes in the application layer to communicate via the session layer.
Layer 7, the application layer, is concerned with the user's view of the network (for example, formatting email messages). The presentation layer provides the application layer with a familiar local representation of data that is independent of the format used on the network. For more information, see the section "The ISO/OSI Model."
The hardware layer corresponds to the ISO/OSI model physical layer and describes the network hardware, including electrical and mechanical connections to the network. This layer regulates the transmission of unstructured bit streams over a transmission medium.
The network interface layer corresponds to the ISO/OSI model data link layer and manages the delivery of data across the physical network. This layer provides error detection and packet framing.
The Internet layer corresponds to the ISO/OSI model network layer and manages data addressing and delivery between networks, as well as fragmenting data for the data link layer.
The transport layer corresponds to the ISO/OSI model transport layer and ensures that messages reach the correct application process by using TCP and UDP.
The application layer corresponds to the session layer, presentation layer, and application layer of the ISO/OSI model. The application layer manages user-accessed application programs and network services. This layer is responsible for defining the way in which cooperating networks represent data. For more information, see the section "The TCP/IP Model."
B. When you think of systems communicating via a network, you can imagine the data progressing through each layer down from the application layer to the hardware layer, across the network, and then flowing back up from the hardware layer to the application layer. A header is added to each segment received on the way down the layers. This is referred to as encapsulation. For more information, see the section "Encapsulation and Decapsulation."
B. A host's unique Ethernet address is also referred to as the MAC address. For more information, see the section "Network Hardware."
A, B, C. The network configuration files /etc/hostname.interface, /etc/nodename, and /etc/inet/hosts are initially set up by the Solaris installation program. For more information, see the section "Configuring an IPv4 Network Interface."
A. The inetadm command lists the network services and their current state. This is a new feature to Solaris 10. For more information, see the section "Network Services" and Chapter 3, "Perform System Boot and Shutdown Procedures" for a full description of the Service Management Facility (SMF).
A. TCP/IP is a general name for a set of protocols that allow computers to share resources across a network. For more information, see the section "The TCP/IP Model."
A, B, D. The following are true of IP addresses: IP addresses are written as four sets of numbers separated by periods, IP addresses provide a means of identifying and locating network resources, and IP addresses identify the machines to their peers on the network. For more information, see the section "IPv4 Addressing."
D. The /etc/hostname.xxy file identifies the network interface on the local host. For more information, see the section "Configuring an IPv4 Network Interface."
D. The router is a network component that forwards Ethernet packets from one network to another. For more information, see the section "Network Hardware."
A. The /etc/inet/hosts file contains the IP addresses and hostnames of machines on a network. For more information, see the section "Configuring an IPv4 Network Interface."
B. Class B addresses are for medium-sized networks, such as campuses and large businesses with many hosts. A Class B network can accommodate a maximum of 65,534 hosts. For more information, see the section "IPv4 Addressing."
A, D, E. The file /etc/defaultdomain sets the domain name and /etc/networks identifies the different networks. For more information, see the section "Changing the System Hostname."
C. The netstat command is used to monitor the system's TCP/IP network activity. netstat can provide some basic data about how much and what kind of network activity is happening. For more information, see the section "Network Maintenance."
B. The snoop command is used to determine what information is flowing between systems across a network. For more information, see the section "Network Maintenance."