Modem, as I know it, has FFFF (65k) ports. Does that mean that it sends signals over different frequencies and my adapter is set by way that it assignes signal of each frequency to a port, or, how does it actually work?

Dani AI

Generated

Short answer for : no — a “port” is a transport‑layer number inside TCP/UDP headers, not a separate radio frequency or Wi‑Fi channel. The 0xFFFF/65535 figure comes from the 16‑bit port fields in TCP/UDP; those numbers let the OS route bytes to the right application. The radio only sees frames and transmits them on whatever channel the adapter/AP is using. RFC 793, RFC 768, RFC 6335. (rfc-editor.org)

How it maps in practice: the stack on your PC builds an IP packet (network layer), wraps a TCP/UDP header with a port (transport layer), then the OS hands that to the NIC which encapsulates it into an 802.11 frame and the radio modulates it onto the chosen Wi‑Fi channel (physical layer). Channel planning (e.g., 2.4 GHz’s limited non‑overlapping channels like 1/6/11, versus many 5 GHz/6 GHz channels) is handled by the wireless hardware and regulatory rules — not by transport ports. See the IP‑over‑802 encapsulation standard and vendor guidance on channel planning. RFC 1042, Cisco docs. (rfc-editor.org)

Why you see many simultaneous “connections”: multiplexing is done in software and by NAT. Each socket is identified by the five‑tuple (protocol, src IP, src port, dst IP, dst port); routers doing NAT rewrite source ports so many internal clients can share one public IP. Ephemeral port handling and ranges are governed by IANA/IETF practices. RFC 6056, RFC 6335. (rfc-editor.org)

Practical takeaways: treat ports as “app addresses” inside packets, and treat Wi‑Fi channels as RF resources controlled by AP/NIC and regulators. If the goal is troubleshooting (slow Wi‑Fi, contention), focus on channel width, channel selection, interference and client/AP placement — not port numbers. For info on the newer 6 GHz/Wi‑Fi 6E band and regulatory status, consult vendor/regulator guidance before assuming device support. (Wi‑Fi 6E expanded 6 GHz in the U.S.; availability and rules vary by country.) (cisco.com)

If you are talking about internet ports, then you can just refer to the first sentence of the wiki page: "In computer networking, a port is an application-specific or process-specific software construct". The important words are in bold. Internet ports are purely a matter of software, not hardware. Modems, network adaptors or routers are not physically switching between different "ports" (e.g., frequencies).

When data is sent over a network (and by extension, the internet), it's bundled into "packets" which are analoguous to traditional mail letters, with a to and from address (IP address). The format of the packets is hierarchial (from low-level to high-level). It first has a IP header, followed by a transport-layer header (such as the TCP header), and then the application-specific data follows. As you can see in those links, the IP header contains the IP addresses, and the transport-layer header contains the port number. In other words, these are logical ports, constructed and handled by software, not hardware.

There are 65k ports because both UDP and TCP headers allocate 2 bytes of space for the port number, effectively limiting them to about 65k values.

When it comes to allowing multiple communications through the same media (wire, frequency, etc..), this requires a channel access method or multiplexing. For example, cell phones using CDMA. Wifi mostly uses OFDM. But these are hardware-specific details. Generally, the standards that regulate different kinds of communication mediums (radio, TV, DSL, Wifi, etc.) specify the method by which to modulate and multiplex the signals, and arbitrage methods. This is a whole other ball-game, and is handled at a low-level (hardware / firmware) that users or software do not have access to.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.