Connectionless Protocol

What is IPv4 Connectionless Protocol?

IPv4 is called a connectionless protocol because it does not establish a dedicated path or session before sending data. Each packet is treated independently and may take different routes to reach the destination.

Why is IPv4 Connectionless Protocol useful?

It allows for flexible and efficient communication across diverse networks. By not requiring a pre-established connection, IPv4 can quickly send data without the overhead of managing sessions.

How does IPv4 Connectionless Protocol work?

Each IP packet (datagram) contains all the information needed to reach its destination. Routers forward packets based on their destination IP address, regardless of any previous or future packets.

Where is IPv4 Connectionless Protocol used?

It is used in nearly all internet and intranet communications. Applications like DNS queries, streaming, video calls, and web browsing all use IPv4 as a connectionless layer for routing packets.

Which OSI layer does IPv4 Connectionless Protocol belong to?

IPv4 operates at the Network Layer (Layer 3) of the OSI model, handling packet addressing, forwarding, and routing without establishing a connection.

Is IPv4 Connectionless Protocol Windows specific?

No, IPv4 being connectionless is a protocol design principle, not platform-specific. All major operating systems implement IPv4 in a connectionless manner.

Is IPv4 Connectionless Protocol Linux specific?

No. The connectionless behavior of IPv4 is universal and not tied to Linux. All devices using IPv4 follow the same behavior, whether on routers, servers, desktops, or embedded systems.

Which Transport Protocol is used by IPv4 Connectionless Protocol?

IPv4 supports both connection-oriented (TCP) and connectionless (UDP) transport protocols. The IP layer itself, however, is always connectionless.

Which Port is used by IPv4 Connectionless Protocol?

IPv4 itself does not use ports. Ports are a concept of the transport layer (e.g., TCP/UDP). IP just delivers packets based on IP addresses.

Is IPv4 Connectionless Protocol using client-server model?

While IPv4 can be used in client-server models, it does not enforce or require them. It simply delivers packets between devices, regardless of the application architecture.

What is the advantage of using a connectionless protocol like IPv4?

The main advantage of a connectionless protocol is efficiency. It doesn’t require the overhead of establishing and maintaining a connection, allowing faster communication between devices.

How does IPv4 ensure data reaches the correct destination without a connection?

IPv4 uses destination IP addresses in each packet’s header to ensure that data is routed to the correct destination, even though there is no pre-established connection.

How does IPv4 differ from TCP, a connection-oriented protocol?

Unlike IPv4, which is connectionless, TCP establishes a connection before transmitting data, ensuring reliable delivery with acknowledgment and retransmission mechanisms.

Can IPv4 handle both small and large packets in a connectionless manner?

Yes, IPv4 can handle both small and large packets. It uses techniques like fragmentation for large packets to ensure they can traverse networks with varying MTU sizes.

What happens if an IPv4 packet is lost?

If an IPv4 packet is lost, it is not automatically retransmitted by IPv4. It is up to higher-layer protocols, like TCP, to detect the loss and request retransmission.

How does IPv4 differ from UDP, another connectionless protocol?

While both are connectionless, IPv4 is a network layer protocol that handles packet forwarding and routing, while UDP is a transport layer protocol that handles data transmission without ensuring reliability.

What role does the IP header play in the connectionless nature of IPv4?

The IP header provides all the information necessary for routers to forward packets, including the destination IP address, packet size, and routing information, all without establishing a session.

Can IPv4 be used in a peer-to-peer network?

Yes, IPv4 is not limited to client-server networks. It can be used in peer-to-peer networks, where devices communicate directly with each other without a centralized server.

Why is IPv4 considered stateless?

IPv4 is stateless because it doesn’t store any information about previous packets. Each packet is independent, and the protocol does not maintain any connection or session state.

How does IPv4 achieve flexibility despite being connectionless?

IPv4 achieves flexibility by allowing each packet to be routed independently, enabling data to flow even if routes or network conditions change dynamically.

Does IPv4 provide any guarantees of packet delivery?

No, IPv4 does not guarantee delivery or reliability. Higher-layer protocols like TCP provide reliability by ensuring data is received and retransmitted if necessary.

What is the main disadvantage of a connectionless protocol like IPv4?

The main disadvantage is that IPv4 does not provide reliable delivery, sequencing, or flow control. Lost or out-of-order packets are not handled by IPv4 itself, requiring higher-layer protocols to manage these issues.

Does IPv4 support multicast communication?

Yes, IPv4 supports multicast communication, allowing packets to be sent to multiple receivers simultaneously without establishing a connection with each individual receiver.

Can IPv4 be used for real-time communication?

Yes, IPv4 can be used for real-time communication, such as VoIP or video conferencing, though it does not guarantee delivery, sequencing, or timing, which is managed by higher-layer protocols.

What happens if IPv4 packets are misrouted?

If IPv4 packets are misrouted, they may be dropped or forwarded to an incorrect destination. This is typically detected by higher-layer protocols or applications, which may then request retransmission or handle errors.

How does IPv4 handle network congestion?

IPv4 itself does not handle network congestion. However, higher-layer protocols like TCP can implement congestion control mechanisms to reduce the load on the network and ensure data transmission is efficient.

Does IPv4 provide encryption or security?

No, IPv4 does not provide encryption or security features by default. Security features can be added with protocols like IPsec, which works alongside IPv4 to provide encryption and authentication.

How is the connectionless nature of IPv4 advantageous for mobile devices?

The connectionless nature of IPv4 allows mobile devices to maintain efficient communication without the need to maintain a dedicated connection, making it suitable for wireless and mobile networks.

Does IPv4 handle both unicast and broadcast communication?

Yes, IPv4 supports unicast (one-to-one) and broadcast (one-to-all) communication. Multicast (one-to-many) is also supported, enabling efficient distribution of data to multiple recipients.

  • In this section, you are going to learn

  • Terminology

  • Version Info

Objective

Prove that IPv4 packets are independent and do not require a pre-established connection.

Implementation

This test case uses the User Datagram Protocol (UDP), a connectionless transport-layer protocol, to demonstrate IPv4’s connectionless nature.

Test Setup

  • Single VM Setup

    • Connect a VM to a switch.

    • Start a Wireshark capture on the VM’s network interface.

    • Open a terminal on the VM.

  • Generate UDP Traffic

    Perform a DNS query using the dig command targeting a public DNS server (e.g., 8.8.8.8):

    test:~$ dig @8.8.8.8 www.google.com
    ; <<>> DiG 9.18.30-0ubuntu0.24.04.2-Ubuntu <<>> @8.8.8.8 www.google.com
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16694
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;www.google.com.          IN      A
    
    ;; ANSWER SECTION:
    www.google.com.           4       IN      A       142.250.207.164
    
    ;; Query time: 5 msec
    ;; SERVER: 8.8.8.8#53(8.8.8.8) (UDP)
    ;; WHEN: Fri Aug 22 10:21:46 IST 2025
    ;; MSG SIZE  rcvd: 48
    

    Note

    DNS uses UDP by default, which is a connectionless protocol ideal for testing IPv4 packet independence.

Procedure and Analysis

  • Filter Packets

    • In Wireshark, apply the display filter:

      udp.port == 53
      

    to isolate DNS query and response packets.

  • Analyze the Flow

    • You will observe a simple two-packet exchange:

      • Packet 1 (Query): Outgoing from the VM to 8.8.8.8. The IPv4 Protocol field is 17 (UDP).

      • Packet 2 (Reply): Incoming from 8.8.8.8 back to the VM.

  • The Proof

    • No three-way TCP handshake occurs (SYN, SYN-ACK, ACK) at the start.

    • Packets are independent and sent without a pre-established connection, demonstrating IPv4’s connectionless and “best-effort” delivery.

Note

  • UDP is stateless; the router forwards packets based solely on the destination IP.

  • Each IPv4 packet carries its own header information for routing, unlike TCP where state is maintained.

  • This test highlights IPv4’s flexibility in handling both connection-oriented and connectionless protocols.

Wireshark Capture

Download wireshark capture

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

  • Reference links