Assigning TCP/IP Ports for In-House Application Use

Ports 0-1023 are the Well Known Ports and are assigned by IANA. These should only be used for the assigned protocols on public networks. Ports 1024-65535 used to be called Registered Port Numbers (see rfc1700) but are now split into two areas (see rfc6335). Ports 1024-49151 are the User Ports and are the ones to … Read more

Size of empty UDP and TCP packet?

TCP: Size of Ethernet frame – 24 Bytes Size of IPv4 Header (without any options) – 20 bytes Size of TCP Header (without any options) – 20 Bytes Total size of an Ethernet Frame carrying an IP Packet with an empty TCP Segment – 24 + 20 + 20 = 64 bytes UDP: Size of … Read more

Setting TIME_WAIT TCP

A TCP connection is specified by the tuple (source IP, source port, destination IP, destination port). The reason why there is a TIME_WAIT state following session shutdown is because there may still be live packets out in the network on their way to you (or from you which may solicit a response of some sort). … Read more

Difference between TCP and UDP?

TCP is a connection oriented stream over an IP network. It guarantees that all sent packets will reach the destination in the correct order. This imply the use of acknowledgement packets sent back to the sender, and automatic retransmission, causing additional delays and a general less efficient transmission than UDP. UDP is a connection-less protocol. … Read more

What is the theoretical maximum number of open TCP connections that a modern Linux box can have

A single listening port can accept more than one connection simultaneously. There is a ’64K’ limit that is often cited, but that is per client per server port, and needs clarifying. Each TCP/IP packet has basically four fields for addressing. These are: source_ip source_port destination_ip destination_port <—– client ——> <——— server ————> Inside the TCP … Read more