Skip to main content

TCP Interview Questions

TCP Interview Questions and Answers (Transmission Control Protocol)

What is TCP?
Transmission Control Protocol is a connection-oriented protocol. This means that before any data transfer can take place, certain parameters have to be negotiated in order to establish the connection.
Explain TCP Three-Way Handshake process?
For Reliable connection, the transmitting device first establishes a connection-oriented (reliable) session with its peer system, which is called three-way handshake. Data is then transferred. When the Data transfer is finished, the connection is terminated and a virtual circuit is torn down.
1. In the First part of Three-way Handshake, the source sends a TCP SYN segment with the initial sequence number X indicating the desire to open the connection.
————————————————
2. In Second Part, when destination receives TCP SYN, It acknowledges this with Ack (X+1)  as well as its own SYN Y (It informs Source what sequence number it will start its data with and will use in further messages). This response is called SYN/ACK.
————————————————
3. In the Third Part, the source sends an ACK (ACK = Y+1) segment to the destination indicating that the connection is set up. Data transfer can then begin.
During this 3 way Handshake, devices are negotiating parameters like Window Size etc.
What does Window Size indicate?
It is 16-bit Window field which indicates the number of bytes a sender will send before receiving an acknowledgement from the receiver.
What is the purpose of RST bit?
When the connection is not allowed by destination connection is reset.
What are TCP Flags?
TCP Flags are used to influence the Flow of Data across a TCP Connection.
1. PUSH (PSH) - It Pushes the buffered data to the receiver's application. If data is to be sent on the immediate basis we will push it.
2. Reset (RST) - It Resets the connection.
3. Finish (FIN) - It Finishes the session. It means No More Data from the sender.
4. Urgent (URG) - It is use to set the priority to tell the receiver that this data is important for you.
5. Acknowledgement (ACK) - All packets after SYN packet sent by the client should have this flag Set. ACK=10 means host has received 0 through 9 and is expecting byte 10 next.
6. Synchronize (SYN) - It initiates a connection. It Synchronizes the sequence number.
What is the difference between PUSH and URG flag?
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.
What is the importance of Sequence Number and Acknowledgement Number?
Sequence Number is a 32-bit field which indicates the amount of data that is sent during a TCP session. By sequence number, the sender can be assured that the receiver received the data because the receiver uses this sequence number as the acknowledgement number in the next segment it sends to acknowledge the received data. When the TCP session starts, the initial sequence number can be any number in the range 0–4,294,967,295.
Acknowledgement number is used to acknowledge the received data and is equal to the received sequence number plus 1.

Comments

Popular posts from this blog

GOOGLE WEB DESIGNER ASSESSMENT

D 1. What does Google Web Designer offer HTML5 coders in particular?       HTML5 syntax highlighting and autocompletion     A code sample library     See tips from award-winning graphic designers     Target ads to specific browsers D 2. What does Google Web Designer help beginners do?      Build creatives without HTML5 coding skills     Learn HTML5 from experts     Consult award-winning graphic designers     Test ads on different browsers simultaneously A 3. How can you move an element in Quick mode animation?       By adding a scene and moving the element where desired     By selecting the element you want to move in the timeline and setting an event marker     By moving the element on the stage and clicking the play button at the top of the animation timeline     By selecting the keyframe in the transition editor The correc...

VPN Interview Questions and Answers

What is VPN? Virtual Private Network (VPN) creates a secure network connection over a public network such as the internet. It allows devices to exchange data through a secure virtual tunnel. It uses a combination of security features like encryption, authentication, tunneling protocols, and data integrity to provide secure communication between participating peers. What is Authentication, Confidentiality & Integrity? Authentication - Verifies that the packet received is actually from the claimed sender. It verifies the authenticity of sender. Pre-shared Key, Digital Certificate are some methods that can be used for authentication. Integrity - Ensures that the contents of the packet has not been altered in between by man-in-middle. Hashing Algorithm includes MD5, SHA. Confidentiality - Encrypts the message content through encryption so that data is not disclosed to unauthorized parties. Encryption algorithms include DES (Data Encryption Standard), 3DES (Triple-DES), AES (Ad...

ASA Firewall Interview Questions and Answers [CCIE]

What is a Firewall? Firewall is a device that is placed between a trusted and an untrusted network. It deny or permit traffic that enters or leaves network based on pre-configured policies. Firewalls protect inside networks from unauthorized access by users on an outside network. A firewall can also protect inside networks from each other. For example - By keeping a Management network separate from a user network. What is the difference between Gateway and Firewall? A Gateway joins two networks together and a network firewall protects a network against unauthorized incoming or outgoing access. Network firewalls may be hardware devices or software programs. Firewalls works at which Layers? Firewalls work at layer 3, 4 & 7. What is the difference between Stateful & Stateless Firewall? Stateful firewall - A Stateful firewall is aware of the connections that pass through it. It adds and maintains information about users connections in state table...