22
Error Checking continued

Error Checking continued. Network Layers in Action Each layer in the OSI Model will add header information that pertains to that specific protocol. On

  • View
    231

  • Download
    0

Embed Size (px)

Citation preview

Error Checking continued

Network Layers in Action

• Each layer in the OSI Model will add header information that pertains to that specific protocol.

• On the receiving end, as each layer receives the packet, header information pertaining to that layer is removed before the packet is passed on.

Network Layers in Action (Cont.)

• Error checking is added at the end of the packet from each layer to ensure delivery of correct information.

• This information added is sometimes referred to as the packet trailer.

• Each layer will verify the correctness of a packet and then send it to the next layer if correct.

• Packets that contain errors are rejected.

Network Layers in Action (Cont.)

The packet at each layer is identical at both the sender and receiver side of the network.

Techniques used by Protocols

• Data Link Layer protocols will used error checking previously discussed.– Simple parity– Longitudal Parity– CRC

• Transport protocols will invoke other techniques that may try to “repair” messages that are received in error

The ordering of packets

• Packets (depending on the routes that they take) may arrive to the receiver out of order.

• This can be caused by networks using the shortest path available for delivery of each packet.

• Transport protocols use Sequencing to handle packets that arrive “out of order”

The ordering of packets (Continued)

• Each packet in the transport layer on the sending side will attach to the packet a sequence number.

• On the receiving end in the transport layer, the sequence number is examined.

• If the packet that arrives is the next packet in order (according to the sequence number) the packet is passed on to the next layer.

The ordering of packets (Continued)

• Packets that are received out of order are stored temporally.

• Each time a new packet arrives the sequence number is examined and packets waiting are also examined to determine the order that they are sent to the next layer.

• This ensures the proper ordering of packets that are passed to the next layer in the OSI Model.

The ordering of packets (Continued)

• Malfunction hardware can cause duplicate packets sent to a receiver.

• The sequence number of each packet can also eliminate the delivery of duplicate packets.

• In the transport layer, duplicate packets are discarded.

Lost Packets

• During communications on a network packets may become lost.– Errors detected by hardware will discard packets– Errors may also be detected in networking equipment

and discarded as well.• Reliable transfer of data can be accomplished

with the use of a positive acknowledgement with retransmission.

• Messages are passed between sender and receiver on status of packets sent and received.

Lost Packets (Continued)

• When messages are received intact, an acknowledgement is sent from the receiver to the sender (Called an ACK).

• In a given amount of time– The sender will retransmit a message if an ACK has

not been received.– There is a certain number of retransmissions that a

sender will do before halting message transmissions to an intended receiver.

Lost Packets (Continued)

• Retransmission of packets can also create duplicate packets.

• Duplicates that are the result of retransmission are then handled at the transport layer.

• Delay in network traffic may also cause false retransmissions of “lost” messages (the ACK is received to late).

Avoiding Replay Errors

• Packets that are sent are delayed due to network problems or congestion.

• Duplicate packets with different information will arrive at the same time (one packet contains old information the other with updated information).

• The duplicate (sometimes the correct) information is then discarded.

Avoiding Replay Errors (Continued)

• Replay errors are avoided by providing a session ID.

• Each ID given to a message is Unique.• Each ID is matched to the packets waiting

to be delivered.• Wrong session ID’s are discarded.• Session ID’s are not re-used for extensive

amounts of time (hours)

Preventing Data Overrun

• Data Overrun occurs when data is sent faster than it can be received.

• This is due to computers operating at different speeds.

• Flow Control mechanisms are used to handle Data Overrun.

• A simple method is that the sender will stop sending information until the receiver is ready (called a stop and go system)

Preventing Data Overrun (Continued)

• Although easy to implement, stop and go systems are vastly inefficient use of networking resources.

• Sliding Window provides a better and more efficient method for preventing Data Overrun on network.

Sliding Window

• The Window is the number of packets that can be sent by a sender at one time.

• The receiver must have enough space in a buffer to receive the whole window of packets sent to it.

• One ACK from the receiver will be sent to the sender containing only packets that were received without error

Sliding Window (Continued)

Only Packets that were not received will be retransmitted in the next window.

Sliding Window (Continued)

• The sliding window mechanism can increase the throughput four times over the stop and go mechanism.

• Increasing the size of the window will not increase the throughput.

• Network bandwidth constraints limit the maximum size a window can have on a network.

Avoiding network Congestion

• Network congestion is caused when more packets are received than those that are sent.

• Switches that contain too many packets in its buffer will start discarding packets causing packet loss.

• When this increases considerably, a network may experience Congestion Collapse.

Avoiding network Congestion (continued)

• Two methods can be used to avoid Congestion Collapse– Switches can notify the sender of the congestion

caused by hardware failure– Packet loss on the receiving end can be used to

estimate the amount of congestion on a network.

• In most modern networks the latter is used to determine network congestion.

Packet or Frames Lost

• The sender always assumes that packet loss is caused by network congestion.

• Two common methods are used to improve network traffic and alleviate network congestion.– Reduce the rate of retransmission of packets on the

sending side.– Reduce the size of the sliding window to reduce the

number of packets on each retransmission of a message.