SShortSingh.
Back to feed

Why TCP/UDP Port Numbers Have Gaps and Strange Origins Explained

0
·1 views

Every internet connection uses a 16-bit port number ranging from 0 to 65535, a ceiling set by the mathematical limit of 16-bit fields in TCP and UDP headers. IANA divides this range into three tiers: well-known ports (0–1023), registered ports (1024–49151), and dynamic ports (49152–65535), as defined in RFC 6335. The restriction preventing non-root processes from binding to ports below 1024 dates back to 4.1c BSD Unix and was originally designed to support primitive authentication in protocols like rlogin, not to protect services broadly. Some of the oldest assigned ports, such as Echo (7), Discard (9), Daytime (13), and Chargen (19), were useful diagnostic tools in the 1980s but are now largely disabled because their UDP versions can be exploited for DDoS amplification attacks. Port 0, while technically valid in the header format, is used by operating systems as a signal to self-assign an ephemeral port, and also appears in network scanning traffic because certain systems respond to it in ways that reveal OS information.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingHacker News ·

AI Tutor Shows Strong Learning Gains in Dartmouth Course Study

A new AI tutoring system has demonstrated notable effectiveness in a Dartmouth college course, achieving an effect size between 0.71 and 1.30 standard deviations. Effect sizes in this range are generally considered large by educational research standards, suggesting meaningful improvements in student learning outcomes. The findings were presented in a paper submitted to an educational technology workshop hosted by Utrecht University in 2026. The study adds to a growing body of research exploring the potential of AI-driven tools to enhance academic performance at the university level.

0
ProgrammingDEV Community ·

PostgreSQL Replans Prepared Statements When Planner Settings Change at EXECUTE

PostgreSQL offers planner configuration parameters like enable_seqscan and enable_indexscan that shape how query execution plans are generated, not how already-planned queries run. A key question arises with prepared statements: do these settings take effect at PREPARE time, at EXECUTE time, or both? Testing with a simple tasks table and a partial index shows that when enable_indexscan is turned off before EXECUTE, PostgreSQL generates a new plan using a sequential scan instead of the previously chosen index scan. This means planner settings applied before EXECUTE can trigger replanning, overriding the plan cached at PREPARE time. Developers should be aware that changing planner parameters between prepare and execute can significantly alter query behavior and performance.

0
ProgrammingHacker News ·

Opinion: Webrings Could Help Revive the Independent Web

A recent essay published on shub.club argues that webrings remain a valuable tool for connecting independent websites and communities online. The author contends that webrings, a concept popularized in the early internet era, can help smaller sites gain visibility outside of algorithm-driven platforms. The piece suggests that modern website owners should consider joining or creating webrings to foster organic discovery and community. The argument reflects a broader conversation about reclaiming decentralized, human-curated spaces on the web.

0
ProgrammingDEV Community ·

Dev builds internal-linking system to help new tool pages rank on Google

A solo developer building an image-processing tool in public documented week 17 of their project, focusing not on new features but on SEO infrastructure. After shipping an AI background remover the previous week, they discovered the new tool's pages were orphaned — reachable via sitemap but not linked from anywhere on the site. To fix this, they replaced scattered hardcoded link lists with a single source-of-truth constant that automatically cross-links a hub page and its use-case spoke pages. The same constant also drives layout logic and populates a footer column, meaning any future spoke page requires just one line of code to be fully integrated. A React hydration error caused by invalid HTML nesting was also caught and resolved during the process.

Why TCP/UDP Port Numbers Have Gaps and Strange Origins Explained · ShortSingh