0% found this document useful (0 votes)
12 views68 pages

Sum

Uploaded by

Hassan Shaheen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views68 pages

Sum

Uploaded by

Hassan Shaheen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 68

How has computer networking changed since the 1970s?

- Since the 1970s, computer communication has changed from a research topic to an essential part of
infrastructure.

In which areas of life is networking used?

- Networking is used in business, advertising, production, shipping, planning, billing, and accounting.

How are educational institutions using computer networks?

- Educational institutions use computer networks to provide students and teachers with access to online
information.

4. Which levels of government use networks?

- Federal, state, and local government offices use networks.

5. What was the status of the Internet in 1980?

In 1980, the Internet was a research project that involved a few dozen sites.

6. How has the Internet evolved since 1980?

Today, the Internet has grown into a communication system that reaches all of the world.

7. What economic impact has the advent and utility of networking created?

The advent and utility of networking have created dramatic economic shifts.

8.How has networking affected telecommuting?

Networking has made telecommuting available to individuals.

9. What industry emerged due to the importance of networking?

An entire industry emerged that develops networking technologies, products, and services.

10.Why has there been a demand for people with networking expertise in all industries?

The importance of computer networks has produced a demand for people with networking expertise to
plan, acquire, install, operate, and manage the hardware and software systems for networks.

11.Why does the networking subject seem complex?

The networking subject seems complex because many technologies exist, each with features that
distinguish it from others, and companies create commercial network products and services using
technologies in new unconventional ways.

12. How can technologies in networking be combined?


Technologies in networking can be combined and interconnected in many ways.

13. Why can computer networks be especially confusing to a beginner?

Computer networks can be especially confusing to a beginner because no single underlying theory
exists that explains the relationship among all parts.

14. What have multiple organizations created regarding computer networks, and what issue arises
from this?

Multiple organizations have created computer networks standards, and some standards are incompatible
with others.

15.What have various organizations attempted to define in the context of computer networks?

Various organizations have attempted to define conceptual models.

16.What challenges are there with the set of technologies in networking?

The set of technologies is diverse and changes rapidly.

17. What issue arises with the conceptual models defined by organizations?

Models are either so simplistic that they do not distinguish among details or so complex that they do not
help simplify the subject.

18. What challenge does the lack of consistency in the field of computer networking produce for
beginners?

The lack of consistency produces the challenge of dealing with multiple groups each attempting to create
their own terminology.

19. Why do researchers and marketing teams contribute to the confusion in terminology?

Researchers cling to scientifically precise terminology, while marketing teams often invent new terms to
distinguish their products or services from others.

20. How are technical terms sometimes misused in the field of computer networking?

Technical terms are sometimes confused with the names of popular products, and professionals may use a
technical term from one technology when referring to an analogous feature of another technology.

21. What issue arises from the large set of terms and acronyms in computer networking? The issue
is that the set contains many synonyms, and jargon often includes terms that are abbreviated, misused, or
associated with products.

22. What is important to gain in order to master the complexity of computer networking?

It is important to gain a broad background that includes five key aspects.

23.What are the five key aspects to understand in computer networking?


The five key aspects are:

1. Network Applications and Network Programming

2. Data Communications

3. Packet Switching and Networking Technologies

4. Internetworking with TCP/IP

5. Additional Networking Concepts and Technologies

24.Will these topics be covered in detail throughout the book?

Yes, these topics will be covered throughout the book.

25.What will be provided in this chapter regarding the key aspects?

A brief introduction to these key aspects will be given in this chapter.

26.How are network services provided?

Network services are provided by application software.

27.How does an application on one computer communicate with another computer?

An application on one computer communicates across a network with an application program running on
another computer.

28. What are some examples of network applications?

Examples of network applications include email, file transfer, web browsing, voice telephone calls
(VoIP), distributed databases, and audio/video teleconferencing.

29.What does each network application offer?

Each application offers a specific service with its own form of user interface.

30.Can all network applications communicate over a single, shared network?

Yes, all applications can communicate over a single, shared network.

31.What advantage does a unified underlying network provide for programmers?

A unified underlying network supports all applications, making a programmer's job much easier.

32.What does a programmer need to learn when working with a unified network?

A programmer needs to learn about one interface to the network and one basic set of functions to be
used.
33.Is it possible to write code that communicates over a network without understanding the
hardware/software technologies?

Yes, it is possible to understand network applications and write code that communicates over a network
without understanding the hardware/software technologies.

34. What benefit does mastering the interface provide for a programmer?

Once a programmer masters the interface, no further knowledge of networking may be needed.

35.Why is knowledge of the underlying network system beneficial for a programmer?

Knowledge of the underlying network system allows a programmer to write better code and develop
more efficient applications.

36.What does data communications refer to?

Data communications refers to the study of low-level mechanisms and technologies used to send
information across a physical communication medium, such as a wire, radio wave, or light beam.

37.What is the focus of data communications?

Data communications focuses on ways to use physical phenomena to transfer information.

38.For whom might the subject of data communications seem useful?

The subject may seem useful for engineers who design low-level transmission facilities.

39.Why is data communications important beyond just low-level transmission facilities?

Several key concepts that arise from data communications influence the design of many protocol layers.

40.What does data communications provide for the field of networking?

Data communications provides a foundation of concepts on which the rest of networking is built.

41.How did the packet switching concept revolutionize data communications in the 1960s?

Packet switching revolutionized data communications by changing the way information was sent,
allowing multiple users to share a network and providing the basis for the modern Internet.

42.What were early communication networks based on?

Early communication networks evolved from telegraph and telephone systems, using a physical pair of
wires between two parties to form a dedicated circuit.

43.How did the underlying paradigm of early communication networks remain the same even with
the advent of electronic switches?

The underlying paradigm remained the same by forming a circuit and then sending information across the
circuit.
44. What fundamental change did packet switching bring to networking?

Packet switching allowed multiple users to share a network, dividing data into small blocks called
packets, and including the identification of the intended recipient in each packet.

45.How do devices in a packet-switched network know how to reach each possible destination?

Devices throughout the network each have information about how to reach each possible destination.

Certainly! Here’s a brief overview:

46.How should a destination be identified?

- Using unique addresses (e.g., IP addresses).

47.How can a sender find the identification of a destination?

- Through name resolution services like DNS.

48. How large should a packet be?

- Typically defined by the Maximum Transmission Unit (MTU), varying by technology (e.g., 1500
bytes for Ethernet).

47. How can a network recognize the end of one packet?

- By using delimiters or length fields in packet headers.

49. How can a network recognize the beginning of another packet?

- With specific start-of-frame indicators or headers.

50. If a network is shared, then how can they coordinate to ensure that each receives a fair
opportunity to send?

- Using access control protocols like CSMA/CD for Ethernet or CSMA/CA for wireless networks.

51. How can packet switching be adapted to wireless networks?

By incorporating mechanisms for signal strength variability, interference management, and handoffs.

52. How can network technologies be designed to meet various requirements for speed, distance,
and economic cost?

- Through careful selection of technology based on trade-offs between performance, range, and cost.

You've touched on some fundamental questions in the design of packet switching networks. Let’s break
them down:

53. How should a destination be identified?


- Typically, destinations are identified using addresses. In IP networks, for instance, this is done using IP
addresses. Each device on the network is assigned a unique address that is used to route packets to the
correct destination.

54. How can a sender find the identification of a destination?

- This is usually achieved through a process called name resolution. In IP networks, the Domain Name
System (DNS) translates human-readable domain names into IP addresses. In other contexts, different
lookup methods or directories might be used.

55. How large should a packet be?

- The size of packets, known as Maximum Transmission Unit (MTU), can vary depending on the network
technology. For instance, Ethernet typically has an MTU of 1500 bytes, while other networks might have
different limits. The size needs to balance efficiency and overhead.

How can a network recognize the end of one packet?

- Packet boundaries are often marked using delimiters or headers that include length fields. The header
information typically contains metadata about the packet’s size and type, enabling routers and switches to
determine where one packet ends and another begins.

How can a network recognize the beginning of another packet?

Like with packet termination, the start of a new packet is usually indicated by the header. In many
protocols, packets are prefixed with specific start-of-frame indicators or header information that denotes
the start of the packet.

If a network is shared, then how can they coordinate to ensure that each receives a fair opportunity
to send?

This is managed through various protocols and mechanisms. For example, in Ethernet networks, Carrier
Sense Multiple Access with Collision Detection (CSMA/CD) is used to manage access to the network. In
wireless networks, similar mechanisms like Carrier Sense Multiple Access with Collision Avoidance
(CSMA/CA) are employed.

How can packet switching be adapted to wireless networks?

Wireless networks introduce unique challenges such as variable signal strength and interference.
Protocols need to handle issues like handoffs between access points, variable bandwidth, and error
correction. Techniques such as adaptive modulation and coding, and sophisticated error recovery
mechanisms are often employed.

How can network technologies be designed to meet various requirements for speed, distance, and
economic cost?

Different technologies are optimized for different needs. For high-speed requirements, fiber optics might
be used, while for long distances, satellite links may be appropriate. Economic factors can influence the
choice of technology as well, with trade-offs between cost and performance.
Each of these questions relates to fundamental aspects of designing and optimizing packet-switched
networks, and the answers often depend on the specific use case and technology in question.

What significant development in computer networks occurred in the 1970s?

The rise of the Internet.

What observation did Vinton Cerf and Robert Kahn make in 1973?

No single packet switching technology could satisfy all needs.

Why did they suggest not to find a single best solution?

Because low-cost, low-capacity technologies could be built for various environments.

What did they propose instead?

Interconnecting many packet switching technologies into a functioning whole.

What standards were developed for this interconnection?

The TCP/IP Internet Protocol Suite.

What is the key to the success of TCP/IP?

Its tolerance of heterogeneity.

How does TCP/IP achieve flexibility?

By using a network-independent packet and identification scheme.

Here are the key points about network ownership and categorization:

What is a public network?

A public network is a service available to anyone who pays the subscription fee. It is run by a service
provider and refers to the general availability of the service, not the data being transferred.

What is a private network?

A private network is controlled by a single group or organization, with access restricted to that group. It
can include leased circuits from a public provider.

Here's a breakdown of network types based on ownership:

What are public networks?

Networks run as a service available to subscribers. Anyone who pays the subscription fee can use it. The
term "public" refers to the availability of the service, not the data transferred.
What is a service provider?

A company that offers public network services.

What are private networks?

Networks controlled by a single group, with access restricted to that group. Private networks can include
leased circuits from a provider.

How do network vendors categorize private networks based on size?

Consumer, Small Office / Home Office (SOHO), Small-to-Medium Business (SMB), and Large
Enterprise.

What is a Consumer network?

A network designed for individual or household use with basic functionality.

What defines a Small Office / Home Office (SOHO) network?

A network for small-scale business or home office environments, offering more features than consumer
networks.

What is a Small-to-Medium Business (SMB) network?

A network tailored for small to medium-sized businesses, with more advanced features and scalability
than SOHO networks.

What characterizes a Large Enterprise network?

A network designed for large organizations with extensive networking needs, providing complex
configurations, high capacity, and robust security features.

Are these network categories rigidly defined?

No, the categories are loosely defined and primarily related to sales and marketing.

What is required for communication in a network?

Communication always involves at least two entities: one that sends information and another that receives
it.

What must all entities in a network agree on?

They must agree on how information will be represented and communicated.

What details are involved in communication agreements?

The way electrical signals represent data, procedures for initiating and conducting communication, and
the format of messages.
What is interoperability?

Interoperability refers to the ability of two entities to communicate effectively.

What ensures that communicating parties can interact successfully?

All parties must agree on and follow the same set of rules, defined by a communication protocol.

What is a communication protocol, network protocol, or simply protocol?

It is a specification for network communication that defines details for one aspect of communication,
including actions to be taken in case of errors or unexpected situations.

What is necessary for a communication system to be complete and efficient?

A set of protocols must be constructed to ensure this.

How should each protocol be designed?

Each protocol should handle a specific part of communication that is not managed by other protocols.

How can we guarantee that protocols work well together?

By designing protocols in complete, cooperative sets called suites or families.

What is a protocol suite or family?

A set of protocols designed to handle different aspects of networking, with each protocol covering a
specific aspect of communication.

How are protocols within a suite designed?

The entire suite is designed to ensure that the protocols work together efficiently and cover all aspects of
communication.

What fundamental abstraction is used to organize protocols into a unified system?

The layering model.

What does the layering model involve?

It involves partitioning all aspects of a communication problem into manageable pieces, each known as a
layer.

How does dividing protocols into layers help?

It helps both protocol designers and implementers manage complexity by allowing them to focus on one
aspect of communication at a time.
What will later chapters explain about the layering model?

They will explain protocols in detail and help understand layering.

What is sufficient to know about layering for now?

It is sufficient to understand the purpose of each layer and how protocols are used for communication.

Here are the questions and answers for the details about the Physical Layer and Network Interface Layer:

What does the Physical Layer (Layer 1) specify?

It specifies details about the underlying transmission medium and hardware, including electrical
properties, radio frequencies, and signals.

What is included in Layer 1 specifications?

Specifications related to electrical properties, radio frequencies, and signal characteristics.

What does the Network Interface Layer (Layer 2) specify?

It specifies details about communication between higher layers of protocols (implemented in software)
and the underlying network (implemented in hardware).

What aspects are covered by the Network Interface Layer?

Network addresses, maximum packet size supported by the network, protocols used to access the
underlying medium, and hardware addressing.

What is another term sometimes used for the Network Interface Layer?

Data Link Layer.

What does the Internet Layer (Layer 3) provide?

It forms the fundamental basis for the Internet by specifying communication across multiple
interconnected networks.

What is the role of Layer 3 protocols?

They manage communication across the Internet, handling data transfer between different networks.

What does the Transport Layer (Layer 4) handle?

It facilitates communication from an application program on one computer to an application program on


another.

What specifications are included in the Transport Layer?

Controlling the maximum rate a receiver can accept data, mechanisms to avoid network congestion, and
techniques to ensure all data is received in the correct order.
What does the Application Layer (Layer 5) specify?

It specifies how a pair of applications interact during communication.

What details are defined by the Application Layer?

The format and meaning of messages exchanged between applications, and the procedures to be followed.

What are some examples of network applications in Layer 5?

Email exchange, file transfer, web browsing, telephone services, and video teleconferencing.

How do protocol implementations follow the layering model?

By passing the output from a protocol in one layer to the input of a protocol in the next layer.

How do adjacent layers achieve efficiency in handling packets?

Instead of copying the entire packet, they pass a pointer to the packet.

What happens when an application sends data using the layered protocols?

The data is placed in a packet, which then passes down through each layer of protocols on the sending
computer.

What occurs after the packet has passed through all layers on the sending computer?

The packet is transmitted across the physical network.

What happens when the packet reaches the receiving computer?

The packet passes up through the layers of protocols on the receiving computer.

What occurs if the application on the receiving computer sends a response?

The process is reversed, with the response packet passing down through the layers on the sending
computer and up through the layers on the receiving computer.

What does each layer of protocol software do to ensure messages arrive as expected?

It performs computations and exchanges information with the corresponding layer on the other machine.

How does protocol software on the sender prepare a packet for transmission?

Each layer on the sender adds extra information, known as a header, to the packet.

What happens to the headers on the receiving machine?

The corresponding protocol layer on the receiver removes and uses the extra information (headers).

What is the additional information added by a protocol called?


It is called a header.

In what order are headers added to a packet?

Headers are added in sequence from the highest layer to the lowest layer (e.g., Transport layer first, then
Internet layer, etc.).

Are headers always of the same size?

No, in practice, headers are not of uniform size.

Is a physical layer header always present?

No, a physical layer header is optional.

Which two large standards bodies jointly formed an alternative reference model and created a set
of internetworking protocols?

The International Standardization Organization (ISO) and the International Telecommunications Union,
Telecommunication (ITU-T).

What was the ITU known as before becoming ITU-T?

The Consultative Committee for International Telephone and Telegraph (CCITT).

What is the ISO layering model known as?

he Open Systems Interconnection (OSI) Seven-Layer Reference Model.

How many layers are in the OSI Seven-Layer Reference Model?

Seven layers.

Where can you find an illustration of the seven layers in the OSI model?

In Figure 1.4 (presumably from the relevant reference material).

How do ISO and ITU handle the process of creating standards?

They use a process that accommodates many viewpoints, which can result in standards that seem like
political compromises rather than purely technical solutions.

What was the nature of the OSI Seven-Layer Reference Model when it was first created?

It started as a political compromise and was designed as a competitor to the Internet protocols.

Who were the primary creators of the Internet protocols and reference model?

A small group of about a dozen researchers.


Why might standards organizations have been confident about replacing TCP/IP with OSI
protocols?

Due to their large size and influence, they believed they could dictate a set of protocols that would lead
everyone to switch from the protocols designed by researchers.

At one point, what was the U.S. government's stance on TCP/IP and OSI protocols?

The U.S. government was convinced that TCP/IP should be replaced by OSI protocols.

What eventually happened with TCP/IP technology and OSI protocols?

TCP/IP technology was found to be technically superior, leading to the termination of efforts to develop
and deploy OSI protocols.

What was left for the standards bodies after the termination of OSI protocols?

They were left with the seven-layer model.

How have advocates for the seven-layer model attempted to align it with TCP/IP?

They have tried to stretch the definitions to match TCP/IP, suggesting that layer three could be considered
an Internet layer and placing some support protocols into layers five and six.

What humorous aspect remains in how engineers refer to protocols?

Many engineers still refer to applications as layer 7 protocols, even though layers five and six are
considered unfilled and unnecessary.

What is the focus of PART III: Packet Switching and Network Technologies?

It focuses on packet switching and packet technologies.

Why do computer networks use packets?

The book explains the reasons for using packets in computer networks.

What does PART III describe about packets?

It describes the general format of packets.

How are packets prepared for transmission?

The book examines how packets are encoded for transmission.

What process is shown regarding packet delivery?

It shows how each packet is forwarded across a network to its destination.

What basic categories of computer networks are introduced in PART III?


Local Area Networks (LANs) and Wide Area Networks (WANs).

What is covered regarding these network categories?

The properties of each category are characterized, and some example technologies are discussed.

What does PART IV: Internetworking cover?

It covers internetworking and the associated TCP/IP Suite.

What does PART IV explain about the Internet and TCP/IP protocols?

It explains the structure of the Internet and the TCP/IP protocols.

What addressing scheme is discussed in PART IV?

The IP addressing scheme.

What mapping is described in PART IV?

The mapping between Internet addresses and underlying hardware addresses.

What routing topic is covered in PART IV?

Internet routing and routing protocols.

What fundamental concepts are described in PART IV?

Encapsulation, fragmentation, congestion, flow control, virtual connections, address translation,


bootstrapping, IPv6, and various support protocols.

What does PART V: Other Networking Concepts and Technologies cover?

It covers a variety of remaining topics that pertain to the network as a whole instead of individual parts.

What network-related issues are discussed in PART V?

Issues related to network performance.

What emerging topic is covered in PART V?

Emerging technologies.

What major issues are discussed in PART V?

Major issues in network security.

What concept related to network management is introduced in PART V?

The need for network management and its concepts.


What was the primary motivation for developing early computer networks?

Resource sharing.

How did early computer networks operate?

Multiple users shared a large centralized computer through screens and keyboards.

What kind of resources were initially shared over networks?

Expensive, centralized resources like large computers and peripheral devices.

Specific to ARPA and ARPANET:

What was the primary challenge faced by ARPA in the 1960s?

Insufficient budget to fund multiple expensive computers for researchers.

What was ARPA's solution to this challenge?

Interconnecting computers into a network and developing software to allow researchers to use
the best computer for each task.

What steps did ARPA take to create ARPANET?

Gathering top minds, focusing on computer network research, and hiring contractors to build the
system.

What was the outcome of ARPA's research?

Revolutionary advancements in computer networking.

Why were early computer networks created?

For resource sharing because computers were large and expensive.

What was the initial purpose of these networks?

To connect multiple users to a centralized computer.

What later function did these networks provide?

They allowed multiple users to share peripheral devices.


Why was DARPA interested in computer networks in the 1960s?

To share resources due to the high cost of powerful computers.

What was ARPA's solution to the problem of expensive computers?

To interconnect computers with a network and create software for resource sharing.

What actions did ARPA take to develop a computer network?

They gathered top researchers, focused on network research, and hired contractors to build
ARPANET.

What was the outcome of ARPA's research?

The creation of ARPANET, a revolutionary system.

How has the Internet evolved in less than 30 years?

It has grown from a research prototype connecting a few sites to a global communication system.

What is notable about the Internet's growth rate?

The growth rate has been phenomenal.

What does Figure 2.1 illustrate about the Internet's growth?

It shows the growth using a linear scale with values from zero to 550 million.

Why can linear plots be deceptive?

They can hide small details.

What does Figure 2.2 reveal about the Internet's early growth rate?

It shows that the Internet has had exponential growth for over 25 years.

How often has the Internet been doubling in size?

Every nine to fourteen months.

How did the Internet change as it grew?

Communication speeds increased dramatically, and new applications appealed to a broader


audience.
Who initially dominated the Internet, and how has that changed?

The Internet was initially dominated by scientists and engineers, but it is now widely used by
various sectors of society.

What technological changes shifted the focus from resource sharing to new applications?

Higher communication speeds and the advent of powerful, affordable personal computers.

How did higher communication speeds impact Internet applications?

They enabled applications to transfer large volumes of data quickly.

What effect did affordable personal computers have on Internet usage?

They provided the computational power needed for complex tasks, reducing the demand for
shared resources.

What significant shift has occurred in the type of data sent across the Internet?

The shift from textual data to multimedia, including images, audio, and video.

What does Figure 2.3 illustrate about the evolution of Internet communication?

It shows the transition from textual data to the transfer of images, video clips, and full-motion
videos by the late 1990s.

What similar transition is shown in Figure 2.4?

A transition in audio communication, from basic audio to more advanced multimedia audio
formats.

What is multimedia?

Multimedia refers to data that contains a combination of text, graphics, audio, and video.

What characterizes much of the content available on the Internet today?

A significant portion of Internet content now consists of multimedia.

How has the quality of multimedia content improved?

Higher bandwidths have made it possible to communicate high-resolution video and high-fidelity
audio.

What continues to emerge in the Internet landscape?


New technologies and new applications.

What significant transitions have traditional communication systems undergone?

They have moved from analog to digital and adopted Internet technology.

Which traditional systems have adopted Internet technology?

The voice telephone network and cable television.

What trend is accelerating in Internet technology?

Support for mobile users.

What is one interesting aspect of the Internet's evolution?Internet applications change


frequently, even though the underlying technology remains largely the same.

What do Figures 2.5 and 2.6 illustrate?

Figure 2.5 lists recent changes in Internet technology and applications, while Figure 2.6 lists
types of applications that have emerged.

What is significant about the availability of high-quality teleconferencing systems like


Cisco's TelePresence?

They allow businesses to hold meetings without the need for travel, significantly reducing costs.

How do teleconferencing systems benefit businesses?

By lowering travel expenses, which can reduce overall business costs.

What are some examples of social networking applications?

Facebook, Second Life, and YouTube.

Why are social networking applications considered fascinating?

They create new social connections where people know each other only through the Internet.

What do sociologists suggest about social networking applications?

They believe these applications will enable more people to find others with shared interests and
foster the formation of small social groups.
What does the term "stream" refer to in the context of the Internet?

It refers to a paradigm where a sequence of bytes flows from one application program to another.

How does the Internet's stream mechanism work between two applications?

It arranges two streams between a pair of communicating applications, with one stream in each
direction.

What does the network do with the data from the applications?

The network accepts input from either application and delivers the data to the other application.

How does the stream mechanism handle the sequence of bytes?

It transfers a sequence of bytes without attaching meaning to the bytes or inserting boundaries.

Can a sending application generate data in different ways?

Yes, a sending application can generate one byte at a time or blocks of bytes.

How does the network handle the delivery of bytes?

The network can combine smaller blocks into one large block or divide a large block into smaller
blocks.

What are some examples of Internet applications that use the stream mechanism?

Examples include HTTP, FTP, and Telnet.

What does the message paradigm refer to in the context of the Internet?

It refers to a network mechanism that accepts and delivers complete messages.

How does the message paradigm ensure message integrity?

The network delivers each message exactly as it was sent, without delivering part of a message
or combining multiple messages.

What happens if a sender sends a message with n bytes?

The receiver will receive exactly n bytes in the incoming message.

What are the different forms of message delivery in the message paradigm?

Unicast, Multicast, and Broadcast.


What is unicast delivery?

A message is sent from an application on one computer directly to an application on another


computer (1-to-1).

What is multicast delivery?

A message is sent to some of the computers on a network (1-to-many).

What is broadcast delivery?

A message is sent to all computers on a given network (1-to-all).

What does the message service not guarantee?

It does not guarantee delivery, so messages may be lost, duplicated, or delivered out-of-order.

What must a programmer ensure when using the message paradigm?

The application must operate correctly even if packets are lost or reordered.

Why do most applications require delivery guarantees?

To ensure that data is reliably transmitted and received.

What service do programmers typically use instead of the message paradigm?

The stream service, except in special situations like video.

In what situations might the message paradigm be used?

In special situations such as video streaming, where multicast is needed, and the application
handles packet reordering and loss.

What is an example of an application that uses multicast and the message paradigm?

Internet radio.

What type of communication does the Internet stream service use?

It uses connection-oriented communication.

How does connection-oriented communication operate?

It operates similarly to a telephone call: applications request a connection, send data in both
directions once the connection is established, and terminate the connection when done.
What must two applications do to start using connection-oriented communication?

They must request that a connection be created.

What happens once a connection is established in connection-oriented communication?

The applications can send data in either direction.

What do applications do when they finish communicating?

They request that the connection be terminated.

What does Algorithm 3.1 summarize?

The interaction involved in connection-oriented communication.

What question does Algorithm 3.1 raise regarding connection requests? How can two
applications on independent computers coordinate to request a connection at the same time?

What interaction model addresses this question?

The client-server model.

In the client-server model, what roles do the server and client play?

The server starts first and waits for contact, while the client starts second and initiates the
connection.

What does Figure 3.2 summarize?

The interaction in the client-server model.

How do application programs use the client-server model on the Internet?

Clients (e.g., web browsers) request services, while servers (e.g., web servers) provide those
services.

Can you give examples of client-server applications?

A web browser acts as an HTTP client, and a web server acts as an HTTP server.

The Client-Server Model of Interaction is a foundational concept in network communication,


where one program (the client) requests services from another program (the server). Here's a
breakdown of its key elements:

1. Roles:

- Server:
- Starts first and listens for incoming requests.

- Waits for clients to initiate contact.

- Provides resources or services in response to client requests.

- Client:

- Starts after the server and initiates the connection.

- Requests services or resources from the server.

- Handles the user interface and application logic.

2. Process:

- Connection Request:

- The client sends a request to the server to establish a connection.

- Service Provision:

- Once the connection is established, the server provides the requested service or resource.

- Termination:

- After the communication is complete, the connection is terminated, either by the client or
the server.

3. Examples:

- Web Browsers and Web Servers:

- Web browsers (clients) request web pages from web servers (servers).

- Email Clients and Email Servers:

- Email clients request access to emails from email servers.

- File Transfer Protocols:

- Clients request file transfers from file servers.

4. Advantages:

- Separation of Concerns:

- Clients and servers can focus on their respective tasks.


- Scalability:

- Servers can handle requests from multiple clients simultaneously.

- Resource Management:

- Servers manage resources and services, while clients use them as needed.

5. Interaction Summary:

- The client-server model facilitates organized and efficient communication in distributed


systems, ensuring that requests and responses are handled in a structured manner.

What is a client software in the client-server model?

- It is an application program that becomes a client temporarily when remote access is needed
but also performs other computations.

How is a client software typically invoked?

It is invoked directly by a user and executes only for one session.

Where does client software usually run?

It runs locally on a user's personal computer.

How does a client interact with a server?


It actively initiates contact with the server.

Can a client access multiple services?

Yes, but it usually contacts one remote server at a time.

What are the hardware requirements for a client?

It does not require especially powerful computer hardware.

What is server software in the client-server model?

It is a special-purpose, privileged program dedicated to providing a service.

How many remote clients can a server handle simultaneously?

It can handle multiple remote clients at the same time.


When is server software typically invoked?

It is invoked automatically when a system boots and continues to execute through many sessions.

Where does server software usually run?

It runs on a large, powerful computer.

How does a server interact with clients?

It waits passively for contact from arbitrary remote clients.

How does a server handle client connections?

It accepts contact from arbitrary clients but offers a single service.

What are the hardware and software requirements for a server?

It requires powerful hardware and a sophisticated operating system (OS).

What does the term "server" refer to in the context of server programs?

It refers to a program that waits passively for communication, not to the computer on which it
runs.

What does the term "server" refer to when talking about computers?

It refers to a computer that is dedicated to running one or more server programs.

How do hardware vendors contribute to confusion regarding the term "server"?

They classify computers with fast CPUs, large memories, and powerful operating systems as
server machines.

What does Figure 3.3 illustrate?

It illustrates the different definitions and uses of the term "server" in the context of programs and
computers.

Which side initiates contact in a client-server interaction?

The client initiates contact.

What happens once contact has been established between client and server?

Two-way communication is possible, allowing data to flow from the client to the server and from
the server to the client.

Can a client send multiple requests?


Yes, a client can send a series of requests.

Can a server issue multiple responses?

Yes, a server can issue a series of responses to a client's requests.

Give an example of a scenario where a client sends multiple requests and receives multiple
responses.

A database client that allows a user to look up more than one item at a time.

Why is it useful to allow a single computer to operate multiple servers?

Because it allows hardware to be shared, reduces system administration overhead, and meets
sporadic demand for services.

What are the benefits of running multiple servers on a single computer?

Lower system administration overhead, hardware sharing, and reduced cost without significantly
affecting performance.

Why might a server remain idle for long periods?

Because the demand for server services is often sporadic.

How does consolidating servers on a single computer affect costs?

It can dramatically reduce costs if the demand for services is low.

Does consolidating servers on a single computer usually impact performance?

No, it typically does not significantly reduce performance.

What are some configurations a computer can run in terms of clients and servers?

A single client, a single server, multiple copies of a client contacting a single server, multiple
clients contacting a particular server, or multiple servers each for a different service.

Why is allowing a computer to operate multiple clients useful?

Because it enables simultaneous access to multiple services.

Give an example of how a user might run multiple clients on a computer.

A user might have three windows open: one for retrieving and displaying email, another for
connecting to a chat service, and a third running a web browser.

How does a client identify a server on the Internet?


By using two pieces of information: the IP address of the computer and the port number for the
service.

What does an IP address identify?

It identifies the specific computer on which a server runs.

How is the IP address formatted?

It is a unique 32-bit identifier known as an Internet Protocol address.

Why might IP addresses be hard to remember?

Because they are numeric and not easily relatable for humans.

What system helps translate between IP addresses and human-readable names?

The Domain Name System (DNS).

What does DNS do?

It translates domain names (e.g., www.sustech.edu) into IP addresses and vice versa.

How does a user typically specify a server's address?

By using a domain name rather than an integer IP address.

How is a service identified on the Internet?

Each service is assigned a unique 16-bit identifier known as a protocol port number (or port
number).

What are some examples of well-known port numbers and their associated services?

Email (SMTP) uses port number 25, and the web (HTTP) uses port number 80.

What must a server do when it begins execution?

It registers with its local OS by specifying the port number for its service.

How does a client request a service from a server?

The request contains the port number, so the client must know the port number for the service.

What happens when a request arrives at a server?

The server's software uses the port number in the request to determine which application on the
server should handle the request.
What does Figure 3.4 illustrate?

It summarizes the basic steps involved in server identification and demultiplexing.

What does the serial approach imply about a server's handling of clients?

It implies that a server handles one client at a time.

Why is a concurrent server typically used instead of a serial approach?

Because most servers need to handle multiple clients simultaneously.

What does concurrent execution of a server depend on?

It depends on the operating system (OS) being used.

What are the two main components of concurrent server code?

A main program (thread) and a handler.

What does the main thread of a concurrent server do?

It accepts contact from a client and creates a thread of control for that client.

What does each thread of control in a concurrent server do?

It interacts with a single client and runs the handler code.

What happens to a thread after it has handled a client in a concurrent server?

The thread terminates.


What does the main thread do in a concurrent server after creating a thread to handle a
request?

It keeps the server alive and waits for another request to arrive.

How many threads are running if N clients are simultaneously using a concurrent server?

N+1 threads: the main thread (1) and N threads each interacting with a single client.

What can blur the distinction between clients and servers?

A server for one service can act as a client for another service.

Give an example of when a server might act as a client.

A web server may become a client of a database to fill in a web page or a security service to
verify a client's access rights.

What must programmers be careful to avoid among servers?

Circular dependencies among servers.

What is an example of a circular dependency among servers?

A server for service X1 becomes a client of service X2, which becomes a client of service X3,
which in turn becomes a client of service X1, creating a potentially endless chain of requests.

Why is the potential for circular dependencies especially high?

Because services are often designed independently, with no single programmer controlling all
servers.

What can happen if a single server provides a given service?

The network connection between the server and the Internet can become a bottleneck.

Why is a single server network connection vulnerable?

It can be exploited for Denial of Service (DoS) attacks.

What does Figure 3.5 illustrate?

The architecture of a network where a single server provides a service, potentially leading to
bottlenecks.
How can Internet services avoid creating a central bottleneck?

By using a peer-to-peer (P2P) architecture.

What is the key concept behind the P2P architecture?

Data is distributed equally among a set of N servers, avoiding reliance on a central server.

How does the P2P architecture handle client requests?

Each client request is sent to the appropriate server, with each server providing only 1/N of the
data.

What is the impact on traffic between a server and the Internet in the P2P architecture
compared to a single-server architecture?

The amount of traffic is reduced to 1/N as much as in the single-server architecture.

Can server software run on the same computers as clients in a P2P architecture?

Yes, server software can run on the same computers as clients.

What does Figure 3.6 illustrate?

The architecture of a peer-to-peer (P2P) network, showing how data is distributed among
multiple servers to avoid central bottlenecks.
What is the interface an application uses to specify communication called?

An Application Program Interface (API).

Where can a simplified API with example code be found?

In Appendix 1.

What does the simplified API in Appendix 1 demonstrate?

It demonstrates how to create Internet applications, including a working web server.

What determines the details of an API?

The operating system (OS).

What is the de facto standard API for software that communicates over the Internet?

The socket API, commonly abbreviated as sockets.

Which operating systems provide the socket API?

The socket API is available for many OS, including Microsoft's Windows (known as "winsock")
and various UNIX systems, including Linux, which are developed from the Berkeley socket API.

What was the socket API originally developed as part of?

The UNIX operating system.

How is the socket API integrated with the operating system?

It is integrated with the I/O system.


What does the OS return when an application creates a socket for Internet use?

A small integer descriptor that identifies the socket.

What does the application do with the socket descriptor?

It passes the descriptor as an argument when calling functions to perform operations on the
socket, such as transferring or receiving data.

How are socket descriptors integrated in many operating systems?

They are integrated with other I/O descriptors, allowing applications to use the same read and
write operations for both socket I/O and file I/O.

How does socket programming differ from conventional I/O?

An application must specify details like the address of a remote computer, the protocol port
number, and whether the application will act as a client or server.

What did designers of the socket API do to avoid having a single socket function with many
parameters?

They chose to define many functions instead of one with many parameters.

What does an application do after creating a socket?

It invokes additional functions to specify details.

What is the advantage of the socket API approach?

Most functions have three or fewer parameters.

What is the disadvantage of the socket API approach?

A programmer must remember to call multiple functions when using sockets.


What does Figure 3.8 illustrate?

The sequence of socket calls made by a typical client and server using a stream connection.

Who typically sends data first in a client-server socket interaction?

The client sends data first, and the server waits to receive data.

Can the order of sending and receiving data be reversed in some applications?

Yes, in some applications, the server may send data first, and the client waits to receive it (i.e.,
`send` and `recv` are called in reverse order).
What does the `socket` function do?

The `socket` function creates a new socket and returns a descriptor that identifies it.

What arguments are needed for the `socket` function?

The `socket` function requires `protofamily`, `type`, and `protocol` as arguments.

What does `protofamily` specify in the `socket` function?

protofamily` specifies the protocol family, such as `PF_INET` for the TCP/IP protocol suite.

What does `type` specify in the `socket` function?

`type` specifies the type of communication, with `SOCK_STREAM` for stream transfer and
`SOCK_DGRAM` for connectionless message transfer.

What is the purpose of the `send` function?

The `send` function is used to send data from a socket to another socket.

What arguments does the `send` function take?

The `send` function takes `socket`, `data`, `length`, and `flags` as arguments.

What is the purpose of the `recv` function?


The `recv` function is used to receive data from a socket into a buffer.

What arguments does the `recv` function take?

The `recv` function takes `socket`, `buffer`, `length`, and `flags` as arguments.

How are `read` and `write` functions used with sockets?

The `read` function reads data from a socket, while the `write` function sends data to a socket,
similar to how they operate with file descriptors.

Can `read` and `write` be used instead of `recv` and `send` on some operating systems?

Yes, on some operating systems like Linux, the `read` and `write` functions can be used instead
of `recv` and `send`.

How do the arguments of `read` and `write` compare to those of `recv` and `send`?

The `read` function takes three arguments identical to the first three arguments of `recv`, and the
`write` function takes three arguments identical to the first three arguments of `send`.

What is the purpose of the `close` function?

The `close` function is used to close a socket, freeing the associated resources.

What argument does the `close` function take?

The `close` function takes a single argument: the socket descriptor to be closed.

What is the purpose of the `connect` function?

The `connect` function is used by clients to establish a connection with a specific server.

What arguments does the `connect` function take?

The `connect` function takes three arguments: `socket`, `saddress`, and `saddresslen`.

What is the `socket` argument in the `connect` function?

The `socket` argument is the descriptor of the socket to use for the connection.

What does the `saddress` argument represent in the `connect` function?

The `saddress` argument is a `sockaddr` structure that specifies the server’s address and protocol
port number.

What does `saddresslen` specify in the `connect` function?

The `saddresslen` argument specifies the length of the server address, measured in bytes.
What is the purpose of the `bind` function?

The `bind` function is used by a server to assign a local address to a socket.

What arguments does the `bind` function take?

The `bind` function takes three arguments: `socket`, `localaddr`, and `addrlen`.

What is the `localaddr` argument in the `bind` function?

The `localaddr` argument is a structure that specifies the local address to be assigned to the
socket.

What does the `addrlen` argument specify in the `bind` function?

The `addrlen` argument specifies the length of the address in bytes.

What is the purpose of the `listen` function?

The `listen` function is used by a server to specify the length of the request queue for a socket.

What arguments does the `listen` function take?

The `listen` function takes two arguments: `socket` and `queuesize`.

What does the `queuesize` argument specify in the `listen` function?

The `queuesize` argument specifies the length of the socket’s request queue.

What is the purpose of the `accept` function?

The `accept` function is used by a server to accept a connection request from a client and create a
new socket for the connection.

What arguments does the `accept` function take?

The `accept` function takes three arguments: `socket`, `caddress`, and `caddresslen`.

What are the `caddress` and `caddresslen` arguments in the `accept` function?

The `caddress` argument is a structure that will be filled with the client’s address information,
and `caddresslen` specifies the length of this structure in bytes.

What is the purpose of the `accept` function in socket programming?

The `accept` function is used by a server to accept a connection request from a client, create a
new socket for the connection, and return the descriptor of the new socket.

What arguments does the `accept` function take?


The `accept` function takes three arguments: `socket`, `caddress`, and `caddresslen`.

What is the `socket` argument in the `accept` function?

The `socket` argument is the descriptor of the socket that the server has created and bound to a
specific protocol port.

What is the `caddress` argument in the `accept` function?

The `caddress` argument is a pointer to a structure of type `sockaddr`, which will be filled with
the address of the client that formed the connection.

What does the `caddresslen` argument specify in the `accept` function?

The `caddresslen` argument is a pointer to an integer that will be set to the length of the client’s
address.

What does the `accept` function return?

The `accept` function returns the descriptor of the new socket created for the connection.

Why are socket functions for the message paradigm more complicated than those for the stream
paradigm?

Socket functions for the message paradigm are more complicated because they offer more
options, such as choosing whether to store the recipient’s address in the socket or specify it with
each message, and allowing different ways to pass address and message data.

What is one option available when sending a message in the message paradigm?

One option is to store the recipient’s address in the socket and only send data, or to specify the
recipient’s address each time a message is transmitted.

How can a sender pass the address and message when using message-based sockets?

A sender can either place the address and message in a structure and pass the address of the
structure as an argument or pass the address and message as separate arguments.

What does the complexity of message-based socket functions reflect?

The complexity reflects the need for more flexibility in specifying message transmission details,
such as handling addresses and message data in various ways.

What is the purpose of the `sendto` function?

The `sendto` function is used to send data to a specific destination address. It allows specifying
the destination address and its length in addition to the data to be sent.
What arguments does the `sendto` function take?

The `sendto` function takes six arguments: `socket`, `data`, `length`, `flags`, `destaddress`, and
`addresslen`.

What does the `sendmsg` function do?

The `sendmsg` function performs the same operation as `sendto`, but uses a structure to
encapsulate the destination address, the length of the address, the message, and the length of the
message, simplifying the function call.

What is the advantage of using `sendmsg` over `sendto`?

The advantage of using `sendmsg` is that it simplifies the function call by using a structure to
group related information, making the code easier to read and manage.

What is the role of the `msgstruct` argument in the `sendmsg` function?

The `msgstruct` argument in the `sendmsg` function is a structure that contains the destination
address, the length of the address, the message to be sent, and the length of the message.

What is the purpose of the `recvfrom` function?

The `recvfrom` function is used to receive data from a socket and also retrieve the sender's
Internet address.

What arguments does the `recvfrom` function take?

The `recvfrom` function takes six arguments: `socket`, `buffer`, `length`, `flags`, `sndraddr`, and
`saddrlen`.

What does the `recvmsg` function do?

The `recvmsg` function performs the same operation as `recvfrom`, but uses a structure to
encapsulate the message and the sender’s Internet address, simplifying the function call.

What is the advantage of using `recvmsg` over `recvfrom`?

The advantage of using `recvmsg` is that it simplifies the function call by using a structure to
manage both the message and the sender’s address information, making the code easier to read
and manage.

What is the role of the `msgstruct` argument in the `recvmsg` function?

The `msgstruct` argument in the `recvmsg` function is a structure that holds the address of the
incoming message as well as locations for recording the sender’s Internet address. The format of
this structure is the same as that used with `sendmsg`.
How does the socket API support concurrent servers?

The socket API supports concurrent servers by allowing threads to inherit open sockets from the
thread that created them, enabling multiple threads to use the same sockets concurrently.

What happens to a socket's reference count when a new thread is created?

When a new thread is created, it inherits a pointer to each open socket, causing the reference
count of each socket to be incremented by 1.

What is the purpose of the reference count mechanism in socket management?

The reference count mechanism helps manage the lifetime of a socket. It ensures that a socket
remains open as long as there are references to it and is removed only when its reference count
drops to zero.

What occurs when a thread calls the `close` function on a socket?

When a thread calls `close` on a socket, the system decrements the socket's reference count. If
the reference count reaches zero, the socket is removed and deallocated.

How does the socket API handle the lifecycle of sockets in a multithreaded environment?

In a multithreaded environment, each thread inherits a copy of all open sockets from the creating
thread, and the reference count mechanism ensures proper management and cleanup of sockets
when they are no longer in use.

What details must a programmer specify when creating two network applications?

The syntax and semantics of messages, who initiates interaction, error-handling actions, and how to
terminate communication.

What are the two broad types of application-layer protocols?

Private communication (proprietary, limited scope) and standardized service (Internet-wide, like web
servers or FTP).

Who decides the actions to be taken if an error arises in communication?

The programmer specifies these actions.

How do applications know when to terminate communication?

The programmer defines the termination conditions.

What is private communication in application-layer protocols?


It involves a programmer creating a pair of applications for private use, where interaction is
straightforward and doesn’t require a formal protocol specification.

What characterizes standardized service protocols?

They are documented independent of implementation, precise, unambiguous, and their size depends on
the complexity of the service.

Why must standardized service protocols be documented?

Because many programmers may create server or client software to offer or access the service.

What two aspects of interaction do application-layer protocols specify?

Representation and transfer.

Why are representation and transfer important in application-layer protocols?

They define how data is structured and how it is transmitted between applications.

Figure 4.1 (below) explains the distinction

What is the World Wide Web (WWW)?

One of the most widely used services on the Internet.

Why is the web considered complex?

Because many protocol standards have been devised to specify various aspects and details.

• Figure 4.2 (below) illustrate major WWW standards


What is HTML?

HTML (HyperText Markup Language) is a representation standard that specifies the syntax of a web
page.

What are the general characteristics of HTML?

Textual representation, multimedia description, declarative paradigm, markup specifications, hyperlink


embedding, and inclusion of metadata like MIME type.

What types of content can HTML specify in a web page?

HTML can specify complex web pages that contain graphics, audio, video, and text.

How is HTML classified in terms of programming paradigms?

HTML is classified as declarative, specifying what is to be done rather than how to do it.

Why is HTML considered a markup language?

It provides general guidelines for display without detailed formatting instructions.

What does HTML allow regarding headings?

HTML allows specifying the level of importance for a heading without requiring exact font, typeface, or
size details.

Why is the use of a markup language like HTML important for browsers?

It allows a browser to adapt the page to different display hardware, from high-resolution screens to small
handheld devices.

What do HTML extensions provide?

They allow the specification of exact fonts, typefaces, point sizes, and formatting.

How does HTML specify markup?


HTML uses tags embedded in the document.

What do HTML tags provide?

They provide structure, formatting, and control over display.

What is the effect of white space in an HTML document?

White space can be inserted without affecting the formatted version displayed by a browser.

Are HTML tags case-sensitive?

No, HTML tags are case-insensitive.

What is the purpose of the IMG tag in HTML?

The IMG tag encodes a reference to an external image, with options to specify alignment with
surrounding text.

Sure, here are some questions and answers based on the information about Uniform Resource Locators
(URLs) and hyperlinks:

What is a Uniform Resource Locator (URL)?

A Uniform Resource Locator (URL) is a syntactic form used by the Web to specify a web page. It
provides the address of a resource on the Internet.

What are the main components of a URL?

The main components of a URL are:

Protocol: The name of the protocol used to access the document (e.g., `http`, `https`).

Computer_name: The domain name of the computer on which the document resides (e.g.,
`www.example.com`).
Port (optional): The port number at which the server is listening (e.g., `:80` for HTTP, `:443` for HTTPS).

Document_name(optional): The name of the document (e.g., `index.html`). If not provided, `index.html`
is assumed.

Parameters(optional): Parameters for the page, which are introduced by a `?` (e.g., `?search=example`).

What does the 'protocol' in a URL specify?

The 'protocol' in a URL specifies the method used to access the document on the Web, such as HTTP or
HTTPS.

Is the port number in a URL always required?

No, the port number is optional. If it is not specified, the default port for the protocol is used (e.g., port 80
for HTTP and port 443 for HTTPS).

What happens if the document_name is not specified in the URL?

If the document_name is not specified, the server typically defaults to `index.html` or another default
page.

What is the correct symbol for introducing parameters in a URL?

The correct symbol for introducing parameters in a URL is `?`, not `%`. For example,
`http://www.example.com/page?param=value`.

Example:

Can a user omit parts of a URL?

Yes, a user can omit many parts of a URL. If omitted, defaults are assumed:

Protocol: If not specified, `http` is assumed.

Port: If not specified, port 80 is assumed.

Document Name: If not specified, `index.html` is assumed.

Parameters: If not specified, no parameters are assumed.

What information does a URL contain for a browser to retrieve a page?

A URL contains all the necessary information for a browser to retrieve a page, including the protocol,
computer name, document name, and parameters.
What are the separator characters used in a URL?

The separator characters used in a URL are:

Colon (`:`) – separates the protocol from the port.

Slash (`/`) – separates different parts of the URL.

Percent(`%`) – used in URL encoding to represent special characters.

How does a browser use the URL to form a connection to the server?

A browser uses the **protocol** and **port** (if specified) to form a connection to the server on which
the page resides. If no port is specified, the default port for the protocol is used.

How does a browser use the URL to request a page?

The browser uses the **document name** and **parameters** (if specified) to request the page from the
server. If no document name is provided, it defaults to `index.html`.

What is the primary transfer protocol that a browser uses to interact with a web server?

The primary transfer protocol used by a browser to interact with a web server is HyperText Transfer
Protocol (HTTP).

How does a browser use a URL to contact a web server?

A browser acts as a client that extracts the server name from the URL and contacts the server to request or
interact with resources.

What protocol references are commonly found in URLs for HTTP?

URLs commonly contain an explicit protocol reference of `http://` or omit the protocol altogether, in
which case HTTP is assumed.

How can HTTP be characterized?

HTTP can be characterized by the following:

Uses textual control messages: Communication between client and server is done using plain text.

Transfers binary data files: HTTP can handle and transfer various types of binary files.

Can download or upload data: HTTP supports both downloading data from and uploading data to the
server.

Incorporates caching: HTTP can use caching to store copies of web pages and resources to improve
performance and reduce the need for repeated requests.

What does a browser do once it establishes a connection with a server?


Once a browser establishes a connection with a server, it sends an HTTP request to the server.

What are the four major HTTP request types listed in Figure 4.5?

The four major HTTP request types are:

GET: Retrieves data from the server.

POST: Submits data to the server for processing.

PUT: Updates or replaces an existing resource on the server.

DELETE: Removes a resource from the server.

What is the purpose of a GET request in HTTP?

The purpose of a GET request is to retrieve data from the server, such as requesting a web page or other
resources.

When is a POST request used in HTTP?

A POST request is used when submitting data to the server, such as when a user submits a form or
uploads a file.

How does a PUT request differ from a POST request in HTTP?

A PUT request updates or replaces an existing resource on the server, while a POST request is typically
used to submit new data or create a resource.

What is the function of a DELETE request in HTTP?

The function of a DELETE request is to remove a specified resource from the server.

What does a browser do to request a page from a server?

The browser sends a GET request to the server.

How does the server respond to a GET request?


The server responds with a header, a blank line, and the requested document.

What is the format of a GET request?

The format of a GET request is:

```

GET /item version CRLF

```

What does "item" refer to in a GET request?

"Item" refers to the URL of the resource being requested.

What does "version" specify in a GET request?

"Version" specifies the HTTP protocol version (e.g., HTTP/1.0 or HTTP/1.1).

What does CRLF stand for?

CRLF stands for Carriage Return and Linefeed, which are ASCII characters used to mark the end of a
line.

Why is version information important in HTTP?

Version information ensures backward compatibility and helps the server choose the highest protocol
version both the browser and server can understand.

What does the first line of an HTTP response header contain?

The first line of an HTTP response header contains a status code that indicates whether the server
successfully handled the request.

What does a status code 404 signify?

A status code 404 signifies that the requested item cannot be found.

What does a status code 200 indicate?

A status code 200 indicates that the server successfully honored the request.

What additional information can be found in the header beyond the status code?

Additional information in the header can include:

The length of the content

The date and time when the content was last modified

The type of content (content type)


Figure 4.6 shows the general format of lines in a basic response header

What type of file is being requested in the sample output from the Apache web server?

The requested file is a text file containing 16 characters, including the text "This is a test." plus a
NEWLINE character.

Which HTTP version is specified in the GET request?

The GET request specifies HTTP version 1.0.

What HTTP version is the server actually running?

The server is running HTTP version 1.1.

How many lines of header does the server return in the response?

The server returns 9 lines of header in the response.

What does the server include after the header lines in the response?

After the header lines, the server includes a blank line and then the contents of the requested file.
Why is caching important for web access?

Caching is important because users often visit the same websites repeatedly, and caching helps optimize
access by storing copies of frequently used content.

What types of content often benefit from caching?

Large images, such as Graphics Interchange Format (GIF) and Joint Photographic Experts Group (JPEG)
images, benefit from caching as they often contain backgrounds or banners that do not change frequently.

How does caching reduce download times?

Caching reduces download times by saving a copy of each image on the user's disk, allowing the browser
to use the cached copy instead of downloading it again.

What happens if the document on the web server changes after a browser has cached it?

The browser needs a way to determine whether its cached copy is still valid or if it has become stale.

How can a browser determine if its cached copy is stale?

A browser can determine if its cached copy is stale by checking if the content has been updated on the
server, often using methods like validating cache expiration dates or ETags (entity tags).

What information does the header specify when a browser obtains a document from a web server?

The header specifies the last time the document was changed

How does a browser use the Last-Modified date in caching?

The browser saves the Last-Modified date with the cached copy and uses it to compare with the server's
Last-Modified date to check if the cached version is stale.

What action does a browser take if the cached version of a document is stale?
If the cached version is stale, the browser downloads the new version from the server.

What is a No-cache header in HTTP?

A No-cache header specifies that a given item should not be cached by the browser.

Why do browsers often avoid caching small items?

Browsers avoid caching small items because the time to download them with a GET request is similar to
the time for a HEAD request, and keeping many small items in a cache can increase lookup times.

Caching In Browsers

What makes a browser structure complex?

A browser structure is complex because it must understand HTTP and support multiple other protocols.

What must a browser contain to handle different protocols?

A browser must contain client code for each protocol used and be capable of interacting with servers and
interpreting responses.

How does a browser interact with FTP services?

A browser must know how to access and interact with FTP (File Transfer Protocol) services.

What does Figure 4.9 illustrate about browser architecture?


Figure 4.9 illustrates the components that a browser should contain to support its functions.

Browser Architecture

What is a file in the context of computing?

A file is a fundamental storage abstraction that can hold various objects such as documents, spreadsheets,
computer programs, graphic images, or data.

What does FTP do?

FTP (File Transfer Protocol) allows the transfer of a copy of a file from one computer to another,
providing a mechanism for exchanging data.

Why is file transfer across the Internet complicated?

File transfer is complicated because computers are heterogeneous, meaning they differ in file
representations, type information, naming conventions, and file access mechanisms.

What aspects make computers heterogeneous in the context of file transfer?

Aspects include differences in file representations, type information, naming conventions, and file access
mechanisms.

What are some variations in file extensions for JPEG images across different operating systems?

Some operating systems use the extension `.jpg`, while others use `.jpeg` for JPEG images.

How do line termination conventions differ among operating systems?


Some operating systems use a single LINEFEED character to terminate lines in a text file, while others
require both CARRIAGE RETURN and LINEFEED.

What are the different file name separators used by various operating systems?

Some operating systems use a slash (`/`) as a file name separator, while others use a backslash (`\`).

How does user account information vary across different operating systems?

User account information varies because user accounts defined on one operating system are not the same
as those on another. User X on one computer may not be the same as User X on another computer.

What types of data can FTP transfer?

FTP can transfer any type of data, including arbitrary file contents.

Can FTP handle both downloading and uploading files?

Yes, FTP supports bidirectional transfer, allowing both downloads and uploads.

What does FTP support in terms of file access?

FTP supports authentication and ownership, allowing files to have ownership and access restrictions.

What feature of FTP allows navigation through file systems?

FTP provides the ability to browse folders.

How are control messages transmitted in FTP?

Control messages in FTP are sent as ASCII text.

How does FTP handle differences between various operating systems?

FTP accommodates heterogeneity by hiding the details of individual computer operating systems.

How is FTP typically used in web browsers?

FTP is mostly invisible to users and is invoked automatically by a browser when a user requests a file
download.

How does FTP handle client-server interaction?

In FTP, a client establishes a connection to an FTP server and sends requests, to which the server
responds.

Does an FTP server use the same connection for sending responses as the one used for requests?

No, the server does not use the same connection for responses. The connection used for requests is called
the control connection, and the server opens a new connection for file transfers.
What is the purpose of the control connection in FTP?

The control connection is reserved for sending commands between the client and server.

What are data connections used for in FTP?

Data connections are used for transferring files, such as downloading or uploading files, and are distinct
from the control connection.

How does FTP invert the client-server relationship for data connections?

For data connections, FTP inverts the client-server relationship, meaning the server initiates the
connection to the client for data transfer.

What does Figure 4.10 illustrate about FTP?

Figure 4.10 illustrates the interaction between the control and data connections in FTP.

Figure 4.10 Illustration of FTP connections during a typical session

What must a client do after creating the control connection in FTP?

After creating the control connection, a client must log into the server using the USER and PASS
commands to provide a login name and password.
How does the server indicate whether the login was successful?

The server sends a numeric status response over the control connection to inform the client of the login
success or failure.

When can a client send other commands in FTP?

A client can only send other commands after a successful login.

What is the login process for accessing public files in FTP?

For accessing public files, a client uses an anonymous login with the user name "anonymous" and the
password "guest" or similar.

What protocol port number should a server specify when connecting to the client?

The default protocol port number for FTP is **port 21**.

What does a client do to prepare for a data connection in FTP?

The client allocates a protocol port on its local operating system, binds to that port to await a connection,
and sends the port number to the server using the PORT command over the control connection.

What is the purpose of the PORT command in FTP?

The PORT command informs the server about the port number on the client’s side that will be used for
the data connection.

What problem can arise if one endpoint is behind a Network Address Translation (NAT) device?

The transmission of a protocol port number can fail if one of the endpoints is behind a NAT device, such
as a wireless router.

How does a NAT device support FTP despite the issues with port transmission?

A NAT device that supports FTP recognizes the FTP control connection, inspects its contents, and
rewrites the values in a PORT command to facilitate the connection.

Which chapter explains how FTP handles NAT devices?

Chapter 23 explains how FTP handles NAT devices and the issues related to port number transmission.
Why is email one of the most widely used Internet applications?

Email is widely used because it was conceived before personal computers and hand-held PDAs were
available, making it a foundational and enduring application.

What does Figure 4.11 illustrate about email?

Figure 4.11 illustrates the architecture of email.

What does Algorithm 4.3 list regarding email?

Algorithm 4.3 lists the steps involved in email processing.

What are the two main components of email software?

The two main components are:

Email interface application: Allows users to compose, edit, read, and process messages.

Mail transfer program: Acts as a client to send messages to the mail server, which then deposits the
messages into the appropriate user's mailbox.

What role does the mail transfer program play in email communication?

The mail transfer program acts as a client to send messages to the destination mail server, which accepts
and stores the messages in the recipient's mailbox.
How can the specifications for Internet email be categorized?

The specifications for Internet email can be divided into three broad categories.

What are the three broad categories of email specifications illustrated in Figure 4.12?
Figure 4.12 lists the three broad categories, which are typically:

Email Formats: Defines how email messages are formatted and structured.

Email Transfer Protocols: Specifies how email is transmitted between servers and clients.

Email Access Protocols: Describes how users access and retrieve their email from the server.

What is the purpose of email format specifications?

Email format specifications define how email messages are structured and formatted, ensuring
compatibility and proper interpretation by email clients and servers.

What do email transfer protocols cover?

Email transfer protocols cover the rules and methods for transmitting email messages between servers and
clients.

What do email access protocols facilitate?

Email access protocols facilitate the retrieval and management of email messages by users from their mail
servers.

What is the primary function of SMTP?

SMTP is the standard protocol used by a mail transfer program to send email messages.

How can SMTP be characterized?

SMTP can be characterized as:


- Following a stream paradigm

- Only transferring text messages

- Allowing a sender to specify and check recipients' names

- Sending one copy of a given message

What is a key limitation of SMTP?

SMTP is limited to sending only textual content.

How does SMTP handle attachments?

SMTP uses the MIME (Multipurpose Internet Mail Extensions) standard to include attachments such as
graphic images or binary files.

Can SMTP send messages to multiple recipients?

Yes, SMTP can send a single message to multiple recipients by allowing a client to list users and send
one copy of the message to all users on the list.

Why do most users rely on ISPs for email services?

Most users rely on ISPs for email services because they often leave their computer running continuously
and may not know how to configure and manage their own email server.

What role do ISPs play in providing email services?

ISPs run email servers and provide a mailbox for each user, along with an interface to access their
mailbox.

How can users access their email mailbox provided by an ISP?

Users can access their email mailbox through either a special-purpose email interface application or a web
browser that accesses an email web page.

What does Figure 4.14 illustrate?

Figure 4.14 illustrates the arrangement of how ISPs provide email services and how users access their
mailboxes.

What are the two forms of email access?

- The two forms of email access are:

- A special-purpose email interface application.

- A web browser that accesses an email web page.

4.14 ISPs, Mail Servers, And Mail Access


How does the web browser approach work for accessing email?

An ISP provides a special web page that displays messages from a user's mailbox, allowing access from
any computer with a web browser.

What is the chief advantage of using a web page for email?

The chief advantage is the ability to read email from any computer without needing a special mail
interface application.

How can a special mail application be used to manage email offline?

A special mail application can download an entire mailbox onto a local computer, such as a laptop,
allowing the user to process email offline while disconnected from the Internet.

What happens when Internet connectivity is regained after using a special mail application offline?

When connectivity is regained, the email program communicates with the ISP’s server to upload any
email created offline and download any new messages

What is a benefit of downloading an entire mailbox to a local computer?

The benefit is that users can access and process their email while offline, such as during travel, without
needing an active Internet connection.

What distinguishes access protocols from transfer protocols in email systems?

Access protocols are used for interacting with a single user's mailbox, while transfer protocols are used
for sending mail to other users.

What are the key characteristics of email access protocols?

- Email access protocols:

- Provide access to a user's mailbox.

- Permit actions such as viewing headers, downloading, deleting, or sending messages.


- Involve a client running on the user's personal computer and a server running on a computer that
stores the user's mailbox.

Why is the ability to view a list of messages without downloading their contents useful?

It is useful for scenarios where the link between two parties is slow, such as when browsing on a cell
phone. Users can view headers and manage messages without waiting to download the full content.

What are two common mail access protocols?

The two common mail access protocols are:

- POP (Post Office Protocol)

- IMAP (Internet Message Access Protocol)

What mechanisms are available for email access?

Email access can be provided through free email access software from ISPs or through standard email
access protocols.

What are the two standard email access protocols?

The two standard email access protocols are:

- POP (Post Office Protocol)

- IMAP (Internet Message Access Protocol)

How do POP and IMAP differ?

POP and IMAP differ in many details, including their authentication mechanisms and how they handle
email storage and management.

What role does authentication play in email access protocols?

Each email access protocol provides its own authentication mechanism to verify and identify users when
accessing their mailboxes.

What information does Figure 4.15 provide?

Figure 4.15 lists the standard protocol names for email access.

What are the two important email representation standards?


The two important email representation standards are:

- RFC 2822 Mail Message Format

- MIME (Multipurpose Internet Mail Extensions)

What does RFC 2822 specify about mail message format?

RFC 2822 specifies that a mail message is represented as a text file and consists of a header section, a
blank line, and a body.

How are header lines formatted in RFC 2822?

Header lines in RFC 2822 have the format: **Keyword: information**, where the set of keywords
includes fields like From:, To:, Subject:, and Cc:.

What is the purpose of MIME in email representation?

MIME extends the basic email format specified by RFC 2822 to support a variety of media types, such as
attachments (e.g., images, audio, and binary files), and different character sets.

What is the role of the blank line in the RFC 2822 mail message format?

The blank line separates the header section from the body of the email message.

What does MIME stand for and what does it extend?

MIME stands for Multi-purpose Internet Mail Extensions. It extends the functionality of email to allow
the transfer of non-text data in a message.

How does MIME handle binary files?

MIME specifies how binary files can be encoded into printable characters, included in a message, and
then decoded by the receiver.

What is the most popular encoding standard used by MIME?

The most popular encoding standard used by MIME is Base64.

Does MIME restrict encoding to a specific form?

No, MIME does not restrict encoding to a specific form; it allows the sender and receiver to choose a
convenient encoding method.

How does MIME handle multiple parts in a message?

MIME allows a sender to divide a message into several parts, each with its own encoding. For example, a
message can include a plain text part along with attachments like a graphic image, a spreadsheet, and an
audio clip, each encoded independently.

What additional information is included in the MIME header?


The MIME header includes additional lines to specify the encoding used and other details about each part
of the message.

What does the Domain Name System (DNS) provide?

DNS provides a service that maps human-readable symbolic names to computer addresses.

How is DNS used by Internet applications?

Browsers, mail software, and most other Internet applications use DNS to translate symbolic names into
IP addresses.

How is DNS structured in terms of client-server interaction?

DNS is an example of client-server interaction where the mapping is distributed among a large set of
servers across the Internet.

What happens when an application needs to translate a name using DNS?

The application becomes a client of the DNS system, sends a request to a name server, and the server
finds and returns the corresponding address.

What occurs if a name server cannot answer a DNS request?

If a name server cannot answer a request, it temporarily becomes the client of another name server until a
server that can answer the request is found.

How is each domain name syntactically structured?

Each domain name consists of a sequence of alphanumeric segments separated by periods.

What is an example of a domain name for a computer in the Computer Science Department at Sudan
University?

An example is cs.sustech.edu.

What is an example of a domain name for a computer at Cisco, Incorporated?

An example is sales.cisco.com.

How are domain names hierarchical?

Domain names are hierarchical with the most significant part of the name on the right, and the left-most
segment representing the individual computer or more specific entity.

What does the segment "sustech" in the domain name "cs.sustech.edu" represent?

The segment "sustech" represents the name of the university, Sudan University of Science and
Technology.

What does the segment "cisco" in the domain name "sales.cisco.com" represent?
The segment "cisco" represents the name of the company, Cisco.

Does DNS specify the number of segments in a domain name?

No, DNS does not specify the number of segments in a domain name.

What is a top-level domain (TLD) and who controls it?

A top-level domain (TLD) is the most significant segment of a domain name. It is controlled by the
Internet Corporation for Assigned Names and Numbers (ICANN).

What role does ICANN play in the DNS?

ICANN designates domain registrars to administer TLDs and approve specific domain names under those
TLDs.

What are generic TLDs?

Generic TLDs are generally available for registration by anyone, such as `.com` or `.org`.

What are restricted TLDs?

Restricted TLDs are reserved for specific groups or government agencies, such as `.gov` or `.edu`.

How can organizations use geographic registration in DNS?

Organizations can use geographic registration to include location-based segments in their domain names,
such as `cnri.reston.va.us` for the Corporation For National Research Initiatives.

What is an example of a common TLD chosen by US corporations?

Most US corporations choose to register under the `.com` domain.

Figure 4.16 Example top-level domains and the group to which each is assigned
How can an organization manage its DNS servers?

An organization can either contract with an ISP to run a DNS server or run its own DNS servers.

Can an organization choose to divide its DNS names among multiple servers?

Yes, an organization can choose to divide its DNS names among multiple servers or place all names in a
single physical server.

What is an example of how a large organization might structure its DNS servers?

For example, a large organization like the hypothetical Foobar Corporation might have separate servers
for different divisions, such as a candy division and a soap division.
What flexibility does an organization have in choosing its DNS server setup?

Organizations have the flexibility to either centralize all DNS management on a single server or distribute
it across multiple servers based on their needs.

The DNS Hierarchy And Server Model

What is the process of translating a domain name into an address called?

The process is called name resolution.

What is a name resolver?

A name resolver (or simply resolver) is software that performs the translation of a domain
name into an address.

In the socket API, which function is used to invoke the resolver?

The function gethostbyname is used to invoke the resolver in the socket API.

How does a resolver interact with a DNS server?

The resolver becomes a client by contacting a DNS server, which then returns an answer
to the resolver.

How is a resolver configured in terms of DNS servers?


Each resolver is configured with the address of one or more local domain name servers.

What steps does a resolver take to obtain a DNS answer?

The resolver forms a DNS request message, sends it to the local server, and waits for the
server to send a DNS reply message with the answer.

What paradigms can a resolver use when communicating with a DNS server?

A resolver can use either the stream or message paradigm.

Which paradigm do most resolvers use and why?

Most resolvers use the message paradigm because it imposes less overhead for small
requests.

If a computer in the soap division requests the name chocolate.candy.foobar.com, what does the
local DNS server do?

The local DNS server for foobar.com will forward the request to the server for
candy.foobar.com, as it cannot answer the request itself.

What role does the server for candy.foobar.com play in name resolution?

The server for candy.foobar.com is responsible for generating the answer to the request for
chocolate.candy.foobar.com.

What is the locality of reference principle in DNS caching?

It includes spatial and temporal locality. Spatial locality refers to looking up local
computers more often, and temporal locality refers to frequently looking up the same set
of domain names.

How does DNS exploit spatial locality?

DNS exploits spatial locality by having a name resolver contact a local server first.

How does DNS exploit temporal locality?

DNS exploits temporal locality by caching all lookups, allowing frequently accessed
domain names to be quickly retrieved from the cache.

What does Algorithm 4.4 summarize in relation to DNS caching?

Algorithm 4.4 summarizes the process of caching lookups in DNS servers.


What happens when a request arrives for a name outside the set for which the server is an
authority?

The server temporarily becomes a client of another name server to resolve the request.

What does the original server do after receiving an answer from another server?

The original server caches the answer and sends a copy of the answer back to the resolver
from which the request arrived.

In addition to knowing the address of servers down the hierarchy, what else must each
DNS server know?

Each DNS server must know the address of a root server.

How is the duration for which items should be cached determined in DNS?

DNS specifies a cache timeout for each item to prevent stale data, determining how long
items should be cached.

What are the three items in each DNS database entry?


A domain name, a record type, and a value.

What does a DNS query specify?

A DNS query specifies both a domain name and a record type.

What does a DNS server return in response to a query?

The server returns a binding that matches the type of the query.

What is the principal type of DNS entry that maps a domain name to an IP address?

The principal type is type A.

Which applications use type A lookups?

Applications such as FTP, ping, and browsers use type A lookups.

What does type MX specify in DNS?

Type MX specifies a Mail eXchanger, which is used by SMTP to look up the name in an
email address.

What character set does DNS use?

DNS uses the ASCII character set.

Why are modifications needed for international domain names in DNS?

Many languages, including Russian, Greek, Chinese, and Japanese, contain characters not
represented in ASCII, and some European languages use diacritical marks that ASCII
cannot represent.

What approach did the IETF choose to handle international domain names?

The IETF chose the Internationalizing Domain Names in Applications (IDNA) approach.

How does IDNA handle domain names with non-ASCII characters?

IDNA translates non-ASCII characters into a sequence of ASCII characters and stores the
result in the DNS.

What is a key disadvantage of fixed application protocols?

The chief disadvantage is the difficulty in making changes to the protocol.


What major change was needed for email standards to include MIME extensions?

A major change was needed because email standards originally restricted message
content to text.

What is the alternative to a fixed representation in application protocols?

The alternative is an extensible system that allows specifying the format of data.

What standard is widely accepted for extensible representation?

The Extensible Markup Language (XML) is a widely accepted standard.

How does XML resemble HTML?

XML resembles HTML in that both languages embed tags into a text document.

How do XML tags differ from HTML tags?

Unlike HTML, XML tags are not predefined and do not correspond to formatting
commands.

What does XML describe about data?

XML describes the structure of data and provides names for each field.

What does it mean for XML tags to be well-balanced?

Each occurrence of a tag <X> must be followed by a corresponding closing tag </X>.

Does XML assign meaning to tags?

No, XML does not assign meaning to tags. Tag names can be created as needed and
chosen to make data easier to parse or access.

What can companies do when agreeing to exchange data like corporate telephone
directories using XML?

They can define an XML format that includes specific data items such as an employee's
name, phone number, and office. They can also choose to further divide data items, such
as splitting a name into a last name and a first name.

What is the advantage of defining a custom XML format for data exchange?
Defining a custom XML format allows companies to specify exactly how data should be
structured and represented, making it easier to exchange and interpret information
consistently.

What does XML allow companies to do with data items?

XML allows companies to create and structure data items in a way that suits their specific
needs, including the ability to create custom tags and attributes.

You might also like