惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
C
Check Point Blog
J
Java Code Geeks
腾讯CDC
Apple Machine Learning Research
Apple Machine Learning Research
宝玉的分享
宝玉的分享
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
量子位
Google DeepMind News
Google DeepMind News
I
InfoQ
The GitHub Blog
The GitHub Blog
aimingoo的专栏
aimingoo的专栏
N
Netflix TechBlog - Medium
Hugging Face - Blog
Hugging Face - Blog
博客园 - Franky
V
V2EX
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
小众软件
小众软件
博客园_首页
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
IT之家
IT之家

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Ports
Palak Hirave · 2026-05-02 · via DEV Community

Palak Hirave

A port is a number assigned to a specific process or sevice in the network to help comuters sort and direct network traffic correctly. It works on Layer 4(Transport Layer) of the OSI model and works with protocals such as TCP and UDP. They enable the simultaneous operaton of multiple network services on a single IP adress.

When a client application initiates a connection, it specifies the destination port number corresponding to the desired service. Client applications are those who request data or services while server applications respond to those requests and provide the data or services. The OS(opperating system) then directs the incoming traffic to the correct application based on this port number.

eg. a user accesses a website: the user’s browser initiates a connection to the server's IP address on port 80(which is designated for HTTP). The server, listening on this port, responds to the request. If the user needs to access a secure site, the browser instead connects to port 443, the standard for HTTPS.

Well-Known Ports

These ports are numbers 0 to 1023 and are reserved for common and universally recognized services and protocols. They are standerdized and managed by the IANA(Internet Assigned Numbers Authority). HTTP, for example, is used for data communication for the the WWW and uses port 80. Browsers do not tend to display the port number in order to simplyify the user exerience. And HTTPS, S standing for Secure, uses port 443. FTP, used for file transfers, uses ports 20 and 21.

Registered Ports

These ports go from 1024 to 49151 and, while they are not as strictly regulated as well-known ports, they still need to be registered and assigned to specific services by the IANA. They are used for external services that users might install such as Microsoft SQL Server, which is a database service and runs of port 1433. Software companies tend to register a port for their application in order to ensure that their software consistently uses the same port no matter the system. Registration also helps in managing network traffic and preventing port conflicts across different applications.

Dynamic/Private Ports

They are also known as ephemeral ports and range form 49152 to 65535 and are majorly used by client applications to send and recive data from servers. These ports are called dynamic because they are not fixed and can be randomly selected by the client's OS as needed. They act as temporary communication sessions and get closed once the session ends. They can also be assigned to custom server applications.

Browsing Internet Example

  1. DNS Lookup - computer resolves the domain name to an IP address (eg. 93.184.216.34 for example.com)

  2. Data Encapsulation

  • Browser generates an HTTP request.
  • Request is encapsulated with TCP, specifying the destination port 80 or 443.
  • Packet includes the destination IP address (eg. 93.184.216.34.)
  • On the local network, the computer uses ARP to find the MAC address of the default gateway (router).
  1. Data Transmission
  • Data frame is sent to the router's MAC address.
  • Router forwards the packet toward the destination IP address.
  • Intermediate routers continue forwarding the packet based on the IP address.
  1. Server Processing
  • Server receives the packet and directs it to the application listening on port 80 or 443.
  • Server processes the HTTP request and sends back a response following the same path in reverse.
  1. Response Transmission
  • Server sends the response back to the client’s temporary port, which was randomly selected by the client’s operating system at the start of the session.
  • Response follows the reverse path back through the network, being directed from router to router based on the source IP address and port information until it reaches the client.

Anddd...thats all

Useful video I found to learn about ports - https://www.youtube.com/watch?v=h5vq9hFROEA