Can two network adapters work in different IP protocols simultaneously?

Network Protocols: In a transport layer connection between two host processes, how does the destination host process know the IP Address of the source host?

  • As far as I know, the TCP segment or UDP datagram structure has only information about the port numbers.  Hence, when these transport layer packets (stripped-off of the network header which contains the IP information) reach the destination host and consequently a process, how does it know the IP Address of the source to whom to send a response?

  • Answer:

    TCP and  UDP are the transport layer. They run on the Network layer, which most of the time is IP. Each IP packet has the source and destination IPs in its header.

Casey Callendrello at Quora Visit the source

Was this solution helpful to you?

Other answers

A typical tcp connection is identified by four parameters, soucce ip source port destination ip and destination port. Also, source ip and dest ip are embedded in every packet whether it is TCP,UDP,ICMP, any one. Since address is stored at one place, end host know how to access it. There is no need of redundant address copy in transport header or application header. Good analogy is When a letter is delivered, address is mentioned at envelope. So postman, post master and receiver all can refer from envelope about address , there is no need to copy same address on post card or any where else. Please read Steven TCP/IP illustrated volume 1--- ch 17 to ch23

Arpit Singh

It's true that TCP or UDP packets don't contain the source and destination IP addresses of the packet. But remember, each TCP or UDP (Transport Layer) packet is embedded in an IP (Network Layer) packet. Its the IP packet that has the IP addresses in its header. The source computer sends the IP packet. It contains a header (which includes the source and destination IP addresses) plus some data which is the actual TCP or UDP packet. The receiver computer then parses the IP packet and gets the source IP address plus the TCP or UDP packet from it. Then parses the TCP or UDP packet and gets protocol-specific information including its source and destination port, and the actual data from it. Here is a sample IP packet in a simple readable form: source=192.168.0.5; destination=192.168.0.6; data=(type=TCP;source_port=21343;destination_port=80;data=...) The data between the parentheses is the TCP packet.

Masoud Gheysari

The OS maintains the networking state. Programming languages have functions built in to query the underlying OS so you can ask questions such as "What is the IP address(s) that is/are connecting to me" How you do that depends on the language, the OS, if your program is the client, server, or neither. Network connections are, for the most part, treated like anyother I/O.

Mike Fratto

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.