Monday, August 12, 2013

Data communi_Network Tech_Web services/Design

  A community blog for doeaccian by doeaccian to clear the  NIELIT (doeacc) o/a/b level
                         ****************************************************************  
        DOEACC NOTES,QUESTION ANSWER AND STUDY MATERIALS
                         ****************************************************************    

================================================================================= Notes For Networking/Web tech/ Data Communi/Web Services

 How does slotted ALOHA improve throughput as compared to pure ALOHA?

In slotted ALOHA packets must be transmitted within a slot. If a terminal has a packet

to send, it waits until the beginning of the next slot. Hence, slotted ALOHA has no

partial collision. Therefore, it can improve the throughput by reducing the contention

period.

 What is meant by a collision in data transfer and why is it not possible to

decipher information from collided data? Explain clearly.
A collision of data transfer means that there are more than one terminal
transmitting data on the shared medium at the same time. It is not possible to
decipher information from the collided data because the signals get garbled and
cannot be separated or interpreted by the nodes accurately.
 What are relative advantages and disadvantages of persistent and
non‐persistent CSMA protocols? What makes you select one over the other? Explain
clearly.
Advantages of persistent CSMA:
The terminal will keep listening to the medium when it senses the medium busy.
Then it will capture the channel immediately after the medium becomes idle. Thus,
1‐persistent CSMA will have good channel utilization when traffic is light. The
p‐persistent CSMA works better when traffic is heavy.
Disadvantages of persistent CSMA:
When traffic is heavy, 1‐persistent will bring more collisions because it is highly
possible that more than one terminal sense the medium immediately after the
medium becomes idle.
Advantages of non‐persistent CSMA:
It can reduce the collisions by waiting for a random time to sense the medium again
after it senses the medium is busy. It is especially useful when traffic is heavy.
Disadvantages of non‐persistent CSMA:
It may waste the channel by waiting for an unnecessary random time to sense the
medium again due to light traffic. Therefore, choosing the 1‐persistent CSMA when
traffic is light, and non‐persistent CSMA or p‐persistent CSMA when traffic is heavy.

 Can we use CSMA/CD in cellular wireless networks? Explain your answer with
solid reasoning.
We cannot use CSMA/CD in wireless networks. Because the sender node cannot
detect the collisions during its transmission.
What is the difference between collision detection and collision avoidance?
Collision detection means if a collision is detected during the transmission, the
terminal aborts its transmission immediately and the terminal attempts to transmit
later after waiting for a random time. Collision detection protocol is mainly used in
Ethernet. While collision avoidance does not abort the transmission but tries to avoid
collisions in advance. Collision avoidance is implemented by an additional waiting
time of DIFS and backoff time. Collision avoidance is used in wireless LANs.
What are the purposes to use RTS/CTS in CSMA/CA?
RTS/CTS is used for:
(a) Solving the hidden terminal problems;
(b) Reducing the collision period.
 In CSMA/CA, why do you need a contention window, even after DIFS? What is
the typical size of the contention window?
The purpose of the contention window is to reduce or avoid the collisions.
The typical size of the contention window is 32, 64, 128, 256,…
 Suppose the propagation delay isα , SIFS isα , DIFS is 3α , and RTS and CTS are
5α , respectively, for CSMA/CA with RTS/CTS.
(a) What is the earliest time for the receiver to send the CTS message?
(b) If the data packet is 100α long, what is the shortest time for the receiver to send
the ACK signal?
(c) Explain why SIFS is kept smaller than DIFS.
(d) Can you make SIFS = 0?
(a) If a terminal has a packet ready to transmit, it will sense the medium first. If the
medium is idle for DIFS, it will transmit RTS, then wait for the CTS from the receiver.
Therefore, the earliest time for the receiver to send CTS massage is:
3α + 5α +α +α = 10α .
(b) When the sender receives the CTS from the receiver, it waits for SIFS, and then
sends its data packet. Therefore, the shortest time for the receiver to send the ACK
signal is:
3α + 5α +α +α + 5α +α +α +100α +α +α = 119α .
Note that we should include the propagation delay also.
(c) This is to give priority to some packets. For example after transmitting the DATA
packets the receiver should be allowed to send ACK packets without any collisions.
To accomplish this, we transmit the ACK packets immediately after SIFS time interval
before any other node can transmit and interrupt the ACK packet.
(d) No. SIFS is the turnaround time required to change from transmit (receive) mode
to receive (transmit) mode. Thus it is compulsory to have finite SIFS time.
 What is the difference between the”guard band” and the “guard time”, and why
are they important in a cellular system? Explain clearly.
A “guard band” is used in FDMA where as “guard time” is used in TDMA to reduce
interference between adjacent channels in FDMA, and adjacent time slots in TDMA
respectively.
 A TDMA system uses 270.833 kbps data rate to support 8 users per frame.
(a) What is the raw data rate provided for each user?
(b) If guard time and synchronization occupy 10.1 kbps, determine the traffic
efficiency?
(c) If (7, 4) code is used for error handling, what is the overall efficiency?
(a) Since 8 users are supported per frame the raw data rate is 270.833 33.858= kbps
(b) If 10.1 kbps is for guard and synchronization information the traffic efficiency is
given by33.85 10.1 100 70.16%33.85−× =
(c) If (7, 4) code is used only 4 out of 7 bits contain the data. Thus the efficiency is
4 33.85 10.1 100 40%7 33.85−× × =
Radio signal travels from the BS to an MS along different paths‐some direct,
some reflected and some deflected. If the worst case difference in the path length
traversed by a signal is 2 km, what is the minimum value of guard time that needs to
be used? Assume the signal propagation rate of 512 kbps.
The difference in time between the receptions of the two waves is:s = vt2000 6.671*10 6 sec299792458 / sect mm= = −
Separation in bits = 6.671*10‐6 sec * 512000 bits/sec = 3.415 bits
Is it possible to jam CDMA? Explain clearly.
In CDMA data signal is spread out over the entire available bandwidth using a unique
code assigned to each user during call set up time with base station. Spreading of
data signal is achieved using some spread spectrum technique like frequency
hopping where data is sent in small pieces over a number of the discrete frequencies
available for use at any time in the specified range. Thus jamming such a data signal
which is changing its frequency is difficult and impractical.
What frequency band is used in biomedical devices surgical applications? How
does that limit the use of wireless devices?
The 2.4 GHz ISM band is used in biomedical devices for surgical applications. A
number of wireless standards, such as Bluetooth and the IEEE 802.11b use the same
band for communication. Nodes using these standards for communication cannot,
therefore, be used in areas where biomedical surgical devices operate.
Why does the power control become one of the main issues for the efficient
operation of CDMA?
The power control is critical for efficient operation of CDMA. Because, the sender’s
transmission power level determines the signal quality at the receiver. There is a
need to conserve the limited battery power of the MS for quality signal and also
hand off will be smooth with high quality signal. Also, since interference is converted
to noise, a strong interference implies a strong noise and degrades the channel for all
other users. Therefore, CDMA must use very tight power control for efficient
operation.
Solution of Selected Exercises from the End of Chapter Exercises
Chapter 1 - Introduction And Overview
1.1 Provide reasons for Internet growth in recent years.
1.2 List ten industries that depend on computer networking.
1.3 According to the text, is it possible to develop Internet applications without understanding the architecture of the Internet and the technologies? Support your answer.
Answer: Yes, possible to write code that communicates over a network, without understanding the hardware and software technologies that are used to transfer data from one application to another. However,  knowledge of the underlying network system allows a programmer to write better code.
1.4 To what aspects of networking does data communications refer?
Answer: 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.
1.5 What is packet-switching, and why is packet switching relevant to the Internet?
Answer: Packet switching divides data into small blocks, called packets, and includes an identification of the intended recipient in each packet. Packet switching changed networking in a fundamental way, and provided the basis for the modern Internet. Packet switching allows multiple senders to transmit data over a shared network.
1.6 Provide a brief history of the Internet describing when and how it was started.
1.7 What is interoperability, and why is it especially important in the Internet?
1.8 What is a communication protocol? Conceptually, what two aspects of communication does a protocol specify?
Answer: A communication protocol refer to a specification for network communication.  Major aspects of a protocol are syntax (format) and semantics (meaning)  of the protocol.
1.9 What is a protocol suite, and what is the advantage of a suite?
Answer: protocols are designed in complete, cooperative sets called suites or families, instead of creating each protocol in isolation. Each protocol in a suite handles one aspect of communication; together, the protocols in a suite cover all aspects of communication. The entire suite is designed to allow the protocols to work together efficiently.
1.10 Describe the TCP/IP layering model, and explain how it was derived.
1.11 List the layers in the TCP/IP model, and give a brief explanation of each.
Answer: The TCP/IP consists of 5 layers. The layers and their short explanation is as follows:
  • Layer 1: Physical: Protocols in the Physical layer specify details about the underlying transmission medium and the associated hardware.
  • Layer 2: Network Interface Protocols in the Network Interface layer specify details about communication between higher layers of protocols and the underlying network.
  • Layer 3: Internet: Protocols in the Internet layer form the fundamental basis for the Internet. Layer 3 protocols specify communication between two computers across the Internet
  • Layer 4: Transport: Protocols in the Transport layer provide for communication from an application program on one computer to an application program on another.
  • Layer 5: Application: Protocols in the top layer of the TCP/IP stack specify how a pair o applications interact when they communicate.

1.12 Explain how headers are added and removed as data passes through a layered model.
Answer: each layer on the sending computer prepends extra information onto the packet; the corresponding protocol layer on the receiving computer removes and uses the extra information.

1.13 List major standardization organizations that create standards for data communications and computer networking.
Answer: Various national and international organizations are involved in standardization of communications and networking services. To list few:
  • International Organization for Standardization (ISO)
  • International Telecommunications Union, Telecommunication Standardization Sector (ITU-T)
  • Institute of Electrical and Electronics Engineers (IEEE)
  • Internet Engineering Task Force (IETF)

1.14 Give a brief explain of the layers in the ISO Open System Interconnection model.
Answer: ISO  OSI model consists of 7 layers, namely:
  • Layer 7: Application
  • Layer 6: Presentation
  • Layer 5: Session
  • Layer 4: Transport
  • Layer 3: Network
  • Layer 2: Data Link
  • Layer 1: Physical
Reader is expected to find out short explanation of each layer.
Chapter - 2 Internet Trends
2.1 Why was sharing of computational resources important in the 1960s?
2.2 The plot in Figure 2.1 shows that Internet growth did not start until after 1995. Why is the figure misleading?
Answer: Researchers computers working for the Advanced Research Projects Agency (ARPA) of US Department of Defense (DoD) needed powerful and computers were incredibly expensive. The ARPA budget was insufficient to fund many computers. The ARPA planned to interconnect all computers with a data network and devise software that would allow a researcher to use whichever computer was best suited to perform a given task.
2.3 Assume that one hundred million new computers are added to the Internet each year. If computers are added at a uniform rate, how much time elapses between two successive additions?
2.4 Extend the plot in Figure 2.2, and estimate how many computers will be connected to the Internet by 2020.
2.5 What shift in Internet use occurred when the World Wide Web first appeared?
2.6 List the steps in the transition in graphics presentation from the early Internet to the current Internet.
Answer: The trend in the graphic presentation has been as follows:
Text à Graphic Images à Video Clips à Full-Motion Video

2.7 Describe the evolution in audio that has occurred in the Internet.
Answer: The trend in audio processing has been as follows:
Alert Sounds à Human Voice à Audi Clips à High-Fidelity Audio

2.8 What impact is Internet technology having on the cable television industry?
2.9 What Internet technology is the telephone system using?
Answer: Some current telephone systems uses Voice-Over IP technology. Reader is encouraged to refer to later chapters for details.

2.10 Why is the switch from wired Internet access to wireless Internet access significant?
2.11 List four new Internet applications, and tell the groups for which each is important.
2.12 Describe Internet applications that you use regularly that were not available to your parents when they were your age.

Chapter 3 - Internet Applications And Network Programming
3.1 What are the two basic communication paradigms used in the Internet?
Answer: There are various approaches, but according to textbook, we can specify them as Stream Paradigm and Message Paradigm.
3.2 Give six characteristics of Internet stream communication.
Answer: Characteristics of Internet stream communication can be listed as follows:
  • Connection-oriented
  • 1-to-1 communication
  • Sequence of individual bytes
  • Arbitrary length transfer
  • Used for multimedia applications 
  • Built on UDP protocol 

3.3 Give six characteristics of Internet message communication.
Answer: Characteristics of Internet message communication can be listed as follows:
  • Connectionless 
  • Many-to-many communication 
  • Sequence of individual messages 
  • Each message limited to 64 Kbytes 
  • Used by most applications
  • Built on TCP protocol

3.4 If a sender uses the stream paradigm and always sends 1024 bytes at a time, what size blocks can the Internet deliver to a receiver?
Answer: stream paradigm does not provide any guarantees for block sizes, so all depends on individual transfer.
3.5 If a sender wants to have copies of each data block being sent to three recipients, which paradigm should the sender choose?
Answer: The message paradigm is suitable for such transfer, since it allows many-to-many communication
3.6 What are the three surprising aspects of the Internet’s message delivery semantics?
Answer: The Internet’s message delivery has the following undesirable characteristics:
  • Messages can be lost
  • Messages can be duplicated
  • Messages can be delivered out-of-order

3.7 Give the general algorithm that a connection-oriented system uses.
Answer:  The interaction between two connection-oriented parties can be summarized as:
·         Setting-up connection between two parties
·         Exchange information
·         Terminate the connection

3.8 When two applications communicate over the Internet, which one is the server?
Answer:  The application that waits for some other applications to contact is called server, and the application that contact other one is called client.
3.9 Compare and contrast a client and server application by summarizing characteristics of each.
3.10 What is the difference between a server and a server-class computer?
Answer: The server term refers to a program that waits passively for communication, and not to the computer on which it executes. However, when a computer is dedicated to running one or more server programs, the computer itself is sometimes called a server. Hardware vendors contribute to the confusion because they classify computers that have fast CPUs, large memories, and powerful operating systems as server machines.
3.11 Can data flow from a client to a server? Explain.
Answer: Yes, data may flow in both directions (clientàserver and serverà client).
3.12 List the possible combinations of clients and servers a given computer can run.
3.13 Can all computers run multiple services effectively? Why or why not?
3.14 What two identifiers are used to specify a particular server?
Answer: A particular server is identified by the following identifiers:
  • An identifier for the computer on which a server runs (IP Address)
  • An identifier for a particular service on the computer (Port Number)

3.15 List the steps a client uses to contact a server after a user specifies a domain name for the server.
Answer: The steps that a client uses to contact a server can be summarized as follows:
  • Start after server is already running
  • Obtain server name from user
  • Use DNS to translate name to IP address
  • Specify that the service uses port N
Contact server and interact
Chapter 4 -  Traditional Internet Applications
4.1 What details does an application protocol specify?
Answer: An application protocol may specify the following details:
  • The syntax and semantics of messages that can be exchanged
  • Whether the client or server initiates interaction
  • Actions to be taken if an error arises
  • How the two sides know when to terminate communication

4.2 Why is a protocol for a standardized service documented independent of an implementation?
4.3 What are the two key aspects of application protocols, and what does each include?
Answer:  Application-layer protocols specify two aspects of interaction are given below:
  • Data Representation: Syntax of data items that are exchanged, specific form used during transfer, translation of integers, characters, and files between computers
  • Data Transfer: Interaction between client and server, message syntax and semantics, valid and invalid exchange error handling, termination of interaction

4.4 Give examples of web protocols that illustrate each of the two aspects of an application protocol.
4.5 Summarize the characteristics of HTML.
Answer: HTML has the following general characteristics:
  • Uses a textual representation
  • Describes pages that contain multimedia
  • Follows a declarative rather than procedural paradigm
  • Provides markup specifications instead of formatting
  • Permits a hyperlink to be embedded in an arbitrary object
  • Allows a document to include metadata

4.6 What are the four parts of a URL, and what punctuation is used to separate the parts?
Answer: The URL into four components: a protocol, a computer name, a document name, and parameters. The computer name and protocol port are used to form a connection to the server on which the page resides. And the document name and parameters are used to request a specific page.
4.7 What are the four HTTP request types, and when is each used?
Answer: The four common HTTP request types and their usage can be given as follows:
  • GET: Requests a document; server responds by sending status information followed by a copy of the document
  • HEAD: Requests status information; server responds by sending status information, but does not send a copy of the document
  • POST: Sends data to a server; the server appends the data to a specified item
  • PUT Sends data to a server; the server uses the data to completely replace the specified item

4.8 How does a browser know whether an HTTP request is syntactically incorrect or whether the referenced item does not exist?
4.9 What does a browser cache, and why is caching used?
Answer: A browser saves the Last-Modified date information along with the cached copy. Caching provides an important optimization for web access because users tend to visit the same web sites repeatedly.
4.10 Describe the steps a browser takes to determine whether to use an item from its cache.
Answer: A browser saves the Last-Modified date information along with the cached copy. Before it uses a document from the local cache, a browser makes a HEAD request to the server and compares the Last-Modified date of the server’s copy to the Last-Modified date on the cached copy. If the cached version is stale, the browser downloads the new version. Algorithm 4.1 summarizes caching.
4.11 Can a browser use transfer protocols other than HTTP? Explain.
4.12 When a user requests an FTP directory listing, how many TCP connections are formed? Explain.
Answer: FTP uses two types of connections to perform its functionality, namely
  • A control connection is reserved for commands. Each time the server needs to download or upload a file, the server opens a new connection.
  • A  data connection is used to transfer files.
4.13 True or false: when a user runs an FTP application, the application acts as both a client and server. Explain your answer.
Answer: True, An FTP may invert the client-server relationship for data connections. That is, when opening a data connection, the client acts like a server (i.e., waits for the data connection) and the server acts like a client (i.e., initiates the data connection).
4.14 How does an FTP server know the port number to use for a data connection?
Answer:  Before making a request to the server, a client allocates a protocol port on its local operating system and sends the port number to the server. The client binds to the port to await a connection, and then transmits a PORT command over the control connection to inform the server about the port number being used.
4.15 According to the original email paradigm, could a user receive email if the user’s computer did not run an email server? Explain.
4.16 List the three types of protocols used with email, and describe each.
Answer: Three major type of protocols being used with email are:
  • Transfer: A protocol used to move a copy of an email message from one computer to another
  • Access: A protocol that allows a user to access their mailbox and to view or send email messages
  • Representation A protocol that specifies the format of an email message when stored on disk

4.17 What are the characteristics of SMTP?
Answer: The following can be given as major characteristics of SMTP
  • Follows a stream paradigm
  • Uses textual control messages
  • Only transfers text messages
  • Allows a sender to specify recipients’ names and check each name
  • Sends one copy of a given message

4.18 Can SMTP transfer an email message that contains a period on a line by itself? Why or why not?
4.19 Where is an email access protocol used?
Answer: An email access protocol is used for users to access their mailboxes, either to send or to receive email messages.
4.20 What are the two main email access protocols?
Answer: Two major email access protocols are:
  • Post Office Protocol (POP)
  • Internet Mail Access Protocol (IMAP)

4.21 Why was MIME invented?
Answer: Multi-purpose Internet Mail Extensions (MIME) standard  allows the transfer of non-text data in a message. MIME specifies how a binary file can be encoded into printable characters, included in a message, and decoded by the receiver.
4.22 What is the overall purpose of the Domain Name System?
Answer: The overall purpose of Domain Name System (DNS)to  provide a service that maps human-readable symbolic names to computer addresses.
4.23 Assuming ISO has assigned N country codes, how many top-level domains exist?
4.24 True or false: a web server must have a domain name that begins with www. Explain.
Answer: False. An arbitrary computer can run a web server, even if the computer’s domain name does not contain www. Furthermore, a computer that has a domain name beginning with www is not required to run a web server.  Using the first label in a domain name to denote a service (e.g., www) is merely a convention to help humans.
4.25 True or false: a multi-national company can choose to divide its domain name hierarchy in such a way that the company has a domain name server in Europe, one in Asia, and one in North America.
Answer: One of the main features of the Domain Name System (DNS) is autonomy. The DNS is designed to allow each organization to assign names to computers or to change those names without informing a central authority. Each organization is free to choose the details of its servers.  A large organization that runs its own server can choose to place all names for the organization in a single physical server, or can choose to divide its names among multiple servers.
4.26 When does a domain name server send a request to an authoritative server and when does it answer the request without sending to the authoritative server?
4.27 True or false: a DNS server can return a different IP address for a given name, depending on whether the lookup specifies email or web service. Explain.
Answer: Yes, a corporation may decide to use the name corporation.com for both web and email services. With the DNS, it is possible for the corporation to divide the workload between separate computers by mapping type A lookups to one computer and type MX lookups to another.
4.28 Does the IDNA standard require changes in DNS servers? in DNS clients? Explain.
Answer: No, instead of modifying the underlying DNS, IDNA uses ASCII to store all names. That is, when given a domain name that contains a non-ASCII character, IDNA translates the name into a sequence of ASCII characters, and stores the result in the DNS. For the clients (the latest versions of the widely-used browsers, Firefox and Internet Explorer)  can accept and display non-ASCII domain names because they each implement IDNA.
4.29 Search the web to find out about iterative DNS lookup. Under what circumstances is iterative lookup used?
4.30 How does XML allow an application to specify fields such as a name and address?
Answer: XML does not assign any meaning to tags, tag names can be created as needed. In particular, tag names can be selected to make data easy to parse or access. If two companies agree to exchange corporate telephone directories, they can define an XML format that has data items such as an employee’s name, phone number, and office.
PART II
Data Communications
Chapter 5 - Overview of Data Communications
5.1 What three disciplines are involved in data communications?
Data communication involves concepts from physics, mathematics, and electrical engineering.

5.2 What are the motivations for data communications?
The following ideas provide motivation for data communications and help define the scope:
  • The sources of information can be of arbitrary types
  • Transmission uses a physical system
  • Multiple sources of information can share the underlying medium

5.3 What are the conceptual pieces of a data communications system?
A communication can be a simple or a complex one depending on the technology, the need and the environment being deployed. A complex communication system involving many parties and different types of services may involve the following conceptual pieces:
  • Information Sources
  • Source Encoder and Source Decoder
  • Encryptor and Decryptor
  • Channel Encoder and Channel Decoder
  • Multiplexor and Demultiplexor
  • Modulator and Demodulator
  • Physical Channel and Transmission

5.4 Which piece of a data communications system handles analog input?
The input to a communication system is first handled by source encoder, which receives information and transforms into a format that is suitable for further processing for transmission.

5.5 Which piece of a data communications system prevents transmission errors from corrupting data?
The channel encoder and decoder parts of a communication system are responsible for protecting against possible errors during transmission.

Chapter 6- Information Sources and Signals
6.1 Give three examples of information sources other than computers.
6.2 Name a common household device that emits an aperiodic signal.
6.3 Why are sine waves fundamental to data communications?
Sine waves are especially important in information sources because natural phenomena produce sine waves.

6.4 State and describe the four fundamental characteristics of a sine wave.
There are four important characteristics of signals that relate to sine waves:
  • Frequency: the number of oscillations per unit time (usually seconds)
  • Amplitude: the difference between the maximum and minimum signal heights
  • Phase: how far the start of the sine wave is shifted from a reference time
  • Wavelength: the length of a cycle as a signal propagates across a medium

6.5 When shown a graph of a sine wave, what is the quickest way to determine whether the phase is zero?
6.6 When is a wave classified as simple?
A signal is classified as simple when consist of a single sine wave that cannot be decomposed further.
6.7 What does Fourier analysis of a composite wave produce?
With Fourier analysis, it is possible to decompose a composite signal into its constituent parts, a set of sine functions, each with a frequency, amplitude, and phase.
6.8 On a frequency domain graph, what does the y-axis represent?
A frequency domain graph shows a set of simple sine waves that constitute a composite function. The  y-axis gives the amplitude, and the x-axis gives the frequency.
6.9 What is the analog bandwidth of a signal?
Analog bandwidth of signal can be defined as to be the difference between the highest and lowest frequencies of the constituent parts (i.e., the highest and lowest frequencies obtained by Fourier analysis)
6.10 Is bandwidth easier to compute from a time domain or frequency domain representation? Why?
It is easier to compute bandwidth from a frequency-domain representation
6.11 Suppose an engineer increases the number of possible signal levels from two to four. How many more bits can be sent in the same amount of time? Explain.
The number of levels that can be represented by n bits is given by 2n. So if number of levels changes from 2 à 4, it means number of bits goes from 1 à 2
6.12 What is the definition of baud?
Baud is defined as the number of times that a signal can change per second
6.13 Why is an analog signal used to approximate a digital signal?
From an engineering perspective, Fourier’s result is impractical for digital signals because accurate representation of a digital signal requires an infinite set of sine waves instead an approximate conversion of a signal from digital to analog can be used.  So engineers build equipment to generate analog waves that closely approximate the digital signal
6.14 What is the bandwidth of a digital signal? Explain.
According to the definition of analog bandwidth, a digital signal has infinite bandwidth because Fourier analysis of a digital signal produces an infinite set of sine waves with frequencies that grow to infinity.
6.15 What is a synchronization error?
If a receiver misses the exact/precise start/stop point of a signal, a mismatch in interpretation produce errors.  Such errors are called synchronization error.
6.16 Why do some coding techniques use multiple signal elements to represent a single bit?
6.17 What aspect of a signal does the Manchester Encoding use to represent a bit?
Manchester Encoding uses bit timing and transitions. It specifies that a 1 corresponds to a transition from 0 volts to a positive voltage level. Correspondingly, a 0 corresponds to a transition from a positive voltage level to zero. Furthermore, the transitions occur in the “middle” of the time slot allocated to a bit.
6.18 What is the chief advantage of a Differential Manchester Encoding?
The most important property of differential encoding is that the encoding works correctly even if the two wires carrying the signal are accidentally reversed.
6.19 When converting an analog signal to digital, what step follows sampling?
After sampling, the samples are matched to quantization levels.
6.20 If the maximum frequency audible to a human ear is 20,000 Hz, at what rate must the analog signal from a microphone be sampled when converting it to digital?
The sampling rate =  2 ×  fmax, so the signal should be sampled at 2x20,000 = 40,000 Hz
6.21 What time elapses between samples for the PCM encoding used in the telephone system?
In commercial PCM used telephone system 8000 samples/s and each sample is represented by 8 bits. Therefore, data generation rate is 64,000 bits/s. So time elapsed between samples can be calculated as 1/rate = 1/64,000 s.

6.22 Describe the difference between lossy and lossless compressions, and tell when each might be used.
  • Lossy compression is generally used with data that a human consumes, such as an image, a segment of video, or an audio file. The key idea is that the compression only needs to preserve details to the level of human perception. That is, a change is acceptable if humans cannot detect the change.
  • Lossless compression preserves the original data without any change. Thus, lossless compression can be used for documents or in any situation where data must be preserved exactly.



Chapter 7 - Transmission Media

7.1 What is the difference between guided and unguided transmission?
We use the terms guided and unguided transmission to distinguish between physical media such as copper wiring or optical fibers that provide a specific path (guided) and a radio transmission that travels in all directions through free space (unguided) . Informally, engineers use the terms wired and wireless.

7.2 What are the three energy types used when classifying physical media according to energy used?
Three types of energy used when classifying physical media are electrical, electromechanical (radio), and light

7.3 What happens when noise encounters a metal object?
When it hits metal, electromagnetic radiation induces a small signal. Random noise can interfere with signals used for communication.  Metals absorb radiation, metal acts as a shield. Placing metal between a source of noise and a communication medium can prevent noise from interfering with communication.

7.4 What three types of wiring are used to reduce interference form noise?
There are three forms of wiring that help reduce interference from electrical noise, these are namely:
  • Unshielded Twisted Pair (UTP)
  • Coaxial Cable
  • Shielded Twisted Pair (STP)

7.5 Explain how twisted pair cable reduces the effect of noise.
Reader is encouraged to analyze Fig.7.2 a) and b) and interpret  

7.6 Draw a diagram that illustrates the cross section of a coaxial cable.
7.7 If you are installing computer network wiring in a new house, what category of twisted pair cable would you choose? Why?
Nowadays, the trend is using wireless rather than cabled solutions, but depend on quality of service and cost limitations an appropriate category of twisted pair cable

7.8 Explain why light does not leave an optical fiber when the fiber is bent into an arc.
7.9 What is dispersion?
In optics, dispersion is the phenomenon in which the phase velocity of a wave depends on its frequency. Media having such a property are termed dispersive media.

7.10 List the three forms of optical fiber, and give the general properties of each.
There are three forms of optical fibers that provide a choice between performance and cost:
  • Multimode - Step Index: The least expensive, and is used when performance is unimportant. The boundary between the fiber and the cladding is abrupt which causes light to reflect frequently. Therefore, dispersion is high.
  • Multimode - Graded Index: Slightly more expensive than the step index fiber. It has the advantage of making the density of the fiber increase near the edge/ It reduces reflection and lowers dispersion.
  • Single Mode: The most expensive, and provides the least dispersion. The fiber has a smaller diameter and other properties that help reduce reflection. It is used for long distances and higher bit rates.

7.11 What light sources and sensors are used with optical fibers?
Light sources and sensors that are used with optical fibers are:
  • Transmission: Light Emitting Diode (LED) or Injection Laser Diode (ILD)
  • Reception: photo-sensitive cell or photodiode

7.12 What is the chief disadvantage of optical fiber as opposed to copper wiring?
Optical fibers are less suitable for bending or pulling, also needs specialized equipment and highly qualified technicians to install/maintain

7.13 What is the approximate conical angle that can be used with InfraRed technology?
7.14 Can laser communication be used from a moving vehicle? Explain.
7.15 Why might low-frequency electromagnetic radiation be used for communications? Explain.
7.16 What are the two broad categories of wireless communications?
Wireless technologies can be classified into two broad categories as follows:
  • Terrestrial: Communication uses equipment such as radio or microwave transmitters that is relatively close to the earth’s surface.
  • Non-terrestrial: Some of the equipment used in communication is outside the earth’s atmosphere (e.g., a satellite in orbit around the earth).

7.17 List the three types of communications satellites, and give the characteristics of each.
Major categorization of communication satellites:
  • Low Earth Orbit (LEO):
  • Medium Earth Orbit (MEO)
  • Geostationary Earth Orbit (GEO)
Reader expected to write a paragraph for the characteristics of each

7.18 If messages are sent from Europe to the United States using a GEO satellite, how long will it take for a message to be sent and a reply to be received?
The speed of a signal can be approximated as (v) = 3x108 m/s. The relation between Time, Distance and Speed is given by: Time = Distance / Speed. So, the time taken for a signal to travel between Europe and USA depends on the distance between the points/location being used. Reader is encouraged to find out the closest and farthest points between two continents and calculate the time required to make a complete   round trip.

7.19 How many GEO satellites are needed to reach all populated areas on the earth?
Theoretically 3 (three) satellites suffice to cover the whole surface of the earth, but in practice many more are used to cover and delivery quality service

7.20 What is propagation delay?
Propagation delay can be defined as the time required for a signal to traverse (travel from one end to the other end) the medium

7.21 What is the relationship between bandwidth, signal levels, and data rate?
If a transmission system uses K possible signal levels and has an analog bandwidth B, Nyquist’s Theorem states that the maximum data rate in bits per second, D, is:
D =  2 B log2K

7.22 If two signal levels are used, what is the data rate that can be sent over a coaxial cable that has an analog bandwidth of 6.2 MHz?
Using the D =  2 B log2K relationship, D = 2*6.2*log22 = 2*6.2*1 = 12.4 Mbps
7.23 If a system has an average power level of 100, an average noise level of 33.33, and a bandwidth of 100 MHz, what is the effective limit on channel capacity?
Shannon theorem specify the maximum data rate that could be achieved over a transmission system that experiences noise:
C = B log2 (1 +  S/N)
where C is the effective limit on the channel capacity in bits per second, B is the bandwidth, and S/N is the signal-to-noise ratio.
Using the formulae, we can calculate C for the above given values: C = 100,000,000 * log2 (1 + 100/33.33) = 100,000,000 * log24 = 200,000,000 = 200 Mbps
7.24 If a system has an input power level of 9000, and an output power level of 3000, what is the difference when expressed in dB?
Decibel is expressed as 10 log10 (Pout/Pin) è 10 log10 (3,000/9,000) =
7.25 If a telephone system can be created with a signal-to-noise ratio of 40 dB and an analog bandwidth of 3000 Hz, how many bits per second could be transmitted?
First we should convert 40 dB to a real number, namely if 40 = 10 log10 S/N è S/N = 10,000
Using the Shannon’s capacity expression
                C = B log2 (1 +  S/N) è C = 3,000 log2 (1+ 10,000) = to be determined by reader


Ch 8 - Reliability And Channel Coding

8.1 List and explain the three main sources of transmission errors.
There are three main categories of transmission errors:
  • Interference: Electromagnetic radiation emitted from devices such as electric motors and background cosmic radiation cause noise that can disturb radio transmissions and signals traveling across wires.
  • Distortion: Wires have properties of capacitance and inductance that block signals at some frequencies while admitting signals at other frequencies. All physical systems distort signals. As a pulse travels along an optical fiber, the pulse disperses.
  • Attenuation. As a signal passes across a medium, the signal becomes weaker. Signals on wires or optical fibers become weaker over long distances, just as a radio signal becomes weaker with distance.

8.2 How do transmission errors effect data?
Transmission errors can effect data in different ways, namely it can create single-bit errors, burst errors, and/or erasures.

8.3 In a burst error, how is burst length measured?
For a burst error, the burst size, or length, is defined as the number of bits from the start of the corruption to the end of the corruption.
8.4 What is a codeword, and how is it used in forward error correction?
We can define the set of all possible messages to be a set of datawords, and define the set of all possible encoded versions to be a set of codewords. So each possible code sequence is considered to be a codeword.
8.5 Give an example of a block error code used with character data.
8.6 What does an ideal channel coding scheme achieve?
8.7 Define the concept of Hamming distance.
The Hamming distance is defined as the number of differences in a given two strings of n bits each (i.e., the number of bits that must be changed to transform one bit string to the other).
8.8 Compute the Hamming distance for the following pairs: (0000, 0001), (0101, 0001), (1111, 1001), and ( 0001, 1110).
The Hamming distance for the following pairs is:
(0000, 0001) = 1
(0101, 0001) = 1
(1111, 1001) = 2
( 0001, 1110) = 4

8.9 How does one compute the minimum number of bit changes that can transform a valid codeword into another valid codeword?
This is related to Hamming distance. We define minimum Hamming distance, which is minimum among the Hamming distance between each and every pair of codeword. Minimum Hamming distance the minimum number of errors that can change a valid codeword into an invalid one (error)
8.10 Explain the concept of code rate. Is a high code rate or low code rate desirable?
Code rate can be defines as the ratio of a dataword size to the codeword size. Mathematically, the code rate, R, for an ( n, k ) error coding scheme is given as:
R =   k/n, where k is the number of information bits, and n is the number of bits in a codeword. 
8.11 Generate a RAC parity matrix for a (20, 12) coding of the dataword 100011011111.
1 0 0 0 1
1 1 0 1 1
1 1 1 1 0
1 0 1 0 0

8.12 What can a RAC scheme achieve that a single parity bit scheme cannot?
RAC can correct single bit errors. However, single parity bit can only detect single (or odd) number of errors.

8.13 Write a computer program that computes a 16-bit Internet checksum.
8.14 What are the characteristics of a CRC?
CRC codes have many mathematical and usage characteristics, but we can mention the following ones:
  • Arbitary message length
  • Excellent error detection
  • Fast hardware implementation

8.15 Show the division of 10010101010 by 10101.
8.16 Express the two values in the previous exercise as polynomials. 
X10 + X7 + X5 + X3 + X
X4 + X2  + 1
8.17 Write a computer program that implements the (7,4) cyclic redundancy code in Figure 8.11.
8.18 List and explain the function of the two hardware building blocks used to implement CRC computation.

Ch 9 - Transmission Modes

9.1 Describe the difference between serial and parallel transmission.
Transmission modes can be divided into two fundamental categories:
  • Serial: one bit is sent at a time
  • Parallel: multiple bits are sent at the same time

9.2 What are the advantages of parallel transmission? What is the chief disadvantage?
A parallel mode of transmission has two chief advantages:
  • High speed: Because it can send N bits at the same time, a parallel interface can operate N times faster than an equivalent serial interface.
  • Match to underlying hardware: Internally, computer and communication hardware uses parallel circuitry. Thus, a parallel interface matches the internal hardware well.
The main disadvantage of parallel transmission is number of cables required, for long distance communication, this is an important consideration.

9.3 When transmitting a 32-bit 2’s complement integer in big-endian order, when is the sign bit transmitted?
Engineers use the term little-endian to describe a system that sends the Leas Significant Bit (LSB) first,
and the term big-endian to describe a system that sends the Most Significant Bit (MSB) first. According to the definition given, for a 32-bit 2’s complement integer in big-endian order, the sign bit, namely MSB.

9.4 What is the chief characteristic of asynchronous transmission?
Asynchronous transmission can occur at any time, with an arbitrary delay between the transmission of two data items, it allows the physical medium to be idle for an arbitrary time between two transmissions.

9.5 Which type (or types) of serial transmission is appropriate for video transmission? For a keyboard connection to a computer?
9.6 What is a start bit, and with which type of serial transmission is a start bit used?
Some systems use extra bits allow the receiver’s hardware to synchronize with the incoming signal. In some asynchronous systems, the extra bits are known as a preamble; in others, the extra bits are known as start bits.

9.7 When using a synchronous transmission scheme, what happens when a sender does not have data to send?
To insure that the sender and receiver stay synchronized, a frame starts with a special sequence of bits. Furthermore, most synchronous systems include a special idle sequence (or idle byte) that is transmitted when the sender has no data to send

9.8 When two humans hold a conversation, do they use simplex, half-duplex, or full-duplex transmission?
It depends, but most appropriate type of communication between two reasonable human being would be half-duplex.

9.9 Is a modem classified as DTE or DCE?
A modem is classified as Data Communications Equipment (DCE)

9.10 Use the Web to find the definition of the DCE and DTE pinouts used on a DB-25 connector.  Hint: pins 2 and 3 are transmit or receive. On a DCE type connector, does pin 2 transmit or receive?

Chapter 10 - Modulation And Modems

10.1 List the three basic types of analog modulation.
Three major categories of analog modulation are:
  • Amplitude Modulation (AM)
  • Frequency Modulation (FM)
  • Phase Modulation (PM)

10.2 When using amplitude modulation, does it make sense for a 1 Hz carrier to be modulated by a 2 Hz sine wave? Why or why not?
In modulation generally the idea is to carry a low-frequency signal with a high-frequency carrier signal. So, it will not be appropriate to modulate a 1 Hz carrier with a 2 Hz sine wave.

10.3 Using Shannon’s Theorem, explain why practical amplitude modulation systems keep the carrier near maximum strength.
10.4 What is the difference between shift keying and modulation?
Instead of modulation that is proportional to a continuous signal, digital schemes use discrete values. To distinguish between analog and digital modulation, we use the term shift keying (meaning abrupt changes)  rather than modulation (continuous, smooth changes).

10.5 In phase shift keying, is it possible to have a phase shift of 90 degree? of 270 degree? of 360 degree? Draw an example to explain your answer.
10.6 Search the Web and find a constellation diagram for 32 QAM. How many points are defined in each quadrant?
10.7 Figure 10.9 shows a full-duplex configuration with four wires, two of which are used to transmit in each direction. Argue that it should be possible to use three wires instead.
10.8 In the previous question, why are four wires preferable?
The number of wires being used will determine the speed and mode of operation, namely a system being half-duplex or full-duplex. So depending on the speed required and/or mode of operation 2-wire or 4-wire cabling is used.

10.9 Assuming a signal-to-noise ratio of 30 dB, what is the maximum data rate that can be  achieved for the dialup bandwidth illustrated in Figure 10.11?
The bandwidth of the system is 3000 – 600 = 2,400 Hz. Since, S/N is given, we’ll use Shannon’s capacity expression C = B log2 (1 + S/N). We should convert 30 dB to real value, which means S/N = 1,000.
So C = 2,400 log2 (1 + 1,000) = the result to be determined by the reader 

Chapter  11 - Multiplexing And Demultiplexing (Channelization)

11.1 Give an example of multiplexing in a non-electronic communication system.
11.2 What are the four basic types of multiplexing?
There are four basic approaches to multiplexing that each have a set of variations
and implementations.
  • Frequency Division Multiplexing (FDM)
  • Wavelength Division Multiplexing (WDM)
  • Time Division Multiplexing (TDM)
  • Code Division Multiplexing (CDM)

11.3 How does FDM use electromagnetic radiation?
In FDM, a set of radio stations can transmit electromagnetic signals simultaneously without interference provided they each use a separate channel (i.e., carrier frequency)

11.4 What is a guard band?
For proper communication without interference, we should choose a set of carrier frequencies with a gap between them known as a guard band. The guard band reduces or eliminates the possible interference between neighboring carrier signals.

11.5 An FDM system may assign each channel a range of frequencies. Using a range is essential when which type of modulation is used for each carrier?
A range of frequencies may be used in FDM for increasing data rate or increasing immunity against noise/inference.

11.6 Explain how a range of frequencies can be used to increase data rate.
To increase the overall data rate, a sender divides the frequency range of the channel into K carriers, and sends 1 /K of the data over each carrier.

11.7 In a hierarchical FDM system, explain how a high-capacity channel is divided into sub-channels.
11.8 What is the key mechanism used to combine or separate wavelengths of light in a WDM system?
Prisms form the basis of optical multiplexing and demultiplexing. A multiplexor accepts beams of light of various wavelengths and uses a prism to combine them into a single beam; a demultiplexor uses a prism to separate the wavelengths.

11.9 Is a TDM system required to use round-robin service?
Some TDM systems use a round-robin service while some others may not use round-robin, variations exist, based on the need.

11.10 Explain why framing and synchronization are important in a TDM system.
TDM requires that a demultiplexor stays synchronized with the multiplexor. Because a demultiplexor cannot tell where a slot begins, a slight difference in the clocks used to time bits can cause a demultiplexor to misinterpret the bit stream. To prevent misinterpretation, TDM used in the phone system includes an extra framing channel as input. Instead of taking a complete slot, framing inserts a single bit in the stream on each round.

11.11 In a hierarchical TDM system, at what bit rate does the output of a given level need to operate? (Express the answer in terms of the number and bit rate of inputs.)
The bit rate can be calculated = Number of input lines x bit rate of individual line + framing bits

11.12 Suppose N users compete using a statistical TDM system, and suppose the underlying physical transport can send K bits per second. What is the minimum and maximum data rate that an individual user can experience?
If we neglect the overhead generated by statistical TDM, a system will have two possibilities:
  • Minimum: If all channels have equal data then the rate will be K/N bps
  • Maximum: If only one channel active and the others are passive, then rate will be K bps

11.13 Suppose an OC-12 circuit is twenty percent the cost of an OC-48 circuit. What multiplexing technology can an ISP use to lower the cost of sending data at the OC-48 rate. Explain.
An ISP may use inverse multiplexing, which can utilize 4 x OC-12, which will cost % 80 of a OC-48, assuming no cost for equipment at the multiplexing/demultiplexing.
    
11.14 Search the Web to find the length of a chip sequence used in CDMA phone systems.
11.15 Of the four basic multiplexing techniques, is CDM always the best? Explain.
In terms of resource utilization (speed, channel) CDM is the best, but in terms of complexity in implementation and getting the system up and running may not be optimum solution.

Chapte 12 - Access And Interconnection Technologies

12.1 What is an access technology?
Internet access technology refers to a data communications system that connects an Internet subscriber (typically a private residence or business) to an Internet Service Provider (ISP), such as a telephone company or cable company.

12.2 Why do service providers distinguish between upstream and downstream communication?
A typical residential subscriber receives much more information than the subscriber transmits, Internet access technologies are designed to transfer more data in one direction than the other. The networking industry uses the term downstream to refer to data traveling from an ISP to a subscriber, and upstream to refer to data traveling from a subscriber to an ISP.

12.3 Give examples of narrowband and broadband access technologies.
The following can be given as examples of narrowband access technologies:
  • Dialup telephone connections
  • Leased circuit using modems
  • Fractional T1 data circuits
  • ISDN and other telco data services
The following can be given as examples of broadband access technologies:
  • DSL technologies
  • Cable modem technologies
  • Wireless access technologies
  • Data circuits at T1 speed or higher

12.4 Telephone companies once promoted ISDN as a high-speed access technology. Why has use of ISDN declined?
When ISDN was first proposed, 128 Kbps seemed much faster than dialup modems. So telephone companies promoted the technology a lot. But, the newer local loop technologies provide higher data rates at lower cost, relegating ISDN to a few special cases. Because the speed/quality offered by ISDN stayed behind some other newer technologies, it’s almost abandoned.

12.5 If a customer intends to receive more data than they send, which forms of DSL would be appropriate?
In this case ADSL would be more appropriate choice

12.6 What type of multiplexing does ADSL use?
ADSL uses a scheme known as Discrete Multi Tone modulation (DMT) that combines frequency division multiplexing and inverse multiplexing techniques.

12.7 Two neighbors, who live on the same street, both use ADSL service, but measurements show that one subscriber can download at approximately 1.5 Mbps and the other can download at 2.0 Mbps. Explain.
ADSL is adaptive. That is, when a pair of ADSL modems are powered on, they probe the line between them to find its characteristics, and then agree to communicate using techniques that are optimal for the line. When ADSL starts, both ends probe the available frequencies to determine which frequencies work well and which experience interference. Also, the two ends assess the signal quality at each frequency, and use the quality to select a modulation scheme. If a particular frequency has a high signal-to-noise ratio, ADSL selects a modulation scheme that encodes many bits per baud; if the quality on a given frequency is low, ADSL selects a modulation scheme that encodes fewer bits per baud.

12.8 Why is a splitter used with DSL?
Lifting a receiver can generate noise that interferes with DSL signals. To provide complete isolation, ADSL uses an FDM device known as a splitter that divides the bandwidth by passing low frequencies to one output and high frequencies to another.

12.9 If you had a choice between DSL and cable modem, which would provide the highest potential data rate?
In theory, a cable system can support data rates of 52 Mbps downstream and 512 Kbps upstream. In practice, the rate can be much less. First, the data rate of a cable modem only pertains to communication between the local cable office and the subscriber’s site. Second, the bandwidth is shared among a set of N subscribers, where the size of the set is controlled by the cable provider. From a subscriber’s point of view, sharing the bandwidth with other subscribers can be a disadvantage because the effective data rate available to each individual subscriber varies over time. In the worst case, if N subscribers share a single frequency, the amount of capacity available to an individual subscriber will be 1 /N. DSL provide constant or near-constant service. So the decision of selecting DSL or cable modem will depend on the type of application/environment.

12.10 Why would a service provider choose Hybrid Fiber Coax instead of Fiber To The Premises?
It depends on the existing infrastructure or cost related issues. Each case should be considered on its own circumstances

12.11 Where is a head-end modem located? A tail-end modem?
An access technology requires a pair of modems, with one at the subscriber’s site and one at the provider’s site. The industry uses the term head-end modem to refer to a modem used at the central office, and the term tail-end modem to refer to a modem used at the subscriber’s location.

12.12 What is the advantage of WiMAX access technology compared to satellite? What is the advantage of satellite?
When two system are compared we should consider data rate, speed/delay, cost and other performance issues.  Reader is expected to evaluate and compare them.

12.13 If you lease a T1 circuit, what equipment will be installed between the circuit and a computer at your site?
12.14 Use the Web to find the approximate size of a movie on DVD. How long does it take to download a movie over a T1 line? Over a T3 line? (Ignore overhead.)
12.15 If someone shows you a copper cable and claims that it is an “OC-12 circuit”, what error have they made? What is the correct name they should have used?
It’s an error of reference to wrong type of media. Synchronous Transport Signal (STS) standards refer to the electrical signals used in the digital circuit interface (i.e., over copper), while the Optical Carrier (OC) standards refer to the optical signals that propagate across the fiber.

12.16 Why did the designers of the Synchronous Digital Hierarchy choose unusual values for data rates instead of exact powers of ten?
12.17 Explain how the size of a SONET frame is computed.
Digital telephony takes 8,000 PCM samples per second, which means that a sample is taken every 125 µ seconds. SONET uses the time to define frame size. For example, at the STS-1 transmission rate of 51.840 Mbps, exactly 6480 bits are transferred in 125 µ seconds, which means that a frame consists of 810 each being 8- bit octet.

PART III
Packet Switching and Network Technologies
Chapter 13 -  Local Area Networks: Packets, Frames, And Topologies
13.1 What is circuit switching, and what are its chief characteristics?

The term circuit switching refers to a communication mechanism that establishes a path between a sender and receiver with guaranteed isolation from paths used by other pairs of senders and receivers. Circuit switching is usually associated with telephone technology because a telephone system provides a dedicated connection between two telephones. The circuit switching has the following main characteristics:
  • Point-to-point communication
  • Separate steps for circuit creation, use, and termination
  • Performance equivalent to an isolated physical path

13.2 In a circuit-switched network, can multiple circuits share a single optical fiber? Explain.

It’s possible. Since the circuit switching means that the communication between two parties is not affected in any way by communication among other parties, even if all communication is multiplexed over a common medium. In particular, circuit switching must provide the illusion of an isolated path for each pair of communicating entities.

13.3 In a packet switching system, how does a sender transfer a large file?

The packet switching system requires a sender to divide each message into blocks of data that are known as packets. The size of a packet varies; each packet switching technology defines a maximum packet size. So, a large file will be divided into smaller pieces and sent.

13.4 If someone wanted to broadcast a copy of a video presentation, is a circuit switching system or a packet switching preferable? Why?

Packet switching has the characteristic of establishing arbitrary, asynchronous communication means that can allow a sender to communicate with one recipient or multiple recipients. Also, a given recipient can receive messages from one sender or multiple senders.

13.5 What are the characteristics of LANs, MANs, and WANs?

There are lots of details that can be said and discussed for categorization of network types based on geography, few points are highlighted below:
  • Local Area Network (LAN): Least expensive; spans a single room or a single building
  • Metropolitan Area Network (MAN) Medium expense; spans a major city or a metroplex
  • Wide Area Network (WAN) Most expensive; spans sites in multiple cities

13.6 Name the two sublayers of Layer 2 protocols defined by IEEE, and give the purpose of each.

The Layer 2 protocols defined by IEEE defines two sub-layers as mentioned below:
  • Logical Link Control (LLC) Addressing and demultiplexing
  • Media Access Control (MAC) Access to shared media



13.7 What is a point-to-point network?

The term point-to-point refers to a communication mechanism that connects exactly two communicating entities.

13.8 What are the four basic LAN topologies?

The four basic LAN topologies are star, ring, mesh and bus

13.9 Can the wires of a ring network be arranged in a straight line (e.g., down a hallway)? Explain.

The name ring arises because one can imagine the computers and the cables connecting them arranged in a circle as However, in practice, the cables in a ring network do not form a circle. Instead, they run along hallways or rise vertically from one floor of a building to another.

13.10 In a mesh network, how many connections are required among 20 computers?

The expression to calculate number of connections in a mesh network is given by (n2-n)/2. So for 20 computers then number of connections required will be = (202 – 20)/2

13.11 Given an IEEE MAC address, how can one tell if the address refers to unicast?

In the 48-bit IEEE MAC address one bit determine the type of connection. The value of the bit at position 8 specifies type of communication; 0 (unicast) 1 (multicast)

13.12 Define unicast, multicast, and broadcast addresses. Explain the meaning of each.

Three categories of communication types are listed and described below:
  • Unicast: Uniquely identifies a single computer, and specifies that only the identified computer should receive a copy of the packet
  • Broadcast: Corresponds to all computers, and specifies that each computer on the network should receive a copy of the packet
  • Multicast: Identifies a subset of the computers on a given network, and specifies that each computer in the subset should receive a copy of the packet

13.13 How does a computer attached to a shared LAN decide whether to accept a packet?

LAN transmits packets over a shared medium. In a typical LAN, each computer on the LAN monitors the shared medium, extracts a copy of each packet, and then examines the address in the packet to determine whether the packet should be processed or ignored.

13.14 What term is used to describe the metadata that accompanies a packet?

The header is used to describe metadata that contains information used to process the frame. In particular, a
header usually contains an address that specifies the intended recipient.

13.15 Give a definition of the term frame.

In a packet-switched network, each frame corresponds to a packet processed at data link layer.

13.16 Why is byte stuffing needed?

What happens if the payload of a frame includes one or more bytes with control values/characters, such as EOT, SOH, which can be mistaken an actual control character? The solution lies with using a technique known as byte stuffing that allows transmission of arbitrary data without confusion. So each such case is replaced with a matching sequence which try to eliminate the confusion.

13.17 Write a pair of computer programs, one that accepts a data file as input and produces a byte stuffed version of the file according to the mapping in Figure 13.12, and another that removes byte stuffing. Show that your programs interoperate with those written by others.



Chapter 14 - The IEEE MAC Sub-Layer
14.1 Explain the three basic approaches used to arbitrate access to a shared medium.

The three basic approaches used to arbitrate access to a shared medium are:
·         Controlled access protocols
·         Random access protocols
·         Channelization protocols

14.2 Give an example of a network that uses dynamic channel allocation.

14.3 List the three main types of channelization and the characteristics of each.

The three types of channelization are
  • Frequency division multiple access (FDMA); Consists of a mechanism that allows independent stations to choose carrier frequencies that will not conflict with the carriers used by other stations.
  • Time division multiple access (TDMA); Each active participant is assigned a sequence number from 1 to N, and stations transmit in order 1, 2, 3, ... N.
  • Code division multiplexing; Allows multiple stations to transmit at the same time by encoding each transmission with some mathematically proven strategy.

14.4 Explain polling and the two general polling policies.

The polling uses a centralized controller, which cycles through stations on the network and gives each an opportunity to transmit a packet

14.5 In a reservation system, how does a controller form a list of stations that will transmit in a given round?

A reservation system, often used with satellite transmission, employs a two-step process in which each round of packet transmissions is planned in advance. In the first step, each potential sender specifies whether they have a packet to send during the next round and the controller transmits a list of the stations that will be transmitting. In the second step, stations use the list to know when they should transmit

14.6 What is a token, and how are tokens used to control network access?

A special control message is called a token. In a token passing system, when no station has any packets to send, the token circulates among all stations continuously. When a station captures the token, it sends its data, and when transmission completed, it releases the token.

14.7 In the Aloha protocol, what happens if two stations attempt simultaneous transmission on the inbound frequency, and how is the problem handled?

If two stations simultaneously attempt to transmit on the inbound frequency, the signals will interfere and the two transmissions will be garbled. We use the term collision, and say that the two transmitted packets collide in the medium. The protocol handles a collision by requiring a sender to retransmit each lost packet.

14.8 Expand the acronym CSMA/CD, and explain each part.

The acronym CSMA/CD stands for  Carrier Sense Multi-Access with Collision Detection, which means the following:
  • Carrier Sense: Instead of allowing a station to transmit whenever a packet becomes ready, Ethernet requires each station to monitor the cable to detect whether another transmission is already in progress.
  • Multiple Access: The system allows multiple users/hosts to make use of a common/shared media
  • Collision Detection. A collision can occur if two stations wait for a transmission to stop, find the cable idle, and both start transmitting.

14.9 What is binary exponential backoff?

Doubling the range of the random delay after each collision is known as binary exponential backoff. In essence, exponential backoff means that an Ethernet can recover quickly after a collision, because each computer agrees to wait longer times between attempts when the cable becomes busy. Even in the unlikely event that two or more computers choose delays that are approximately equal, exponential backoff guarantees that contention for the cable will be reduced after a few collisions.

14.10 Why does CSMA/CD use a random delay? (Hint: think of many identical computers on a network.)

Randomization is used to avoid having multiple stations transmit simultaneously as soon as the cable is
idle. That is, the standard specifies a maximum delay, d, and requires each station to choose a random delay less than d after a collision occurs. In most cases, when two stations each choose a random value, the station that chooses the smallest delay will proceed to send a packet and the network will return to normal operation.

14.11 Why is CSMA/CA needed in a wireless network?

In wireless networks there is a hidden terminal/station problem, where some stations may not see/detect the transmission between some other parties. To ensure that all stations share the transmission media correctly, wireless LANs use a modified access protocol known as Carrier Sense Multiple Access With Collision Avoidance (CSMA/CA). Instead of depending on all other computers to receive all transmissions, the CSMA/CA used with wireless LANs triggers a brief transmission from the intended receiver before transmitting a packet. The idea is that if both the sender and receiver transmit a message, all computers within range of either will know a packet transmission is beginning.



Chapter 15 - Wired LAN Technology (Ethernet And 802.3)
15.1 How large is the maximum Ethernet frame, including the CRC?

According to Fig. 15.1 a conventional Ethernet frame has the following fields:
  • Header:  14 bytes (fixed)
  • Payload: 46-1500 bytes (there is a minimum frame size because of collision detection)
  • CRC:      4 bytes (fixed)
Accordingly an Ethernet frame will be maximum 1518 bytes and minimum 64 bytes

15.2 How is the type field in the Ethernet header used?

The type field in an Ethernet frame provides multiplexing and demultiplexing that allows a given computer to have multiple protocols operating simultaneously.

15.3 In an 802.3 Ethernet frame, what is the maximum payload size?

The 802.3 Ethernet makes use of 8-bytes of the original/conventional Ethernet for Logical Link Control / Sub-Network Attachment Point (LLC / SNAP) header instead of extending/increasing the header. This is for sake of backward compatibility. So the maximum pay load is reduced from 1500 bytes to 1492 bytes.

15.4 How can a receiver tell whether an Ethernet frame uses the 802.3 standard?

To keep the two versions of Ethernet compatible, a convention is used:
If bytes 13-14 of an Ethernet frame contain a numeric value less than 1500, the field is interpreted as a packet length and the 802.3 standard applies; otherwise, the field is interpreted as a type field and the original Ethernet standard applies.

15.5 When it is used, where is an LLC/SNAP header placed?

When it is used, LLC/SNAP header is placed after the original header, in the beginning of the payload area.

15.6 How did a computer attach to a Thicknet Ethernet?

Hardware used with Thicknet was divided into two major parts:
  • Transceiver:  A network interface card (NIC) handled the digital aspects of communication, and a separate electronic device called a transceiver connected to the Ethernet cable and handled carrier detection, conversion of bits into appropriate voltages for transmission, and conversion of incoming signals to bits.
  • AUI: A physical cable known as an Attachment Unit Interface (AUI) connected a transceiver to a NIC in a computer. A transceiver was usually remote from a computer.

15.7 How were computers attached to a Thinnet Ethernet?

Thinnet Ethernet  (formally named 10Base2) uses a thinner  coaxial cable that was more flexible than Thicknet. The wiring scheme differed dramatically from Thicknet. Instead of using AUI connections between a computer and a transceiver, Thinnet integrates a transceiver directly on the NIC, and runs a coaxial cable from one computer to another.

15.8 What is an Ethernet hub, and what wiring is used with a hub?

An electronic device that serves as the central interconnection is known as a hub. Hubs were available in a variety of sizes, with the cost proportional to size. The hubs are becoming old-fashioned, and being replaced with switches.

15.9 Look up switches and hubs on the Web. If you were offered a switch or hub that operated at the same bit rate for the same price, which would you choose? Why?

15.10 Give an example of a network with differing physical and logical topologies.

15.11 Which style of Ethernet wiring requires more physical wires in an office building?

Hub/switch type of Ethernet wiring requires more physical wires, but gradually LAN wiring is being replaced with wireless options available

15.12 What category of twisted pair wiring is needed for a 10 Mbps network? 100 Mbps? 1000 Mbps?

The three major categories of Ethernet and their wiring is listed below:
  • 10 Mbps: 10BaseT (Ethernet) à Category 5
  • 100 Mbps: 100BaseT (Ethernet Fast) à Category 5E
  • 1 Gbps: 1000BaseT  (Gigabit Ethernet) à Category 6


Chapter 16 - Wireless Networking Technologies
16.1 Name three wireless PAN technologies, and give a short description of each.

Categorization of Personal Area Network (PAN) technologies and their short description can be given as follows:
  • Bluetooth : Communication over a short distance between a small peripheral device such as a headset or mouse
and a system such as a cell phone or a computer
  • InfraRed: Line-of-sight communication between a small device, often a hand-held controller, and a nearby system such as a computer or entertainment center
  • ISM: Communication using frequencies set aside for Industrial wireless Scientific and Medical devices, an environment where electromagnetic interference may be present

16.2 What are the three blocks of frequencies used by wireless LANs and PANs?

The following range of frequencies are allocated for the usage of LANs and ISM applications without paying license fee:
  • Range of 902 - 928 MHz
  • Range of 2.4 - 2.482 GHz
  • Range of 5.725 – 5.850 GHz

16.3 What is the Wi-Fi Alliance?

Wi-fi Alliance is a group of vendors who build wireless equipment. It is a non-profit organization that tests and certifies wireless equipment using the 802.11 standards.

16.4 Give the numeric prefix IEEE standards use for Wi-Fi networks.

IEEE standards use the following common notation for Wi-Fi networks
  • IEEE 802.11
  • IEEE 802.11a
  • IEEE 802.11g
  • IEEE 802.11g
  • Few others also being developed

16.5 List three spread spectrum techniques, and give a general description of each.

Common spread spectrum techniques and their general description is given below:
  • DSSS (Direct Sequence Spread Spectrum): Similar to CDMA where a sender multiplies the outgoing data by a sequence to form multiple frequencies and the receiver multiplies by the same sequence to decode
  • FHSS (Frequency Hopping Spread Spectrum ): A sender uses a sequence of frequencies to transmit data, and a receiver uses the same sequence of frequencies to extract data
  • OFDM (Orthogonal Frequency Division Multiplexing ): A frequency division multiplexing scheme where the transmission band is divided into many carriers in such a way that the carriers do not interfere

16.6 Look up OFDM on the Web, and give a one-paragraph description in your own words.





16.7 List the IEEE standards that have been proposed or created for wireless LANs.

The question needs to be clarified further. But, the point is IEEE has created many wireless networking standards that handle various types of communication. Each standard specifies a frequency range, the modulation and multiplexing to be used, and a data rate. Figure 16.6 lists the major standards that have been created or proposed, and gives a brief description of each. In 2007, IEEE “rolled up” many of the existing 802.11 standards into a single document known as 802.11-2007. The document describes basics, and has an appendix for each variant.

16.8 Why do most wireless LANs use an infrastructure approach rather than an ad hoc approach?

In practice few ad hoc networks exist. Instead, an organization or service provider deploys a set of access points, and each wireless host communicates through one of the access points. The wired connections that extend to access points usually consist of twisted pair Ethernet.

16.9 Why must a wireless computer associate with a specific base station?

If a pair of access points is too close together, an overlap will exist in which a wireless host can reach both access points. Furthermore, most wireless LANs connect to the Internet. To handle overlap, 802.11 networks require a wireless host to associate with a single access point. That is, a wireless host sends frames to a particular access point, which forwards the frames across the network.

16.10 An 802.11 header contains two destination addresses. Explain the purpose of each.

An 802.11 header contains two destination addresses as follows:
  • Destination 1: AP or wireless computer’s MAC
  • Destination 2: Router’s MAC address

16.11 What are SIFS and DIFS, and why are they needed?

The wireless standard defines timing parameters as follows:
  • SIFS (Short Inter-Frame Space) of 10 µsec
  • DIFS (Distributed Inter-Frame Space) of 50 µsec
The SIFS parameter defines how long a receiving station waits before sending an ACK or other response; the DIFS parameter, which is equal to SIFS plus two Slot Times, defines how long a channel must be idle before a station can attempt transmission.

16.12 Name the two types of WiMAX technologies, and describe the purpose of each.

Two main versions of WiMAX are being developed that differ in their overall approach, namely:
  • Fixed WiMAX:  Refers to systems built using IEEE standard 802.16-2004, which is informally called 802.16d. It is designed to provide connections between a service provider and a fixed location, rather than between a provider and a cell phone.
  • Mobile WiMAX: Refers to systems built according to standard 802.16e-2005, which is informally abbreviated 802.16e. The technology offers handoff among access points, which means a mobile WiMAX system can be used with portable devices such as laptop computers or cell phones.









16.14 Give the characteristics of UWB technology.

Ultra Wideband (UWB) communication utilizes spreading data across many frequencies requires less power to reach the same distance. The key characteristics of UWB are:
  • Uses wide spectrum of frequencies
  • Consumes very low power
  • Short distance (2 to 10 meters)
  • Signal permeates obstacles such as walls
  • Data rate of 110 at 10 meters, and up to 500 Mbps at 2 meters
  • IEEE unable to resolve disputes and form a single standard

16.15 Does it make sense to use IrDA for applications such as file transfer? Why or why not?

16.16 What is RFID, and where is it used?

Radio Frequency Identification (RFID) technology uses an interesting form of wireless communication to create a mechanism whereby a small tag contains identification information that a receiver can “pull” from the tag. RFID mostly used for inventory control, sensors, passports, and other applications.

16.17 To what does a cell tower connect?

Cellular systems were originally designed to provide voice services to mobile customers. Cellular systems are being used to provide data services and Internet connectivity. Each cell contains a tower, and a group of (usually adjacent) cells is connected to a Mobile Switching Center. The center tracks a mobile user, and manages handoff as the user passes from one cell to another.

16.18 What is a cell cluster, and how does a designer use clusters?

In cellular communication interference can be minimized if an adjacent pair of cells do not use the same frequency. To implement the principle, cellular planners employ a cluster approach in which a
small pattern of cells is replicated.

16.19 Name the four generations of cellular technology, and describe each.

The telecommunications industry divides cellular technologies into four generations that are labeled 1G, 2G, 3G, and 4G, with intermediate versions labeled 2.5G and 3.5G. The generations can be characterized as follows:
  • 1G: The first generation began in the latter 1970s, and extended through the 1980s. The systems, which were originally called cellular mobile radio telephones, used analog signals to carry voice.
  • 2G and 2.5G: The second generation began in the early 1990s and continues to be used. The main distinction between 1G and 2G arises because 2G uses digital signals to carry voice. The label 2.5G is used for systems that extend a 2G system to include some 3G features.
  • 3G and 3.5G: The third generation began in the 2000s, and focuses on the addition of higher-speed data services. A 3G system offers download rates of 400 Kbps to 2 Mbps, and is intended to support applications such as web browsing and photo sharing. 3G allows a single telephone to roam across North America, Japan, and Europe.
  • 4G: The fourth generation began around 2008, and focuses on support for real-time multimedia, such as a television program or high-speed video download. In addition, 4G phones include multiple connection technologies, such as Wi-Fi and satellite; at any time, the phone automatically chooses the best connection technology available

16.20 What is GSM, and what standards does it comprise?

The Global System for Mobile Communications (GSM) is created as a system that was intended as a worldwide standard. It comprise many standards and usages, so the question needs to be clarified for a precise answer.

16.21 What are the third-generation cellular technologies that use code-division multiplexing?

Third-generation cellular technologies that use CDMA can be classified as:
  • WCDMA (UMTS + HSDPA)
  • CDMA 2000 (EVDO + EVDV)

16.22 What is a VSAT satellite?

 A major change in satellite occurred with the emergence of a technology known as a Very Small Aperture Terminal (VSAT) that uses dishes less than three meters in diameter. A typical VSAT antenna is less than one meter in diameter.

16.23 Why is a satellite dish shaped in the form of a parabola?

The parabolic shape means that electromagnetic energy arriving from a distant satellite is reflected to a single focus point. By aiming the dish at a satellite and placing a detector at the focus point, a designer can guarantee that a strong signal is received.

16.24 Name the three chief frequency bands used by communication satellites, and give the effect of weather on each.

Major frequency bands used by communication satellites and the effect of weather on each of them is given as follows:
  • C Band: Medium
  • Ku Band: Moderate
  • Ka Band: Severe

16.25 How many satellite are used in GPS, and how accurate is a GPS system?

GPS uses 24 total satellites orbit the earth, arranged in six orbital planes. Accuracy of GPS systems differs, and ranges between 2-20  meters (military versions have higher accuracy)

16.26 In addition to position, what does GPS provide?

In addition to position/location information, GPS provides time synchronization that is used in some communication networks

16.27 What features are controllable in a software radio?

Features that can be controlled in a software programmable radio are:
  • Frequency: The exact set of frequencies used at a given time
  • Power: The amount of power the transmitter emits
  • Modulation: The signal and channel coding and modulation
  • Multiplexing: Any combination of CDMA, TDMA, FDMA and others
  • Signal Direction: Antennas can be tuned for a specific direction
  • MAC Protocol: All aspects of framing and MAC addressing


Chapter 17 - LAN Extensions: Fiber Modems, Repeaters, Bridges, and Switches
17.1 When an optical fiber is used to extend a connection to a LAN, what additional devices are needed?

Fiber modems are required to extend a LAN connection with fiber optic cable

17.2 If a television set provides a wired extension for a remote infrared sensor, what technology is likely used?

17.3 If two computers are connected on a bridged network, are changes required in addressing or in applications? Explain.

Computers and applications running on the computers attached to a bridged network are not aware of the fact they are connected through a bridge. No changes are required on them.

17.4 Give a precise statement of conditions under which an adaptive bridge will forward a packet.

When a frame arrives from a given segment, the bridge extracts the source address from the header, and adds the address to a list of computers attached to the segment. The bridge must then extract the MAC destination address from the frame, and use the address to determine whether to forward the frame using forwarding table.

17.5 Consider a packet sent on a bridged LAN to a nonexistent address. Across how many segments will bridges forward the packet?

17.6 Suppose a network contains three Ethernet segments operating at 100 Mbps connected by two bridges and that each segment contains one computer. If two computers send to a third, what is the maximum data rate a given sender can achieve? The minimum?

On a Ethernet LAN only one station at a time can be active. So, the maximum rate that can be achieved is 100 Mbps, the minimum 0 Mbps (no transmission)

17.7 Consult the Web to find a description of the spanning tree algorithm, and write a computer program that simulates bridges forming a spanning tree.

17.8 Do computers on a bridged Ethernet receive spanning tree packets? Explain.

Ethernet bridges communicate among themselves. Computer on the bridged Ethernet are not aware of the spanning tree.

17.9 Use a network analyzer to observe traffic on a bridged Ethernet. What do you observe after a bridge reboots?

17.10 When bridging is used with a satellite link, two bridges are typically used, one on each side. Explain why.

In satellite links there is long delays between two points. Reader is encouraged to elaborate on this point.

17.11 According to Figure 17.6, can two computers attached to a switched LAN transmit packets simultaneously? Explain.

If the figure is analyzed carefully, it can be seen that, two computers pair of computers can communicate simultaneously without effecting each other.

17.12 Extend Figure 17.6 to have five ports.

17.13 In the previous exercise, write an equation that gives the number of simulated bridges needed as a function of the number of ports.

17.14 Write a computer program that simulates a bridge function. Let two files of data simulate frames transmitted on two segments to which the bridge attaches. Assume that each simulated frame contains a source and destination address. To perform the simulation, read a frame from the first file, then a frame from the second file, and so on. For each frame, display whether the bridge will forward a copy of the frame to the other LAN segment.

17.15 Extend the program in the previous exercise to simulate a VLAN switch. Have the program begin by reading configuration information that specifies a set of hosts and a set of virtual LANs to which they should be attached. Create a file of frames that each specify the computer sending the frame (i.e., the port on the switch over which the frame arrives) and a destination address. Show how each frame is forwarded.

17.16 Can a bridge connect a Wi-Fi network to an Ethernet? Can a switch? Why or why not?



Chapter 18 - WAN Technologies And Dynamic Routing

18.1 What are the conceptual parts of a traditional packet switch, and to what does it connect?

A packet switch consists of a small computer system with a processor, memory, and I/O devices used to send and receive packets. Early packet switches were constructed from conventional computers; the packet switches used in the highest-speed WANs require special-purpose hardware. A packet switch, the device provides local connections for computers at the site as well as connections for data circuits that lead to other sites.

18.2 Into what two conceptual pieces is a modern packet switch divided?

The question can be interpreted differently. But, if we assume the functional blocks of a packet switch, most WANs separate a packet switch into two parts: a Layer 2 switch that connects local computers and a Layer 3 router that connects to other sites.

18.3 Can a computer use an Ethernet interface to communicate with a WAN? Explain.

18.4 If a WAN connects N sites, what is the minimum number of digital circuits needed? What is the maximum number that can be present?

18.5 Explain the store and forward paradigm.

To perform store and forward processing, a packet switch buffers packets in memory. The store operation occurs when a packet arrives: I/O hardware inside the packet switch places a copy of the packet in memory. The forward operation occurs once a packet has arrived and is waiting in memory. The processor examines the packet, determines its destination, and sends the packet over the I/O interface that leads to the destination.

18.6 What are the two conceptual parts of a WAN address?

Conceptually, hierarchical addressing divides each address into two parts:  (site, computer at the site). In practice, instead of a identifying a site, each packet switch is assigned a unique number, which means that the first part of an address identifies a packet switch and the second part identifies a specific computer.

18.7 Figure 18.4 shows how addresses can be assigned to computers that connect to a packet switch. Suppose the hardware for one of the interfaces on a switch fails and a network administrator moves a computer’s connection to an unused interface. Will the new configuration work correctly? Why or why not?

18.8 Write a computer program that takes as input a forwarding table and a series of packets, and generates as output a statement of how each packet should be forwarded. Remember to handle packets that have an incorrect address.

18.9 Consider a WAN with two packet switches. Assume each switch has a forwarding table entry for each local address (i.e., the address of each computer that attaches to the switch) plus a default entry that points to the other switch. Under what circumstances will the scheme work? Under what circumstances will the scheme fail?

18.10 What benefit does dynamic routing offer?

Dynamic routing  builds an initial forwarding table when a the router boots; the program then alters the table as conditions in the network change.  Dynamic routing allows a large network with redundant connections to handle occasional hardware failures.

18.11 Write a computer program that implements Dijkstra’s algorithm for finding shortest paths in a graph.

18.12 What are the two basic approaches used to perform a distributed route computation, and how does each work?
There are two basic approaches used to perform distributed route computation:
  • Link-State Routing (LSR), which uses Dijkstra’s algorithm: In LSR routing, packet switches periodically send messages across the network that carry the status of a link between two packet switches.  Each status message is broadcast to all switches. Every switch runs software that collects incoming status messages and uses them to build a graph of the network.
  • Distance-Vector Routing (DVR), which uses another approach: Each link in the network is assigned a weight, and the distance to a destination between two packet switches is defined to be the sum of weights along the path between the two. In DVR scheme, a router send a complete list of destinations and the current cost of reaching each network that can be reached.
In both LSR and DVR schemes packet switches to exchange messages periodically.

18.13 When computer programs running on two packet switches exchange distance-vector information, the programs must agree on a message format. Create a specification for an unambiguous message format. Hint: consider differences in the way computers represent information.

18.14 Extend the previous exercise by implementing a computer program that uses the specified message format. Have another student implement a program from the same specification, and see if they interoperate correctly.

18.15 When a packet switch receives a distance-vector message from a neighbor, will the switch’s forwarding table always change? Explain.

Forwarding table will change only when newly advertised values are better (shorter) than existing routes. So forwarding table for router may remain stable as long as no changes in the network topology and no changes cost to reach them.

18.16 What is a routing loop?

In a routing loop situation, each packet switch thinks the next packet switch in the set is the shortest
path to a particular destination. As a result, a packet can circulate among the packet switches indefinitely.


Chapter 19 - Networking Technologies Past And Present
19.1 What is SONET?

The term Synchronous Optical NETwork (SONET) in North America,  is known as the Synchronous Digital Hierarchy (SDH) in Europe. SONET uses time-division multiplexing to multiplex the circuits onto an underlying fiber. SONET permits a physical ring to be constructed with the purpose of providing redundancy. A device known as an Add-Drop Multiplexor is used to connect a site to a SONET ring. The term arises because the Add-Drop Multiplexor either inserts or terminates a set of data circuits that each connect to another Add-Drop Multiplexor on the ring. SONET specifies details such as how data is framed, how lower-capacity circuits are multiplexed into a high-capacity circuit, and how synchronous clock information is sent along with data. SONET and the associated TDM hierarchy was originally designed as a system to carry digital voice telephone calls.

19.2 By why name does a consumer know DOCSIS technology?

19.3 Which would you expect to have smaller delay, VSAT technology or WiMAX technology? Why?

The WiMAX technology has smaller delay than VSAT, since in VSAT a satellite is used as a relay point, which has a long distance to travel for a complete round-trip, while in WiMAX communication is limited within a limited location.

19.4 Which company was well-known for a token ring technology?

IBM chose to create a token passing LAN technology that was known as IBM Token Ring.

19.5 What technology overshadowed and eventually edged out FDDI?

The high cost and special expertise needed to install fiber discouraged most organizations from replacing copper wiring. As work on Fast Ethernet progressed, FDDI proponents created a version of FDDI called CDDI that ran over copper wiring. Ultimately, Ethernet proved to have lower cost, and FDDI technologies vanished.

19.6 What technology has replaced Ethernet hubs?

Ethernet switches replaced hubs, and VLAN switches replaced switches.

PART IV
Internetworking Using TCP/IP
Chapter 20 - Internetworking: Concepts, Architecture, and Protocols

20.1 Will the Internet be replaced by a single networking technology? Why or why not?

Incompatibilities make it impossible to form a large network merely by interconnecting the wires among networks. The beauty of the Internet is interconnection of wide range of technologies from various manufacturers. Diversity of the products and solutions is a richness instead of limitation as long as they all adopt the same set of protocols. 

20.2 What is the chief difficulty in providing universal service?

The main difficulty in providing universal service is incompatibilities among network hardware, frames, and addresses prevent a bridged network from including arbitrary technologies.

20.3 What are the two reasons an organization does not use a single router to connect all its networks?

An organization seldom uses a single router to connect all of its networks. There are two major reasons:
  • Because the router must forward each packet, the processor in a given router is insufficient to handle the traffic passing among an arbitrary number of networks.
  • Redundancy improves internet reliability. To avoid a single point of failure, protocol software continuously monitors internet connections and instructs routers to send traffic along alternative paths when a network or router fails.

20.4 If a given router can connect to at most K networks, how many routers, R, are required to connect N networks? Write an equation that gives R in terms of N and K.

A router require an interface of each network to be connected. Since N networks to be connected by a router having K, then number of routers required will be N/K.

20.5 Users view the Internet as a single network. What is the reality, and to what does a user’s computer attach?

Internet is a virtual network system because the communication system is an abstraction. That is, although a combination of hardware and software provides the illusion of a uniform network system, no such network exists. Internet protocol software hides the details of physical network connections, physical addresses, and routing information. Neither users nor application programs are aware of the underlying physical networks or the routers that connect them. Internet software provides the appearance of a single, seamless communication system to which many user computers attach. The system offers universal service: each computer is assigned an address, and any computer can send a packet to any other computer.

20.6 In the 5-layer reference model used with the TCP/IP Internet protocols, what is the purpose of each of the five layers?

The 5-layers of TCP/IP and their purpose is given as follows:
  • Layer 1 (Physical): Protocols in the Physical layer specify details about the underlying transmission medium and the associated hardware.
  • Layer 2 (Network Interface): Protocols in the Network Interface layer specify details about communication between higher layers of protocols and the underlying network.
  • Layer 3 (Internet): Protocols in the Internet layer form the fundamental basis for the Internet. Layer 3 protocols specify communication between two computers across the Internet
  • Layer 4 (Transport): Protocols in the Transport layer provide for communication from an application program on one computer to an application program on another.
  • Layer 5 (Application): Protocols in the top layer of the TCP/IP stack specify how a pair o applications interact when they communicate.



Chapter 21- IP: Internet Addressing


21.1 Could IP be redesigned to use hardware addresses instead of the 32-bit addresses it currently uses? Why or why not?

MAC adresses can not be used, because the Internet can include multiple network technologies and each technology can define its own MAC addresses. But if the Internet were to be designed from the beginning, for sure so many things would be different, probably much easier. Bt because of backward compatibility and various tries by different companies made the system complicated.

21.2 What does the Internet address hierarchy allow a local manager to do?

It allows a local manager to divide the network into subnetworks for better management in terms of security, traffic segregation.

21.3 In the original classful address scheme, was it possible to determine the class of an address from the address itself? Explain.

Yes, since in the classful addressing scheme initial bit(s) gives indication about the class being used.

21.4 Write a computer program that accepts a dotted decimal address as input and displays a string of 32 bits.

21.5 Write a computer program that reads an IP address in dotted decimal form and determines whether the address is a multicast address.

21.6 Write a computer program that translates between CIDR slash notation and an equivalent dotted decimal value.

21.7 If an ISP assigned you a /28 address block, how many computers could you assign an address?

When an organization is assigned /28 CIDR address, it means 28 bits out of 32 bits are fixed, so 32-28 = 4 bits available for user space. So number of users 24-2 = 4, since the all 0s and all 1s address are having special use and can’t be assigned to a user.

21.8 If an ISP offers a / 17 address block for N dollars per month and a / 16 address block for 1.5 N dollars per month, which has the cheapest cost per computer?

Number of addresses in /17 block 232-17 = 215 è Price per address: 215/N        =  215/N       
Number of addresses in /16 block 232-16 = 216 è Price per address: 216/1.5N   = 2x215/1.5N = 1.33x215/N

So /16 address block will be cheaper in comparison with the price given for /17 block.

21.9 Is the CIDR prefix 1.2.3.4 / 29 valid? Why or why not?

21.10 Suppose you are an ISP with a / 24 address block. Explain whether you accommodate a request from a customer who needs addresses for 255 computers. (Hint: consider the special addresses.)

For /24 address block, number of available addresses will be 232-24 = 28 = 256. However, a suffix with all 0s address is reserved for network ID and a suffix with all 1s address is reserved for broadcast address, so number of addresses that can be assigned to computers/hosts will be 256 -2 = 254.




21.11 Suppose you are an ISP that owns a / 22 address block. Show the CIDR allocation you would use to allocate address blocks to four customers who need addresses for 60 computers each.

The /22 address block can be assigned as follows:

ddd.ddd.ddd.00/26
ddd.ddd.ddd.01/26
ddd.ddd.ddd.10/26
ddd.ddd.ddd.11/26

21.12 Suppose you are an ISP that owns a / 22 address block. Can you accommodate requests from six customers who need addresses for 9, 15, 20, 41, 128, and 260 computers, respectively? If so, how? If not, explain why.

If an ISP owns /22 address block, then number of addresses available will be 232-22 = 210 = 1024
We should look at the distribution of these available addresses in a very efficient way. For example, if we want to assign a block for 260 addresses, 28 = 256 is less and 29 =512 is a lot (lots of addresses are wasted). The reader is expected to analyze the situation accordingly and answer the remaining of the question.

21.13 Write a computer program that reads an address in CIDR notation and prints the resulting address and mask in binary.

21.14 Write a computer program that reads as input a network prefix in CIDR notation and a request for a number of hosts. Assume the request has been given to the ISP that owns the prefix, and assign a CIDR prefix that accommodates the request without wasting addresses.

21.15 Write a computer program that reads a 32-bit host address and a 32-bit mask in CIDR notation and tells whether the address is one of the special addresses.

21.16 What is a Berkeley broadcast address?

The University of California at Berkeley developed and distributed an early implementation of TCP/IP protocols as part of BSD UNIX. The BSD implementation contained a nonstandard feature that has affected many subsequent implementations. Instead of using a host suffix of all ones to represent a directed broadcast address, the Berkeley implementation uses a host suffix that contains all zeroes (i.e., identical to the network address). The address form is known informally as Berkeley broadcast.

21.17 How many IP addresses are assigned to a router? Explain.

The number of IP addresses assigned to a router depends on the number of networks connected to the router. But a router at least should have two IP addresses (one to internal network, the other one for external connection)

21.18 Can a host have more than one IP address? Explain.

Yes. A host computer with multiple network connections is said to be multi-homed. Multi-homing is sometimes used to increase reliability. Namely, if one network fails, the host can still reach the Internet through the second connection. Also multi-homing may be used to increase performance connections to multiple networks can make it possible to send traffic directly and avoid routers, which are sometimes congested.


Chapter 22- Datagram Forwarding

22.1 What are the two basic communication paradigms that designers consider when designing an internet?

Two basic communication paradigms that designers consider when designing an internet are:
  • Connection-oriented service
  • Connectionless service

22.2 How does the Internet design accommodate heterogeneous networks that each have their own packet format?

To overcome heterogeneity, the Internet Protocol defines a packet format that is independent of the underlying hardware. The result is a universal, virtual packet that can be transferred across the underlying hardware intact. The Internet packet format is not tied directly to any hardware. The underlying hardware does not understand or recognize an Internet packet.

22.3 Write a computer program to extract the source and destination addresses from an IP datagram, and print them in dotted decimal notation.

22.4 Write a program to extract all fields from an IP datagram header. Print the values in hexadecimal or dotted decimal as appropriate.

22.5 What is the maximum length of an IP datagram?

In the current version of the Internet Protocol (IP version 4), a datagram can contain at most 64 K (65535) octets, including the header.

22.6 Write a computer program that takes as input an IP forwarding table as in Figure 22.3b and a sequence of destination addresses. For each destination address, search the table sequentially to find the correct next hop, and output the results.

22.7 If a datagram contains one 8-bit data value and no header options, what values will be found in header fields H. LEN and TOTAL LENGTH?

H. LEN indicated header in 32-quantities, since no options, then this value will be 5. The TOTAL LENGTH indicated the number of bytes in a datagram including the header. This means 5x4 bytes + 1 (8-bits) = 21 bytes




Chapter 23 - Support Protocols And Technologies

23.1 When a router uses a forwarding table to look up a next-hop address, the result is an IP address. What must happen before the datagram can be sent?

Each router along the path uses the destination IP address in the datagram to select a next-hop address, encapsulates the datagram in a hardware frame, and transmits the frame across one network. A crucial step of the forwarding process requires a translation: forwarding uses IP addresses, and a frame transmitted across a physical network must contain the MAC address of the next hop.

23.2 What term is used to describe the mapping between a protocol address and a hardware address?

Translation from a computer’s IP address to an equivalent hardware address is known as address resolution, and an IP address is said to be resolved to the correct MAC address. The TCP/IP protocol being used for this is called Address Resolution Protocol (ARP). Address resolution is local to a network.

23.3 Can ARP be used on a network that does not provide broadcast? Why or why not?


23.4 How many responses does a computer expect to receive when it broadcasts an ARP request? Explain.

ARP message is broadcasted to all stations/nodes on a LAN network, but the response is only one that comes from only one station. The station that IP address matches the IP address being looked for through the broadcast message responds.

23.5 How many octets does an ARP message occupy when used with IP and Ethernet addresses?

According to Fig 23.3 an ARP message has 7-lines of each being 32-bit (4 bytes or octets), therefore, number of octets in an ARP can be determined as 7x4 = 28 octets

23.6 How does a computer know whether an arriving frame contains an IP datagram or an ARP message?

The type field in the frame header specifies that the frame contains an ARP message. A sender must assign the appropriate value to the type field before transmitting the frame, and a receiver must examine the type field in each incoming frame. Ethernet uses type field 0x806 to denote an ARP message.

23.7 Suppose a computer receives two ARP replies for a single request. The first reply claims that the MAC address is M1, and the second reply claims that the MAC address is M2. How does ARP handle the replies?

23.8 ARP only permits address resolution to occur on a single network. Does it make sense to send an ARP request to a remote server in an IP datagram? Why or why not?

23.9 When does Algorithm 23.1 create a new entry in an ARP cache?

In ARP, the receiver extracts the sender’s address binding when it receives a message and updates the cache if the cache already contains an entry for the sender. If the message was a request and target is the station/node in question, then a new entry will be added to the ARP cache.

23.10 What types of addresses are used in layers below ARP?

ARP forms a conceptual boundary in the protocol stack;  layers above ARP use IP addresses, and layers below ARP use MAC addresses.



23.11 If a datagram has an incorrect value in one of the header fields, which ICMP error message will be received?

ICMP will issue “Parameter Problem” (# 12) error message

23.12 If a routing loop exists, which ICMP error message will be sent? Explain the process.

The Time Exceeded or Destination Unreachable messages may be issued to report an error when a datagram cannot be delivered successfully. A destination address is unreachable if no route exists to the address; a datagram times out if either the TTL count in the header expires or fragments of the datagram do not arrive before the reassembly timer expires.

23.13 Suppose a user specified a directed broadcast address as a destination for ping. What results are possible? Explain.

23.14 Some versions of the traceroute program send ICMP messages and others send UDP messages. Experiment with the version on your computer to determine which it sends.

23.15 Given an Ethernet frame, what fields does a host need to examine to determine whether the frame contains an ICMP message?

ICMP uses IP to transport each error message: when a router has an ICMP message to send, it creates an IP datagram and encapsulates the ICMP message in the datagram. The ICMP message is placed in the payload area of the IP datagram, and then datagram is encapsulated in a frame. So an Ethernet frame should be checked for IP and then within IP we should check the field type to determine if it contains an ICMP message.

23.16 Make a list of the key network information that can be configured when a computer boots.

23.17 What is the chief difference between BOOTP and DHCP?

The main difference is that the BOOTP protocol required manual administration. So before a computer could use BOOTP to obtain an address, a network administrator had to configure a BOOTP server to know the computer’s IP address.

23.18 Some network applications defer configuration until a service is needed. For example, a computer can wait until a user attempts to print a document before the software searches for available printers. What is the chief advantage of deferred configuration? The chief disadvantage?

23.19 DHCP permits a server to be located on a remote network. How can the computer send DHCP messages to a server on another network?

DHCP does not require each individual network to have a server. Instead, a DHCP relay agent forwards requests and responses between a client and the server. At least one relay agent must be present on each network, and the relay agent must be configured with the address of the appropriate DHCP server. When the server responds, the relay agent forwards the response to the client

23.20 As an alternative to DHCP, devise a distributed algorithm that implements a bidding scheme. Assume that one copy of the algorithm will run on each computer, and have the algorithm assign each computer a unique host address.

23.21 What is the chief purpose of NAT?

Network Address Translation (NAT) technology provides transparent communication in the sense that a host at the site appears to have a normal Internet connection, and a host in the Internet always appears to receive communication from a single computer rather than from one of many computers that may exist at the site.


23.22 Many NAT devices choose the 10.0.0.0 /8 address block from Figure 23.10 because it provides the most generality. Explain why.

Because 10.0.0.0 /8 address block is a Class A block which has the largest number set of IP addresses

23.23 In Figure 23.11, the ISP has assigned one IP address to the site. Which is the assigned address?

The IP address of the site is connected through the NAT is 128.210.24.6

23.24 Expand Figure 23.13 to show the mappings that will be used if a third application also attempts to reach the same web server.

23.25 Create a NAPT translation table for a case where three computers at a site have TCP connections to three separate web servers in the Internet.

23.26 What crucial information used by NAPT is not available in most IP fragments?

In addition to keeping a table of source and destination addresses, NAPT uses port numbers to associate each
datagram with a TCP or UDP flow. That is, instead of stopping at the IP-layer, NAPT operates on transport-layer headers. Entries in the translation table used by NAPT contain a 4-tuple of source and destination IP addresses and protocol port numbers.

23.27 To optimize reassembly, some versions of the Linux operating system send the last fragment of an IP datagram first, and then send the remaining fragments in order. Explain why sending the last fragment first does not work well with NAPT.

23.28 When using a wireless router, what are the possible IP addresses that can be assigned to hosts?


Chapter 24 - The Future IP (IPv6)

24.1 What is the primary motivation for a change from IPv4 to IPv6?

The primary motivation for defining a new version of IP arose from the address space limitation. Since larger addresses are necessary to accommodate continued growth of the Internet.

24.2 What is the hourglass model of Internet communication?

Networking professionals say that Internet communication follows an hourglass model, and that IP lies at the position where the hourglass is thin. It means IP lies at the center of Internet communication, all applications use IP, and IP runs over all underlying network technologies.

24.3 List the major features of IPv6, and give a short description of each.

The major features in IPv6 can be grouped into five broad categories:
  • Address Size: Each IPv6 address contains 128 bits.
  • Header Format: The IPv6 datagram header is completely different than the IPv4 header. Almost every field in the header has been changed; some have been replaced.
  • Extension Headers: IPv6 encodes information into separate headers. A datagram consists of the base IPv6 header followed by zero or more extension headers, followed by data.
  • Support For Real-Time Traffic: IPv6 includes a mechanism that allows a sender and receiver to establish a high-quality path through the underlying network and to associate datagrams with that path.
  • Extensible Protocol: IPv6 does not specify all possible protocol features. IPv6 provides a scheme that allows a sender to add additional information to a datagram.

24.4 How large is the smallest IPv6 datagram header?

IPv6 datagram header consists of a base header + zero or more extension header. Since, smallest header is being asked, we assume zero extension header and consider IPv6 will have only base header.  If we look at IPv6 header format in Fig. 24.3, it shows that 10x4 bytes = 40 bytes.

24.5 What does the NEXT HEADER field specify in an IPv6 datagram header?

The NEXT HEADER field is used to specify the type of information that follows the current header. For example, if the datagram includes an extension header, the NEXT HEADER field specifies the type of the extension header. If no extension header exists, the NEXT HEADER field specifies the type of data being carried in the payload.

24.6 What is the fragmentable part of an IPv6 datagram?

Fragmentable part of an IPv6 datagram can include data as well as headers.

24.7 Why does IPv6 use separate extension headers instead of fields in a single, fixed header?

The extension scheme makes IPv6 more flexible than IPv4, and means that new features can be added to the design as needed. This allows a sender to add additional information to a datagram.







24.8 List the three IPv6 address types, and give a brief explanation of each.

The IPv6 address has thefollowing types:
  • Unicast: The address corresponds to a single computer. A datagram sent to the address is routed along a shortest path to the computer.
  • Multicast: The address corresponds to a set of computers, and membership in the set can change at any time. IPv6 delivers one copy of the datagram to each member of the set.
  • Anycast: The address corresponds to a set of computers that share a common prefix. A datagram sent to the address is delivered to exactly one of the computers 

24.9 Write a computer program that reads a 128-bit binary number and prints the number in colon hex notation.

24.10 Extend the program in the previous exercise to implement zero compression.


Chapter 25 - UDP: Datagram Transport Service

25.1 What is the conceptual difference between IP and end-to-end protocols?

IP is incapable of supporting multiple applications because fields in the datagram header only identify computers. That is, from IP’s point of view, the source and destination fields in a datagram identify a host computer; an IP address does not contain additional bits to identify an application program on the host. We say that IP treats a computer as an endpoint of communication. In contrast, transport-layer protocols are known as end-to-end protocols because a transport protocol allows an individual application program to be an endpoint of communication.

25.2 List the features of UDP.

UDP has the following features:
  • End-to-end. UDP is a transport protocol that can distinguish among multiple application programs running on a given computer.
  • Connectionless. The interface that UDP supplies to applications follows a connectionless paradigm.
  • Message-oriented. An application that uses UDP sends and receives individual messages.
  • Best-effort. UDP offers applications the same best-effort delivery semantics as IP.
  • Arbitrary Interaction. UDP allows an application to send to many other applications, receive from many other applications, or communicate with exactly one other application.
  • Operating System Independent. UDP provides a means of identifying application programs that does not depend on identifiers used by the local operating system.

25.3 Do applications need to exchange UDP control messages before exchanging data? Explain.

UDP uses a connectionless communication paradigm, which means that an application using UDP does not need to preestablish communication before sending data, nor does the application need to inform the network when finished. Instead, an application can generate and send data at any time.

25.4 Calculate the size of the largest possible UDP message. (Hint: the entire UDP message must fit in an IP datagram.)

Theoretically, the maximum allowable IP packet size (including header) is 65535 bytes. The normal (without options) IP header is 5x4 bytes. The UDH header is 2x4 = 8 bytes. The total number of bytes used for header will be IP header + UDP header = 20+8 = 28 bytes. So the maximum UDP payload will be 65535 - 28= 65507 bytes.

25.5What happens if a UDP message containing a payload of 1500 data bytes is sent across an Ethernet?

Recall from chapter 15 that, the Ethernet payload is in the range of 46-1500 bytes (there is a minimum frame size because of collision detection). If a UDP message containing 1500 bytes to be sent across an Ethernet, then it will be divided into two frames. The reader is encouraged to work out the size of each frame. Please note the minimum size of an Ethernet frame.

25.6 If an application uses UDP to send an 8K byte message across an Ethernet, how many frames will traverse the network?








25.7 What are the semantics of UDP?

UDP provides applications with exactly the same best-effort delivery semantics as IP, which means messages can be:
  • Lost
  • Duplicated
  • Delayed
  • Delivered out-of-order
  • Corrupted

25.8 What endpoint values must be specified by an application that engages in 1-to-1 communication? In 1-to-many? In many-to-1?

Endpoint values that must be specified by an application are given as follows for different cases:
  • In 1-to-1 communication,  an application specifies the local port number, remote IP address, and remote protocol port number; UDP only passes the application messages that arrive from the specified sender.
  • In 1-to-many communication,  an application specifies the local port number, and remote protocol port number; UDP passes the application all messages that arrive from the specified sender.
  • In many-to-1 communication, the application specifies the local port number, but informs UDP that the remote endpoint can be any system. UDP then passes the application all messages that arrive for the specified port.


25.9 What is a pseudo header, and when is one used?

To allow UDP to verify that messages reach the correct destination without incurring the overhead of additional header fields, UDP extends the checksum. When computing the checksum, UDP software includes a pseudo header that contains the source, destination, and type (i.e. PROTO) fields from the IP datagram and a UDP datagram length. So, the sender computes a checksum as if the UDP header contained extra fields.

25.10 Given an Ethernet frame, what fields must be examined to determine whether the frame carries a UDP message?

Type field of an Ethernet frame should be examined to determine whether the frame carries an IP, and then look at protocol field of the IP datagram. Sequential examination of fields is needed.


Chapter 26 - TCP: Reliable Transport Service

26.1 Assume that messages sent between two programs can be lost, duplicated, delayed, or delivered out of order. Design a protocol that reliably allows the two programs to agree to communicate. Give your design to someone, and see if they can find a sequence of loss, duplication, and delay that makes the protocol fail.

26.2 List the features of TCP.

Features of TCP can be listed as follows:
  • Connection Orientation. TCP provides connection-oriented service in which an application must first request a connection to a destination, and then use the connection to transfer data.
  • Point-To-Point Communication. Each TCP connection has exactly two endpoints.
  • Complete Reliability. TCP guarantees that the data sent across a connection will be delivered exactly as sent, complete and in order.
  • Full Duplex Communication. A TCP connection allows data to flow in either direction, and allows either application program to send data at any time.
  • Stream Interface. TCP provides a stream interface in which an application sends a continuous sequence of octets across a connection.
  • Reliable Connection Startup. TCP allows two applications to reliably start communication.
  • Graceful Connection Shutdown. Before closing a connection, TCP insures that all data has been delivered and that both sides have agreed to shut down the connection.

26.3 What layers of a protocol stack are used on a router? A host?

In order to perform required function, a router make use of layer 1 (physical), layer (data link or interface) 2 and layer 3 (network layer) of a protocol stack. A host make use of all layers of a protocol stack, including application layer.

26.4 What are the main problems a transport protocol must solve to achieve reliable transfer?

An end-to-end transport protocol must be carefully designed to achieve efficient, reliable transfer. The major problems are:
  • Unreliable Communication. Messages sent across the Internet can be lost, duplicated, corrupted, delayed, or delivered out of order.
  • End System Reboot. At any time during communication, either of the two end systems might crash and reboot.
  • Heterogeneous End Systems. A powerful sender can generate data so fast that it overruns a slow receiver.
  • Congestion In The Internet. If senders aggressively transmit data, intermediate switches and routers can become overrun with packets, analogous to a congested highway.

26.5 What are the techniques a transport protocol uses?

A transport protocol uses various techniques, such as:
  • Uses parity bits, a checksum, or a cyclic redundancy check (CRC) for tackling transmission errors
  • Uses sequencing to handle duplicates and out-of-order delivery
  • Uses retransmission to handle lost packets
  • Uses some techniques to avoid replay
  • Uses flow control to prevent data overrun
  • Uses techniques to avoid congestion

26.6 When using a sliding window of size N, how many packets can be sent without requiring a single ACK to be received?
If the size of the window is N, then it means a sender can transmit up to N packets without waiting for an ACK, as long as other controls are in place.

26.7 Why does a stop-and-go protocol have especially low throughput over a GEO satellite channel that operates at two megabits per second?

In case of using a satellite channel, there is a long delay for round-trip. So a sender needs to wait long time to get a confirmation (ACK) for a transmitted packet.

26.8 Extend the diagrams in Figure 26.3 to show the transmission of sixteen successive packets.

26.9 What is the chief cause of packet delay and loss in the Internet?

The main cause of packet delay and loss in the Internet is congestion.

26.10 How does TCP handle packet loss?

To handle packet loss, transport protocols use positive acknowledgement with retransmission. Whenever a frame arrives intact, the receiving protocol software sends a small acknowledgement (ACK) message that reports successful reception. The sender takes responsibility for ensuring that each packet is transferred successfully. Whenever it sends a packet, the sending-side protocol software starts a timer. If an ACK arrives before the timer expires, the software cancels the timer; if the timer expires before an ACK arrives, the software sends another copy of the packet and starts the timer again. The action of sending a second copy is known as retransmitting, and the copy is commonly called a retransmission.


Chapter 27 - Internet Routing And Routing Protocols

27.1 List the two broad categories of Internet routing, and explain each.

IP routing can be partitioned into two broad categories:
  • Static routing: The term static routing characterizes an approach that creates a forwarding table when the system starts and does not change entries unless an administrator manually alters them.
  • Dynamic routing: The term dynamic routing characterizes an approach in which route propagation software runs on the system and continuously updates the forwarding table to insure that each datagram follows an optimum route. The software communicates with other systems to learn optimum routes to each destination, and continually checks for network failures that cause routes to change.

27.2 What two entries are needed in the forwarding table of a typical host?

A typical host forwarding table has the entries for the network(s) that can be reached and the mask being used.

27.3 Suppose that all routers in the Internet contain a default route; show that a routing loop must exist.

27.4 What is an autonomous system?

We use the term Autonomous System (AS) to capture the concept of groups of routers. An AS is a contiguous set of networks and routers all under control of one administrative authority. There is no exact meaning for administrative authority (the term is sufficiently flexible to accommodate many possibilities, but normally it means an organization, company or an ISP).

27.5 List and explain the two types of Internet routing protocols.

All Internet routing protocols fall into one of two categories:
  • Interior Gateway Protocols (IGPs): The routers within an AS use an Interior Gateway Protocol (IGP) to exchange routing information. Several IGPs are available; each AS is free to choose its own IGP. An IGP is easy to install and operate, but an IGP may limit the size or routing complexity of an AS.
  • Exterior Gateway Protocols (EGPs): A router in one AS uses an Exterior Gateway Protocol (EGP) to exchange routing information with a router in another AS. EGPs are usually more complex to install and operate than IGPs, but EGPs offer more flexibility and lower overhead (i.e., less traffic). An EGP can implement policy constraints that allow a system manager to determine exactly what information is released outside the organization.

27.6 Suppose a router in an organization uses a routing protocol to declare that a given destination is ten hops away when the destination is only three hops away. Is the declaration necessarily an error? Explain.

No, it’s not necessarily an error. It’s usually used for reliability. In case the shortest path to destination is not available, then an alternative longer route may be used.

27.7 What is the expected consequence when a router advertises routes to a given destination?

27.8 List and explain the characteristics of BGP.

The BGP has the following characteristics:
  • Routing Among AS. Because it is intended for use as an Exterior Gateway Protocol, BGP provides routing information at the AS level. That is, all routes are given as a path of AS.
  • Provision For Policies. BGP allows the sender and receiver to enforce policies. In particular, a manager can configure BGP to restrict which routes BGP advertises to outsiders.
  • Facilities For Transit Routing. BGP classifies each AS transit system if it agrees to pass traffic through to another AS, or as a stub system if it does not. The classification allows BGP to distinguish between ISPs and other AS. BGP allows a corporation to classify itself as a stub even if it is multi-homed
  • Reliable Transport. BGP uses TCP for all communication. That is, a BGP program on a router in one AS forms a TCP connection to a BGP program on a router in another  AS, and then sends data across the connection. TCP ensures that the data arrives in the correct order and that no data is missing.

27.9 Where is BGP used?

The Border Gateway Protocol (BGP) is used as Exterior Gateway Protocol in the Internet, the protocol has survived three major revisions. Version 4 is the current standard, and is officially abbreviated BGP-4.

27.10 What type of routing algorithm does RIP employ, and where is RIP used?

RIP is an Interior Gateway Protocol that uses a distance vector algorithm to propagate routing information.

27.11 List the characteristics of RIP.

RIP has the following characteristics:
  • Routing Within An Autonomous System. RIP is designed as an IGP used to pass information among routers within an AS
  • Hop Count Metric. RIP measures distance in network hops, where each network between the source and destination counts as a single hop; RIP counts a directly connected network as one hop away.
  • Unreliable Transport. RIP uses UDP to transfer messages among routers.
  • Broadcast Or Multicast Delivery. RIP is intended for use over LAN technologies that support broadcast or multicast (e.g., Ethernet).
  • Support For CIDR And Subnetting. RIP version 2 includes an address mask with each destination address.
  • Support For Default Route Propagation. In addition to specifying explicit destinations, RIP allows a router to advertise a default route.
  • Distance Vector Algorithm. RIP uses the distance-vector approach
  • Passive Version For Hosts. RIP allows a host to listen passively and update its forwarding table. Passive RIP is useful on networks where a host selects among multiple routers.

27.12 When a router receives a RIP message, how does the router divide each IP address into a prefix and suffix?


PART V
Other Aspects of Computer Networking

Chapter 28 - Network Performance (QoS and DiffServ)

28.1 List and describe the three primary measures of network performance.

Primary measures of network performance are the following:
  • Latency (delay): The time required to transfer data across a network
  • Throughput (capacity): The amount of data that can be transferred per unit time
  • Jitter (variability): The changes in delay that occur and the duration of the changes

28.2 Give five types of delay along with an explanation of each.

The following can be given as types of delay:
  • Propagation Delay: The time required for a signal to travel across a transmission medium
  • Access Delay: The time needed to obtain access to a transmission medium (e.g., a cable)
  • Switching Delay: The time required to forward a packet
  • Queuing Delay: The time a packet spends in the memory of a switch or router waiting to be selected for transmission
  • Server Delay: The time required for a server to respond to a request and send a response

28.3 Would you expect access delays to be longer on a LAN or on a WAN? Queuing delays? Why?

28.4 How can throughput be measured?

Throughput is a measure of the rate at which data can be sent through the network, specified in bits per second (bps).  Throughput can be measured several ways, one must be careful to specify
exactly what has been measured. There are several possibilities:
  • Capacity of a single channel
  • Aggregate capacity of all channels
  • Theoretical capacity of the underlying hardware
  • Effective data rate achieved by an application (goodput)

28.5 What name is used for the form of throughput that is the most meaningful to a user?

Users typically assess the effective data rate that an application achieves by measuring the amount of data transferred per unit time; the term goodput is sometimes used to describe the measure.

28.6 Give examples of processing that make goodput less than the channel capacity.

The goodput rate is less than the capacity of the hardware because protocols impose overhead. Some network capacity is not available to user data because protocols:
  • Send packet headers, trailers, and control information
  • Impose a limit on the window size (receive buffer)
  • Use protocols to resolve names and addresses
  • Use a handshake to initiate and terminate communication
  • Reduce the transmission rate when congestion is detected
  • Retransmit lost packets


28.7 Provide an explanation of delay and throughput in terms of bits being transmitted.

Throughput is a measure of capacity, not speed. Throughput specifies how many bits can enter the network per unit time, measures network capacity. Propagation delay specifies the time a single bit remains in transit in a network.

28.8 Which of delay or throughput provides the most fundamental limit on performance? Why?

28.9 Use ping to measure network latency to local and distant sites. What is the minimum and maximum Internet delay you can find?

28.10 If one pings IP address 127.0.0.1, the latency is extremely low. Explain.

Because it a local host address. So all delay types (if any) involved are minimal

28.11 Download a copy of the program ttcp and use it to measure throughput on a local Ethernet. What is the goodput? Estimate the link utilization achieved.

28.12 Compare the throughput of a 100 Mbps network and a 1 Gbps network.

In terms of speed or capacity obviously, a 1 Gbps will be faster than a 100 Mbps. However, we should look at the number of users on each network in order to make a meaningful comparison

28.13 What is jitter, and what are the two approaches used to overcome jitter?

Variance in delay is known as a network’s jitter and it is an important measure in real-time voice and video. 

28.14 Professionals sometimes refer to a “knee” in the delay curve. To understand what they mean, plot the effective delay for values of utilization between 0 and 0.95. Can you find a value of utilization for which the curve appears to increase sharply?

28.15 How much data can be “in flight” between a sending ground station, a satellite, and a receiving station? To find out, compute the delay-throughput product for a GEO satellite network that operates at 3 Mbps. Assume that the satellite orbits at 20,000 miles above the earth, and that radio transmissions propagate at the speed of light.

Bits present in a network = D x T, where D is delay and T is throughput measured in bits per second
The delay in GEO satellite network is the time traveled from a source (transmitter) to a destination (receiver).  The distance traveled by signal is 2 times distance of a GEO from the earth, which is 2x20,000 = 40,000 miles. The time taken to travel this distance, t = distance/speed.  We can assume throughput T as 3 Mbps, assuming the bandwidth is fully utilized without any congestion or packet-drops. Reader is encouraged to utilize these facts/numbers and calculate the number of bits present in the network

28.16 Why is measurement of network performance difficult?

Measuring network performance can be difficult for four reasons:
  • Routes can be asymmetric
  • Conditions change rapidly
  • Measurement can affect performance
  • Traffic is bursty

28.17 How does data traffic differ from voice traffic?

Data traffic is bursty, while voice traffic is normally in a smooth aggregate form


28.18 Explain why ISPs count the number of packets received per unit time instead of merely the number of bytes received per unit time.

The capacity of switches and routers is measured in packets per second. A router or switch performs next-hop forwarding once per packet, the computational effort expended is proportional to the number of packets processed rather than the number of bits in a packet.

28.19 What are the two types of QoS?

The two types of Quality of Service (QoS) and their short explanation are as follows:
  • Fine-Grain: A provider allows a customer to state specific QoS requirements for a given instance of communication; a customer makes a request each time a flow is created
  • Coarse-Grain: A provider specifies a few broad classes of service that are each suitable for one type of traffic; a customer must fit all traffic into the classes

28.20 Estimate the computational power needed to implement fine-grain QoS in the core of the Internet: assume a 10 Gbps link delivering 1000 byte packets and N arithmetic operations per packet, and calculate the number of operations a processor needs to perform per second.

28.21 List the four main categories of QoS that were derived from ATM, and give the meaning of each.

ATM specifies the following four types of QoS categories:
  • CBR (Constant Bit Rate): Data enters the flow at a fixed rate, such as data from a digitized voice call entering at exactly 64 Kbps
  • VBR (Variable Bit Rate):  Data enters the flow at a variable rate within specified statistical bounds
  • ABR (Available Bit Rate): The flow agrees to use whatever data rate is available at a given time
  • UBR (Unspecified Bit Rate): No bit rate is specified for the flow

28.22 Consider a web browser. What type of QoS would be appropriate for a typical flow where the browser downloads a web page? Why?

28.23 If two users create a chat session over the Internet, what category of QoS will they be using?

28.24 What four parameters are used to characterize a VBR flow?

VBR asks users to specify the following:
  • Sustained Bit Rate (SBR)
  • Peak Bit Rate (PBR)
  • Sustained Burst Size (SBS)
  • Peak Burst Size (PBS)

28.25Explain the four steps used to implement QoS.

  • Classification And Policing: When a packet arrives, a router classifies the packet by assigning the packet a flow identifier. Once an identifier has been assigned, the router performs policing, which means that the router verifies that the packet does not violate parameters for the flow.
  • Forwarding Computation: When computing a next-hop, a router or switch can use the flow identifier.
  • Output Queuing: Most implementations of QoS create a set of queues for each output port.
  • Traffic Scheduling: A traffic scheduler implements the QoS policies by selecting a packet to send whenever a port is idle.

28.26 If your ISP uses leaky bucket to schedule packet transmission, will your throughput be higher with large packets or small packets? Explain.

28.26 What is DiffServ?

The IETF created Differentiated Services (DiffServ) to define a coarse-grain QoS mechanism. The DiffServ
effort produced a definition of how classes can be specified and how the TYPE OF SERVICE field in an IPv4 or IPv6 header can be used to specify the class of a datagram.  

28.28 How does MPLS forwarding differ from conventional IP forwarding?

MultiProtocol Label Switching (MPLS) is a connection-oriented communication mechanism built on top of IP. At one end of a path, each datagram is encapsulated in an MPLS header and injected into the MPLS path; at the other end, each datagram is extracted, the MPLS header is removed, and the datagram is forwarded to its destination.  The IP forwarding is connectionless, each packet is forwarded individually.


Chapter 29 - Multimedia And IP Telephony (VoIP)

29.1 Define multimedia data. What are the two techniques used to overcome jitter?

We use the term multimedia to refer to data that contains audio or video, and may include text. The phrase real-time multimedia refers to multimedia data that must be reproduced at exactly the same rate that it was captured. To overcome jitter and achieve smooth playback of real-time data, two chief techniques are employed:
  • Timestamps. A sender provides a timestamp for each piece of data. A receiver uses the timestamps to handle out-of order packets and to display the data in the correct time sequence.
  • Jitter Buffer. To accommodate jitter (i.e., small variances in delay), a receiver buffers data and delays playback.

29.2 Explain how a jitter buffer permits the playback of an audio stream even if the Internet introduces jitter.

The implementation of a jitter buffer is straightforward. A receiver maintains a list of data items, and uses timestamps to order the list. Before it begins playback, a receiver delays for d time units, which means the data being played is d time units behind the data that is arriving. Thus, if a given packet is delayed less than d, the contents of the packet will be placed in the buffer before it is needed for playback. In other words, items are inserted into a jitter buffer with some variation in rate, but the playback process extracts data from a jitter buffer at a fixed rate.

29.3 If an RTP message is intercepted as it travels across the Internet, can the timestamp field be interpreted? If so, how? If not, why not?

29.4 Because it travels in UDP, an RTP message can be duplicated. Does a receiver need to keep a copy of all previously received messages to determine whether an incoming message is a duplicate? Why or why not?

A receiver does not need to keep a copy of all previously received messages to determine if an incoming message is a duplicate. Since, each packet includes a SEQUENCE NUMBER; the sequence is incremented by one for each packet. As with TCP, a sender chooses a random starting sequence to help avoid replay problems.

29.5 RTP contains a companion protocol known as the Real-Time Control Protocol (RTCP) that allows a receiver to report the quality of messages received to a sender. How can adaptive video encoding use the status of received messages?

29.6 If voice is converted to digital form using PCM, how many bits of data will be produced in one-half second?

The commercial PCM used in digital telephony uses 64000 bps. So reader is encouraged to calculate data produced in one-half second.

29.7 Extend the previous exercise. Estimate the size (in octets) of an IP datagram that carries one-quarter of a second of audio encoded in PCM, placed in an RTP packet, and encapsulated in UDP. Hint: RFC 1889 defines the size of an RTP header.

The commercial PCM produces 64,000/4  bps = 16,000 bps. We assume all these information bits are sent as a single packet/datagram. RTP protocol adds 4x32 = 128 bits. The UDP adds 2x32 = 64 bits. And the IP adds 5x32 = 160 bits. So, the resulting IP datagram size will be 16,000 + 128 + 64 + 160 bps.





29.8 Which aspects of IP telephony does H.323 handle?

The H.323 standard consists of a set of protocols that work together to handle all aspects of telephone communication, such as:
  • Handles all aspects of a digital telephone call
  • Includes signaling to set up and manage the call
  • Allows the transmission of video and data while a call is in progress
  • Sends binary messages that are defined by ASN.1 and encoded using Basic Encoding Rules (BER)
  • Incorporates protocols for security
  • Uses a special hardware unit known as a Multipoint Control Unit to support conference calls
  • Defines servers to handle tasks such as address resolution , authentication, authorization, accounting, and features, such as call forwarding

29.9 When H.323 is used to send data along with audio or video, which transport protocol is used?

For the data TCP transport protocol is used, however, for real-time traffic (audio/video) UDP is used.

29.10 What are the six basic methods used with SIP?

The SIP protocol makes use of the following method:
  • INVITE (Session creation): an endpoint is invited to participate in the session
  • ACK (Acknowledgment): response to INVITE
  • BYE (Session termination): call is ended
  • CANCEL: Pending request cancellation (no effect if request has been completed)
  • REGISTER: Registration of user’s location
  • OPTIONS: Query to determine capabilities of called party

29.11 Read the RFC about SIP, and modify Figure 29.9 to show the messages exchanged when call forwarding occurs. Hint: look at SIP redirection messages.

29.12 What are the purposes of the ENUM and TRIP protocols?

The IETF has proposed two protocols that correspond to the mappings needed for the two subproblems:
  • ENUM (short for E.164 NUMbers) solves the problem of converting an E.164 telephone number into a Uniform Resource Identifier (URI).
  • TRIP (Telephone Routing over IP) solves the problem of finding a user in an integrated network. A location server or other network element can use TRIP to advertise routes.

29.13 Consider the operation of an IP telephone and an analog telephone. Which would be better during time of war? Why?

29.14 Look up the e164.arpa domain. Which organization is responsible for the domain?



Chapter 30 - Network Security

30.1 List the major security problems on the Internet, and give a short description of each.

There are numerous problems exist and experts use different terminology to describe them. According to textbook we can list the following problems:
  • Phishing: Masquerading as a well-known site such as a bank to obtain a user’s personal information, typically an account number and access code
  • Misrepresentation: Making false or exaggerated claims about goods or services, or delivering fake or inferior products
  • Scams: Various forms of trickery intended to deceive naive users into investing money or abetting a crime
  • Denial of Service: Intentionally blocking a particular Internet site to prevent or hinder business activities and commerce
  • Loss of Control: An intruder gains control of a computer system and uses the system to perpetrate a crime
  • Loss of Data: Loss of intellectual property or other valuable proprietary business information

30.2 Name the technique used in security attacks.

There are numerous techniques used in security attacks and experts use different terminology to describe them. According to textbook we can list the following problems:
  • Wiretapping: Making a copy of packets as they traverse a network to obtain information
  • Replay: Sending packets captured from a previous session
  • Buffer overflow: Sending more data than a receiver expects in order to store values in variables beyond the buffer
  • Address Spoofing: Faking the IP source address in a packet to trick a receiver into processing the packet
  • Name Spoofing: Using a misspelling of a well-known name or poisoning a name server with an incorrect binding
  • DoS and DDoS: Flooding a site with packets to prevent the site from successfully conducting normal business
  • SYN flood: Sending a stream of random TCP SYN segments to exhaust a receiver’s set of TCP connections. This can be considered a sub-category of DoS and DDoS attacks
  • Key Breaking: Automatically guessing a decryption key or a password to gain unauthorized access to data
  • Port Scanning: Attempting to connect to each possible protocol port on a host to find a vulnerability
  • Packet interception: Removing a packet from the Internet which allows substitution and man-in-the middle attacks

30.3 Suppose an attacker finds a way to store an arbitrary binding in your local DNS server. How can the attacker use such a weakness to obtain your bank account information?

In doing so an attacker can direct a user from a legitimate address (correct bank address) to an incorrect/fake address and when the user enters personal/account information, they can be captured/stored and later be used to access user’s actual bank account to make transaction.

30.4 DoS attacks often send TCP SYN segments. Can an attacker also create a DoS attack by sending TCP data segments? Explain.




30.5 If a password contains eight upper and lower-case letters and digits, how many possible passwords might an attacker need to try to gain access?

The issue here is total number of characters in the set and the number of characters being used. Since the password being mentioned consists of uppercase (26 possibilities), lowercase (26 possibilities and digits (10 possibilities), the reader is encouraged to calculate the possibility of matching 8 characters out of 62 (26+26+10).

30.6 Why is deriving a security policy difficult?

Security policies are complex because they involve human behavior as well as computer and network facilities. Assessing the costs and benefits of various security policies also adds complexity. In particular, a security policy cannot be defined unless an organization understands the value of its information.

30.7 Suppose a company devises a security policy which specifies that only HR personnel are authorized to see payroll files. What type of mechanism is needed to implement the policy? Explain.

30.8 List and describe the eight basic security techniques.

There are various security techniques/technologies being used, such as:
  • Hashing à Data integrity
  • Encryption à Privacy
  • Digital Signatures à Message authentication
  • Digital Certificates à Sender authentication
  • Firewalls à Site integrity
  • Intrusion Detection Systems à Site integrity
  • Deep Packet Inspection & Content Scanning à Site integrity
  • Virtual Private Networks (VPNs) à Data privacy as  well as site integrity


Chapter 31 - Network Management (SNMP)

31.1 Give an example of a protocol mechanism that hides an error.

For example, routing protocols bypass failures and intermittent packet loss can go unnoticed because TCP automatically retransmits.

31.2 If a user complains that they cannot access a given service, which aspects of FCAPS could the complaint potentially involve?

This is related to “Fault Detection and Correction”, but also it may involve directly or indirectly “Configuration and Operation” aspects of FCAPS.

31.3 If a firewall malfunctions, which aspect of FCAPS does the situation fall under? Why?

This is related to “Configuration and Operation” aspects of FCAPS. Because the configurations must be consistent across all devices and as new equipment and services are added or policies
change, a network manager must consider all configurations to insure the entire network
implements the changes correctly.

31.4 Find two examples of manageable elements other than those listed in Figure 31.2.

31.5 What is a protocol analyzer?

A packet analyzer, also called a protocol analyzer, captures and displays packets or statistics about packets

31.6 What does a flow analysis tool help a manager understand?

Flow analysis tools, such as a NetFlow analyzer, also help a manager spot trends. Instead of merely reporting on overall traffic, a flow analyzer can help a manager spot changes in specific types of traffic.

31.7 What terms does network management software use instead of client and server?

To avoid confusion between application programs that users invoke and applicationsthat are reserved for network managers, network management systems avoid the terms client and server. Instead, the client application that runs on the manager’s computer is called a manager, and a server that runs on a network device is called an agent

31.8 ASN.1 defines the exact format of an integer. Why doesn’t the ASN.1 standard merely state that each integer is a 32-bit value?

ASN.1 uses a combination of length and value for each object being transferred to accommodate large values without wasting space on every transfer,. To encode an integer, ASN.1 sends a pair of values: a length, L, followed by L octets that contain the integer. To permit encoding of arbitrarily large integers, ASN.1  also allows the length to occupy more than one octet; extended lengths normally are not needed for the integers used with SNMP.







31.9 It has been argued that one should not use a network to debug a problem in the network. Why does SNMP use the same network that it is debugging?

Using an application protocol for network management, such as SNMP,  works well for two reasons. First, in cases where a special hardware failure prevents communication, a manager can communicate with devices that remain functional, and use success or failure to help locate the problem. Second, using conventional transport protocols means a manager’s packets will be subject to the same conditions as normal traffic. Thus, if delays are high, a manager will find out immediately.

31.10 Write a program that reads an arbitrarily large integer in decimal, encodes the integer into the format illustrated in Figure 31.3, and prints the result.

31.11 What are the two basic operations that SNMP uses?

The SNMP protocol uses a fetch-store paradigm in which there are two basic operations: fetch, used to obtain a value from a device, and store, used to set a value in a device. Each object that can be fetched or stored is given a unique name; a command that specifies a fetch or store operation must specify the name of the object.

31.12 Download free SNMP manager software, and attempt to contact a device such as a printer.

31.13 Does SNMP define a name for each possible MIB variable? Explain.

Each object to which SNMP has access must be defined and given a unique name. Collectively, the set of all objects SNMP can access is known as a Management Information Base (MIB). The SNMP standard only specifies the message format and describes how messages are encoded. A separate standard specifies MIB variables along with the meaning of fetch and store operations on each variable. Separate standards documents specify MIB variables for each type of device.

31.14 What is the chief advantage of appending index information to a name instead of using a conventional array that is indexed by integers?

31.15 Read about how ASN.1 encodes names and values. Write a computer program to encode and decode ASN.1 names such as the name assigned to ipInReceives.



Chapter 32 - Trends In Networking Technologies And Uses

32.1 Explain how content caching permits the Internet to scale.

32.2 Where is a load balancer used?

A load balancer allows a site to have multiple computers each running an identical web server, and distributes incoming requests among the physical servers. So if a server has many users connected to it, in order to improve performance a load balancer can be used to distribute load over multiple servers.

32.3 A web site with N physical servers may not be able to process N times as many requests per second because shared resources can impose a bottleneck. Name two resources that are shared.

The load balancer which greets incoming requests is shared between all the backbone servers, also a database server may be shared between them.

32.4 In addition to permitting scaling, server virtualization may also allow a site to save energy during times when the load is low (e.g., on a weekend). Explain how.

Instead of separate physical computers to be used as standalone servers, server virtualization allows multiple services to be run on a single computer proving multiple services. So energy and other benefits such as management, licensing, and costs can be substantial.

32.5 With what general use is peer-to-peer computing often associated?

Some of the most widely-known p2p systems have been created to allow the sharing
of music files.

32.6 Does a distributed data center approach make sense for a business in which each web request requires access to a central database? Why or why not?

32.7 Name three examples of social network applications.

There are numerous social network examples, such as  Facebook, Myspace, and YouTube

32.8 How are the Internet and cellular telephone systems converging?

It is expected that cellular phones will soon be converted away from other protocols to IP. In particular, once cellular carriers begin to use WiMAX, the entire system will be IP, meaning that cellular service and the Internet have converged.

32.9 What does digital video offer users?

Using IP for video creates interesting opportunities, such as:
  • TV and the Internet converge, making it easy to watch television programs on a computer or use a digital television as a computer display. 
  • IP makes it easier to deploy ondemand video, in which a user can access content when desired, control playback with pause and rewind functions, and capture live content for later viewing.

32.10 When optical fiber is used to deliver data to a home or business, how much faster can data be sent than with DSL or a cable modem?

Reader is encouraged to search for the latest technology being used for optical fiber as well as DSL and/or cable modem for a meaningful comparison between them.

32.11 Give examples of new networking trends for business.

32.12 Where are sensor networks being used?

There a numerous applications for sensors. Sensors are being used to measure the environment (e.g., monitor air and water quality or gather weather information), track the movements of wild animals, help farmers monitor crops, monitor people in office buildings, and assess traffic on highways. Sensors can also be used in residential buildings. It is already possible to install sensors that measure temperature and humidity, or monitor a home for dangers such as smoke and carbon monoxide.

32.13 What technologies are being used to provide remote access to villages?

Ad hoc networking can be used  in rural areas and developing countries. In the US, farmers are using ad hoc technology to connect rural farms to the Internet. Each farmer sets up a wireless station (usually on a tall building, such as a silo), and the stations agree to forward packets, as needed. In developing countries, ad hoc networks are used as an inexpensive way to provide Internet access to an entire village.

32.14 Name two technologies used to increase the speed of routers and switches.

Chip vendors offer various solutions to increase the speed of router and switches, such as:
  • A solution is use of multi-core CPUs that each contain several processors. One approach distributes incoming packets among the N cores, which means that one core only handles 1/N of the packets.
  • Another option is use of network processors. We can think of a network processor as a fast CPU that includes multiple cores plus special instructions to handle common packet processing tasks at high speed.

32.15 Why are cellular telephone providers especially interested in IPv6?

Some cellular operators, especially in Asia, see IPv6 as a way to allow IP addressing on cell
phones, but operators also have the option of devising a layer 2 addressing scheme.



Friday, August 6, 2010
Chapter-8: Wireless Application Protocol (WAP)



January-2004 [18]

5.

a)            What Is the fundamental difference between WML and HTML? Why is this difference important with respect to hand held devices?                                                                               [10]

Differences Between HTML and WAP/WML
































WAP/WML

HTML

Markup language for wireless communication

Markup language for wired communication

Makes use of variables

Does not use variables

WML script stored in a separate file

Javascript is embeded in the same HTML file

Images stored as WBMP

Images are stored as GIF, JPEG or PNG

WBMP is a 2 bit image

Size of the images are much larger in HTML

Case sensitive

Not case sensitive

WML has fewer tags than HTML

HTML has more tags than WML

A set of 'WML Cards' make a 'DECK'

A set of 'HTML pages' make a 'SITE'



b)            What is the fundamental difference between WML and HTML?                                                        [4]

b)            Wireless Markup Language (WML) is optimized for limited capability devices and networks. Describe WML constrains, features and document model?                                 [6]

d)            Wireless markup language.                                                                                                                 [6]











The simplest way to think about a WAP gateway is that it is the system that WAP devices communicate  directly with, and any content delivered to WAP devices via IP networks (like the Internet) must travel through these gateways on their way to those little, tiny screens.

The WAP gateway performs a host of duties, which we'll cover here in detail, but the most important is the protocol translations that are necessary to connect the TCP/IP-based world of the wired Internet with the WAP-based world of wireless mobile devices. Without something to perform this essential task, WAP simply wouldn't work.

A WAP gateway is a piece of software that usually resides on a dedicated Unix-type of server. Often the box itself will also be referred to as the gateway, but for the purposes of this article we will only be considering the software functionality of WAP gateways. There are also WAP gateways that can run on Windows-based systems, as well as combination content-server/gateway products, but the norm is to have a stand-alone Unix server running the gateway software

What does a Gateway Do?

A WAP Gateway plays many roles in the scheme of turning the WAP model into working services. A list of just some of the functions of a WAP gateway include the following:


implementation of the WAP stack
converting protocols
converting markup languages
compiling WMLScript programs
encoding WML into a binary bitstream
providing access control
caching
domain name resolution services (DNS)
security features

Clearly, these gateways can pack a lot of punch. There is a wide range of products available, with differing feature sets and price ranges (from free to big bucks) so we'll deal with the most commonly implemented and important features here.

Providing the software to maintain the WAP stack layers is a critical function of any WAP gateway, though they will not all implement the same layers. Gateways that support connectionless services will not need to implement the WTP layer, just as products that don't support secure services won't need to include the WTLS layer. A gateway that will be used for secure, connection-oriented services will need to implement WSP, WTP, WTLS, and WDP.

Converting between WAP's WSP and the Internet's HTTP is another central function of any WAP gateway. One of the main differences between WSP and HTTP is that WSP's headers are encoded in binary form, or "tokenized." For example, the token "Accept" from the HTTP/1.1 header becomes "0x80". This is a way for WAP to save on bandwidth by transmitting the bare minimum bits possible to represent a specific group of characters.

Some gateways also offer HTML to WML conversion, though this feature rarely results in functional WAP services. It is generally agreed that mobile applications should serve WML directly from the origin server, and that the code needs to be designed and tested separately from HTML implementations.

Another important function of the WAP gateway is the compilation of WMLScript programs. WMLScript is the only scripting language that works with WAP devices, and although there are many similarities to Javascript, there are some key differences in how it is called and compiled. Where Javascript code is enclosed inside of HTML files and interpreted by the client browser, WMLScript code is put in a separate file, and compiled at the gateway, in the constant quest to reduce processing requirements at the device end. The compiled script is then sent to the device as a binary encoded stream, also reducing bandwidth.

Encoding the WML content is another mandatory function of a gateway, and again it is done to save on the precious bandwidth of the wireless networks. By converting the WML to a binary, tokenized format, the amount of data sent over the wireless network is greatly diminished. The gateway also checks the WML for errors as part of this process, which is rigorous as WML is derived from XML and has strict syntax requirements.

List of WAP Gateways

The following link(webpage) lists every country that Wapdrive has confirmed is supporting WAP on at least one cellular phone network. They have also listed the WAP gateway settings wherever possible.


Some WAP gateways are free to use, and some of the gateways require registration with the service provider.





WAP stands for Wireless Access Protocol, a general term used to describe the multi-layered protocol and related technologies that bring Internet content to mobile devices such as PDAs and cell phones.

Such devices are referred to as thin clients because they have one or more constraints in the form of display, input, memory, CPU, or other hardware or usability limitations. The platform constraints and the slower (and more expensive) bandwidth of cellular and related networks make standard Internet protocols difficult to utilize. Using the growing set of WAP tools and protocols, however, the mobile Internet is quite a capable tool.

In some cases, WML stands for Website META Language, a set of free Web-authoring tools for Unix. The acronym’s wider use, however, is to denote the phrase Wireless Markup Language, which is a special subset of XML (Extensible Markup Language), initially developed through the WAP (Wireless Applications Protocol) Forum begun by Ericsson, Motorola, Nokia, and Unwired Planet.

WML is designed with the constraints of small, narrowband devices (such as mobile phones and palm-sized computers) in mind. These constraints include small, often monochrome displays, limited user input facilities (small dial pads with few other keys and stylus input), narrowband network connections (often slower than standard dial-up access), and limited memory and computational resources.

WML includes four major functional areas. The first is text presentation and layout; WML includes text and image support, including a variety of formatting and layout commands. The second, the deck/card organizational metaphor, suggests that all information in WML is organized into a structure similar in nature to a collection of playing cards and decks that correspond somewhat to the page/site model found in HTML (Hypertext Markup Language) Web document structures. In this framework, cards signify one or more units of interaction, and each user action moves him one card deeper into the deck. Whereas a single HTML Web page may present a user with a variety of possible actions, each WML document (or card) contains just one function.

The third functional area, that of inter-card navigation and linking, includes support for explicitly managing the navigation between cards and decks. The fourth and final area is string parameterization and state management. Parameterization is a fancy programmer’s term having to do with passing information from one portion of a program to another through the use of arrayed data and preinitialized variables. State management pertains to the way in which a document reacts to a specific visitor on the basis of cookies (for example, think of the way an HTML Web page presents different information on a user based on cookie information that offers the details of his prior visits).

A major difference between HTML and WML is that the basic unit of navigation in HTML is a page, while that in WML is a card. A WML file can contain multiple cards and they form a deck. When a user goes to a WAP site, the mobile browser loads a WML file that contains a deck of cards from the server. Only one card will be shown on the screen of the wireless device each time. If the user goes to another card of the same deck, the mobile browser does not have to send any requests to the server since the file that contains the deck is already stored in the wireless device.



WML is designed in this way because wireless devices have a high latency for connecting to the server. Downloading a deck of cards at a time can lower the number of round trips to the server.



You can put links, text, images, input fields, option boxes and many other elements in a card.



WML Document Structure

Hello World WML Example

Let's take a look at our first WML example. It shows the structure of a typical WML document.

(helloWorldEg1.wml)








 

    Hello World

 



 

    Welcome to the world of WML





The result of the "Hello World" WML example in mobile phone emulators is shown below:



Wireless Access Protocol (WAP) is a result of continuous work to define an industry-wide standard for developing applications over wireless communication networks. The WAP Forum, originally founded by Ericsson, Motorola, Nokia, and Unwired PlanetWML, was formed to create global wireless protocol specification that works across differing wireless network technology types, for adoption by appropriate industry standards organization.

Wireless Markup Language (WML) is a markup language based on XML, and is used to specify content and user interface for narrow-band devices, including cellular phones and pagers. WML is designed with the constraints of small, narrow-band devices in mind. These constraints include:


Small display and limited user input facilities
Narrow band network connection
Limited memory and computational resources
The Wireless Markup Language is WAP’s analogy to HTML used on the WWW. WML is based on the Extensible Markup Language (XML). 
WML uses a deck/card metaphor to specify a service. A card is typically a unit of interaction with the user, that is, either presentation of information or request for information from the user. 
A collection of cards is called a deck, which usually constitutes a service. This approach ensures that a suitable amount of information is displayed to the user simultaneously since inter-page navigation can be avoided to the fullest possible extent.
   Key features of WML include:  
· Variables
· Text formatting features
· Support for images
· Support for soft-buttons
· Navigation control
· Control of browser history
· Support for event handling (for e.g. telephony services)
· Different types of user interactions, e.g. selection lists and input fields
WML can be binary encoded by the WAP Gateway/Proxy in order to save bandwidth in the wireless domain.
WMLScript
WMLScript is based on ECMAScript, the same scripting language that JavaScript is based on. It can be used for enhancing services written in WML in the way that it to some extent adds intelligence to the services, for example procedural logic, loops, conditional expressions, and computational functions.
WMLScript can be used for e.g. validation of user input. Since WML does not provide any mechanisms for achieving this, a round-trip to the server would be needed in order to determine if user input is valid or not if scripting was not available. Access to local functions in a wireless device is another area where WMLScript is used; for example access to telephony related functions. WMLScript does also support WMLScript Libraries. These libraries contain functions that extend the basic WMLScript functionality. This provides a means for future expansion of functions without having to change the core of WMLScript. Just as with WML, WMLScript can be binary encoded by the WAP Gateway/Proxy in order to minimise the amount of data sent over the air.



A Brief History of WAP

As previously stated, WAP refers to a wide range of technologies and protocols, all related to mobile Internet functionality. This functionality has roots dating back to the mid 1990s. At that time, several vendors were working on the mobile Internet problem as mobile device sales skyrocketed, and several competing technologies emerged:


Nokia's Narrow Band Sockets (NBS) and Tagged Text Markup Language (TTML)
Ericsson's Intelligent Terminal Transfer Protocol (ITTP)
Unwired Planet's Handheld Device Markup Language (HDML)

Each technology had its own purpose, but some overlapped with others in various areas. This diversity threatened to fragment the wireless industry along provider lines. In mid 1997, the WAP Forum was founded to aid in communication among the developers and to spur a common set of protocols and technologies. In the same year, the industry took another step forward with the formation of the Open Mobile Alliance (OMA), which combined several distinct development and standards bodies into one.

How Does WAP Work?

These articles will focus on the delivery of WML content to mobile devices over a cellular or related technology network. However, the delivery of many protocols and technologies takes the same route-namely, through a proxy server that bridges the gap between the wired Internet and the wireless service provider's network.

Figure 1.1 The WAP Gateway provides wireless networks with Internet access and optional content translation and filtering.

This proxy server manages the communication between the wireless client and the Internet server(s), acting as a gateway to the wired Internet. It caches content and in some cases even translates raw HTML into WAP-compatible protocols such as WML.

Many mobile devices have a built-in wireless browser. Although several different browsers are in use today among the various wireless providers, most browsers support WML, either natively or translated into HDML. A popular precursor to WML, the Handheld Device Markup Language (HDML), is still supported on several mobile platforms. However, due to the limitations of HDML (supporting only a handful of navigation tags and virtually no formatting tags), WML is becoming the most widely used mobile markup language. That said, if you plan to support a particular platform, it's best to test your code extensively on that particular device.

Note: When coding for the general public, be careful to stick to the standards and avoid using proprietary extensions to the various languages, no matter how tempting the feature set of the extensions. If you decide to provide the extensions to those who can use them, you should take the necessary server steps to identify the connecting browser and deliver code customized for that browser.

What Is WML?

WML (Wireless Markup Language) is the dominant language in use with wireless devices today. Essentially, WML is a subset of HTML, but has its roots in XML. Those developers with a solid base in XML should have a relatively easy time coding WML.

The current WML standard is 1.3, although many mobile devices in use today support only the WML 1.1 standard. Therefore it's prudent to stay away from 1.3-specific features, unless you know that your target market's devices are 1.3-ready.

There are several key differences between WML and standard HTML, including the following:


WML is highly structured and very particular about syntax. Several current HTML browsers allow for "messy" code such as missing tags and other formatting snafus. Such mistakes are not allowed in WML; the mobile browser will complain and generally won't display the page.
WML is case sensitive. The tags and are treated as different tags, although they accomplish the same purpose (bold text). Therefore, you must be careful to match the case of your opening tags with your closing tags (for example, This is bold will not work as expected).
Many tags have required attributes. Developers accustomed to HTML may be used to including only attributes they need-in some WML tags, you must include a few attributes, even if they are blank or default.
WML pages are structured in "decks" (see the next section), allowing for multiple pages to be defined in each WML file.

WML also has a client-side scripting language, WMLScript, to help automate particular tasks, validate input, and so on. WMLScript is a subset of JavaScript and will be covered in a later article

Understanding Decks

WML pages are structured within "decks," allowing several pages ("cards") to be defined in each WML file. This deck analogy allows multiple pages to be delivered to the mobile client at the same time, minimizing the loading time between related pages. However, the limited memory on most devices constrains the deck size, usually to less than 1024 bytes. Therefore, careful consideration and planning should go into any WAP application; don't start coding without investing time in planning.

Note: Remember your audience. Mobile users generally scroll through cards rapidly and will be reading on a display that's a mere handful of characters wide (usually less than 20 characters) and usually less than 10 lines high. Keep your content to a minimum, provide an intuitive navigation structure, and optimize your decks to maximize links within the deck and minimize links outside of the deck.

Visualizing a physical "deck of cards" structure can help in understanding the principles of WML. For example, suppose we have three simple cards (pages) as shown below:

Figure 1.2 - The physical card analogy to WML decks helps visualize how they work.

These cards together form a deck and are delivered to the mobile device in one file. Now suppose that each card links to the next (card one links to card two, which links to card three, and so on), and that each card also has a "back" link to take the user back to the previous card. As the user navigates the deck, the cards stack in memory as shown below:

Figure 1.3 - As the user follows the links through the deck, the cards stack up in memory.

A developer accustomed to HTML might be tempted to implement the "back" feature by providing a link to the deck, specifying the previous card. However, this would cause the mobile device to re-request the whole deck before redisplaying the card-a card it already had in memory.

Instead, you should use the tag, which tells the browser to remove the current page and display the previous page in the history list (like using the Back button on a PC browser). Of course, the content of the previous page might need to be refreshed each time it's accessed; in that case, valid techniques could include recalling the whole deck or specifying that the page not be cached. Proper navigation will be covered in future articles.

Figure 1.4 - The tag "pops" the top card off the stack (out of the history list), redisplaying the previous card in the history.

Setting Up Your Server for WML

To configure your Web server to deliver WML, you must define the related MIME types for WML content. Web servers and client browsers use MIME (Multipurpose Internet Mail Extensions) to communicate the type of data that is being sent. Before sending data, the server sends a MIME identifier to the client browser, identifying the format of the following data. The client browser can then properly decode and apply the data. Most WML applications require three MIME types, as listed in the following table.


















File Extension

MIME Type Definition

Use

.wml

text/vnd.wap.wml

WML source file

.wmls

text/vnd.wap.wmlscript

WML script file

.wbmp

image/vnd.wap.wbmp

Wireless bitmap file (image)

To add MIME types to your Web server, you must have administrator access to the server. The following sections cover setting up Microsoft's Internet Information Server (IIS) and Apache for WML. If you're using another type of server, read your server's documentation for more information on adding MIME types

To add the MIME types to IIS, open the Internet Information Services Management Console (MC). Access to this console varies depending on which specific operating system you're using and how you installed IIS, but can usually be found under Administrative Tools (Windows 2000) or Option Pack (Windows NT).

Open the IIS MC, click on the server to expand its tree, and then right-click on Default Web Site and choose Properties. (Note: If you don't want all the sites on your server to be able to deliver WML, right-click on those sites you want to be WML-enabled and then continue following these steps.)

Click on the HTTP Headers tab and then click on the File Types button under the MIME Map section. In the File Types dialog, click on New Type and enter the extension and MIME definition ("Content Type") from the preceding table. Click on OK. Repeat this process for the other two MIME types.

When you're finished, close the Web Site Properties dialog by clicking on OK. On some servers, there may be nodes or devices that also define HTTP codes and need to inherit the new setting(s). Choose the appropriate options for your system. Exit the IIS MC. Usually you won't need to restart the IIS service, but it wouldn't hurt to do so just in case.

Tip: Before exiting the Web Site Properties, you may want to add an entry for WML on the Documents tab (such as index.wml). This causes the server to display that document by default, eliminating the need for your visitors to specify a particular file in the URL to access your site.

Adding MIME Types to Apache

To add MIME types to Apache, you must edit the httpd.conf file. This file's location varies from system to system.

This file uses "AddType" lines to define MIME types. Find the section where these appear and add the following lines:

     AddType text/vnd.wap.wml .wml

     AddType text/vnd.wap.wmlscript .wmls

     AddType image/vnd.wap.wbmp .wbmp

Save and close the file and restart the Apache server to reload the configuration with the new MIME types.

Tip: You may want to add "index.wml" or comparable entry to the DirectoryIndex section of the Apache configuration file (requires running mod_dir). This causes the server to display that document by default, eliminating the need for your visitors to specify a particular file in the URL to access your site.

A Sample WML Deck

Now that your server is set up to handle WML correctly, let's try serving up a sample page. The following listing shows the bare minimum coding necessary to contain a WML deck, consisting of a single, blank card:



"http://www.wapforum.org/DTD/wml_1.1.xml">


     

     


The first line of the preceding code specifies that the file is XML and version 1.0-compatible. The second line defines the XML scope of the file; namely, that its DOCTYPE is WML, and where the Document Type Definition (DTD) can be found.

Tip: If you're unfamiliar with XML and don't fully understand these lines, just make sure that they appear at the beginning of all your WML documents.

The next line begins the WML definition with the tag.

The tag defines a card in the deck. Note that the id and title attributes can be anything you choose, but should be short and to the point, and the id must contain only letters and numbers (no punctuation or spaces).

If you want to try the preceding example, create the file on your Web server (in plain text form), adding the following lines between the tags to provide content for the card:


A Sample Card


Place the file in an accessible directory with adequate permissions to access it from an external browser. Now visit the Wapalizer at http://www.gelon.net. Type the URL to the file in the Wapalizer box and click on the Wapalize button. You should see a screen similar to the output below.

Figure 1.5 - Your sample page in the Openwave simulator.



b)            What are the primary goals of the WAP Forum efforts and how are they reflected In the WAP protocol architecture? In which situation is WTP not used? What are the disadvantages of implementing TCP/IP directly over the mobile network?                                     [8]

g)            What are the important functions of a WAP Gateway?                                                           [4]

b)            What is the functionality of the WAP gateway? Why is this functionality required? Draw a simple diagram showing how the WAP gateway interfaces with wireless devices.                       [4]

a)            Explain WAP stack. Prove that WAP session protocol and WAP transaction protocol over UDP conserves bandwidth as compared to TCP over IP.                                                               [9]

b)            Why does WAP define its own security layers and does not rely on the security provided by the mobile phone network? Discuss the important functions WSP and WAE.                    [9]

a)            Draw and explain the WAP network configuration. Also discuss the WAP protocol stack.                        [9]

b)            How does a WAP Gateways act as a bridge between the mobile world and the Internet?                      [4]

b)            Explain each of the following in detail with reference to WAP:

i)             Wireless Datagram Protocol

ii)            Wireless Transaction Protocol

iii)                Wireless Session Protocol                                                                                                [6]

c)            What are Wireless Application Protocol (WAP) gateway and its main functions?         [4]










WAP WIRELESS COMMUNICATION



WAP, Wireless Application Protocol aims to provide Internet content and advanced telephony services to digital mobile phones, pagers and other wireless terminals. The protocol family works across different wireless network environments and makes web pages visible on low-resolution and low-bandwidth devices. WAP phones are "smart phones" allowing their users to respond to e-mail, access computer databases and to empower the phone to interact with Internet-based content and e-mail.

WAP specifies a Wireless application Environment and Wireless Protocols. The Wireless application environment (WAE) is based on WSP (Wireless Session Protocol) and WTP (Wireless Transaction Protocol).

The OSI Model for Wireless Communication





WAP Protocol stack

The basic construction of WAP architecture can be explained using the following model. The order of the independent levels – which are a hierarchy - has the advantage that the system is very flexible and can be scaled up or down. Because of the different levels – or stacks - this is called the "WAP Stack", which is divided into 5 different levels.


Application Layer: Wireless Application Environment (WAE).
Session Layer: Wireless Session Protocol (WSP).
Transaction Layer: Wireless Transaction Protocol (WTP).
Security Layer: Wireless Transport Layer Security (WTLS).
Transport Layer: Wireless Datagram Protocol (WDP).

Each stack overlaps with the stack below. This stack architecture makes it possible for software manufacturers to develop applications and services for certain stacks. They may even develop services for stacks which are not specified yet.

The WAP stack is an entity of protocols which cover the wireless data transfer. The diagram above shows the order of the different stacks and their protocols. This includes the stacks responsible for the layout as well as the stacks resposible for the actual data transfer. The highest level or stack is the one which deals with the layout. A lower stack is responsible for the transfer and the security through WTLS (Wireless Transport Layer Security). All stacks lower than this one are being called network stack. Due to this hierarchy of stacks any changes made in the network stacks will have no influence over the stacks above

Application Layer (WAE and WTA)

The environment for wireless applications (Wireless Application Environment WAE) and the application for wireless phones (Wireless Telephony Application WTA) are the highest layer in the hierarchy of WAP architechture. These two are the main interface to the client device, which gives and controls the description language, the script language of any application and the specifics of the telephony. WAE and WTA have only a few easy functions on the client device, like the maintenance of a history list, for example.

Session Layer (Wireless Session Protocol WSP)

The Wireless Session Protocol (WSP) has all the specifications for a session. It is the interface between the application layer and the transfer layer and delivers all functions that are needed for wireless connections. A session mainly consists of 3 phases: start of the session, transfering information back and forth and the end of the session. Additionally, a session can be interrupted and started again (from the point where it was interrupted.)

Transaction Layer (Wireless Transaction Protocol WTP)

The specifications for the transfer layer are in the Wireless Transaction Protocol (WTP). Like the User Datagramm Protocol (UDP), the WTP runs at the head of the datagramm service. Both the UDP and the WTP are a part of the standard application from the TCP/IP to make the simplified protocol compatible to mobile terminals. WTP supports chaining together protocol data and the delayed response to reduce the number of transmissions. The protocol tries to optimize user interaction in order that information can be received when needed.

Wireless Transport Layer Security WTLS

The Wireless Transport Layer Security (WTLS) is a optional layer or stack which consists of description devices. A secure transmission is crucial for certain applications such as e-commerce or WAP-banking and is a standard in these days. Furthermore WTLS contains a check for data integrity, user authentification and gateway security.

Transport Layer (Wireless Datagram Protocol WDP)

The Wireless Datagram Protocol (WDP) represents the transfer or transmission layer and is also the interface of the network layer to all the above stacks/layers. With the help of WDP the transmission layer can be assimilated to the specifications of a network operator. This means that WAP is completely independent from any network operator. The transmission of SMS, USSD, CSD, CDPD, IS-136 packet data and GPRS is supported. The Wireless Control Message Protocol (WCMP) is an optional addition to WAP, which will inform users about occurred errors.



WTLS

Wapforum version 11/99

Wireless Transport Layer Security is a protocol based on the TLS protocol. It is used with the WAP transport protocols and has been optimised for use over narrow-band communication channels. The WTLs layer is above the transport protocol layer. The required security layer of the protocol determines whether it is used or not. It provides a secure transport service interface that preserves the transport service interface below; additionally it provides an interface for managing secure connections. WTLS aims to provide privacy, data integrity and authentication between two communication applications. Among its features are datagram support, optimised handshaking and dynamic key refreshing. It is optimised for low-bandwidth bearer networks with relatively long latency.

The WTLS Record Protocol is a layered protocol. The Record Protocol takes messages to be transmitted, optionally compresses the data, applies a MAC, encrypts, and transmits the result. Received data is decrypted, verified, and decompressed, then delivered to higher-level clients. Four record protocol clients are described in the WTLS standard; the change cipher spec protocol, the handshake protocol, the alert protocol and the application data protocol. If a WTLS implementation receives a record type it does not understand, it ignores it. Several records can be concatenated into one transport SDU. For example, several handshake messages can be transmitted in one transport SDU. This is particularly useful with packet-oriented transports such as GSM short messages.









Handshake
protocols

Alert Protocol

Application
Protocol

Change Cipher
Spec Protocol

Record protocol

The handshake protocol is made up of 3 sub-protocols. All messages are encapsulated in a plaintext structure.

WTP

WAPforum WTP 11/6/99

The Wireless Transaction Protocol provides the services necessary for interactive browsing applications. During a browsing session the client requests information from a server and the server responds with the information. This is referred to as a transaction. WTP runs on a datagram service and possible a security service.

Advantages of WTP include:


Improved reliability over datagram services
Imported efficiency over connection oriented services
As a message oriented protocol, it is designed for services oriented towards transactions.

Main features:


3 kinds of transaction services.

Class 0 Unreliable invoke messages with no result messages
Class 1: Reliable invoke messages with no result messages
Class 2: Reliable invoke messages with exactly one reliable result message.


Reliability achieved by using unique transaction identifiers, acknowledgements, duplicate removal; and retransmissions.
No explicit set up or tear down phases.
Optional user-to-user reliability.
Optionally the last acknowledgement of the transaction may contain out-of-band information.
Concatenation may be used to convey multiple PDUs in one service data unit of the datagram transport.
The basic unit of interchange is an entire message, not a stream of bytes.
Mechanisms are provided to minimize the number of transactions replayed as a result of duplicate packets.
Abort of outstanding transactions.
For reliable invoke messages, both success and failure reported.
Asynchronous transactions allowed.

The protocol data unit (PDU) consists of the header and data (if present). The header contains a fixed part and a variable part; The variable parts are carried in the Transport Information Item (TPI). Each PDU has its own fixed header (the fixed headers vary slightly in structure). As an example, the structure of the invoke PDU fixed header appears below:


































1

2-5

6

7

8

Con

PDU Type

GTR

TTR

RID

TID

Version

TIDnew

U/P

RES

RES

TCL

CON continue flag (1 bit):
The continue flag indicates the presence of any TPIs in the variable part. If the flag is set, there are one or more TPIs in the variable portion of the header. If the flag is clear, the variable part of the header is empty. This flag is also used as the first bit of a TPI, and indicates whether the TPI is the last of the variable header. If the flag is set, another TPI follows this TPI. If the flag is clear, the octet after this TPI is the first octet of the user data.

PDU type
The PDU type determines the length and structure of the header and dictates what type of WTP PDU the PDU is (Invoke, Ack, etc). This provides information to the receiving WTP provider as to how the PDU data should be interpreted and what action is required.

The following PDU types are defined:


























PDU Code

PDU Type

0x01

Invoke

0x02

Result

0x03

Ack

0x04

Abort

0x05

Segmented Invoke

0x06

Segmented Result

0x07

Negative Ack

Group trailer (GTR) and Transmission trailer (TTR) flag (2 bit):
When segmentation and re-assembly is implemented, the TTR flag is used to indicate the last packet of the segmented message. The GTR flag is used to indicate the last packet of a packet group.

GTR/TTR flag combinations:

GTR TTR Description














00

Not last packet

01

Last packet of message

10

Last packet of packet group

11

Segmentation and Re-assembly NOT supported.

The default setting should be GTR=1 and TTR=1, that is, WTP segmentation and re-assembly not supported.

RID Re-transmission Indicator (1 bit):
Enables the receiver to differentiate between packets duplicated by the network and packets re-transmitted by the sender. In the original message the RID is clear. When the message gets re-transmitted the RID is set.

TID Transaction identifier (16 bit):
The TID is used to associate a packet with a particular transaction.

Version
The current version is 0X00

TIDnew flag
This bit is set when the Initiator has wrapped the TID value, i.e. set it to be lower than the previous TID value.

U/P
When this flag is set it indicates that the Initiator requires a User acknowledgement from the server WTP user. The WTP user confirms every received message.

RES
This is a reserved bit and its value should be set to 0.

TCL
The transaction class shows the desired transaction class in the invoke message.

Packet sequence number (8 bit):
This is used by the PDUs belonging to the segmentation and re

WSP

WAP WSP 5/11/99

The Session layer protocol family in the WAP architecture is called the Wireless Session Protocol, WSP. WSP provides the upper-level application layer of WAP with a consistent interface for two session services. The first is a connection-mode service that operates above a transaction layer protocol WTP, and the second is a connectionless service that operates above a secure or non-secure datagram transport service.

The Wireless Session Protocols currently offer services most suited for browsing applications. WSP provides HTTP 1.1 functionality (it is a binary form of HTTP) and incorporates new features such as long-lived sessions, a common facility for data push, capability negotiation and session suspend/resume. The protocols in the WSP family are optimized for low-bandwidth bearer networks with relatively long latency. Requests and responses can include both headers and data. WSP provides push and pull data transfer WSP functions on the transaction and datagram services.

Messages can be in connection mode or connectionless. Connection mode messages are carried over WTP. In this case the protocol consists of WTP protocol messages with WSP PDUs as their data. Connectionless messages consist only of the WSP PDUs.

The general structure of the WSP PDU is as follows:








1 bite1 bite



TID/PIDPDU Type

Type Specific Contents

TID/PID
Transaction ID or Push ID. The TID field is used to associate requests with replies in the connectionless session service. The presence of the TID is conditional. It is included in the connectionless WSP PDUs, and is not included in the connection-mode PDUs. In connectionless WSP, the TID is passed to and from the session user as the "Transaction Id" or "Push Id" parameters of the session primitive

PDU type
The Type field specifies the type and function of the PDU. The type numbers for the various PDUs are defined below. The rest of the PDU is type-specific information, referred to as the contents.










































































Number

Name Assigned

0x00

Reserved

0x01

Connect

0x02

ConnectReply

0x03

Redirect

0x04

Reply

0x05

Disconnect

0x06

Push

0x07

ConfirmedPush

0x08

Suspend

0x09

Resume

0x10–0x3

FUnassigned

0x40

Get

0x41

Options (Get PDU)

0x42

Head (Get PDU)

0x43

Delete (Get PDU)

0x44

Trace (Get PDU)

0x45-0x4

FUnassigned (Get PDU)

0x50-0x5

FExtended Method (Get PDU)

0x60

Post

0x61

Put (Post PDU)

0x62–0x6

FUnassigned (Post PDU)

0x70-0x7

FExtended Method (Post PDU)

0x80-0x

FFReserved



The WAP Forum is the industry association that has developed the de-facto world standard for wireless information and telephony services on digital mobile phones and other wireless terminals. The primary goal of the WAP Forum is to bring together companies from all segments of the wireless industry to ensure product interoperability and growth of the wireless market.

WAP is designed in a layered fashion so that it can be extensible,flexible, and scalable. As a result, the WAP protocol stack is divided into five layers:

       Application Layer
Wireless Application Environment (WAE). This layer is of most interest to content developers because it contains, among other things, device specifications and the content development programming languages, WML and WMLScript.

       Session Layer
Wireless Session Protocol (WSP). Unlike HTTP, WSP has been designed by the WAP Forum to provide fast connection suspension and reconnection.

       Transaction Layer
Wireless Transaction Protocol (WTP). The WTP runs on top of a datagram service such as User Datagram Protocol (UDP) and is part of the standard suite of TCP/IP protocols used to provide a simplified protocol suitable for low bandwidth wireless stations.

       Security Layer
Wireless Transport Layer Security (WTLS). WTLS incorporates security features that are based upon the established Transport Layer Security (TLS) protocol standard. It includes data integrity checks, privacy, service denial, and authentication services.

       Transport Layer
Wireless Datagram Protocol (WDP). The WDP allows WAP to be bearer-independent by adapting the transport layer of the underlying bearer. The WDP presents a consistent data format to the higher layers of the WAP protocol stack, thereby offering the advantage of bearer independence to application developers.

Each of these layers provides a well-defined interface to the layer above it. This means that the internal workings of any layer are transparent or invisible to the layers above it. The layered architecture allows other applications and services to utilise the features provided by the WAP-stack as well. This makes it possible to use the WAP-stack for services and applications that currently are not specified by WAP.

The WAP protocol architecture is shown below alongside a typical Internet Protocol stack.

Note that the mobile network bearers in the lower part of the figure above are not part of the WAP protocol stack.

The uppermost layer in the WAP stack, the Wireless Application Environment (WAE) provides an environment that enables a wide range of applications to be used on wireless devices. In the chapter "WAP - the wireless service enabler" the WAP WAE programming model was introduced. This chapter will focus on the various components of WAE:

       Addressing model
A syntax suitable for naming resources stored on servers. WAP use the same addressing model as the one used on the Internet, that is, Uniform Resource Locators (URL).

       Wireless Markup Language (WML)
A lightweight markup language designed to meet the constraints of a wireless environment with low bandwidth and small handheld devices. The Wireless Markup Language is WAP.s analogy to HTML used on the WWW. WML is based on the Extensible Markup Language (XML).

       WMLScript
A lightweight scripting language. WMLScript is based on ECMAScript, the same scripting language that JavaScript is based on. It can be used for enhancing services written in WML in the way that it to some extent adds intelligence to the services, for example procedural logic, loops, conditional expressions, and computational functions.

       Wireless Telephony Application (WTA, WTAI)
A framework and programming interface for telephony services. The Wireless Telephony Application (WTA) environment provides a means to create telephony services using WAP.

Hardware and Software Requirement:

At minimum, developing WAP applications requires a web server and a WAP simulator. Using simulator software while developing a WAP application is convenient as all the required software can be installed on the development PC.

Although software simulators are good in their own right, no WAP application should go into production without testing it with actual hardware. The following list gives a quick overview of the necessary hardware and software to test and develop WAP applications:

       a Web server with connection to the Internet

       a WML to develop WAP application

       a WAP simulator to test WAP application

       a WAP gateway

       a WAP phone for final testing

Microsoft IIS or Apache on Windows or Linux can be used as the web server and Nokia WAP Toolkit version 2.0 as the WAP simulator.

Please have look at WAP - Useful Resources to find out all the above components.

Configure Web Server for WAP:

In the WAP architecture, the web server communicates with the WAP gateway, accepting HTTP requests and returning WML code to the gateway. The HTTP protocol mandates that each reply must include something called a Multi-Purpose Internet Mail Extensions (MIME) type.

In normal web applications, this MIME type is set to text/html, designating normal HTML code. Images, on the other hand, could be specified as image/gif or image/jpeg, for instance. With this content type specification, the web browser knows the data type that the web server returns.

In WAP applications a new set of MIME types must be used, as shown in the following table:














File type

MIME type

WML (.wml)

text/vnd.wap.wml

WMLScript (.wmls)

text/vmd.wap.wmlscript

WBMP (.wbmp)

image/vnd.wap.wbmp

In dynamic applications, the MIME type must be set on the fly, whereas in static WAP applications the web server must be configured appropriately.

For more information about configuring MIME types for your web server, please consult your web server documentation

The topmost layer in the WAP architecture is made up of WAE (Wireless Application Environment), which consists of WML and WML scripting language.

WML scripting language is used to design applications that are sent over wireless devices such as mobile phones. This language takes care of the small screen and the low bandwidth of transmission. WML is an application of XML, which is defined in a document-type definition.

WML pages are called decks. They are constructed as a set of cards, related to each other with links. When a WML page is accessed from a mobile phone, all the cards in the page are downloaded from the WAP server to mobile phone showing the content.

WML commands and syntaxes are used to show content and to navigate between the cards. Developers can use these commands to declare variables, format text, and show images on the mobile phone.

WAP Program Structure:

A WML program is typically divided into two parts: the document prolog and the body. Consider the following code:








"http://www.wapforum.org/DTD/wml12.dtd">





...


...more cards...


The first line of this text says that this is an XML document and the version is 1.0. The second line selects the document type and gives the URL of the document type definition (DTD). This DTD gives the full XML definition of WML. The DTD referenced is defined in WAP 1.1, but this header changes with the versions of the WML. The header must be copied exactly so that the tool kits automatically generate this prolog.

The body is enclosed within a ... tag pair as shown above. The body of a WML document can consist of one or more of the following:

       Deck

       Card

       Content to be shown

       Navigation instructions

WML Commands:

The commands used in WML are summarized as follows:

Formatting:
































Command

Description


Paragraph


Bold


Large


Emphasized


Italicized


Small


Strongly Emphasized


Underlined



Line Break

Inserting images:




Picture not available

Using Tables:

















Command

Description


Definition of a table


Defining a row


Defining a column


Table header

Variables:

Declared as:





Used as:




$ identifier or
$ (identifier) or
$ (Identifier; conversion)

Forms:




















Command

Description


Define single or multiple list


Input from user


Defines an option in a selectable list


Defines a set of input fields


Defines an option group in a selectable list

Task Elements

















Command

Description


Represents the action of switching to a new card


Says that nothing should be done


Represents the action of going back to the previous card


Refreshes some specified card variables.

Events:

The various events are as follows:


























Command

Description


Defines a do event handler


Defines an onevent event handler


Defines a postfield event handler


Defines an ontimer event handler


Defines an onenterforward handler


Defines an onenterbackward handler


Defines an onpick event handler

Sample WML Program:

Keep the following WML code into info.wml on your server. If your server is WAP enabled then you can access this page using any WAP device.






"http://www.wapforum.org/DTD/wml12.dtd">

       Arithmetic Operators

       Comparison Operators

       Logical (or Relational) Operators

       Assignment Operators

       Conditional (or ternary) Operators

Check for complete detail of The WML Operators.

WML Script Control Statements:

Control statements are used for controlling the sequence and iterations in a program.




















Statement

Description

if-else

Conditional branching

for

Making self-incremented fixed iteration loop

while

Making variable iteration loop

break

Terminates a loop

continue

Quit the current iteration of a loop

Check for complete detail of WML Script Control Statements.

WML Script Functions:

The user-defined functions are declared in a separate file having the extension .wmls. Functions are declared as follows:




function name (parameters)

{  

   control statements;

   return var;

}

The functions used are stored in a separate file with the extension .wmls. The functions are called as the filename followed by a hash, followed by the function name:




maths.wmls#squar()

WML Scripts Standard Libraries:

There are six standard libraries totally. Here is an overview of them:

       Lang: The Lang library provides functions related to the WMLScript language core.
Example Function: abs(),abort(), characterSet(),float(), isFloat(), isInt(), max(), isMax(), min(), minInt(), maxInt(), parseFloat(), parseInt(), random(), seed()

       Float: The Float library contains functions that help us perform floating-point arithmetic operations.
Example Function: sqrt(), round(), pow(), ceil(), floor(), int(), maxFloat(), minFloat()

       String: The String library provides a number of functions that help us manipulate strings.
Example Function: length(), charAt(), find(), replace(), trim(), compare(), format(), isEmpty(), squeeze(), toString(), elementAt(), elements(), insertAt(), removeAt(), replaceAt()

       URL: The URL library contains functions that help us manipulate URLs.
Example Function: getPath(), getReferer(), getHost(), getBase(), escapeString(), isValid(), loadString(), resolve(), unescapeString(), getFragment()

       WMLBrowser: The WMLBrowser library provides a group of functions to control the WML browser or to get information from it.
Example Function: go(), prev(), next(), getCurrentCard(), refresh(), getVar(), setVar()

       Dialogs: The Dialogs library Contains the user interface functions.
Example Function: prompt(), confirm(), alert()

WML Scripts Comments:

There are two types of comments in WMLScript:

       Single-line comment: To add a single-line comment, begin a line of text with the // characters.

       Multi-line comment: To add a multi-line comment, enclose the text within /* and */.

These rules are the same in WMLScript, JavaScript, Java, and C++. The WMLScript engine will ignore all comments. The following WMLScript example demonstrates the use of comments:




// This is a single-line comment.



  /* This is a

     multi-line comment. */



  /* A multi-line comment can be placed on a single line. */

WML Script Case Sensitivity:

The WMLScript language is case-sensitive. For example, a WMLScript function with the name WMLScript_Function is different from wmlscript_function. So, be careful of the capitalization when defining or referring to a function or a variable in WMLScript.

Whitespaces in WMLScript:

Except in string literals, WMLScript ignores extra whitespaces like spaces, tabs and newlines. Hence, the code in the earlier "Hello World" example can be typed in the following way and the result will remain the same:

WML Script Statement Termination by Semicolons:

A semicolon is required to end a statement in WMLScript. This is the same as C++ and Java. Note that JavaScript does not have such requirement but WML Script makes it mandatory.

A vast majority of WAP services are available in the market. You may to contact to some WAP lover to have a big list of all the available services and then you can start accessing those services from your WAP enabled mobile phone.

However, some examples of useful mobile services are in the following fields:

Banking:

       Accessing account statements

       Paying bills

       Transferring money between accounts

Finance:

       Retrieving stock and share prices

       Buying and selling stocks and shares

       Looking up interest rates

       Looking up currency exchange rates

Shopping:

       Buying everyday commodities

       Browsing and buying books

       Buying CDs

Ticketing:

       Booking or buying airline tickets

       Buying concert tickets

       Booking theatre tickets

Entertainment:

       Retrieving restaurant details

       Looking up clubs

       Finding out what is playing in what cinemas

       Playing solitaire games

       Playing interactive games

Weather:

       Retrieving local weather forecasts

       Looking up weather at other locations

E- Messaging:

       Voice mail

       Unified Messaging

       Enhanced support of legacy SMS services



1.a)        How can a Bluetooth network have more than 8 nodes? Draw such a network with 10 nodes and clearly mark the different nodes and parts of the network.                                   [4]

b)            Write short notes on any two topics

iii)           Blue-tooth Protocol stock                                                                                                    [5]

a)            Blue tooth Protocol stack                                                                                                                     [6]

a)            Explain briefly the types of links available with Bluetooth network.                                                  [4]

b)            Bluetooth is aimed for ad-hoc network with a very limited coverage and without need for an infrastructure. Explain its Physical and Medium Access Control Layers.                         [9]

a)            Why do not other RF (Radio Frequency) devices interfere with Bluetooth Devices?       [4]



Bluetooth is a short-range wireless technology that allows both voice and data to be transmitted between electronic devices. Originally conceived as a means to implement hands-free mobile phone use without a cable between the handset and the headset, companies have developed some very exciting, futuristic applications for Bluetooth. With this technology, people really could send and receive voice or data to or from any device or person in a network using a small lapel-mounted device a la Star Trek.




The Bluetooth Special Interest Group (SIG), which was founded in 1998 by Ericsson, IBM, Nokia, and Toshiba, authored the current standard. Today, over 2000 members of the Bluetooth SIG as well as vendors of both integrated circuits and development tools have helped designers to create Bluetooth end products.

What's in a Bluetooth System?










There are four basic parts to any Bluetooth system: a radio frequency (RF) component, a baseband or link control unit, link management software, and the supporting application software.

Bluetooth Radio—The Bluetooth radio is a short-distance, low-power radio operating in the unlicensed spectrum of 2.4-gigahertz (GHz). The radio uses a nominal antenna power of 0-dBm (1-mW) and has a range of 10 meters (33-feet). Optionally, a range of 100 meters (about 328-feet) may be achieved by using an antenna power of 20-dBm (100-mW). Data is transmitted at a maximum rate of up to 1-Mbits-per-second (Mbps). However, communication protocol overhead limits the practical data rate to a little over 721-Kbits-per-second (Kbps).

Figure 1:  Block diagram of a typical Bluetooth radio.

The Bluetooth radio employs spectrum spreading, whereby the transmission hops among 79 different frequencies between 2.402- and 2.480-GHz at nominal rate of 1600-hops/s. Spectrum spreading minimizes interference from other devices in the 2.4-GHz band, such as microwave ovens and other wireless networks. If a transmission encounters interference, it waits 1/1600th of a second (625-µsec) for the next frequency hop and retransmits on a new frequency. Frequency hopping also provides data security because two packets of data are never sent consecutively over the same frequency, and the changing frequencies are pseudo-random.

Bluetooth Baseband and Link Controller—The second part of a Bluetooth system is the Link Controller, the supervisory function which handles all the Bluetooth baseband functions, that include encoding voice and data packets, error correction, slot delimitation, frequency hopping, radio interface, data encryption, and link authentication. In addition, the Link Controller also executes Link Management software.

The Bluetooth standard supports two link types: the synchronous connection oriented (SCO) link, used primarily for voice communications, and the asynchronous connection-less (ACL) link, used for packet data. Each link type supports 16 different packet types. Any two devices in a Bluetooth system may use either link type and may change link types during a transmission. Over these links, Bluetooth supports an asynchronous data channel, three synchronous voice channels at 64-Kbps, or simultaneous asynchronous data and synchronous voice channels. The asynchronous channel can support an asymmetric link of 721-Kbps in either direction and 57.6-Kbps in the return direction or a 432.6-Kbps symmetric link.

Link Manager—The third component of a Bluetooth system, the Bluetooth Link Manager software governs the communication between various Bluetooth devices, such as a phone and a PC. The Link Manager's control includes setting up the communication link and performing authentication, configuration, and other protocols.

Application Software—The fourth component of a Bluetooth system is the application software embedded in the end product (e.g., PDA, mobile phone, or keyboard). All Bluetooth devices are required to have Bluetooth-compatible sections in the application software so that any Bluetooth device will work with any other one



Bluetooth Tutorial - Specifications

  What is Bluetooth? Well you can get lots of different definitions, but essentially Bluetooth is the term used to describe the protocol of a short range (10 meter) frequency-hopping radio link between devices. These devices are then termed Bluetooth - enabled. Documentation on Bluetooth is split into two sections, the Bluetooth Specification and Bluetooth Profiles.


The Specification describes how the technology works (i.e the Bluetooth protocol architecture),
The Profiles describe how the technology is used  (i.e how different parts of the specification can be used to fulfil a desired function for a Bluetooth device)

The Specification is examined first,  then the Profiles.

 Bluetooth Specification Protocol Stack:

Click on a section of the diagram* above, for a tutorial of its functions



    In more detail: Bluetooth is the name given to a new technology using short-range radio links, intended to replace the cable(s) connecting portable and/or fixed electronic devices. It is envisaged that it will allow for the replacement of the many propriety cables that connect one device to another with one universal radio link. Its key features are robustness, low complexity, low power and low cost. Designed to operate in noisy frequency environments, the Bluetooth radio uses a fast acknowledgement and frequency hopping scheme to make the link robust. Bluetooth radio modules operate in the unlicensed ISM band at 2.4GHz, and avoid interference from other signals by hopping to a new frequency after transmitting or receiving a packet. Compared with other systems in the same frequency band, the Bluetooth radio hops faster and uses shorter packets. The following pages give more detail about different sections of the protocol, note this tutorial is completely up to date with the latest version of the bluetooth Specification (ver 1.1)


















































































































































1


v1.1



The Radio layer defines the requirements for a Bluetooth transceiver operating in the 2.4 GHz ISM band.





2


v1.1



The Baseband layer describes the specification of the Bluetooth Link Controller (LC) which carries out the baseband protocols and other low-level link routines.





3


v1.1



The Link Manager Protocol (LMP) is used by the Link Managers (on either side) for link set-up and control.





4


v1.1



The Host Controller Interface (HCI) provides a command interface to the Baseband Link Controller and Link Manager, and access to hardware status and control registers.





5


v1.1



Logical Link Control and Adaptation Protocol (L2CAP) supports higher level protocol multiplexing, packet segmentation and reassembly, and the conveying of quality of service information.





6


v1.1



The RFCOMM protocol provides emulation of serial ports over the L2CAP protocol. The protocol is based on the ETSI standard TS 07.10.





7


v1.1



The Service Discovery Protocol (SDP) provides a means for applications to discover which services are provided by or available through a Bluetooth device. It also allows applications to determine the characteristics of those available services.







b)            How Internet may be supported on mobile links. Draw the architecture and functional components of mobile IP. Describe data transfer from a mobile node to a fixed node and vice-versa.                   [9]

a)What is mobile IP? Draw & describe the mobile IP architecture and its functional components.                     [12]

b)What is mobile IP? Explain with the help of a neat diagram how a mobile user remains on line irrespective of his current position.                                                                                                      [9]


 The Mobile IP protocol allows location-independent routing of IP datagrams on the Internet. Each mobile node is identified by its home address disregarding its current location in the Internet. While away from its home network, a mobile node is associated with a care-of address which identifies its current location and its home address is associated with the local endpoint of a tunnel to its home agent. Mobile IP specifies how a mobile node registers with its home agent and how the home agent routes datagrams to the mobile node through the tunnel.

Mobile IP provides an efficient, scalable mechanism for roaming within the Internet. Using Mobile IP, nodes may change their point-of-attachment to the Internet without changing their home IP address. This allows them to maintain transport and higher-layer connections while roaming. Node mobility is realized without the need to propagate host-specific routes throughout the Internet routing fabric.

How Mobile IP works

A mobile node can have two addresses - a permanent home address and a care of address (CoA), which is associated with the network the mobile node is visiting. There are two kinds of entities in Mobile IP:


A home agent stores information about mobile nodes whose permanent home address is in the home agent's network.
A foreign agent stores information about mobile nodes visiting its network. Foreign agents also advertise care-of addresses, which are used by Mobile IP.

A node wanting to communicate with the mobile node uses the permanent home address of the mobile node as the destination address to send packets to. Because the home address logically belongs to the network associated with the home agent, normal IP routing mechanisms forward these packets to the home agent. Instead of forwarding these packets to a destination that is physically in the same network as the home agent, the home agent redirects these packets towards the foreign agent through an IP tunnel by encapsulating the datagram with a new IP header using the care of address of the mobile node.

When acting as transmitter, a mobile node sends packets directly to the other communicating node through the foreign agent, without sending the packets through the home agent, using its permanent home address as the source address for the IP packets. This is known as triangular routing. If needed, the foreign agent could employ reverse tunneling by tunneling the mobile node's packets to the home agent, which in turn forwards them to the communicating node. This is needed in networks whose gateway routers have ingress filtering enabled and hence the source IP address of the mobile host would need to belong to the subnet of the foreign network or else the packets will be discarded by the router.

The Mobile IP protocol defines the following:


an authenticated registration procedure by which a mobile node informs its home agent(s) of its care-of-address(es);
an extension to ICMP Router Discovery, which allows mobile nodes to discover prospective home agents and foreign agents; and
the rules for routing packets to and from mobile nodes, including the specification of one mandatory tunneling mechanism and several optional tunneling mechanisms.

IP version 4 assumes that a node’s IP address uniquely identifies its physical attachment to the Internet. Therefore, when a corespondent host (CH) tries to send a packet to a mobile node (MN), that packet is routed to the MN’s home network, independently of the current attachment of that MN (this is because CHs do not have any knowledge of mobility). 

When the MN is on its home network, and a CH sends packets to the mobile node, the Mobile Node obtains those packets and answers them as a normal host (this is one important requirement in Mobile IP), but if the MN is away from its home network, it needs an agent to work on behalf of it. That agent is called Home Agent (HA). This agent must be able to communicate with the MN all the time that it is “on-line”, independently of the current position of the MN. So, HA must know where the physical location of the MN is. 

In order to do that, when the MN is away from home, it must get a temporary address (which is called care-of address), which will be communicated to the HA to tell its current point of attachment. This care-of address can be obtained by several ways, but the most typical one is that the MN gets that address from an agent. In this case, this agent is called Foreign Agent (FA). 

Therefore, when a MN is away from home, and it’s connected to a foreign network, it detects is on a different network and sends a registration request through the FA to the HA requesting mobile capabilities for a period of time. The HA sends a registration reply back to the MN (through the FA) allowing or denying that registration. This is true when the Mobile Node is using a Foreign Agent for the registration. If the Mobile Node obtains the care-of address by other meanings, that step (registration through the FA) is not necessary.  If the HA allows that registration, it will work as a proxy of the MN. When MN’s home network receives packets addressed to the MN, HA intercepts those packets (using Proxy ARP), encapsulates them, and sends them to the care-of address, which is one of the addresses of the FA. The FA will decapsulate those packets, and it will forward them to the MN (because it knows exactly, where the MN is). 

Encapsulation is the method used by the HA to deliver information to the MN putting an extra IP header on top of the packet and tunnelling that packet to the MN (when it's on a foreign network). Tunneling and encapsulation are defined in  IP in IP tunneling and IP encapsulation within IP. 

So, when the MN is on a foreign network, it uses its home agent to tunnel encapsulated packets to itself via FA. This occurs until the lifetime expires (or the MN moves away). When this happens (time out) MN must register again with its HA through the FA (if the MN obtains its care-of address for other meanings, it acts as its own FA). 

When the MN moves to another network and it detects so, it sends a new registration request through (one more time) the new FA. In this case, HA will change MN’s care-of address and it will forward encapsulated packets to that new care-of address (which, usually, belongs to the FA). Some extensions of Mobile IP allows to a MN to have several care-of addresses. Then, HA will send the same information to all the care-of addresses. This is particularly useful when the MN is at the edges of cells on a wireless environment, and it is moving constantly. 

MN bases its movement detection basically looking at periodic adverts of the FA (and HA), which sends to its localnet. Those messages are one extension of the ICMP router discovery messages and they are called Agent Advertisement (because they advertises a valid agent for Mobile Nodes). 

There are two different methods to detect network movement: 

a) The first method is based on network prefixes. For further information look at Mobile IP RFC 2002  (section 2.4.2.2, page 22). This method is not included in our current implementation. 

b) The second method is based upon the Lifetime field within the main body of the ICMP Router Advertisement portion of the Agent Advertisement. Mobile nodes keep track of that Lifetime and if it expires, it sends an Agent Solicitation (asking for a new Agent Advertisement) and it presumes that it has been moved. 

When the MN returns to its home network, it does not require mobility capabilities, so it sends a deregistration request to the HA, telling it that it’s at home (just to deactivate tunneling and to remove previous care-of address(es)). 

At this point, MN does not have to (de)register again, until it moves away from its network. The detection of the movement is based on the same method explained before.



No comments:

Post a Comment