Sum
Sum
- Since the 1970s, computer communication has changed from a research topic to an essential part of
infrastructure.
- Networking is used in business, advertising, production, shipping, planning, billing, and accounting.
- Educational institutions use computer networks to provide students and teachers with access to online
information.
In 1980, the Internet was a research project that involved a few dozen sites.
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.
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.
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.
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?
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?
2. Data Communications
An application on one computer communicates across a network with an application program running on
another computer.
Examples of network applications include email, file transfer, web browsing, voice telephone calls
(VoIP), distributed databases, and audio/video teleconferencing.
Each application offers a specific service with its own form of user interface.
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.
Knowledge of the underlying network system allows a programmer to write better code and develop
more efficient applications.
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.
The subject may seem useful for engineers who design low-level transmission facilities.
Several key concepts that arise from data communications influence the design of many protocol layers.
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.
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.
- Typically defined by the Maximum Transmission Unit (MTU), varying by technology (e.g., 1500
bytes for Ethernet).
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.
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:
- 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.
- 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.
- 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.
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.
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 observation did Vinton Cerf and Robert Kahn make in 1973?
Here are the key points about network ownership and categorization:
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.
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.
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?
Networks controlled by a single group, with access restricted to that group. Private networks can include
leased circuits from a provider.
Consumer, Small Office / Home Office (SOHO), Small-to-Medium Business (SMB), and Large
Enterprise.
A network for small-scale business or home office environments, offering more features than consumer
networks.
A network tailored for small to medium-sized businesses, with more advanced features and scalability
than SOHO networks.
A network designed for large organizations with extensive networking needs, providing complex
configurations, high capacity, and robust security features.
No, the categories are loosely defined and primarily related to sales and marketing.
Communication always involves at least two entities: one that sends information and another that receives
it.
The way electrical signals represent data, procedures for initiating and conducting communication, and
the format of messages.
What is interoperability?
All parties must agree on and follow the same set of rules, defined by a communication 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.
Each protocol should handle a specific part of communication that is not managed by other protocols.
A set of protocols designed to handle different aspects of networking, with each protocol covering a
specific aspect of communication.
The entire suite is designed to ensure that the protocols work together efficiently and cover all aspects of
communication.
It involves partitioning all aspects of a communication problem into manageable pieces, each known as a
layer.
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?
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:
It specifies details about the underlying transmission medium and hardware, including electrical
properties, radio frequencies, and signals.
It specifies details about communication between higher layers of protocols (implemented in software)
and the underlying network (implemented in hardware).
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?
It forms the fundamental basis for the Internet by specifying communication across multiple
interconnected networks.
They manage communication across the Internet, handling data transfer between different networks.
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?
The format and meaning of messages exchanged between applications, and the procedures to be followed.
Email exchange, file transfer, web browsing, telephone services, and video teleconferencing.
By passing the output from a protocol in one layer to the input of a protocol in the next layer.
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 passes up through the layers of protocols on the receiving computer.
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.
The corresponding protocol layer on the receiver removes and uses the extra information (headers).
Headers are added in sequence from the highest layer to the lowest layer (e.g., Transport layer first, then
Internet layer, etc.).
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).
Seven layers.
Where can you find an illustration of the seven layers in the OSI model?
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?
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.
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?
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.
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?
The book explains the reasons for using packets in computer networks.
The properties of each category are characterized, and some example technologies are discussed.
What does PART IV explain about the Internet and TCP/IP protocols?
It covers a variety of remaining topics that pertain to the network as a whole instead of individual parts.
Emerging technologies.
Resource sharing.
Multiple users shared a large centralized computer through screens and keyboards.
Interconnecting computers into a network and developing software to allow researchers to use
the best computer for each task.
Gathering top minds, focusing on computer network research, and hiring contractors to build the
system.
To interconnect computers with a network and create software for resource sharing.
They gathered top researchers, focused on network research, and hired contractors to build
ARPANET.
It has grown from a research prototype connecting a few sites to a global communication system.
It shows the growth using a linear scale with values from zero to 550 million.
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.
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.
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.
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.
Higher bandwidths have made it possible to communicate high-resolution video and high-fidelity
audio.
They have moved from analog to digital and adopted Internet technology.
Figure 2.5 lists recent changes in Internet technology and applications, while Figure 2.6 lists
types of applications that have emerged.
They allow businesses to hold meetings without the need for travel, significantly reducing costs.
They create new social connections where people know each other only through the Internet.
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.
It transfers a sequence of bytes without attaching meaning to the bytes or inserting boundaries.
Yes, a sending application can generate one byte at a time or blocks 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?
What does the message paradigm refer to in the context of the Internet?
The network delivers each message exactly as it was sent, without delivering part of a message
or combining multiple messages.
What are the different forms of message delivery in the message paradigm?
It does not guarantee delivery, so messages may be lost, duplicated, or delivered out-of-order.
The application must operate correctly even if packets are lost or reordered.
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.
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?
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?
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.
Clients (e.g., web browsers) request services, while servers (e.g., web servers) provide those
services.
A web browser acts as an HTTP client, and a web server acts as an HTTP server.
1. Roles:
- Server:
- Starts first and listens for incoming requests.
- Client:
2. Process:
- Connection Request:
- 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 (clients) request web pages from web servers (servers).
4. Advantages:
- Separation of Concerns:
- Resource Management:
- Servers manage resources and services, while clients use them as needed.
5. Interaction Summary:
- It is an application program that becomes a client temporarily when remote access is needed
but also performs other computations.
It is invoked automatically when a system boots and continues to execute through many sessions.
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?
They classify computers with fast CPUs, large memories, and powerful operating systems as
server machines.
It illustrates the different definitions and uses of the term "server" in the context of programs and
computers.
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.
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.
Because it allows hardware to be shared, reduces system administration overhead, and meets
sporadic demand for services.
Lower system administration overhead, hardware sharing, and reduced cost without significantly
affecting 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.
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.
Because they are numeric and not easily relatable for humans.
It translates domain names (e.g., www.sustech.edu) into IP addresses and vice versa.
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.
It registers with its local OS by specifying the port number for its service.
The request contains the port number, so the client must know the port number for the service.
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?
What does the serial approach imply about a server's handling of clients?
It accepts contact from a client and creates a thread of control for that client.
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.
A server for one service can act as a client for another service.
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.
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.
Because services are often designed independently, with no single programmer controlling all
servers.
The network connection between the server and the Internet can become a bottleneck.
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?
Data is distributed equally among a set of N servers, avoiding reliance on a central server.
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?
Can server software run on the same computers as clients in a P2P architecture?
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?
In Appendix 1.
What is the de facto standard API for software that communicates over the Internet?
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.
It passes the descriptor as an argument when calling functions to perform operations on the
socket, such as transferring or receiving data.
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.
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.
The sequence of socket calls made by a typical client and server using a stream connection.
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.
protofamily` specifies the protocol family, such as `PF_INET` for the TCP/IP protocol suite.
`type` specifies the type of communication, with `SOCK_STREAM` for stream transfer and
`SOCK_DGRAM` for connectionless message transfer.
The `send` function is used to send data from a socket to another socket.
The `send` function takes `socket`, `data`, `length`, and `flags` as arguments.
The `recv` function takes `socket`, `buffer`, `length`, and `flags` as arguments.
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`.
The `close` function is used to close a socket, freeing the associated resources.
The `close` function takes a single argument: the socket descriptor to be closed.
The `connect` function is used by clients to establish a connection with a specific server.
The `connect` function takes three arguments: `socket`, `saddress`, and `saddresslen`.
The `socket` argument is the descriptor of the socket to use for the connection.
The `saddress` argument is a `sockaddr` structure that specifies the server’s address and protocol
port number.
The `saddresslen` argument specifies the length of the server address, measured in bytes.
What is the purpose of the `bind` function?
The `bind` function takes three arguments: `socket`, `localaddr`, and `addrlen`.
The `localaddr` argument is a structure that specifies the local address to be assigned to the
socket.
The `listen` function is used by a server to specify the length of the request queue for a socket.
The `queuesize` argument specifies the length of the socket’s request queue.
The `accept` function is used by a server to accept a connection request from a client and create a
new socket for the connection.
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.
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.
The `socket` argument is the descriptor of the socket that the server has created and bound to a
specific protocol port.
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.
The `caddresslen` argument is a pointer to an integer that will be set to the length of the client’s
address.
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.
The complexity reflects the need for more flexibility in specifying message transmission details,
such as handling addresses and message data in various ways.
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`.
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.
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.
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.
The `recvfrom` function is used to receive data from a socket and also retrieve the sender's
Internet address.
The `recvfrom` function takes six arguments: `socket`, `buffer`, `length`, `flags`, `sndraddr`, and
`saddrlen`.
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.
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.
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.
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.
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.
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.
Private communication (proprietary, limited scope) and standardized service (Internet-wide, like web
servers or FTP).
They are documented independent of implementation, precise, unambiguous, and their size depends on
the complexity of the service.
Because many programmers may create server or client software to offer or access the service.
They define how data is structured and how it is transmitted between applications.
Because many protocol standards have been devised to specify various aspects and details.
HTML (HyperText Markup Language) is a representation standard that specifies the syntax of a web
page.
HTML can specify complex web pages that contain graphics, audio, video, and text.
HTML is classified as declarative, specifying what is to be done rather than how to do it.
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.
They allow the specification of exact fonts, typefaces, point sizes, and formatting.
White space can be inserted without affecting the formatted version displayed by a browser.
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:
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.
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`).
The 'protocol' in a URL specifies the method used to access the document on the Web, such as HTTP or
HTTPS.
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).
If the document_name is not specified, the server typically defaults to `index.html` or another default
page.
The correct symbol for introducing parameters in a URL is `?`, not `%`. For example,
`http://www.example.com/page?param=value`.
Example:
Yes, a user can omit many parts of a URL. If omitted, defaults are assumed:
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?
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.
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).
A browser acts as a client that extracts the server name from the URL and contacts the server to request or
interact with resources.
URLs commonly contain an explicit protocol reference of `http://` or omit the protocol altogether, in
which case HTTP is assumed.
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 are the four major HTTP request types listed in Figure 4.5?
The purpose of a GET request is to retrieve data from the server, such as requesting a web page or other
resources.
A POST request is used when submitting data to the server, such as when a user submits a form or
uploads a file.
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.
The function of a DELETE request is to remove a specified resource from the server.
```
```
CRLF stands for Carriage Return and Linefeed, which are ASCII characters used to mark the end of a
line.
Version information ensures backward compatibility and helps the server choose the highest protocol
version both the browser and server can understand.
The first line of an HTTP response header contains a status code that indicates whether the server
successfully handled the request.
A status code 404 signifies that the requested item cannot be found.
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?
The date and time when the content was last modified
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.
How many lines of header does the server return 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.
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.
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.
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
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.
A No-cache header specifies that a given item should not be cached by the browser.
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
A browser structure is complex because it must understand HTTP and support multiple other protocols.
A browser must contain client code for each protocol used and be capable of interacting with servers and
interpreting responses.
A browser must know how to access and interact with FTP (File Transfer Protocol) services.
Browser Architecture
A file is a fundamental storage abstraction that can hold various objects such as documents, spreadsheets,
computer programs, graphic images, or data.
FTP (File Transfer Protocol) allows the transfer of a copy of a file from one computer to another,
providing a mechanism for exchanging data.
File transfer is complicated because computers are heterogeneous, meaning they differ in file
representations, type information, naming conventions, and file access mechanisms.
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.
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.
FTP can transfer any type of data, including arbitrary file contents.
Yes, FTP supports bidirectional transfer, allowing both downloads and uploads.
FTP supports authentication and ownership, allowing files to have ownership and access restrictions.
FTP accommodates heterogeneity by hiding the details of individual computer operating systems.
FTP is mostly invisible to users and is invoked automatically by a browser when a user requests a file
download.
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.
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.
Figure 4.10 illustrates the interaction between the control and data connections 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.
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 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.
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.
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.
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.
Email format specifications define how email messages are structured and formatted, ensuring
compatibility and proper interpretation by email clients and servers.
Email transfer protocols cover the rules and methods for transmitting email messages between servers and
clients.
Email access protocols facilitate the retrieval and management of email messages by users from their mail
servers.
SMTP is the standard protocol used by a mail transfer program to send email messages.
SMTP uses the MIME (Multipurpose Internet Mail Extensions) standard to include attachments such as
graphic images or binary files.
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.
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.
ISPs run email servers and provide a mailbox for each user, along with an interface to access their
mailbox.
Users can access their email mailbox through either a special-purpose email interface application or a web
browser that accesses an email web page.
Figure 4.14 illustrates the arrangement of how ISPs provide email services and how users access their
mailboxes.
An ISP provides a special web page that displays messages from a user's mailbox, allowing access from
any computer with a web browser.
The chief advantage is the ability to read email from any computer without needing a special mail
interface application.
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
The benefit is that users can access and process their email while offline, such as during travel, without
needing an active Internet connection.
Access protocols are used for interacting with a single user's mailbox, while transfer protocols are used
for sending mail to other users.
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.
Email access can be provided through free email access software from ISPs or through standard email
access protocols.
POP and IMAP differ in many details, including their authentication mechanisms and how they handle
email storage and management.
Each email access protocol provides its own authentication mechanism to verify and identify users when
accessing their mailboxes.
Figure 4.15 lists the standard protocol names for email access.
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.
Header lines in RFC 2822 have the format: **Keyword: information**, where the set of keywords
includes fields like From:, To:, Subject:, and Cc:.
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.
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.
MIME specifies how binary files can be encoded into printable characters, included in a message, and
then decoded by the receiver.
No, MIME does not restrict encoding to a specific form; it allows the sender and receiver to choose a
convenient encoding method.
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.
DNS provides a service that maps human-readable symbolic names to computer addresses.
Browsers, mail software, and most other Internet applications use DNS to translate symbolic names into
IP addresses.
DNS is an example of client-server interaction where the mapping is distributed among a large set of
servers across the Internet.
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.
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.
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.
An example is sales.cisco.com.
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.
No, DNS does not specify the number of segments in a domain name.
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).
ICANN designates domain registrars to administer TLDs and approve specific domain names under those
TLDs.
Generic TLDs are generally available for registration by anyone, such as `.com` or `.org`.
Restricted TLDs are reserved for specific groups or government agencies, such as `.gov` or `.edu`.
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.
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.
A name resolver (or simply resolver) is software that performs the translation of a domain
name into an address.
The function gethostbyname is used to invoke the resolver in the socket API.
The resolver becomes a client by contacting a DNS server, which then returns an answer
to the resolver.
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?
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.
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.
DNS exploits spatial locality by having a name resolver contact a local server first.
DNS exploits temporal locality by caching all lookups, allowing frequently accessed
domain names to be quickly retrieved from the cache.
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?
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.
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?
Type MX specifies a Mail eXchanger, which is used by SMTP to look up the name in an
email address.
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.
IDNA translates non-ASCII characters into a sequence of ASCII characters and stores the
result in the DNS.
A major change was needed because email standards originally restricted message
content to text.
The alternative is an extensible system that allows specifying the format of data.
XML resembles HTML in that both languages embed tags into a text document.
Unlike HTML, XML tags are not predefined and do not correspond to formatting
commands.
XML describes the structure of data and provides names for each field.
Each occurrence of a tag <X> must be followed by a corresponding closing tag </X>.
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.
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.