DC Module3_complete Notes
DC Module3_complete Notes
Guided Media: Guided media, which are those that provide a medium
from one device to another, include twisted-pair cable, coaxial cable, and
fiber-optic cable.
The most common UTP connector is RJ45 (RJ stands for registered jack)
Applications
Twisted-pair cables are used in telephone lines to provide voice and
data channels.
Local-area networks, such as l0Base-T and l00Base-T, also use
twisted-pair cables.
Coaxial Cable
Coaxial cable (or coax) carries signals of higher frequency ranges than those
in twisted pair cable. coax has a central core conductor of solid or stranded
wire (usuallycopper) enclosed in an insulating sheath, which is, in turn,
encased in an outer conductor of metal foil, braid, or a combination of the
two. The outer metallic wrapping serves both as a shield against noise and
as the second conductor, which completes the circuit.This outer conductor
is also enclosed in an insulating sheath, and the whole cable is protected by
a plastic cover.
Propagation Modes
Fiber Construction
• In a switched-network,
1) Some nodes are connected to the end-systems (For example: PC or TP).
2) Some nodes are used only for routing.
The resources remain dedicated for the entire duration of data transfer until the teardown phase.
• The virtual-circuit setup procedure
→ first determines a path through the network &
→ sets parameters in the switches by exchanging connect-request & connect-confirm messages
• If a switch does not have enough resources to set up a virtual circuit, the switch responds with a
connect-reject message and the setup procedure fails (Figure 7.15).
• A connection-release procedure may also be required to terminate the connection.
The Figure 8.7 shows how the 4 packets are transferred from station-A to station-X.
The switches are referred to as routers.
All four packets (or datagrams) belong to the same message, but may travel different paths to
reach their destination.
This is so because the links may be involved in carrying packets from other sources and do not
have the necessary bandwidth available to carry all the packets from A to X.
This approach can cause the datagrams of a transmission to arrive at their destination out-
oforder with different delays between the packets.
Packets may also be lost or dropped because of a lack-of-resources.
It is the responsibility of an upper-layer protocol to
→ reorder the datagrams or
→ ask for lost datagrams.
The datagram-networks are referred to as connectionless networks. This is because
1) The switch does not keep information about the connection state.
2) There are no setup or teardown phases.
3) Each packet is treated the same by a switch regardless of its source or destination
Routing Table
• Each switch has a routing-table which is based on the destination-address.
• The routing-tables are dynamic & updated periodically.
• The destination-addresses and the corresponding forwarding output-ports are recorded in the
tables.
Destination Address
• Every packet carries a header that contains the destination-address of the packet.
• When the switch receives the packet,
→ This destination-address is examined.
→ The routing-table is consulted to find the corresponding port through which the packet
should be forwarded.
• The destination address in the header of a packet in remains the same during the entire journey
of the packet.
Efficiency
• Datagram-networks are more efficient when compared to circuit-switched-network. This is
because
1) Resources are allocated only when there are packets to be transferred.
2) If a source sends a packet and there is a delay of a few minutes before another packet can be
sent, the resources can be re-allocated during these minutes for other packets from other sources.
Delay
• Datagram-networks may have greater delay when compared to circuit-switched-network. This
is because
1) Each packet may experience a wait at a switch before it is forwarded.
2) Since not all packets in a message necessarily travel through the same switches, the delay is
not uniform for the packets of a message.
The Figure 8.9 gives an example of delay for one single packet.
The packet travels through two switches.
There are three transmission times (3T), three propagation delays (slopes 3t of the lines), and
two waiting times (W1+ W2).
Setup Phase
• A switch creates an entry for a virtual-circuit.
• For example, suppose source A needs to create a virtual-circuit to B.
• Two steps are required: 1) Setup-request and
2) Acknowledgment.
1) Setup Request
A setup-request frame is sent from the source to the destination (Figure 8.14).
e) Destination-B
→ receives the setup-frame
→ assigns a VCI to the incoming frames that come from A, in this case 77.
¤ This VCI lets the destination know that the frames come from A, and no other
sources.
2) Acknowledgment
A special frame, called the acknowledgment-frame, completes the entries in the
Switching tables (Figure 8.15).
Teardown Phase
• Source-A, after sending all frames to B, sends a special frame called a teardown request.
• Destination-B responds with a teardown confirmation frame.
• All switches delete the corresponding entry from their tables.
Efficiency
• Resource reservation can be made in 2 cases:
1) During the setup: Here, the delay for each packet is the same.
2) On demand: Here, each packet may encounter different delays.
• Advantage of on demand resource allocation:
The source can check the availability of the resources, without actually reserving it.
Delay in Virtual Circuit Networks
• There is a one-time delay for setup and a one-time delay for teardown (Figure 8.16).
• If resources are allocated during the setup phase, there is no wait time for individual packets.
• The packet is traveling through two switches (routers).
• There are three transmission times (3T), three propagation times (3τ), data transfer delay, a
setup delay and a teardown delay.
• The total delay time is
Solution
a) Single-Bit error
b) Burst error
1) Single-Bit Error
Only 1 bit of a given data is changed
→ from 1 to 0 or
→ from 0 to 1 (Figure 10.1a).
2) Burst Error
Two or more bits in the data have changed
→ from 1 to 0 or
→ from 0 to 1 (Figure 10.1b).
A burst-error occurs more than a single-bit error. This is because: Normally, the duration of
noise is longer than the duration of 1-bit.
When noise affects data, the noise also affects the bits.
The no. of corrupted-bits depends on
→ data-rate and
→ duration of noise.
3.1.2 Redundancy
• The central concept in detecting/correcting errors is redundancy.
• Some extra-bits along with the data have to be sent to detect/correct errors. These extra bits are
called redundant-bits.
• The redundant-bits are
→ added by the sender and
→ removed by the receiver.
• The presence of redundant-bits allows the receiver to detect/correct errors.
3.1.4 Coding
• Redundancy is achieved through various coding-schemes.
1) Sender adds redundant-bits to the data-bits. This process creates a relationship between
→ redundant-bits and
→ data-bits.
2) Receiver checks the relationship between redundant-bits & data-bits to detect/correct errors.
• Two important factors to be considered:
1) Ratio of redundant-bits to the data-bits and
2) Robustness of the process.
• Two broad categories of coding schemes: 1) Block-coding and 2) Convolution coding.
3.2 Block Coding
• The message is divided into k-bit blocks. These blocks are called data-words.
• Here, r-redundant-bits are added to each block to make the length n=k+r.
• The resulting n-bit blocks are called code-words.
• Since n>k, the number of possible code-words is larger than the number of possible data-words.
• Block-coding process is 1-to-1; the same data-word is always encoded as the same code-word.
• Thus, we have 2n-2k code-words that are not used. These code-words are invalid or illegal.
3.2.1 Error Detection
• If the following 2 conditions are met, the receiver can detect a change in the original code-
word:
1) The receiver has a list of valid code-words.
1) At Sender
i) The sender creates code-words out of data-words by using a generator.
The generator applies the rules and procedures of encoding.
ii) During transmission, each code-word sent to the receiver may change.
2) At Receiver
i) a) If the received code-word is the same as one of the valid code-words,
the code-word is accepted;
the corresponding data-word is extracted for use.
b) If the received code-word is invalid, the code-word is discarded.
ii) However, if the code-word is corrupted but the received code-word still matches a valid
codeword, the error remains undetected.
• An error-detecting code can detect only the types of errors for which it is designed; other
types of errors may remain undetected.
Example 10.1
Let us assume that k = 2 and n = 3. Table 10.1 shows the list of datawords and codewords.
Later, we will see how to derive a codeword from a dataword. Assume the sender encodes
the dataword 01 as 011 and sends it to the receiver. Consider the following cases:
1. The receiver receives 011. It is a valid codeword. The receiver extracts the dataword 01
from it.
2. The codeword is corrupted during transmission, and 111 is received (the leftmost bit is
corrupted).This is not a valid codeword and is discarded.
3. The codeword is corrupted during transmission, and 000 is received (the right two bits
are corrupted). This is a valid codeword. The receiver incorrectly extracts the dataword 00.
Two corrupted bits have made the error undetectable.
Modular Arithmetic
In modulo-N arithmetic, we use only the integers in the range 0 to N - 1, inclusive.
In modulus 2 arithmetic, we use only 0 and 1. Operations in this arithmetic are very simple.
The following shows how we can add or subtract 2 bits.
Adding: 0+0=0, 0-0=0, 0+1=1 and 0-1=1 Subtracting: 1+0=1, 1-0=1, 1+1=0 and 1-1=0
Notice particularly that addition and subtraction give the same results. In this arithmetic we use the
XOR (exclusive OR) operation for both addition and subtraction
Hamming Distance
One of the central concepts in coding for error control is the idea of the Hamming distance.
The Hamming distance between two words (of the same size) is the number of differences
between the corresponding bits.
We show the Hamming distance between two words x and y as d(x, y).
The Hamming distance can easily be found if we apply the XOR operation on the two words
and count the number of 1s in the result.
Let us find the Hamming distance between two pairs of words.
1. The Hamming distance d(000, 011) is 2 because
If code has to detect upto ‘s’ errors, the minimum-distance b/w the valid codes must be
‘s+1’ i.e. dmin=s+1.
We use a geometric approach to define dmin=s+1.
¤ Let us assume that the sent code-word x is at the center of a circle with radius s.
¤ All received code-words that are created by 0 to s errors are points inside the circle or on
the perimeter of the circle.
¤ All other valid code-words must be outside the circle
• For example: A code scheme has a Hamming distance dmin = 4.
This code guarantees the detection of upto 3 errors (d = s + 1 or s = 3).
3.2.1.3 Parity Check Code
• This code is a linear block code. This code can detect an odd number of errors.
• A k-bit data-word is changed to an n-bit code-word where n=k+1.
• One extra bit is called the parity-bit.
• The parity-bit is selected to make the total number of 1s in the code-word even.
• Minimum hamming distance dmin = 2. This means the code is a single-bit error-detecting
code.
• Here is how it works (Figure 10.4):
¤ If all syndrome-bits are not 0s, the received code-word is discarded (Figure 10.7b).
3.3.2 Polynomials
• The power of each term shows the position of the bit; the coefficient shows the value of
the bit.
3.3.3 Cyclic Code Encoder Using Polynomials
• Let Data-word = 1001 = x^3+1.
Divisor = 1011 = x^3+x+1.
• In polynomial representation, the divisor is referred to as generator polynomial t(x)
(Figure 10.9).
1) At Source
Firstly the message is divided into m-bit units.
Then, the generator creates an extra m-bit unit called the checksum.
The checksum is sent with the message.
2) At Destination
The checker creates a new checksum from the combination of the message and
Sent checksum.
i) If the new checksum is all 0s, the message is accepted.
ii) If the new checksum is not all 0s, the message is discarded
3.4.1.3 Algorithm
3.4.2 Other Approaches to the Checksum
• If two 16-bit items are transposed in transmission, the checksum cannot catch this error.
• The reason is that the traditional checksum is not weighted: it treats each data item
equally.
• In other words, the order of data items is immaterial to the calculation.
• Two approaches have been used to prevent this problem: 1)Fletcher and 2)Adler