According to me when PSH flag is set , it indicates that data will have to be sent immediately to the wire and on receiving side the data has to be pushed to the application immediately .

When URG flag is set it indicates that urgent data has to be sent immediately to wire from sender side and on receiving end the urgent data has to be sent immediately to application.

Urgent pointer in TCP segment is used to indicate that amount of urgent data present in TCP segemnt . So, for example, if the segment contained 400 bytes of urgent data followed by 200 bytes of regular data, the URG bit would be set and the Urgent Pointer field would have a value of 400.

The problem here is that , Is urgent data is same as push data . If , yes then why two different URG and PSH flag are used in TCP segment . Please help me to clear my doubts in simple language .

I am new to networking field and preparing for CCNA exam. Thanks in advance :-)


Jeremy Stretch has a good article on this.

This is where the PSH flag comes in. The socket that TCP makes available at the session level can be written to by the application with the option of "pushing" data out immediately, rather than waiting for additional data to enter the buffer. When this happens, the PSH flag in the outgoing TCP packet is set to 1 (on). Upon receiving a packet with the PSH flag set, the other side of the connection knows to immediately forward the segment up to the application. To summarize, TCP's push capability accomplishes two things:

• The sending application informs TCP that data should be sent immediately.

• The PSH flag in the TCP header informs the receiving host that the data should be pushed up to the receiving application immediately.

The URG flag is used to inform a receiving station that certain data within a segment is urgent and should be prioritized. If the URG flag is set, the receiving station evaluates the urgent pointer, a 16-bit field in the TCP header. This pointer indicates how much of the data in the segment, counting from the first byte, is urgent.

  • So I should take it that when PSH flag is set from sender side then receiver receives PUSH data and is not expecting any more PUSH data from sender (but there can be more Push data coming receiver doesn't know that) but when URG flag is set then receiver receives the urgent data and process it and is expecting more urgent data from sender until the data with sequence number comes to receiver which is written in urgent pointer . – user10433098 Apr 21 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.