IPv4 Addressing - Unicast Addressing ========================================= .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is Unicast Addressing?** Unicast addressing is a method of communication where data is sent from one source device to one specific destination device over a network. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is Unicast Addressing useful?** Unicast is the most common form of network communication. It is efficient for one-to-one data exchanges like web browsing, file transfers, and emails. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works?** In unicast communication, each packet contains the unique IP address of the destination device. Routers forward the packet based on this address to reach the correct recipient. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is Unicast Addressing used?** Unicast is used in most standard internet and network communications, including HTTP, FTP, SSH, VoIP, and more. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** Unicast addressing operates at the Network Layer (Layer 3) of the OSI model, using IP for addressing and routing. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is Unicast Addressing Windows specific?** No, unicast addressing is not Windows specific. It is universally supported across all platforms that implement the IP protocol. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is Unicast Addressing Linux specific?** No, unicast addressing is not Linux specific. It is supported by all network-capable operating systems, including Linux, Windows, and macOS. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Transport Protocol is used by Unicast Addressing?** Unicast can use both TCP and UDP transport protocols depending on the application requirements. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Port is used by Unicast Addressing?** Unicast addressing itself does not define any specific port. The port number depends on the application or service being used (e.g., HTTP uses port 80). .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is Unicast Addressing using client-server model?** Yes, unicast is often used in client-server communication, where a client sends requests to a specific server, and the server responds directly to that client. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is the difference between unicast and multicast?** Unicast sends data to a single specific device, while multicast sends data to a group of devices subscribed to a multicast address. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is the difference between unicast and broadcast?** Unicast targets one device; broadcast sends data to all devices on the local network. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Can unicast addressing be used over the internet?** Yes, unicast is the standard communication method on the internet, sending data from one host to another. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Does unicast addressing consume more bandwidth than multicast?** Typically yes, because unicast sends separate copies to each recipient, while multicast sends a single stream to multiple devices. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How does unicast addressing handle data loss?** Protocols like TCP provide error checking and retransmission to ensure reliable delivery over unicast. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is unicast addressing scalable?** It can be less scalable for one-to-many communication because it requires individual transmissions to each receiver. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is the address range for IPv4 unicast addresses?** Most IPv4 addresses, except those reserved for multicast and broadcast, are unicast addresses. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Are MAC addresses used in unicast communication?** Yes, at Layer 2, unicast communication uses unique MAC addresses to identify devices on the local network. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Does unicast addressing support both IPv4 and IPv6?** Yes, unicast addressing exists in both IPv4 and IPv6 protocols. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Can unicast addressing be used in peer-to-peer networks?** Yes, unicast allows direct device-to-device communication without intermediaries. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What role does DNS play in unicast addressing?** DNS translates domain names to unicast IP addresses, enabling devices to locate specific hosts. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is unicast addressing affected by NAT?** Yes, NAT modifies IP addresses, but unicast communication continues through address translation. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How does unicast addressing impact network security?** Since unicast targets specific devices, it can be secured with firewalls and access control lists. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Can unicast packets be intercepted?** Yes, but encryption protocols like TLS help protect data confidentiality. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is a unicast routing table?** A routing table that stores paths to individual destination IP addresses. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Does unicast addressing require session establishment?** Not inherently; session establishment depends on the transport protocol used, such as TCP. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is a unicast IP address example?** An example is 192.168.1.10, assigned to a single device on a network. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How do routers forward unicast packets?** Routers use the destination IP in the packet header and their routing tables to forward packets toward the intended device. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`Unicast_Addressing Version&IEEE Details ` * :ref:`Unicast_Addressing Basic Setup on Ubuntu using IPv4 ` * :ref:`Unicast_Addressing Protocol Packet Details ` * :ref:`Unicast_Addressing Usecases ` * :ref:`Unicast_Addressing Basic Features ` * :ref:`Reference links ` .. _Unicast_Addressing_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _Unicast_Addressing_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _Unicast_Addressing_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _Unicast_Addressing_step5: .. tab-set:: .. tab-item:: Unicast_Addressing Version&RFC Details * rfc details .. _Unicast_Addressing_step18: .. tab-set:: .. tab-item:: IPv4 Unicast **Objective** Verify one-to-one communication on the subnet. **Test Setup** * Hardware: Three virtual machines (VM1, VM2, Sender VM) * Network Configuration: All VMs connected to the same virtual network - VM1: 192.168.1.10/24 - VM2: 192.168.1.20/24 - Sender: 192.168.1.30/24 .. note:: Ensure all VMs are on the same subnet. Only the target IP should receive the packet. **VM Configuration** .. code-block:: shell # VM1 test:~$ sudo ip addr add 192.168.1.10/24 dev enp0s8 test:~$ sudo ip link set enp0s8 up # VM2 test:~$ sudo ip addr add 192.168.1.20/24 dev enp0s8 test:~$ sudo ip link set enp0s8 up # Sender VM test:~$ sudo ip addr add 192.168.1.30/24 dev enp0s8 test:~$ sudo ip link set enp0s8 up test:~$ ping 192.168.1.10 PING 192.168.1.10 (192.168.1.10) 56(84) bytes of data. 64 bytes from 192.168.1.10: icmp_seq=1 ttl=64 time=4.97 ms 64 bytes from 192.168.1.10: icmp_seq=2 ttl=64 time=0.827 ms 64 bytes from 192.168.1.10: icmp_seq=3 ttl=64 time=1.04 ms 64 bytes from 192.168.1.10: icmp_seq=4 ttl=64 time=1.50 ms 64 bytes from 192.168.1.10: icmp_seq=5 ttl=64 time=0.737 ms 64 bytes from 192.168.1.10: icmp_seq=6 ttl=64 time=1.46 ms 64 bytes from 192.168.1.10: icmp_seq=7 ttl=64 time=0.887 ms 64 bytes from 192.168.1.10: icmp_seq=7 ttl=64 time=0.887 ms 64 bytes from 192.168.1.10: icmp_seq=8 ttl=64 time=0.979 ms 64 bytes from 192.168.1.10: icmp_seq=9 ttl=64 time=0.548 ms 64 bytes from 192.168.1.10: icmp_seq=10 ttl=64 time=1.08 ms 64 bytes from 192.168.1.10: icmp_seq=11 ttl=64 time=0.898 ms 64 bytes from 192.168.1.10: icmp_seq=12 ttl=64 time=0.865 ms 64 bytes from 192.168.1.10: icmp_seq=13 ttl=64 time=0.839 ms 64 bytes from 192.168.1.10: icmp_seq=14 ttl=64 time=1.10 ms 64 bytes from 192.168.1.10: icmp_seq=15 ttl=64 time=0.797 ms 64 bytes from 192.168.1.10: icmp_seq=16 ttl=64 time=0.544 ms 64 bytes from 192.168.1.10: icmp_seq=17 ttl=64 time=1.10 ms 64 bytes from 192.168.1.10: icmp_seq=18 ttl=64 time=0.692 ms 64 bytes from 192.168.1.10: icmp_seq=19 ttl=64 time=1.15 ms 64 bytes from 192.168.1.10: icmp_seq=20 ttl=64 time=0.914 ms 64 bytes from 192.168.1.10: icmp_seq=21 ttl=64 time=0.688 ms 64 bytes from 192.168.1.10: icmp_seq=22 ttl=64 time=0.533 ms 64 bytes from 192.168.1.10: icmp_seq=23 ttl=64 time=0.839 ms 64 bytes from 192.168.1.10: icmp_seq=24 ttl=64 time=0.980 ms ^C --- 192.168.1.10 ping statistics --- 24 packets transmitted, 24 received, 0% packet loss, time 23249ms rtt min/avg/max/mdev = 0.533/1.082/4.967/0.845 ms **Capture Analysis** * Wireshark on VM1: Shows ICMP Echo Request and Reply. * Wireshark on VM2: No packets observed (not the intended recipient). * Wireshark on Sender: Shows outgoing Echo Request and incoming Echo Reply. **Wireshark Captures** - :download:`VM1 Capture ` - :download:`VM2 Capture ` - :download:`Sender Capture ` .. _Unicast_Addressing_step6: .. tab-set:: .. tab-item:: Unicast_Addressing Protocol Packet Details * packet details .. _Unicast_Addressing_step7: .. tab-set:: .. tab-item:: Unicast_Addressing Usecases * usecases .. _Unicast_Addressing_step8: .. tab-set:: .. tab-item:: Unicast_Addressing Basic Features * features .. _Unicast_Addressing_step17: .. tab-set:: .. tab-item:: Reference links * Reference links