100% Pass Cisco, PMP, CISA, CISM, AWS Dumps on SALE!
Get Now
01:59:56

X

Why should I ask TCP / IP / HTTP for these interviews?

Why should I ask TCP / IP / HTTP for these interviews?

Regardless of these agreements, what is the best thing to ask?

 

Questions about OSPF and BGP? That's the protocol used by network engineers.

 

Questions about Kerberos, CIFS / SMB? That's the protocol used by Windows system administrators.

 

Questions about Access Token, SSO, CSRF, SQL Injection? That's what Web development uses.

 

Questions about Padding Oracle, Crime, Beast? That's what information security uses only.

 

Only TCP / IP / HTTP is the common intersection of the above four categories of personnel. TCP / IP / HTTP occupies the vast majority of Internet traffic. Internet people need to learn these basic skills just like learning to read and write.

 

The following are basic interview questions:

 

1. If both TCP parties send SYN signals at the same time, will one TCP connection or two TCP connections be established?

The interviewer learned from the textbook that TCP is a three-way handshake. Since both parties send a SYN signal at the same time, there will be two three-way message handshake and eventually two TCP connections will be generated. Let's look at an example first.

Alice's IP = 6.6.6.6 Listening port number = 6666

Bob's IP = 8.8.8.8 listening port number = 8888

Scenario 1: The originating connection uses the listening port as the source port. Alice sends a SYN signal, and the packet looks like:



Bob sends a SYN signal, the message looks like:



The quads of the two sides are exactly the same, and the two sides face each other on a track, so in the end, the two sides will meet and eventually establish a connection. The difference from the traditional TCP three-way handshake is that it requires four message interactions, and both parties need to use SYN + ACK messages to confirm each other.

 

Scenario 2: The initiating party uses a random port as the source port

 

Alice sends a SYN signal, the message looks like:



Bob sends a SYN signal, the message looks like:



The quads of the two parties are not consistent. Both parties need to use SYN + ACK to respond to each other, and complete the TCP connection with three complete message interactions, which will establish 2 TCP connections.

 

The question is, which connection will the two parties use to transfer data? Using any one, the other idle TCP connection is a waste of resources! However, TCP does not know that this is idle resources, but the application knows that TCP has helped establish 2 TCP virtual channels, and the application needs to choose!

 

How does the application choose?

 

BGP protocol runs on TCP179 port, use scenario 2 to establish a TCP connection, the two parties will inevitably establish 2 TCP connections. BGP completes the migration of the BGP state machine on one of the TCP connections, connect, active, and established. Once completed, BGP considers this TCP to be intact and immediately sends an instruction to TCP to release another idle TCP connection.

 

Why does the TCP actively close the party need to wait 2MSL time before the port resources can be released?

 

The last ACK message sent by the active closing party cannot be guaranteed to reach the other party if the port resources are released immediately. When the quaternion of the newly created TCP connection is exactly the same as the quaternion just closed, the FIN message of the old TCP connection just arrived, and the Sequence Number is within the legal reception window of the new TCP connection. Is likely to be closed.

 

Theoretically, the limit survival time of an IP packet on the network is 255 seconds (TTL = 255). If the active shutdown party waits for 255 seconds, TCP packets stranded on the network will either reach the active shutdown party or be discarded by the network. It disappears from the network and can never reach the active shutdown party. This is thinking from a network perspective.

 

If the passive shut-off party does not receive the passive shut-off party's ACK, it will always retransmit the FIN, and the retransmission time period is generally like this:

 

0.5, 1, 2, 4, 8, 16, 32, 32

 

After 8 times of retransmission, the other party has not received the ACK from the other party, and the passive connection will reset the current connection.

 

Considering the time of the last retransmission message and the time it may stay on the network, the combination of the two factors, the TCP protocol specification determines that the passive shutdown needs to wait 240 seconds, and MSL = 120 seconds. Waiting time for passive shutdown = 2MSL.

 

Regulations such as TCP actually deal with extreme situations, and the data of two TCP connections conflicts!


The above is the news sharing from the PASSHOT. I hope it can be inspired you. If you think today' s content is not too bad, you are welcome to share it with other friends. There are more latest Linux dumps, CCNA 200-301 dumps and CCNP Written dumps waiting for you.

Have any question for us?

Cisco Dumps Popular Search:

350-401 official cert guide ccie security written passing score ccnp route hands on skills exam ccie routing and switching lab devices ccie lab after written ccna c difficile ccna latest dumps free download pdf ccnp 300-101 ppt ccna practise how to prepare for ccna book

Copyright © 2024 PASSHOT All rights reserved.