Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After reading about packet and circuit-switching, I've learned that servers maintain multiple connections with a port by passing down an established client connection to a child process; and that all nodes involved in the connection route maintain a connection-id table so packets can be correctly forwarded to the next node.

I still have a few questions about this though:

  • Do packets need any more header data other than a connection-id number once a connection has been established with another program?

  • After a connection is made through, say port 80; does data still go through that port, or has the connection-id established specified a new open port to use for further communications?

  • In correspondence with my question here; Is there an actual physical separation between different connections? Or is it purely theoretical/virtual?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

You seem to be confusing circuit-switching ideas with TCP/IP.

Talk of Port 80 suggests the HTTP protocol over TCP and IP. With TCP/IP the intermediate nodes (routers) do not need to keep track of "connection IDs". Dynamically maintained routing tables of IP-address ranges are used to forward packets. It is not necessary that successive packets follow the same path.

The server keeps track of TCP connections using the clients IP-address and TCP port number as well as the server's port number (and server IP-address, servers can have multiple IP-addresses). A connection is identified by the combination of those four pieces of information. The client port number is usually chosen pseudo-randomly by the client.

Note that UDP is connectionless, there is no concept of a UDP connection. Many Internet application-layer protocols use UDP as a transport-layer protocol.

Do packets need any more header data other than a connection-id number once a connection has been established with another program?

TCP headers and IP headers in TCP/IP packets don't contain "connection ids" as such.

After a connection is made through, say port 80; does data still go through that port,

Yes.

or has the connection-id established specified a new open port to use for further communications?

As I said above, connection-ids, as such, do not exist in TCP/IP. Sometimes a higher level protocol establishes communications on other ports (e.g. FTP's control and data ports).

In correspondence with my question here; Is there an actual physical separation between different connections?

Not usually. A server can have multiple NICs serving different groups of clients.

Or is it purely theoretical/virtual?

Port numbers and such are just numbers in the packet headers.

share|improve this answer
    
Ok so with what protocols are connection paths established? Wikipedia's "packet-switching" article states that "in connection-oriented packet-switching, a connection is defined and preallocated in each involved node. The packets include a connection identifier rather than address information, and are delivered in order." So what protocols or kinds of programs would establish this kind of connection? –  Griffin Jan 30 '12 at 0:07
1  
@Griffin: ATM establishes "virtual circuits". ISDN establishes digital circuits, Frame Relay uses permanent or switched virtual circuits. None of these are relevant to end-users of Internet services. IP can be carried over these other protocols but is largely oblivious to them. –  RedGrittyBrick Jan 30 '12 at 11:34
    
+1 I had an exam on this today. ;) –  Tom Wijsman Jan 30 '12 at 11:36

After reading about packet and circuit-switching, I've learned that servers maintain multiple connections with a port by passing down an established client connection to a child process; and that all nodes involved in the connection route maintain a connection-id table so packets can be correctly forwarded to the next node.

This paragraph is really confusing. At first you refer to switching on the network layer. Then you refer to connections made on the transport layer. Then you somehow combine them together, although they are really different layers. Consider that circuit-switching might be just an idea and might or might not have been used in the past. However, once you refer to ports you are referring to TCP/IP which does not use circuit-switching at all...

Do packets need any more header data other than a connection-id number once a connection has been established with another program? After a connection is made through, say port 80; does data still go through that port, or has the connection-id established specified a new open port to use for further communications?

You are referring to a connection with a program, with would use TCP/IP ports. In that case no connection-id has been attached to the packet. In case of circuit-switching this would be necessary.

Is there an actual physical separation between different connections? Or is it purely theoretical/virtual?

Everything goes over the same cable, so it could be considered virtual rather than physical.

An established connection is just a means of saying "I will communicate over this post on this address". Yes, a connection is simply an IP address and port pair...


Don't use Wikipedia solely to get insight on this, try to deep-dive into a book on Computer Networks...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.