10.07.2015 Views

Practical Industrial Data Networks:Design, Installation and ...

Practical Industrial Data Networks:Design, Installation and ...

Practical Industrial Data Networks:Design, Installation and ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

16.3.2 UDPTCP/IP overview 271data with a sequence number of ISN+1. The ISN is a pseudo r<strong>and</strong>om number with valuesbetween 0 <strong>and</strong> 2 32 .The acknowledgments number (32 bits) is used to verify correct receipt of thetransmitted data. The receiver checks the incoming data <strong>and</strong> if the verification is positive,acknowledges it by placing the number of the next byte expected in the acknowledgmentsnumber field <strong>and</strong> setting the ACK flag. The sender, when transmitting, sets a timer <strong>and</strong> ifacknowledgments are not received within a specific time, an error is assumed <strong>and</strong> the datais retransmitted.<strong>Data</strong> offset (4 bits) is the number of 32-bit words in the TCP header. This indicateswhere the data begins. It is necessary since the header can contain options <strong>and</strong> thus doesnot have a fixed length.Six flags control the connection <strong>and</strong> data transfer. They are:• URG: Urgent pointer field significant• ACK: Acknowledgments field significant• PSH: Push function• RST: Reset the connection• SYN: Synchronize sequence numbers• FIN: No more data from senderThe window field (16 bits) provides flow control. Whenever a host sends anacknowledgment to the other party in the bi-directional communication, it also sends awindow advertisement by placing a number in the window field. The window sizeindicates the number of bytes, starting with the one in the acknowledgments field, that thehost is able accept.The checksum field (16 bits) is used for error controlThe urgent pointer field (16 bits) is used in conjunction with the URG flag <strong>and</strong> allows forthe insertion of a block of ‘urgent’ data in the beginning of a particular segment. Thepointer points to the first byte of the non-urgent data following the urgent data.User datagram protocol (UDP) is a ‘connectionless’ protocol <strong>and</strong> does not require aconnection to be established between two machines prior to data transmission. It istherefore said to be ‘unreliable’ – the word ‘unreliable’ used here as opposed to ‘reliable’in the case of TCP <strong>and</strong> should not be interpreted against its everyday context.Sending a UDP datagram involves very little overhead in that there are nosynchronization parameters, no priority options, no sequence numbers, no timers, <strong>and</strong> noretransmission of packets. The header is small, the protocol is streamlined functionally.The only major drawback is that delivery is not guaranteed. UDP is therefore used forcommunications that involve broadcasts, for general network announcements, or for realtimedata.The UDP headerThe UDP header is significantly smaller than the TCP header <strong>and</strong> only contains fourfields.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!