Port Addressing
What is Port Addressing?
Port addressing is a method used in networking to distinguish between multiple applications or services running on a single device. It uses port numbers to identify specific processes.
Why is Port Addressing useful?
Port addressing allows multiple network services to operate on the same machine without conflict. It enables precise delivery of data to the correct application.
How does Port Addressing work?
Port addressing uses port numbers (ranging from 0 to 65535) in combination with IP addresses. When a packet is received, the transport layer uses the destination port to route data to the correct application.
Where is Port Addressing used?
Port addressing is used in all TCP and UDP communications. It is essential for services like HTTP (port 80), HTTPS (443), FTP (21), DNS (53), and others.
Which OSI layer does Port Addressing belong to?
Port addressing operates at the Transport Layer (Layer 4) of the OSI model, where protocols like TCP and UDP manage end-to-end communication.
Is Port Addressing Windows specific?
No, port addressing is part of the transport layer protocols and is supported by all major operating systems, including Windows, Linux, and macOS.
Is Port Addressing Linux specific?
No, port addressing is a standard networking concept implemented in all operating systems that support TCP/IP networking.
Which Transport Protocol is used by Port Addressing?
Port addressing is used by both TCP and UDP, which rely on source and destination port numbers to direct traffic to the appropriate applications.
Is Port Addressing using client-server model?
Yes, in a client-server model, port addressing helps the client connect to the correct service on the server by targeting a specific port, like port 443 for HTTPS or 22 for SSH.
In this section, you are going to learn
Terminology
Version Info
setup
Port Addressing - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Valid Port Number |
Use a valid port (e.g., 80) |
Port accepted |
2 |
Port Number Too Low |
Use port number < 0 |
Error: Invalid port |
3 |
Port Number Too High |
Use port number > 65535 |
Error: Invalid port |
4 |
Reserved Port |
Use reserved port (e.g., 0) |
Error: Reserved port |
5 |
Duplicate Port |
Assign same port to two services |
Error: Port conflict |
6 |
Port Already in Use |
Try to bind to used port |
Error: Port in use |
7 |
Dynamic Port Range |
Use port in dynamic range (4915265535) |
Port accepted |
8 |
Well-Known Port |
Use port in 01023 range |
Port accepted with admin rights |
9 |
Registered Port |
Use port in 102449151 range |
Port accepted |
10 |
Port Format String |
Input port as string |
Error: Invalid format |
11 |
Port Format Float |
Input port as float |
Error: Invalid format |
12 |
Port Format Hex |
Input port in hex |
Error or convert to decimal |
13 |
Port Format Negative |
Input negative port |
Error: Invalid port |
14 |
Port Format Null |
No port provided |
Error: Port required |
15 |
Port Format Empty |
Empty string as port |
Error: Port required |
16 |
Port Format Special Char |
Port with special characters |
Error: Invalid characters |
17 |
Port Format Alphanumeric |
Port with letters |
Error: Invalid format |
18 |
Port Binding Success |
Bind to available port |
Binding successful |
19 |
Port Binding Failure |
Bind to unavailable port |
Error: Binding failed |
20 |
Port Release |
Release port after use |
Port released successfully |
21 |
Port Reuse |
Reuse released port |
Port reused successfully |
22 |
Port Timeout |
Port not released after timeout |
Error: Port still in use |
23 |
Port Scan Detection |
Detect port scan attempt |
Alert triggered |
24 |
Port Forwarding |
Forward traffic to another port |
Forwarding successful |
25 |
Port Blocking |
Block specific port |
Port blocked successfully |
26 |
Port Filtering |
Allow only specific ports |
Filtering applied |
27 |
Port Range Validation |
Validate port range input |
Range accepted or rejected |
28 |
Port Conflict Resolution |
Resolve port conflict |
Conflict resolved |
29 |
Port Logging |
Log port usage |
Logs generated |
30 |
Port Monitoring |
Monitor port activity |
Activity tracked |
31 |
Port Access Control |
Restrict access to port |
Access denied |
32 |
Port Encryption |
Secure port communication |
Encryption enabled |
33 |
Port Authentication |
Require auth for port access |
Auth enforced |
34 |
Port Mapping |
Map external to internal port |
Mapping successful |
35 |
Port NAT Traversal |
Handle NAT traversal |
Traversal successful |
36 |
Port Load Balancing |
Distribute traffic across ports |
Load balanced |
37 |
Port Failover |
Switch to backup port |
Failover successful |
38 |
Port Health Check |
Check port availability |
Port is healthy |
39 |
Port Throttling |
Limit traffic on port |
Throttling applied |
40 |
Port Flood Protection |
Detect port flooding |
Protection triggered |
41 |
Port Isolation |
Isolate port from network |
Isolation successful |
42 |
Port Redirection |
Redirect traffic to another port |
Redirection successful |
43 |
Port Protocol Match |
Match port with correct protocol |
Protocol matched |
44 |
Port Protocol Mismatch |
Use wrong protocol on port |
Error: Protocol mismatch |
45 |
Port Logging Disabled |
Disable port logging |
Logging disabled |
46 |
Port Access Log |
View access logs |
Logs displayed |
47 |
Port Usage Stats |
View usage statistics |
Stats generated |
48 |
Port Configuration Error |
Misconfigured port |
Error: Configuration issue |
49 |
Port Security Breach |
Simulate breach attempt |
Breach detected |
50 |
Port Recovery |
Recover from port failure |
Recovery successful |
Reference links