1 votes 1 votes When a TCP segment arrives at a host, in order to direct it to the appropriate socket, the operating system's network stack uses which of the following? (a)Transport protocol number (b)Destination IP Address (c)Source port number (d)Destination port number (e)Destination MAC Address Answer is given to be a,b,c,d. I understand why a,b and d are needed. Why source port number is needed? Document Ref: https://gateoverflow.in/?qa=blob&qa_blobid=8025344419025703520 Computer Networks tcp transport-layer + – Ayush Upadhyaya asked Nov 10, 2018 Ayush Upadhyaya 1.4k views answer comment Share Follow See all 16 Comments See all 16 16 Comments reply Magma commented Nov 10, 2018 i edited by Magma Nov 10, 2018 reply Follow Share In order to identify connection uniquely , port number is not sufficient , Two host chossen the same host or IP address is also not sufficient because there is a chance that the two host have same IP addresses , they can choose any port number inside the computer , it might so happen that , the number which they have choose is also 'X' So we are not going to use Only prt number , Or only IP address to identify the connection uniquely therefore we combine both (IP + Port = Socket) 0 votes 0 votes kumar.dilip commented Nov 10, 2018 reply Follow Share two IP choosen by the same host within a same network will be same It will be Two port. 0 votes 0 votes Magma commented Nov 10, 2018 reply Follow Share I want to say that How to identify the the connection uniquely two host can choose the same port number or two host can have same IP address therefore we can combine both (IP address + post = socket) 0 votes 0 votes kumar.dilip commented Nov 10, 2018 reply Follow Share How this is possible two hosts with the same IP?? As I know IP address is globally unique?? 0 votes 0 votes kumar.dilip commented Nov 10, 2018 reply Follow Share two host can have same port number that's why we use IP + port number to uniquely indetify??? 0 votes 0 votes Magma commented Nov 10, 2018 reply Follow Share How this is possible two hosts with the same IP?? How said ?? https://www.makeuseof.com/tag/whats-ip-conflict-resolve/ read it ! 0 votes 0 votes kumar.dilip commented Nov 10, 2018 reply Follow Share if you see in your image You have given same port (x) But different IP address IA and IB. 0 votes 0 votes Magma commented Nov 10, 2018 reply Follow Share I'm just trying to explain the concept with the help of diagram that's Y I write down below the whole summary ....you can't visualize everything with this diagram :p 0 votes 0 votes kumar.dilip commented Nov 10, 2018 reply Follow Share According to you Ip address and port may be same. Then How we will uniquely identify any network ???Then What's use of Socket ??? 0 votes 0 votes Ayush Upadhyaya commented Nov 10, 2018 reply Follow Share @Magma-Can we say that since TCP handles each client concurrently and has a incoming queue for each client to which it is connected, source port number is useful to identify to which service of source should the TCP server respond right? 0 votes 0 votes Magma commented Nov 10, 2018 reply Follow Share yeah correct Ayush Upadhyaya 0 votes 0 votes Magma commented Nov 10, 2018 reply Follow Share kumar.dilip probability of occuring (same port no + same IP address ) of the two host at the same instant of time is very very very very very low :3 0 votes 0 votes srestha commented Nov 11, 2018 reply Follow Share It is already told that TCP arrives in a host and now it is finding appropriate socket So, it has no need to find destination IP again right? 0 votes 0 votes Ayush Upadhyaya commented Nov 14, 2018 reply Follow Share @srestha-But to direct it to correct socket, you need destination Ip because socket=IP+Port 0 votes 0 votes srestha commented Nov 15, 2018 reply Follow Share check this If the URGENT flag is set, segments sent to the destination TCP will have the urgent pointer set. The receiving TCP will signal the urgent condition to the receiving process if the urgent pointer indicates that data preceding the urgent pointer has not been consumed by the receiving process. The purpose of urgent is to stimulate the receiver to process the urgent data and to indicate to the receiver when all the currently known urgent data has been received. The number of times the sending user's TCP signals urgent will not necessarily be equal to the number of times the receiving user will be notified of the presence of urgent data. If no foreign socket was specified in the OPEN, but the connection is established (e.g., because a LISTENing connection has become specific due to a foreign segment arriving for the local socket), then the designated buffer is sent to the implied foreign socket. Users who make use of OPEN with an unspecified foreign socket can make use of SEND without ever explicitly knowing the foreign socket address. However, if a SEND is attempted before the foreign socket becomes specified, an error will be returned. Users can use the STATUS call to determine the status of the connection. In some implementations the TCP may notify the user when an unspecified socket is bound. chk pg 46 https://tools.ietf.org/html/rfc793 Socket only need connections, not addresses right? 0 votes 0 votes Ayush Upadhyaya commented Nov 16, 2018 reply Follow Share @srestha-TCP supports concurrent connections. In case multiple connections are open from a single server, source IP is needed to identify which source is being served by which child process so that the incoming segment goes into the respective queue of the server. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes For making socket connection 5 tuples are required < destination port no, source port no, destination IP, source IP, protocol used >. Hence options A, B, C, D rish1602 answered May 2, 2021 rish1602 comment Share Follow See all 0 reply Please log in or register to add a comment.