IPv4 - Internet Protocol version 4
What is IPv4?
IPv4 stands for Internet Protocol version 4. It is the fourth version of the Internet Protocol and the most widely used protocol for identifying devices on a network using a 32-bit address. Each device on a network is assigned a unique IPv4 address to enable communication.
Why is IPv4 useful?
Identifying devices on a network
Routing data between devices across networks
Enabling internet communication
How it works?
Device gets an IP address – Either manually or via DHCP.
Data is sent with IP headers – Each packet includes source and destination IPv4 addresses.
Routers forward packets – Based on the destination IP, routers direct the packet toward its target.
Target device receives data – The device with the matching IP address processes the packet.
Where is IPv4 used?
Home networks – Routers assign IPv4 addresses to phones, laptops, TVs, etc.
Enterprise networks – Servers, workstations, and printers use IPv4 for communication.
Internet – Every website, server, and online service uses IPv4 (or IPv6) to identify and communicate with devices.
Which OSI Layer does IPv4 operate at?
IPv4 operates at the Network Layer (Layer 3) of the OSI model.
It handles logical addressing and routing between different networks.
It is responsible for packet forwarding, including routing through intermediate routers.
Topics in this section,
In this section, you are going to learn
Terminology
Version Info
Version & RFC Details |
|||
---|---|---|---|
IPv4 Version |
RFC Version |
Year |
Core Idea / Contribution |
IPv4 |
|||
RFC 760 |
1980 |
First formal specification of IPv4; defined datagram format and addressing. |
|
RFC 791 |
1981 |
Replaces RFC 760; defines the modern IPv4 protocol including header structure, addressing, fragmentation. |
|
RFC 792 |
1981 |
Defines ICMP for error and control messaging. |
|
RFC 919 |
1984 |
Defines broadcasting methods in IP networks. |
|
RFC 922 |
1984 |
Defines broadcasting methods in IP networks. |
|
RFC 950 |
1985 |
Introduces subnetting for efficient IP address allocation. |
|
RFC 1122 |
1989 |
Host requirements for Internet protocols including IPv4. |
|
RFC 1812 |
1995 |
Router requirements for IPv4. |
|
RFC 1918 |
1996 |
Defines private IP address ranges. |
|
RFC 2131 |
1997 |
Defines DHCP for dynamic IP address assignment. |
|
RFC 3021 |
2000 |
Allows /31 subnets for point-to-point links. |
|
RFC 4632 |
2006 |
Classless Inter-Domain Routing (CIDR) notation and address allocation. |
Setup
Setup
IPv4 Packet
S.No |
Protocol Packets |
Description |
Size(bytes) |
---|---|---|---|
1 |
IPv4 |
42 |
|
Header |
|||
Version |
IP version (4 for IPv4) |
1 |
|
Header Length (IHL) |
length of the IP header in 32-bit words. |
1 |
|
Type of Service (ToS) |
specifying the priority of the packet. |
1 |
|
Total Length |
total length of the IP packet (header + data). |
2 |
|
Identification |
uniquely identifying the packet fragments. |
2 |
|
Flags |
controlling or identifying fragments. |
1 |
|
Fragment Offset |
offset of a fragment |
2 |
|
Time to Live (TTL) |
maximum time the packet is allowed to remain |
1 |
|
in the network. |
|||
Protocol |
specifying the next level protocol (e.g., 6=TCP,17= UDP). |
1 |
|
Header Checksum |
error-checking the header. |
2 |
|
Source IP Address |
IP address of the sender. |
4 |
|
Destination IP Address |
IP address of the receiver. |
4 |
|
Options |
variable-length field for optional settings. |
variable |
|
Data(Payload) |
actual payload carried by the IP packet. |
variable(20) |
IPv4 - Use Cases |
||
---|---|---|
S.no |
Use Case |
Description |
1 |
Internet Communication |
IPv4 is the foundational protocol for routing data across the internet using unique 32-bit addresses. |
2 |
Enterprise Networking |
Used in LANs and WANs for assigning IP addresses to devices like computers, printers, and servers. |
3 |
Web Hosting & DNS |
Websites are hosted on servers with IPv4 addresses; DNS maps domain names to these addresses. |
4 |
Network Address Translation (NAT) |
Enables multiple devices on a private network to share a single public IPv4 address. |
5 |
VPN and Remote Access |
IPv4 is used in tunneling protocols to securely connect remote users to private networks. |
6 |
IoT Device Connectivity |
Many IoT devices still rely on IPv4 for communication due to its widespread support. |
7 |
DHCP Address Assignment |
IPv4 works with DHCP to dynamically assign IP addresses to devices on a network. |
8 |
VoIP and Streaming Services |
IPv4 supports real-time data transmission for voice and video over IP networks. |
IPv4 - Basic Features |
||
---|---|---|
S.no |
Features |
Description |
1 |
Addressing |
IPv4 uses 32-bit addresses, allowing for unique identification of devices on a network. |
2 |
Header Structure |
IPv4 packets have a structured header with fields like source/destination IP, TTL, protocol, etc. |
3 |
Packet Routing |
Routers use IPv4 addresses to forward packets across networks toward their destination. |
4 |
Fragmentation |
IPv4 supports fragmentation when packets exceed the MTU of a network segment. |
5 |
Connectionless Protocol |
IPv4 does not establish a connection before sending data; each packet is independent. |
6 |
Subnetting |
Allows division of IP networks into smaller subnetworks for efficient IP management. |
7 |
NAT Compatibility |
IPv4 works with Network Address Translation to conserve public IP addresses. |
8 |
Broadcast Support |
IPv4 supports broadcasting to all devices in a subnet. |
9 |
Protocol Identification |
The header includes a field to identify the encapsulated protocol. |
10 |
TTL (Time to Live) |
Limits the lifespan of a packet to prevent infinite looping in the network. |
11 |
Classful Addressing (Legacy) |
Originally, IPv4 used fixed address classes (A, B, C, D, E), though now replaced by CIDR. |
Addressing - Testcases
Addressing - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
Assign Valid IPv4 Address |
Assign 192.168.1.10 |
Address accepted |
2 |
Assign Invalid IPv4 Address |
Assign 999.999.999.999 |
Address rejected |
3 |
Assign Broadcast Address |
Assign 192.168.1.255 |
Used for broadcast only |
4 |
Assign Network Address |
Assign 192.168.1.0 |
Reserved for network ID |
5 |
Assign Loopback Address |
Assign 127.0.0.1 |
Used for local testing |
6 |
Assign Link-Local Address |
Assign 169.254.1.1 |
Used for auto-configuration |
7 |
Assign Multicast Address |
Assign 224.0.0.1 |
Used for multicast traffic |
8 |
Assign Reserved Address |
Assign 0.0.0.0 |
Used for default route |
9 |
Assign Private Address |
Assign 10.0.0.1 |
Used in private networks |
10 |
Assign Public Address |
Assign 8.8.8.8 |
Routable on the internet |
11 |
Assign Address with Subnet Mask |
Assign 192.168.1.10/24 |
Host identified within subnet |
12 |
Assign Address with CIDR Notation |
Assign 192.168.1.10/26 |
Host identified within smaller subnet |
13 |
Assign Duplicate Address |
Assign same IP to two hosts |
IP conflict detected |
14 |
Assign Address via DHCP |
DHCP assigns IP |
Address dynamically allocated |
15 |
Assign Static IP Address |
Manually assign IP |
Address remains fixed |
16 |
Assign Address via APIPA |
No DHCP, APIPA assigns IP |
Address in 169.254.x.x range |
17 |
Assign Address via BOOTP |
Legacy protocol assigns IP |
Address allocated successfully |
18 |
Assign Address via PPP |
Point-to-point protocol assigns IP |
Address assigned dynamically |
19 |
Assign Address via VPN |
VPN assigns IP |
Address scoped to VPN |
20 |
Assign Address via NAT |
Internal IP mapped to public IP |
Address translation occurs |
21 |
Assign Address via Proxy |
Proxy assigns IP |
Address used for routing |
22 |
Assign Address via IPv4 Header |
IP set in packet header |
Address used for routing |
23 |
Assign Address with Invalid Subnet |
Assign 192.168.1.10/33 |
Subnet mask rejected |
24 |
Assign Address with Valid Subnet |
Assign 192.168.1.10/30 |
Subnet accepted |
25 |
Assign Address with Overlapping Subnet |
Two subnets overlap |
Routing conflict detected |
26 |
Assign Address with Non-overlapping Subnet |
Subnets are distinct |
No conflict |
27 |
Assign Address with Gateway |
Assign IP with default gateway |
Host can reach external networks |
28 |
Assign Address without Gateway |
No gateway assigned |
Host limited to local subnet |
29 |
Assign Address with DNS |
DNS server assigned |
Host can resolve domain names |
30 |
Assign Address without DNS |
No DNS assigned |
Host cannot resolve domains |
31 |
Assign Address with DHCP Lease Expiry |
Lease expires |
IP released or renewed |
32 |
Assign Address with DHCP Reservation |
IP reserved for MAC |
Host always gets same IP |
33 |
Assign Address with DHCP Conflict |
Two hosts request same IP |
Conflict resolved by server |
34 |
Assign Address with DHCP Relay |
Relay forwards request |
IP assigned via remote server |
35 |
Assign Address with DHCP Option 82 |
Relay agent info included |
IP assigned based on location |
36 |
Assign Address with ARP Resolution |
IP resolved to MAC |
Host reachable on LAN |
37 |
Assign Address with ARP Conflict |
Duplicate IP detected |
ARP warning triggered |
38 |
Assign Address with ICMP Echo |
Ping IP address |
Host responds if reachable |
39 |
Assign Address with ICMP Unreachable |
Ping unreachable IP |
ICMP error returned |
40 |
Assign Address with Routing Table Update |
IP added to route table |
Traffic routed correctly |
41 |
Assign Address with Static Route |
Route manually added |
Traffic follows defined path |
42 |
Assign Address with Dynamic Route |
Route learned via protocol |
Traffic routed dynamically |
43 |
Assign Address with ACL |
Access control list applied |
Traffic filtered based on IP |
44 |
Assign Address with Firewall Rule |
IP allowed/blocked |
Traffic permitted or denied |
45 |
Assign Address with NAT Overload |
Many IPs mapped to one |
Port-based translation used |
46 |
Assign Address with NAT Pool |
IPs assigned from pool |
Address allocated dynamically |
47 |
Assign Address with IPsec Tunnel |
IP used in secure tunnel |
Traffic encrypted |
48 |
Assign Address with QoS Policy |
IP prioritized |
Traffic shaped accordingly |
49 |
Assign Address with SNMP Monitoring |
IP monitored via SNMP |
Status and usage tracked |
50 |
Assign Address with Logging Enabled |
IP assignment logged |
Event recorded for audit |
Header Structure - Testcases
Header Structure - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
Valid IPv4 Header |
All fields correctly set |
Packet accepted |
2 |
Invalid Version Field |
Version ? 4 |
Packet dropped |
3 |
Valid IHL Field |
IHL = 5 (20 bytes) |
Header accepted |
4 |
Invalid IHL Field |
IHL < 5 |
Packet dropped |
5 |
Valid Total Length |
Length ? header + data |
Packet accepted |
6 |
Invalid Total Length |
Length < header size |
Packet dropped |
7 |
Valid Identification Field |
Unique ID set |
Used for fragmentation |
8 |
Duplicate Identification Field |
Same ID reused |
May cause reassembly issues |
9 |
Valid Flags Field |
DF or MF set correctly |
Fragmentation behavior respected |
10 |
Invalid Flags Field |
Reserved bit set |
Packet dropped or logged |
11 |
Valid Fragment Offset |
Offset aligned to 8 bytes |
Packet accepted |
12 |
Invalid Fragment Offset |
Misaligned offset |
Packet dropped |
13 |
Valid TTL Field |
TTL > 0 |
Packet forwarded |
14 |
TTL = 0 |
TTL expired |
ICMP Time Exceeded sent |
15 |
TTL Decrement |
TTL decremented by each router |
Packet dropped if TTL = 0 |
16 |
Valid Protocol Field |
Protocol = TCP/UDP/ICMP |
Packet processed accordingly |
17 |
Unknown Protocol Field |
Unsupported protocol |
Packet dropped |
18 |
Valid Header Checksum |
Correct checksum |
Packet accepted |
19 |
Invalid Header Checksum |
Corrupted checksum |
Packet dropped |
20 |
Header Checksum Recalculation |
After TTL decrement |
Checksum updated |
21 |
Valid Source IP Address |
Proper IPv4 address |
Packet accepted |
22 |
Invalid Source IP Address |
0.0.0.0 or broadcast |
Packet dropped |
23 |
Valid Destination IP Address |
Proper IPv4 address |
Packet routed |
24 |
Invalid Destination IP Address |
255.255.255.255 |
Packet broadcasted |
25 |
Valid Options Field |
Options present, IHL > 5 |
Packet accepted |
26 |
Invalid Options Field |
Malformed options |
Packet dropped |
27 |
No Options Field |
IHL = 5 |
Standard header |
28 |
Padding Present |
Padding added to align header |
Packet accepted |
29 |
Padding Missing |
Misaligned header |
Packet dropped |
30 |
Header Length Mismatch |
IHL ? actual header size |
Packet dropped |
31 |
Header with Timestamp Option |
Timestamp option set |
Router logs timestamp |
32 |
Header with Record Route Option |
Route recorded |
Intermediate routers append IPs |
33 |
Header with Source Route Option |
Strict/loose source routing |
Packet follows specified path |
34 |
Header with Security Option |
Security level set |
Used in classified networks |
35 |
Header with Router Alert Option |
Routers inspect packet |
Used for RSVP, IGMP |
36 |
Header with End of Option List |
Properly terminated options |
Packet accepted |
37 |
Header with No Operation Option |
Padding between options |
Packet accepted |
38 |
Header with Invalid Option Code |
Unknown option |
Packet dropped or ignored |
39 |
Header with Overlapping Options |
Options overlap |
Packet dropped |
40 |
Header with Excessive Options |
IHL > 15 |
Packet dropped |
41 |
Header with Reserved Bits Set |
Reserved bits ? 0 |
Packet dropped or logged |
42 |
Header with All Fields Zero |
Empty header |
Packet dropped |
43 |
Header with Max Total Length |
65535 bytes |
Packet accepted if supported |
44 |
Header with Min Total Length |
20 bytes |
Header only, no data |
45 |
Header with Fragmented Packet |
MF set, offset > 0 |
Reassembly required |
46 |
Header with Last Fragment |
MF = 0, offset > 0 |
Final fragment |
47 |
Header with First Fragment |
MF = 1, offset = 0 |
First fragment |
48 |
Header with Non-Fragmented Packet |
MF = 0, offset = 0 |
Single packet |
49 |
Header with DF Set and Large Packet |
DF = 1, size > MTU |
ICMP Fragmentation Needed sent |
50 |
Header with DF Cleared and Large Packet |
DF = 0, size > MTU |
Packet fragmented |
Packet Routing - Testcases
Packet Routing - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
Route to Directly Connected Network |
Destination in local subnet |
Packet delivered directly |
2 |
Route to Remote Network |
Destination outside local subnet |
Packet forwarded to next hop |
3 |
No Route to Host |
Destination not in routing table |
ICMP Destination Unreachable sent |
4 |
Default Route Present |
No specific route, default exists |
Packet forwarded via default gateway |
5 |
Default Route Missing |
No specific or default route |
Packet dropped |
6 |
Static Route Configured |
Manual route entry |
Packet follows static route |
7 |
Dynamic Route Learned |
Route via OSPF/RIP |
Packet follows dynamic route |
8 |
Multiple Routes to Destination |
Equal-cost paths |
Load balancing or ECMP used |
9 |
Route with Lower Metric |
Multiple routes, different metrics |
Packet follows lowest metric route |
10 |
Route with Administrative Distance |
Conflicting routes |
Route with lowest AD used |
11 |
TTL = 1 |
TTL expires at router |
ICMP Time Exceeded sent |
12 |
TTL > 1 |
TTL decremented, packet forwarded |
Packet continues routing |
13 |
TTL = 0 |
Packet arrives with TTL 0 |
Packet dropped |
14 |
Packet Fragmented |
Size > MTU, DF not set |
Packet fragmented and forwarded |
15 |
Packet with DF Set and Size > MTU |
DF = 1, size too large |
ICMP Fragmentation Needed sent |
16 |
Packet with Valid Checksum |
Header checksum correct |
Packet forwarded |
17 |
Packet with Invalid Checksum |
Header checksum incorrect |
Packet dropped |
18 |
Packet with Loopback Address |
Destination = 127.0.0.1 |
Packet not routed |
19 |
Packet with Broadcast Address |
Destination = 255.255.255.255 |
Packet broadcasted locally |
20 |
Packet with Multicast Address |
Destination = 224.0.0.1 |
Routed to multicast group members |
21 |
Packet with Private Address |
Destination = 192.168.x.x |
Routed within private network |
22 |
Packet with Public Address |
Destination = 8.8.8.8 |
Routed to internet |
23 |
Packet with NAT Translation |
Source/destination translated |
Packet routed post-translation |
24 |
Packet with PAT Translation |
Port-based NAT applied |
Routed with port mapping |
25 |
Packet with Policy-Based Routing |
Route based on policy |
Packet follows policy route |
26 |
Packet with ACL Deny |
ACL blocks destination |
Packet dropped |
27 |
Packet with ACL Permit |
ACL allows destination |
Packet forwarded |
28 |
Packet with QoS Tag |
DSCP/ToS set |
Packet prioritized in routing |
29 |
Packet with Routing Loop |
TTL expires in loop |
ICMP Time Exceeded sent |
30 |
Packet with ICMP Redirect |
Better route exists |
Host updates route |
31 |
Packet with Source Routing Option |
Strict/loose source route |
Packet follows specified path |
32 |
Packet with Invalid Source IP |
Source = 0.0.0.0 |
Packet dropped |
33 |
Packet with Invalid Destination IP |
Destination = 0.0.0.0 |
Packet dropped |
34 |
Packet with Unreachable Next Hop |
Next hop not reachable |
ICMP Destination Unreachable sent |
35 |
Packet with ARP Resolution |
MAC resolved for next hop |
Packet forwarded |
36 |
Packet with ARP Failure |
No MAC for next hop |
Packet queued or dropped |
37 |
Packet with VRRP Gateway |
Virtual gateway used |
Packet routed via active router |
38 |
Packet with HSRP Gateway |
Hot standby router used |
Packet routed via active router |
39 |
Packet with BGP Route |
Route learned via BGP |
Packet routed to external network |
40 |
Packet with OSPF Route |
Route learned via OSPF |
Packet routed internally |
41 |
Packet with RIP Route |
Route learned via RIP |
Packet routed with hop count |
42 |
Packet with Static and Dynamic Route |
Both exist |
Static route preferred |
43 |
Packet with Route Flap |
Route changes frequently |
Packet may be dropped or delayed |
44 |
Packet with Converged Route |
Routing table stable |
Packet routed normally |
45 |
Packet with Blackhole Route |
Route to null interface |
Packet dropped silently |
46 |
Packet with Loop Prevention |
TTL or split horizon used |
Loop avoided |
47 |
Packet with Route Redistribution |
Between protocols |
Packet routed across domains |
48 |
Packet with Route Summarization |
Aggregated route used |
Packet routed efficiently |
49 |
Packet with Route Filtering |
Route denied by filter |
Packet dropped |
50 |
Packet with Route Preference Change |
Admin distance updated |
Packet follows new preferred route |
Fragmentation - Testcases
Fragmentation - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
Packet Size > MTU, DF = 0 |
Fragmentation allowed |
Packet is fragmented |
2 |
Packet Size > MTU, DF = 1 |
Fragmentation not allowed |
ICMP Fragmentation Needed sent |
3 |
Packet Size ? MTU |
No fragmentation needed |
Packet forwarded as-is |
4 |
First Fragment Sent |
Offset = 0, MF = 1 |
Router forwards first fragment |
5 |
Middle Fragment Sent |
Offset > 0, MF = 1 |
Router forwards middle fragment |
6 |
Last Fragment Sent |
MF = 0 |
Router forwards last fragment |
7 |
All Fragments Received |
All fragments arrive |
Host reassembles packet |
8 |
Missing Fragment |
One fragment lost |
Reassembly fails, packet dropped |
9 |
Fragment Timeout |
Fragments delayed |
Reassembly times out, packet dropped |
10 |
Overlapping Fragments |
Fragments overlap |
Host handles or drops based on policy |
11 |
Fragment Offset Not Multiple of 8 |
Misaligned offset |
Packet dropped |
12 |
Fragment Offset = 0 |
First fragment |
Reassembly starts |
13 |
Fragment Offset > 0 |
Not first fragment |
Waits for earlier fragments |
14 |
MF Bit Set |
More fragments follow |
Host waits for next fragment |
15 |
MF Bit Cleared |
Last fragment |
Host completes reassembly |
16 |
Fragmented Packet with Valid Checksum |
Checksum correct |
Packet accepted |
17 |
Fragmented Packet with Invalid Checksum |
Checksum incorrect |
Packet dropped |
18 |
Fragmented Packet with TTL = 1 |
TTL expires |
ICMP Time Exceeded sent |
19 |
Fragmented Packet with TTL > 1 |
TTL decremented |
Packet forwarded |
20 |
Fragmented Packet with Options |
Options in first fragment |
Options processed |
21 |
Fragmented Packet with Options in Middle Fragment |
Options missing |
Packet dropped |
22 |
Fragmented Packet with Padding |
Padding present |
Packet accepted |
23 |
Fragmented Packet with No Padding |
Misaligned data |
Packet dropped |
24 |
Fragmented Packet with Duplicate Fragments |
Same fragment resent |
Host handles gracefully |
25 |
Fragmented Packet with Out-of-Order Fragments |
Fragments arrive out of order |
Host reassembles correctly |
26 |
Fragmented Packet with Reassembly Buffer Overflow |
Too many fragments |
Packet dropped |
27 |
Fragmented Packet with Reassembly Buffer Exhaustion |
Multiple packets reassembling |
Some packets dropped |
28 |
Fragmented Packet with Source Routing |
Source route option |
Routing follows specified path |
29 |
Fragmented Packet with Record Route |
Route recorded |
Option processed in first fragment |
30 |
Fragmented Packet with Timestamp Option |
Timestamp recorded |
Option processed in first fragment |
31 |
Fragmented Packet with Invalid Header Length |
IHL incorrect |
Packet dropped |
32 |
Fragmented Packet with Invalid Total Length |
Length mismatch |
Packet dropped |
33 |
Fragmented Packet with Reserved Flags Set |
Reserved bit = 1 |
Packet dropped |
34 |
Fragmented Packet with Unknown Protocol |
Protocol not supported |
Packet dropped |
35 |
Fragmented Packet with Loopback Address |
Destination = 127.0.0.1 |
Packet not routed |
36 |
Fragmented Packet with Broadcast Address |
Destination = 255.255.255.255 |
Packet broadcasted |
37 |
Fragmented Packet with Multicast Address |
Destination = 224.0.0.1 |
Packet forwarded to group |
38 |
Fragmented Packet with Private Address |
Destination = 192.168.x.x |
Routed within private network |
39 |
Fragmented Packet with Public Address |
Destination = 8.8.8.8 |
Routed to internet |
40 |
Fragmented Packet with NAT |
Translated IP |
Fragments handled by NAT device |
41 |
Fragmented Packet with PAT |
Port-based NAT |
Reassembly before translation |
42 |
Fragmented Packet with Firewall |
Firewall inspects fragments |
Policy applied per fragment |
43 |
Fragmented Packet with IDS/IPS |
Security device inspects fragments |
Reassembly for inspection |
44 |
Fragmented Packet with VPN |
Encrypted tunnel |
Fragmentation handled before encryption |
45 |
Fragmented Packet with MPLS |
MPLS label added |
Fragmentation handled before encapsulation |
46 |
Fragmented Packet with QoS |
DSCP marked |
QoS applied per fragment |
47 |
Fragmented Packet with Logging Enabled |
Logging active |
Fragmentation events logged |
48 |
Fragmented Packet with ICMP Error |
Error in fragment |
ICMP sent to source |
49 |
Fragmented Packet with Reassembly Success |
All fragments arrive |
Original packet reconstructed |
50 |
Fragmented Packet with Reassembly Failure |
One or more fragments lost |
Packet dropped, ICMP may be sent |
Connectionless Protocol - Testcases
Connectionless Protocol - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
Send Packet Without Handshake |
No session setup |
Packet transmitted immediately |
2 |
Send Packet to Unreachable Host |
No connection check |
Packet sent, ICMP error may return |
3 |
Send Packet Without Acknowledgment |
No ACK expected |
Sender does not wait for response |
4 |
Send Packet to Closed Port |
No session awareness |
ICMP Port Unreachable may be returned |
5 |
Send Packet with No State Tracking |
Stateless delivery |
Router does not track session |
6 |
Send Packet with No Retransmission |
Packet lost |
No automatic retry |
7 |
Send Packet with No Flow Control |
High traffic |
No congestion management by IPv4 |
8 |
Send Packet with No Ordering |
Multiple packets sent |
May arrive out of order |
9 |
Send Packet with No Delivery Guarantee |
Packet dropped |
No recovery mechanism |
10 |
Send Packet to Broadcast Address |
One-to-many delivery |
No connection to each host |
11 |
Send Packet to Multicast Address |
One-to-group delivery |
No session with group members |
12 |
Send Packet with No Session Teardown |
No FIN or RST |
No connection closure needed |
13 |
Send Packet with No Keepalive |
No periodic messages |
No connection maintenance |
14 |
Send Packet with No Handshake Delay |
Immediate transmission |
Low latency |
15 |
Send Packet with No Congestion Avoidance |
Network congested |
IPv4 does not throttle |
16 |
Send Packet with No Error Recovery |
Packet corrupted |
No retransmission |
17 |
Send Packet with No Sequence Number |
No tracking of order |
Receiver must handle ordering |
18 |
Send Packet with No Acknowledgment Number |
No ACK field |
Stateless communication |
19 |
Send Packet with No Session ID |
No unique session identifier |
Stateless routing |
20 |
Send Packet with No Connection Timeout |
No timeout tracking |
Stateless behavior |
21 |
Send Packet with No Session Establishment |
No SYN or handshake |
Stateless delivery |
22 |
Send Packet with No Session Termination |
No FIN or teardown |
Stateless delivery |
23 |
Send Packet with No Session Recovery |
Session interrupted |
No recovery mechanism |
24 |
Send Packet with No Session Persistence |
No session memory |
Stateless per packet |
25 |
Send Packet with No Session Authentication |
No identity check |
No built-in security |
26 |
Send Packet with No Session Encryption |
No encryption |
Plaintext delivery |
27 |
Send Packet with No NAT Awareness |
NAT modifies IP |
IPv4 unaware of session state |
28 |
Send Packet with No Firewall Session Tracking |
Stateless firewall |
Filters per packet |
29 |
Send Packet with No Load Balancer Affinity |
Stateless load balancing |
Packets may go to different servers |
30 |
Send Packet with No Application Layer Awareness |
IPv4 unaware of app state |
Stateless delivery |
31 |
Send Packet with No Transport Layer Coordination |
IPv4 independent of TCP/UDP |
Stateless delivery |
32 |
Send Packet with No Session Logs |
No session tracking |
Logs only per packet |
33 |
Send Packet with No Session Metrics |
No session stats |
Only packet-level metrics |
34 |
Send Packet with No Session Timeout Handling |
No timeout logic |
Stateless delivery |
35 |
Send Packet with No Session Reuse |
Each packet independent |
No reuse of state |
36 |
Send Packet with No Session Negotiation |
No negotiation of parameters |
Stateless delivery |
37 |
Send Packet with No Session Buffering |
No buffering |
Immediate forwarding |
38 |
Send Packet with No Session Synchronization |
No sync between sender/receiver |
Stateless delivery |
39 |
Send Packet with No Session Monitoring |
No session health check |
Stateless delivery |
40 |
Send Packet with No Session Redundancy |
No failover |
Packet lost if path fails |
41 |
Send Packet with No Session Multiplexing |
No session ID |
No multiplexing at IPv4 level |
42 |
Send Packet with No Session Fragmentation Awareness |
Fragmented packets |
Reassembly at receiver only |
43 |
Send Packet with No Session Compression |
No compression |
Full-size packets |
44 |
Send Packet with No Session Prioritization |
No QoS at session level |
All packets treated equally |
45 |
Send Packet with No Session Replay Protection |
No anti-replay |
Stateless delivery |
46 |
Send Packet with No Session Integrity Check |
No end-to-end integrity |
Only header checksum |
47 |
Send Packet with No Session Authentication |
No identity verification |
Stateless delivery |
48 |
Send Packet with No Session Authorization |
No access control |
Stateless delivery |
49 |
Send Packet with No Session Accounting |
No usage tracking |
Stateless delivery |
50 |
Send Packet with No Session Lifecycle |
No session start/end |
Stateless per packet |
Subnetting - Testcases
Subnetting - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
Create Subnet with /24 |
Subnet mask 255.255.255.0 |
256 IPs, 254 usable |
2 |
Create Subnet with /30 |
Subnet mask 255.255.255.252 |
4 IPs, 2 usable |
3 |
Create Subnet with /32 |
Single host subnet |
Only one usable IP |
4 |
Create Subnet with /16 |
Subnet mask 255.255.0.0 |
65,536 IPs, 65,534 usable |
5 |
Create Subnet with /8 |
Subnet mask 255.0.0.0 |
16,777,216 IPs |
6 |
Invalid Subnet Mask /33 |
Beyond IPv4 range |
Subnet rejected |
7 |
Overlapping Subnets |
Two subnets share IPs |
Routing conflict detected |
8 |
Non-overlapping Subnets |
Distinct IP ranges |
No conflict |
9 |
Subnet with Reserved IPs |
Includes 0.0.0.0 or 255.255.255.255 |
Reserved IPs excluded |
10 |
Subnet with Private IP Range |
192.168.0.0/16 |
Valid private subnet |
11 |
Subnet with Public IP Range |
8.8.8.0/24 |
Routable on internet |
12 |
Subnet with Broadcast Address |
Last IP in subnet |
Used for broadcast only |
13 |
Subnet with Network Address |
First IP in subnet |
Reserved for network ID |
14 |
Subnet with Valid Gateway |
Assign gateway IP |
Host can reach external networks |
15 |
Subnet with Invalid Gateway |
Gateway outside subnet |
Routing fails |
16 |
Subnet with DHCP Scope |
DHCP assigns IPs within subnet |
Dynamic allocation works |
17 |
Subnet with Static IPs |
Manual IP assignment |
IPs remain fixed |
18 |
Subnet with VLAN Tagging |
Subnet scoped to VLAN |
Traffic isolated per VLAN |
19 |
Subnet with NAT |
Internal subnet mapped to public IP |
Address translation occurs |
20 |
Subnet with ACL |
Access control applied |
Traffic filtered by subnet |
21 |
Subnet with Firewall Rules |
Rules applied to subnet |
Traffic permitted or denied |
22 |
Subnet with Routing Table Entry |
Subnet added to route table |
Traffic routed correctly |
23 |
Subnet with Static Route |
Manual route to subnet |
Traffic follows defined path |
24 |
Subnet with Dynamic Route |
Learned via protocol |
Traffic routed dynamically |
25 |
Subnet with CIDR Notation |
Subnet defined as /27 |
32 IPs, 30 usable |
26 |
Subnet with Subnet Zero |
First subnet used |
Allowed in modern networks |
27 |
Subnet with All-Ones Subnet |
Last subnet used |
Allowed in modern networks |
28 |
Subnet with Class A Address |
10.0.0.0/8 |
Valid private subnet |
29 |
Subnet with Class B Address |
172.16.0.0/12 |
Valid private subnet |
30 |
Subnet with Class C Address |
192.168.1.0/24 |
Valid private subnet |
31 |
Subnet with Class D Address |
224.0.0.0/4 |
Reserved for multicast |
32 |
Subnet with Class E Address |
240.0.0.0/4 |
Reserved for experimental use |
33 |
Subnet with Loopback Address |
127.0.0.0/8 |
Used for local testing |
34 |
Subnet with Link-Local Address |
169.254.0.0/16 |
Used for auto-configuration |
35 |
Subnet with Fragmented Packets |
MTU exceeded |
Packet fragmented within subnet |
36 |
Subnet with ARP Resolution |
MAC resolved for IP |
Host reachable on LAN |
37 |
Subnet with ARP Conflict |
Duplicate IP detected |
Warning triggered |
38 |
Subnet with ICMP Echo |
Ping IP in subnet |
Host responds if reachable |
39 |
Subnet with ICMP Unreachable |
Ping unreachable IP |
ICMP error returned |
40 |
Subnet with SNMP Monitoring |
Subnet monitored |
Usage and status tracked |
41 |
Subnet with Logging Enabled |
Events logged |
IP assignments recorded |
42 |
Subnet with VPN |
Subnet scoped to VPN |
Traffic isolated and encrypted |
43 |
Subnet with MPLS |
Subnet tunneled via MPLS |
Efficient routing |
44 |
Subnet with QoS Policy |
Traffic prioritized |
Bandwidth managed per subnet |
45 |
Subnet with Load Balancer |
IPs distributed across servers |
Traffic balanced |
46 |
Subnet with Failover |
Redundant gateway |
Traffic rerouted on failure |
47 |
Subnet with IPv6 Transition |
Dual-stack configuration |
IPv4 subnet coexists with IPv6 |
48 |
Subnet with DNS Integration |
DNS resolves IPs in subnet |
Hostnames mapped correctly |
49 |
Subnet with Routing Loop |
Misconfigured routes |
TTL expires, ICMP sent |
50 |
Subnet with Route Summarization |
Multiple subnets aggregated |
Efficient routing table entry |
NAT Compatibility - Testcases
NAT Compatibility - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
Basic NAT Translation |
Private IP translated to public IP |
Packet forwarded with new source IP |
2 |
Static NAT Mapping |
One-to-one IP mapping |
Always uses same public IP |
3 |
Dynamic NAT Mapping |
IP from pool assigned |
IP assigned dynamically |
4 |
PAT (NAT Overload) |
Multiple private IPs share one public IP |
Port numbers used for differentiation |
5 |
NAT with TCP Traffic |
TCP session initiated |
NAT tracks and translates session |
6 |
NAT with UDP Traffic |
UDP datagram sent |
NAT translates and maintains mapping |
7 |
NAT with ICMP Echo Request |
Ping sent |
NAT translates ICMP identifiers |
8 |
NAT with ICMP Error Message |
ICMP error returned |
NAT translates embedded IP header |
9 |
NAT with FTP Active Mode |
Control and data channels used |
NAT handles embedded IP in payload |
10 |
NAT with FTP Passive Mode |
Client initiates data connection |
NAT handles port mapping |
11 |
NAT with SIP Protocol |
VoIP session initiated |
NAT handles dynamic port allocation |
12 |
NAT with H.323 Protocol |
Video call initiated |
NAT handles multiple ports and IPs |
13 |
NAT with DNS Query |
DNS request sent |
NAT translates source IP |
14 |
NAT with DNS Response |
DNS reply received |
NAT maps response to correct client |
15 |
NAT with VPN Tunnel |
IPsec tunnel initiated |
NAT-T (NAT Traversal) required |
16 |
NAT with GRE Tunnel |
GRE encapsulated traffic |
NAT must support GRE |
17 |
NAT with PPTP Tunnel |
VPN using PPTP |
NAT handles control and data channels |
18 |
NAT with IP Fragmentation |
Fragmented packet sent |
NAT reassembles before translation |
19 |
NAT with Large Packet |
Packet > MTU |
NAT fragments or drops if DF set |
20 |
NAT with TTL Expiry |
TTL = 1 |
NAT decrements TTL and sends ICMP |
21 |
NAT with Port Exhaustion |
All ports used |
New connections dropped |
22 |
NAT with Port Reuse |
Same port reused for different IPs |
NAT tracks sessions separately |
23 |
NAT with Session Timeout |
Inactive session |
Mapping removed after timeout |
24 |
NAT with Persistent Mapping |
Session kept alive |
Mapping retained |
25 |
NAT with Asymmetric Routing |
Return path bypasses NAT |
Response dropped |
26 |
NAT with Load Balancer |
NAT behind load balancer |
Mapping maintained per flow |
27 |
NAT with Firewall |
NAT and firewall coexist |
Rules applied post-translation |
28 |
NAT with ACL |
Access control on translated IPs |
ACLs applied to public IPs |
29 |
NAT with Logging Enabled |
NAT events logged |
Translation entries recorded |
30 |
NAT with SNMP Monitoring |
NAT table monitored |
Entries visible via SNMP |
31 |
NAT with Static Port Mapping |
Specific port mapped |
Always uses same external port |
32 |
NAT with Dynamic Port Mapping |
Port assigned dynamically |
Port changes per session |
33 |
NAT with Overlapping Subnets |
Same private IPs in different sites |
NAT differentiates by interface |
34 |
NAT with Dual Stack (IPv4/IPv6) |
IPv4 NAT only |
IPv6 bypasses NAT |
35 |
NAT with Hairpinning |
Internal host accesses another via public IP |
NAT redirects internally |
36 |
NAT with Loopback Traffic |
Host accesses itself via public IP |
NAT handles loopback correctly |
37 |
NAT with DNS ALG |
DNS ALG enabled |
Embedded IPs rewritten |
38 |
NAT with SIP ALG |
SIP ALG enabled |
SIP headers rewritten |
39 |
NAT with Application Proxy |
Proxy handles session |
NAT sees only proxy IP |
40 |
NAT with Port Forwarding |
External port mapped to internal host |
Traffic redirected correctly |
41 |
NAT with DMZ Host |
All ports forwarded to one host |
Host receives all unsolicited traffic |
42 |
NAT with Multiple Interfaces |
NAT on multiple WAN links |
Mapping per interface |
43 |
NAT with Failover |
Primary link fails |
NAT continues on backup link |
44 |
NAT with Redundancy |
Stateful failover |
NAT table synced between devices |
45 |
NAT with High Availability |
Active/standby NAT |
Seamless transition |
46 |
NAT with QoS |
Traffic prioritized |
NAT preserves QoS markings |
47 |
NAT with IPv4 Broadcast |
Broadcast sent |
NAT does not forward broadcast |
48 |
NAT with Multicast |
Multicast sent |
NAT may not support multicast |
49 |
NAT with ICMP Redirect |
Redirect received |
NAT ignores or drops |
50 |
NAT with Fragmented ICMP |
ICMP fragmented |
NAT reassembles before translation |
Broadcast Support - Testcases
Broadcast Support - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
Send Limited Broadcast |
Destination = 255.255.255.255 |
Packet delivered to all hosts on local network |
2 |
Send Directed Broadcast |
Destination = subnet broadcast (e.g., 192.168.1.255) |
Packet delivered to all hosts in subnet |
3 |
Send Broadcast with Valid Source |
Source IP is valid |
Packet accepted by receivers |
4 |
Send Broadcast with Invalid Source |
Source IP = 0.0.0.0 |
Packet dropped |
5 |
Broadcast Packet with TTL = 1 |
TTL expires after one hop |
Packet not forwarded |
6 |
Broadcast Packet with TTL > 1 |
TTL > 1 |
Packet still not forwarded (broadcasts not routed) |
7 |
Broadcast Packet with UDP |
UDP datagram broadcasted |
All hosts receive |
8 |
Broadcast Packet with TCP |
TCP not typically used |
Packet dropped or ignored |
9 |
Broadcast Packet with ICMP |
ICMP Echo Request to broadcast |
May be dropped by hosts |
10 |
Broadcast Packet with ARP |
ARP request broadcasted |
All hosts on LAN receive |
11 |
Broadcast Packet with DHCP Discover |
DHCP Discover sent |
All DHCP servers receive |
12 |
Broadcast Packet with BOOTP |
BOOTP request broadcasted |
Server responds if available |
13 |
Broadcast Packet with NetBIOS |
NetBIOS name query broadcasted |
All Windows hosts respond |
14 |
Broadcast Packet with SNMP Trap |
Trap sent to broadcast address |
All SNMP listeners receive |
15 |
Broadcast Packet with Custom App |
App sends UDP broadcast |
All listening clients receive |
16 |
Broadcast Packet with VLAN |
Broadcast scoped to VLAN |
Only VLAN members receive |
17 |
Broadcast Packet with Trunk Port |
Tagged broadcast |
Forwarded to correct VLANs |
18 |
Broadcast Packet with Access Port |
Untagged broadcast |
Forwarded within VLAN |
19 |
Broadcast Packet with ACL Permit |
ACL allows broadcast |
Packet forwarded |
20 |
Broadcast Packet with ACL Deny |
ACL blocks broadcast |
Packet dropped |
21 |
Broadcast Packet with Firewall |
Firewall allows broadcast |
Packet forwarded |
22 |
Broadcast Packet Blocked by Firewall |
Firewall blocks broadcast |
Packet dropped |
23 |
Broadcast Packet with NAT |
NAT device receives broadcast |
Packet not translated or forwarded |
24 |
Broadcast Packet with Router |
Router receives broadcast |
Packet not forwarded to other networks |
25 |
Broadcast Packet with Switch |
Switch floods broadcast |
All ports receive except source |
26 |
Broadcast Packet with Hub |
Hub repeats broadcast |
All ports receive |
27 |
Broadcast Packet with Wireless AP |
Broadcast sent over Wi-Fi |
All wireless clients receive |
28 |
Broadcast Packet with VPN |
Broadcast sent over VPN |
May not be forwarded |
29 |
Broadcast Packet with MPLS |
MPLS network |
Broadcast not supported |
30 |
Broadcast Packet with IPv6 |
IPv6 used |
Broadcast not supported (uses multicast) |
31 |
Broadcast Packet with Logging Enabled |
Logging active |
Broadcast events logged |
32 |
Broadcast Packet with Monitoring Tool |
Tool captures broadcast |
Packet visible in capture |
33 |
Broadcast Packet with Packet Sniffer |
Wireshark running |
Broadcast packet captured |
34 |
Broadcast Packet with Loopback Interface |
Sent to 127.0.0.1 |
Packet not broadcasted |
35 |
Broadcast Packet with Broadcast Storm |
Excessive broadcasts |
Network congestion occurs |
36 |
Broadcast Packet with Rate Limiting |
Broadcasts throttled |
Excess packets dropped |
37 |
Broadcast Packet with Storm Control |
Switch limits broadcast rate |
Excess packets dropped |
38 |
Broadcast Packet with QoS |
QoS policy applied |
Broadcasts prioritized or limited |
39 |
Broadcast Packet with Fragmentation |
Large broadcast fragmented |
Reassembled at receiver |
40 |
Broadcast Packet with Invalid Checksum |
Corrupted header |
Packet dropped |
41 |
Broadcast Packet with IP Options |
Options present |
Packet processed if supported |
42 |
Broadcast Packet with Source Routing |
Source route option |
Packet dropped or ignored |
43 |
Broadcast Packet with TTL = 0 |
TTL expired |
Packet dropped immediately |
44 |
Broadcast Packet with ICMP Redirect |
Sent to broadcast |
Packet dropped |
45 |
Broadcast Packet with DHCP Relay |
Relay agent forwards |
Packet unicast to DHCP server |
46 |
Broadcast Packet with Proxy ARP |
Proxy responds |
Host receives reply |
47 |
Broadcast Packet with Duplicate IP Detection |
ARP probe broadcasted |
Conflict detected if IP in use |
48 |
Broadcast Packet with Gratuitous ARP |
ARP broadcasted without request |
Used for IP conflict detection |
49 |
Broadcast Packet with Wake-on-LAN |
Magic packet broadcasted |
Target device wakes up |
50 |
Broadcast Packet with Legacy Protocol |
NetBEUI or similar |
Broadcast used for discovery |
Protocol Identification - Testcases
Protocol Identification - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
Protocol = 1 (ICMP) |
IPv4 packet with ICMP |
Routed to ICMP handler |
2 |
Protocol = 6 (TCP) |
IPv4 packet with TCP |
Routed to TCP stack |
3 |
Protocol = 17 (UDP) |
IPv4 packet with UDP |
Routed to UDP stack |
4 |
Protocol = 2 (IGMP) |
IPv4 packet with IGMP |
Routed to IGMP handler |
5 |
Protocol = 89 (OSPF) |
IPv4 packet with OSPF |
Routed to OSPF process |
6 |
Protocol = 47 (GRE) |
IPv4 packet with GRE |
Routed to GRE tunnel handler |
7 |
Protocol = 50 (ESP) |
IPv4 packet with IPsec ESP |
Routed to IPsec stack |
8 |
Protocol = 51 (AH) |
IPv4 packet with IPsec AH |
Routed to IPsec stack |
9 |
Protocol = 132 (SCTP) |
IPv4 packet with SCTP |
Routed to SCTP stack |
10 |
Protocol = 115 (L2TP) |
IPv4 packet with L2TP |
Routed to L2TP handler |
11 |
Protocol = 0 |
Reserved value |
Packet dropped or logged |
12 |
Protocol = 255 |
Reserved for testing |
Packet dropped or logged |
13 |
Protocol = Unknown Value |
Unsupported protocol |
Packet dropped |
14 |
Protocol = 6 with Invalid TCP Header |
Malformed TCP |
Packet dropped |
15 |
Protocol = 17 with Invalid UDP Header |
Malformed UDP |
Packet dropped |
16 |
Protocol = 1 with Echo Request |
ICMP Echo Request |
ICMP reply generated |
17 |
Protocol = 1 with Destination Unreachable |
ICMP error |
Routed to ICMP handler |
18 |
Protocol = 6 with SYN Packet |
TCP handshake |
Routed to TCP stack |
19 |
Protocol = 6 with FIN Packet |
TCP termination |
Routed to TCP stack |
20 |
Protocol = 17 with DNS Query |
UDP DNS request |
Routed to DNS service |
21 |
Protocol = 17 with DHCP Discover |
UDP broadcast |
Routed to DHCP server |
22 |
Protocol = 6 with HTTP Traffic |
TCP port 80 |
Routed to web server |
23 |
Protocol = 6 with HTTPS Traffic |
TCP port 443 |
Routed to TLS handler |
24 |
Protocol = 6 with FTP Traffic |
TCP port 21 |
Routed to FTP server |
25 |
Protocol = 6 with SSH Traffic |
TCP port 22 |
Routed to SSH daemon |
26 |
Protocol = 6 with SMTP Traffic |
TCP port 25 |
Routed to mail server |
27 |
Protocol = 6 with POP3 Traffic |
TCP port 110 |
Routed to mail client |
28 |
Protocol = 6 with IMAP Traffic |
TCP port 143 |
Routed to mail client |
29 |
Protocol = 6 with Telnet Traffic |
TCP port 23 |
Routed to Telnet server |
30 |
Protocol = 6 with RDP Traffic |
TCP port 3389 |
Routed to RDP service |
31 |
Protocol = 6 with SQL Traffic |
TCP port 1433 |
Routed to database server |
32 |
Protocol = 6 with Malformed TCP Flags |
Invalid flags |
Packet dropped or logged |
33 |
Protocol = 6 with TCP Reset |
TCP RST flag |
Connection reset |
34 |
Protocol = 6 with TCP Retransmission |
Duplicate segment |
Handled by TCP stack |
35 |
Protocol = 17 with TFTP Traffic |
UDP port 69 |
Routed to TFTP server |
36 |
Protocol = 17 with SNMP Traffic |
UDP port 161 |
Routed to SNMP agent |
37 |
Protocol = 17 with NTP Traffic |
UDP port 123 |
Routed to NTP service |
38 |
Protocol = 17 with Syslog Traffic |
UDP port 514 |
Routed to logging service |
39 |
Protocol = 6 with Fragmented Packet |
TCP in fragments |
Reassembled before processing |
40 |
Protocol = 17 with Fragmented Packet |
UDP in fragments |
Reassembled before processing |
41 |
Protocol = 6 with NAT |
TCP translated |
Protocol field preserved |
42 |
Protocol = 17 with NAT |
UDP translated |
Protocol field preserved |
43 |
Protocol = 1 with Firewall |
ICMP filtered |
Packet dropped or allowed |
44 |
Protocol = 6 with Firewall |
TCP filtered |
Packet dropped or allowed |
45 |
Protocol = 17 with Firewall |
UDP filtered |
Packet dropped or allowed |
46 |
Protocol = 6 with QoS |
TCP prioritized |
QoS applied |
47 |
Protocol = 17 with QoS |
UDP prioritized |
QoS applied |
48 |
Protocol = 6 with Logging Enabled |
TCP packet logged |
Protocol field recorded |
49 |
Protocol = 17 with Logging Enabled |
UDP packet logged |
Protocol field recorded |
50 |
Protocol = 6 with IDS/IPS |
TCP packet inspected |
Protocol used for rule matching |
TTL (Time to Live) - Testcases
TTL (Time to Live) - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
TTL = 64 |
Standard TTL value |
Packet forwarded, TTL decremented |
2 |
TTL = 1 |
Minimum valid TTL |
Packet dropped at first hop, ICMP Time Exceeded sent |
3 |
TTL = 0 |
Invalid TTL |
Packet dropped immediately |
4 |
TTL = 255 |
Maximum TTL |
Packet forwarded, TTL decremented |
5 |
TTL Decrement by Router |
Router receives packet |
TTL reduced by 1 |
6 |
TTL Expiry at Router |
TTL reaches 0 |
ICMP Time Exceeded sent to source |
7 |
TTL with Looping Route |
Packet loops |
TTL eventually expires |
8 |
TTL with Static Route |
TTL decremented normally |
Packet forwarded |
9 |
TTL with Dynamic Route |
TTL decremented normally |
Packet forwarded |
10 |
TTL with Fragmented Packet |
Each fragment has same TTL |
TTL decremented per fragment |
11 |
TTL with NAT |
TTL decremented before translation |
NAT does not reset TTL |
12 |
TTL with Firewall |
TTL checked for filtering |
Packet allowed or dropped |
13 |
TTL with ACL |
ACL does not inspect TTL |
Packet filtered based on IP/port |
14 |
TTL with VPN Tunnel |
TTL decremented before encapsulation |
Tunnel endpoint receives packet |
15 |
TTL with GRE Tunnel |
TTL decremented before encapsulation |
GRE header added |
16 |
TTL with IPsec Tunnel |
TTL decremented before encryption |
Packet encrypted and forwarded |
17 |
TTL with MPLS |
TTL copied to MPLS label |
Decremented per hop |
18 |
TTL with ICMP Echo Request |
Ping with TTL = 1 |
ICMP Time Exceeded received |
19 |
TTL with ICMP Echo Reply |
Ping reply TTL = 64 |
Reply received with TTL intact |
20 |
TTL with Traceroute |
TTL incremented per probe |
ICMP Time Exceeded received from each hop |
21 |
TTL with Broadcast Packet |
TTL = 1 |
Packet not forwarded beyond subnet |
22 |
TTL with Multicast Packet |
TTL controls scope |
Packet dropped after TTL expires |
23 |
TTL with Loopback Address |
TTL not decremented |
Packet processed locally |
24 |
TTL with Private Address |
TTL decremented normally |
Packet routed within private network |
25 |
TTL with Public Address |
TTL decremented normally |
Packet routed to internet |
26 |
TTL with Logging Enabled |
TTL logged |
TTL value recorded in logs |
27 |
TTL with Monitoring Tool |
TTL captured |
TTL visible in packet capture |
28 |
TTL with QoS |
TTL not affected by QoS |
Packet prioritized |
29 |
TTL with Load Balancer |
TTL decremented before forwarding |
Load balancer does not reset TTL |
30 |
TTL with Proxy |
TTL decremented before proxy |
Proxy may reset TTL |
31 |
TTL with NAT Hairpinning |
TTL decremented |
Packet routed internally |
32 |
TTL with TTL Expiry Logging |
TTL = 1 |
Expiry logged by router |
33 |
TTL with TTL-Based Filtering |
TTL < threshold |
Packet dropped |
34 |
TTL with TTL-Based Routing |
TTL used in policy |
Packet routed based on TTL |
35 |
TTL with TTL Reset by Device |
Device resets TTL |
Packet appears fresh |
36 |
TTL with TTL Preservation |
TTL unchanged by device |
Packet continues with original TTL |
37 |
TTL with TTL Manipulation Attack |
TTL set low |
Packet dropped early |
38 |
TTL with TTL Spoofing Detection |
TTL anomaly detected |
Packet flagged or dropped |
39 |
TTL with TTL Expiry Notification |
ICMP Time Exceeded sent |
Source notified of drop |
40 |
TTL with TTL Expiry Suppression |
ICMP disabled |
Packet dropped silently |
41 |
TTL with TTL in Fragmented Packet |
All fragments have same TTL |
TTL decremented per fragment |
42 |
TTL with TTL in Reassembled Packet |
TTL from first fragment used |
Packet reassembled correctly |
43 |
TTL with TTL in IPv6 |
Not applicable |
IPv6 uses Hop Limit |
44 |
TTL with TTL in IPv4 Header |
TTL field = 8 bits |
Value between 0255 |
45 |
TTL with TTL in Routing Loop Detection |
TTL used to detect loops |
Loop broken by TTL expiry |
46 |
TTL with TTL in Path MTU Discovery |
TTL not used |
PMTUD uses DF bit and ICMP |
47 |
TTL with TTL in BGP |
TTL used in TTL Security Check |
Protects against spoofing |
48 |
TTL with TTL in OSPF |
TTL = 1 for hello packets |
Ensures packets stay on local link |
49 |
TTL with TTL in RIP |
TTL not used |
RIP uses hop count |
50 |
TTL with TTL in Application Layer |
App reads TTL |
Used for diagnostics or routing decisions |
Classful Addressing (Legacy) - Testcases
Classful Addressing (Legacy) - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
Class A Address Assignment |
Assign 10.0.0.1 |
Recognized as Class A |
2 |
Class B Address Assignment |
Assign 172.16.0.1 |
Recognized as Class B |
3 |
Class C Address Assignment |
Assign 192.168.1.1 |
Recognized as Class C |
4 |
Class D Address Assignment |
Assign 224.0.0.1 |
Recognized as multicast |
5 |
Class E Address Assignment |
Assign 240.0.0.1 |
Reserved, not routable |
6 |
Class A Default Subnet Mask |
255.0.0.0 |
Applied automatically |
7 |
Class B Default Subnet Mask |
255.255.0.0 |
Applied automatically |
8 |
Class C Default Subnet Mask |
255.255.255.0 |
Applied automatically |
9 |
Class A Network Range |
1.0.0.0 to 126.255.255.255 |
Valid Class A range |
10 |
Class B Network Range |
128.0.0.0 to 191.255.255.255 |
Valid Class B range |
11 |
Class C Network Range |
192.0.0.0 to 223.255.255.255 |
Valid Class C range |
12 |
Class D Network Range |
224.0.0.0 to 239.255.255.255 |
Multicast only |
13 |
Class E Network Range |
240.0.0.0 to 255.255.255.254 |
Reserved |
14 |
Loopback Address |
127.0.0.1 |
Not part of any class |
15 |
Broadcast Address |
255.255.255.255 |
Not class-specific |
16 |
Class A with Custom Subnet |
10.0.0.1/16 |
Subnetting applied |
17 |
Class B with Custom Subnet |
172.16.0.1/20 |
Subnetting applied |
18 |
Class C with Custom Subnet |
192.168.1.1/28 |
Subnetting applied |
19 |
Invalid Class A Address |
0.0.0.1 |
Reserved, not valid |
20 |
Invalid Class B Address |
127.0.0.1 |
Loopback, not Class B |
21 |
Invalid Class C Address |
223.255.255.256 |
Invalid octet |
22 |
Class A with Host Bits All 0 |
10.0.0.0 |
Network address |
23 |
Class A with Host Bits All 1 |
10.255.255.255 |
Broadcast address |
24 |
Class B with Host Bits All 0 |
172.16.0.0 |
Network address |
25 |
Class B with Host Bits All 1 |
172.16.255.255 |
Broadcast address |
26 |
Class C with Host Bits All 0 |
192.168.1.0 |
Network address |
27 |
Class C with Host Bits All 1 |
192.168.1.255 |
Broadcast address |
28 |
Class D with TTL = 1 |
224.0.0.1 |
Local multicast only |
29 |
Class D with TTL > 1 |
224.0.1.1 |
Multicast routed |
30 |
Class E with Routing Attempt |
240.0.0.1 |
Packet dropped |
31 |
Class A with ARP Request |
10.0.0.1 |
ARP resolves MAC |
32 |
Class B with DHCP |
172.16.0.1 |
DHCP assigns IP |
33 |
Class C with NAT |
192.168.1.1 |
NAT translates IP |
34 |
Class A with ACL |
10.0.0.1 |
ACL filters traffic |
35 |
Class B with Firewall |
172.16.0.1 |
Firewall rules applied |
36 |
Class C with VPN |
192.168.1.1 |
Routed through VPN |
37 |
Class A with Routing Table |
10.0.0.0/8 |
Route added |
38 |
Class B with Static Route |
172.16.0.0/16 |
Route configured |
39 |
Class C with Dynamic Routing |
192.168.1.0/24 |
Route learned |
40 |
Class D with IGMP |
224.0.0.1 |
Group membership managed |
41 |
Class A with DNS |
10.0.0.1 |
Resolves to hostname |
42 |
Class B with SNMP |
172.16.0.1 |
Device monitored |
43 |
Class C with Syslog |
192.168.1.1 |
Logs sent |
44 |
Class A with ICMP |
10.0.0.1 |
Ping successful |
45 |
Class B with Traceroute |
172.16.0.1 |
TTL decremented |
46 |
Class C with Packet Capture |
192.168.1.1 |
Traffic visible |
47 |
Class D with Multicast App |
224.0.0.1 |
App receives stream |
48 |
Class A with Subnet Overlap |
10.0.0.0/8 and 10.1.0.0/16 |
Conflict detected |
49 |
Class B with Subnetting Violation |
172.16.0.0/15 |
Not aligned with class |
50 |
Class C with CIDR |
192.168.1.0/26 |
CIDR overrides classful mask |
Reference links