Previous Page
Next Page

Apply Your Knowledge

Exercises

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

1.
Log in as root on hostA. Make sure you have an entry in your /etc/inet/hosts file for hostB.

2.
As root, use the ifconfig command to display information about your network interface:

ifconfig -a
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
ether 8:0:20:a2:63:82

The ifconfig 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.

3.
Use ping to send ICMP echo requests from hostA to hostB:

ping hostB

On hostA, use the rpcinfo utility with the -p option to list the registered RPC programs:

rpcinfo

4.
Look for the sprayd service on your system:

rpcinfo | grep sprayd

5.
Stop the sprayd service on your local system, as follows:

rpcinfo -d sprayd 1

6.
Verify that the sprayd service has been unregistered from RPC:

rpcinfo | grep sprayd

7.
Restart the sprayd service by issuing the svcadm restart command, as follows:

svcadm restart spray

8.
Verify that the sprayd service now registered with RPC:

rpcinfo | grep sprayd

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

1.
On hostA, 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:

snoop hostA hostB

snoop shows what actually happens when hostA uses the ping command to communicate with hostB.

2.
In a second window on hostA, type the following:

ping hostB

3.
Watch the information that is displayed in the first window that is running snoop.

4.
Issue the spray command to send a one-way stream of packets to hostB:

spray hostB

5.
Watch the information that is displayed in the first window that is running snoop.

Exam Questions

1.

Name and provide a brief description of each layer of the seven-layer OSI model.

2.

Name and provide a brief description of each layer of the five-layer TCP/IP model.

3.

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?

  1. Decapsulation

  1. Encapsulation

  1. Encryption

  1. Decryption


4.

What other name refers to a host's unique Ethernet address?

  1. IP address

  1. MAC address

  1. Internet address

  1. Hostname


5.

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.)

  1. /etc/hostname.interface

  1. /etc/nodename

  1. /etc/inet/hosts

  1. /etc/defaultdomain


6.

Which command lists the network services and their current state?

  1. inetadm

  1. inetd

  1. rpcinfo

  1. nfsd


7.

What is TCP/IP?

  1. A general name for a set of protocols that allow computers to share resources across the network

  1. A network security specification used widely on the Internet

  1. One of the services provided by DNS

  1. Transfer Control Protocol/Information Protocol


8.

Which of the following statements about IP addresses are true? (Choose all that apply.)

  1. IP addresses are written as four sets of numbers separated by periods.

  1. IP addresses provide a means of identifying and locating network resources.

  1. IP addresses are divided into three unique numbers: network, class, and host.

  1. The IP address identifies the machine to its peers on the network.


9.

Which of the following statements is true about the /etc/hostname.xxy file?

  1. It is a system script file.

  1. It is a Sparc executable file.

  1. It contains the hostname of the local host.

  1. It identifies the network interface on the local host.


10.

Which of the following is a network component that forwards Ethernet packets from one network to another?

  1. Hub

  1. Switch

  1. Network interface

  1. Router


11.

Which of the following contains the IP addresses and hostnames of machines on a network?

  1. /etc/inet/hosts

  1. /etc/hostname.xxy

  1. /etc/defaultdomain

  1. /etc/nodename


12.

Which of the following address classes is for medium-sized networks such as campuses and large businesses with many hosts?

  1. Class A

  1. Class B

  1. Class C

  1. Class D


13.

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.)

  1. /etc/nodename

  1. /etc/defaultdomain

  1. /etc/networks

  1. /etc/inet/hosts

  1. /etc/inetipnodes


14.

Which of the following commands is used to monitor the system's TCP/IP network activity?

  1. iostat

  1. vmstat

  1. netstat

  1. ping


15.

Which command is used to determine the information that is flowing between systems across a network?

  1. netstat

  1. snoop

  1. iostat

  1. ping


Answers to Exam Questions

1.

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."

2.

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."

3.

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."

4.

B. A host's unique Ethernet address is also referred to as the MAC address. For more information, see the section "Network Hardware."

5.

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."

6.

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).

7.

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."

8.

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."

9.

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."

10.

D. The router is a network component that forwards Ethernet packets from one network to another. For more information, see the section "Network Hardware."

11.

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."

12.

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."

13.

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."

14.

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."

15.

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."


Previous Page
Next Page