Uploaded by 洪崇育

CHAPTER 6 Computer Networks and Internet

advertisement
CHAPTER 6
Computer Networks and Internet
(Solutions to Review Questions and Problems)
Review Questions
Q6-1.
Q6-2.
Q6-3.
Q6-4.
Q6-5.
Q6-6.
Q6-7.
To make the communication bidirectional, each layer needs to be able to provide two opposite tasks, one in each direction.
The identical objects are the two messages: one sent and one received.
a. At the application layer, the unit of data is a message.
b. At the network layer, the unit of data is a datagram.
c. At the data-link layer, the unit of data is a frame.
A frame is a link-layer data unit. It encapsulates a data unit coming from the
network layer. In this case, the data unit is a datagram.
A user datagram is a transport-layer data unit. It decapsulates a data unit going
to the application layer. In this case, the data unit is a message.
The data unit should belong to layer 4. In this case, it is a user datagram.
a. At the application layer, we normally use a name to define the destination
computer name and the name of the file we need to access. An example is
something@somewhere.com.
b. At the network layer, we use two logical addresses (source and destination)
to define the source and destination computers. These addresses are unique
universally.
c. At the data-link layer, we use two link-layer addresses (source and destination) to define the source and destination connections to the link.
Q6-8. Probably Alice turned off her desktop, which stopped the FTP server, when
she left the office. A server process should be running all the time, waiting for
clients to access it.
Q6-9. A personal computer, such as a desktop or a laptop, is normally used as a client. If a business needs to use a computer as a server, it should be more powerful to allow several connections from clients at the same time.
Q6-10. In this case, UDP is more appropriate because it does not have the overhead of
TCP in connection establishment and teardown.
1
2
Q6-11. Routing cannot be done at the transport layer, because the communication at
the transport layer is one single logical path between the source port and the
destination port. Routing cannot be done at the data-link layer because the
communication at the data-link layer is between two nodes (one single path);
there is no need for routing. On the other hand, there are several possible paths
for a packet between the source host and destination host at the network layer.
Routing is the job of selecting one of these paths for the packet.
Q6-12. Communication at the network layer is host-to-host; communication at the
data-link layer is node-to-node.
Q6-13. Dial-up modems use part of the bandwidth of the local loop to transfer data.
The latest dial-up modems use the V-series standards such as V.90 (56 kbps
for downloading and 33.6 kbps for uploading), and V.92 (56 kbps for downloading and 48 kbps for uploading).
Q6-14. A Bluetooth network is normally a wireless small network that is more suited
to communication in a personal environment; a wireless local area can cover a
larger geographical areas such as a building or an office.
Q6-15. The period of a signal is the inverse of its frequency: T = 1/f.
Q6-16. The amplitude measures the value of the signal at any point.
Q6-17. Normally, analog transmission refers to the transmission of analog signals
using a band-pass channel. Baseband digital or analog signals are converted to
a complex analog signal with a range of frequencies suitable for the channel.
Q6-18. The transmission media is located beneath the physical layer and controlled
by the physical layer.
Q6-19. The two major categories are guided and unguided media.
Q6-20. The three major categories of guided media are twisted-pair, coaxial, and
fiber-optic cables.
Problems
P6-1.
P6-2.
P6-3.
P6-4.
P6-5.
The services provided in part a and part b are the opposite of each other.
a. Layer 1 takes the ciphertext from layer 2, inserts (encapsulates) it in an
envelope and sends it.
b. Layer 1 receives the mail, removes (decapsulates) the ciphertext from the
envelope and delivers it to layer 2.
The services provided in part a and part b are the opposite of each other.
a. Layer 2 takes the plaintext from layer 3, encrypts it, and delivers it to layer
1.
b. Layer 2 takes the ciphertext from layer 1, decrypts it, and delivers it to
layer 3.
In 10 years, the number of hosts becomes about six times (1.2010 ? 6.19) thenumber in 2010. This means the number of hosts connected to the Internet is
more than three billion.
The system transmits 150 bytes for a 100-byte message. The efficiency is 100/
150 or 66.66%.
3
a. The network layer is responsible for route determination.
b. The physical layer is the only layer that is connected to the transmission
media.
c. The application layer provides services for the end users.
P6-6.
P6-7.
a. User datagrams are created at the transport layer.
b. The data-link layer is responsible for handling frames between adjacentnodes.
c. The physical layer is responsible for transforming bits to electromagnetic
signals.
Figure 6.1 shows the layers. Note that we have not shown the security checking that you need to pass through because it does not have the counterpart
when you arrive. It must be included in baggage/checking layer.
Figure 6.1 Solution to P6-7
Source/destination
airport
Source/destination
airport
Baggage
checking/claiming
Baggage
checking/claiming
Boarding/unboarding
Boarding/unboarding
Takeoff/Landing
Takeoff/Landing
Flying
P6-8.
The only two layers that need to be changed are the data-link layer and the
physical layer. The new hardware and software need to be installed in all host,
routers, and link-layer switches. As long as the new data-link layer can enca
sulate and decapsulate datagrams from the network layer, there is no need to
change any protocol in the upper three layers. This is one of the characteristics
of the protocol layering.
P6-9. The domain of IP addresses is universal. A device directly connected to the
Internet needs a unique IP address. The domain of port numbers is local; they
can be repeated. Two computers running the HTTP server process use the
same well-known port number (80); two computers running the HTTP client
process can use the same ephemeral port number.
P6-10. We change each byte to the corresponding binary representation:
a. 01101110 00001011 00000101 01011000
b. 00001100 01001010 00010000 00010010
c. 11001001 00011000 00101100 00100000
P6-11. We change each 8-bit section to the corresponding decimal value and insert
dots between the bytes.
a. 94.176.117.21
b. 137.142.208.49
4
c. 87.132.55.15
P6-12. We interpret each four-bit pattern as a hexadecimal digit. We then group the
hexadecimal digits with a colon between the pairs:
5A:11:55:1B:AA:0F
P6-13.
a. (10 / 1000) s = 0.01 s
b. (8 / 1000) s = 0. 008 s = 8 ms
c. ((100,000 ⋅ 8) / 1000) s = 800 s
Download