Doubt In Tcp
Results 1 to 4 of 4

Thread: Doubt In Tcp

  1. #1
    Member
    Join Date
    Sep 2001
    Posts
    61

    Doubt In Tcp

    i have not come across(may be i overlooked) any means by which TCP or IP could identify two different application using the same port..
    for example suppose i telnet to two different machines,say A and B ..an terminal that telneted to A will recieve the packets from A and the terminal that telneted to B will recieve the packets from B but never mixed up(ofcourse)..how will TCP or IP on my computer pass incoming packets to the higher layer correctly??which field in their respective headers does either of these use to pass the right packet to the right application..as far as i have read IP has a field in its header that will tell it which upper layer protocol (TCP or UDP ) is the packet meant for but not more..i have not seen any field in the TCP header that will tell TCP that the incoming packet is for application A or application B...
    however i do have a guess...does the fields that specify source and destination ports in the TCP header do that work for TCP..if so i have no further questions ..otherwise HEEEEEEELP
    Share on Google+

  2. #2
    Junior Member
    Join Date
    Nov 2001
    Posts
    10

    Wink IP and upper layers

    Ti's quite simple really.

    Your everyday packet has a source ip, source port , dest. IP and dest. port .
    So, when your computer opens a session to the various known ports, it usually uses a source port from 1024 and up.
    hence, when you start two sessions, your computer uses two different source ports and sends the packets to the right applications respectfully.
    Share on Google+

  3. #3
    Banned
    Join Date
    Sep 2001
    Posts
    522

    Re: IP and upper layers

    Originally posted by guyh
    Ti's quite simple really.

    Your everyday packet has a source ip, source port , dest. IP and dest. port .
    So, when your computer opens a session to the various known ports, it usually uses a source port from 1024 and up.
    hence, when you start two sessions, your computer uses two different source ports and sends the packets to the right applications respectfully.

    This is correct, also if you need to use the SAME port, what you see isnt always what is actualy recived by the telnet program or any other program, alot of it is filtered out cus u dont want to see dumb code, alot of times before everything that is sent or received there is a command and next to it where it came from, if the coder coded the program right he would filter it by having anything commin from this soource going to this destination by matching the variables..... i dont know if u understand what im sayin but its kinda like goin to multiple chats on IRC, it filters it to different chat windows but all on the same port....
    Share on Google+

  4. #4
    Senior Member
    Join Date
    Nov 2001
    Posts
    185

    Re: neat question

    Very interesting question. Since my ansewer to that would be yanked straight from the RFC's, I thought I would just suggest some *light* reading to you that should resolve a lot of your questions.

    If you are not already familiar with the RFC's, they are the best technical references on the net if you ask me. And best of all they will save you a lot of money on technical books.

    Suggested reading:
    RFC791 Internet Protocol
    RFC815 IP Datagram Reassembly Algorithms
    RFC814 Names, Addresses, Ports, and Routes
    RFC768 User Datagram Protocol
    RFC793 Transmission Control Protocol
    RFC813 Window and Acknowledgment Strategy in TCP
    RFC896 Congestion Control in IP/TCP Internetworks

    you can get them all at
    http://www.rfc-editor.org/rfc.html

    Hope this helped.
    Know this..., you may not by thyself in pride claim the Mantle of Wizardry; that way lies only Bogosity without End.

    Rather must you Become, and Become, and Become, until Hackers respect thy Power, and other Wizards hail thee as a Brother or Sister in Wisdom, and you wake up and realize that the Mantle hath lain unknown upon thy Shoulders since you knew not when.

    Share on Google+

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides