DATA COMMUNICATION AND COMPUTER NETWORK : DATA COMMUNICATION AND COMPUTER NETWORK B.Sc. III SEMESTER- UNIT 4
D.S.V.V.
PACKET TRANSMISSION : PACKET TRANSMISSION Packet : Concept of packet
Network System divided data into small blocks called packet.
Why we prefer packet transmission?
Usually data is preferred to be send in small packets, as it is easy to detect that the data from the senders to receivers reached without failure.
Small packets ensure the transmission is fast & there will not be much delay for the others to send there packets working on the same network.
Packet Transmission : Packet Transmission Suppose we have to send a 5MB file
Over a connection 56000 kbps then it
will take approx. 12 minutes, and if it is
Broken into 10 packets of 500 kb then the
Time span is just 1/10 and the waiting time
For others will be few seconds.
Packets Transmission and Multiplexing : Packets Transmission and Multiplexing Multiplexer Using Channel to send a packet A Network that permits many sources to take turns accessing a
a shared communication resource is providing a form of Time
Division Multiplexing.
Computer 1 uses the resource to send packet .
Computer 2 uses the resource to send packet.
Packets and frames : Packets and frames No universal format of packet ( it is just small block of data.)
it varies from the type of hardware.
Frame – to denote the definition of a packet used with a specific type of network. Soh block of data in frame eot ** soh – start of header; eot: end of trailer
Disadvantages and Advantages of frames : Disadvantages and Advantages of frames Disadvantage
Condition when the sender transmits two frames without no delay between them.
Only one character is needed in this condition to separate two blocks of data.
So an extra, unnecessary character between blocks of data. Advantages
Larger delays in sending the data.
End of trailer will let one knows when the frame will end.
Computer crash condition
Computer crashes then eot will not received the computer. So when system reboots it will come to know the situation.
Byte Stuffing : Byte Stuffing Using soh & eot having advantages but most computers network can’t afford to reserve character for use by network.
Instead network permits an application to transfer arbitrary characters across n/w.
Network system arrange for the sending side to change the data slightly before it is sent, and then arrange for the receiving side to restore the original data before passing it to the receiving application. So the network system newer confuses with data.
Network system usually insert an extra bits or bytes to change data for transmission, the techniques is called DATA STUFFING.
Byte Stuffing : Byte Stuffing Soh & Eot are defined as delimiting the frame, so these two characters can’t be used.
Byte stuffing can have the third character say esc. When any of the three character occur in data, the sender inserts esc and replace the character.
Character in Data Characters sent
Soh esc X
Eot esc y
Esc esc Z
To implement byte stuffing, the sender must scan an entire data block ad perform the mapping before any data is sent.
Byte Stuffing : Before byte stuffing
frame after Byte stuffing
As the frame arrived the receiver will look for the esc followed by x,y,z and replace the two character combination with the appropriate single character. Byte Stuffing Esc soh eot esc soh Esc Z Esc X Esc Y Esc Z eot
Time check : Time check Communication systems – worked without problem for years.
Interference in long distance will be controlled by the modems automatically.
Inspite that the scientists and engineers developed a software and hardware mechanism to detect and correct problems.
The moment the character begin to arrive, the receiver starts a timer and uses the time to check bits of incoming character. If the signal does not remain at a fixed voltage for the expected duration of each bit or if a bit does not occur at the appropriate time, the hardware declares that interference caused an error.
Character Count : Character Count Specifying the header the numbers of bits in packet. We had defined three frames of 5, 8,2 bits. Character count error
Bit stuffing : Bit stuffing It contains an arbitrary numbers of bits and allows character code with an arbitrary number of bits per character.
Each frame begins and ends with a special bit pattern. E.g. 01111110 is a flag byte.
Whenever the sender encounter five consecutive 1’s then automatically it stuff a 0 bit in an outgoing bit stream.
011011111111111111010 original data
01101111101111101111010 data with stuffed bits
011011111111111111010 data received
Bit stuffing is an analogous to the Byte stuffing where the escape byte is stuffed into the outgoing character stream before a flag byte in data
Transmission Errors : Transmission Errors Lightning, Power surges & other electro-magnetic interference – causes unwanted current in the media.
Interference (Lightning)- causes permanent damage.
Small change in the electrical signal – causes receiver to misinterept the data.
Transmission Errors: the problem of lost, changed or spuriously appearing bits account for much of the complexity needed in computer networks.
Parity check : Parity check Most RS-232 circuits uses parity check.
The mechanism require the sender to compute an additional bit, called parity bit and to attach with each character before sending.
After all the bits of a character arrive, the receiver removes the parity bit, performs some computation as sender and verifies the result is same as the value of parity bit.
Two form of parity – even and odd. This depends on the agreement of the sender and the receiver which parity has to be used.
Parity check : Parity check Sender – set the parity bit that will make the total number of 1 bits may be odd or even.
Receiver- counts the number of 1 bits to check the parity.
In short Network system usually send a small amount of additional information with the data. A sender computes the value of the additional information from the data and the receiver performs the same computation to verify that the transmission of packet was done without errors.
Limits of parity check : Limits of parity check It detects a single bit error only.
With the two bits error it is not easy to detect with parity check.
Even parity – bit transmitted by the sender contain an even number of 1 bits. The three options are:
it can be in change in two 0’s that the total number of 1 bits is increased by even num.
It can be in change in two 1’s that the total number of 1 bits is decreased by even number.
If the 1 is changed to 0 & 0 is changed to 1 then the total number of 1 bits is same.
Detecting errors : Detecting errors Checksum: Sender treats the data as a sequence of binary integers and computer their sum. Data can contain characters, floating point numbers or an image.
Cyclic Redundancy checks: It uses hardware to for check and uses to components – a shift register and an exclusive unit.
Flow Control : Flow Control Data Overrun when the senders speed is faster than the receiver.
Techniques to overcome data overrun is called flow controls.
Stop and Go: Seder waits after transmitting a packet. When the receiver is ready for a packet, it will send a acknowledgement.
Stop and run is inefficient use of network capacity.
Flow Control : Flow Control Slide Window: Sender and receiver are programmed to use a fixed window size, which is the maximum amount of data that can be sent before an acknowledgment arrives.
Eg: sending four packets at a time. Initial stage Already
acknowledge window