Limited broadcast vs subnet broadcast
IP Broadcast Addresses
IP broadcast addresses are used for single-packet one-to-everyone delivery. A sending host addresses the IP packet using a broadcast address and every node on the sending node's network segment receives and processes the packet. IP broadcast addresses can be used only as the destination IP address.
There are four different types of IP broadcast addresses. For each type, the broadcast IP packet is addressed at the Network Interface Layer using the network technology's broadcast address. For example, for Ethernet and Token Ring networks, all IP broadcasts are sent using the Ethernet and Token Ring broadcast address 0xFF-FF-FF-FF-FF-FF.
Network Broadcast
The IP network broadcast address is the address formed by setting all the host bits to 1 for a classful address. An example of a network broadcast address for the classful network ID 131.107.0.0/16 is 131.107.255.255.
Subnet Broadcast
The IP subnet broadcast address is the address formed by setting all the host bits to 1 for a nonclassful address. An example of a network broadcast address for the nonclassful network ID 131.107.26.0/24 is 131.107.26.255.
All-Subnets-Directed Broadcast
The IP all-subnets-directed broadcast address is the address formed by setting all the original classful network ID host bits to 1 for a nonclassful network. A packet addressed to the all-subnets-directed broadcast is intended to reach all hosts on all of the subnets of a subnetted class-based network ID. An example of an all-subnets-directed broadcast address for the subnetted network ID 131.107.26.0/24 is 131.107.255.255. The all-subnets-directed broadcast is the network broadcast address of the original classful network ID.
Limited Broadcast
The limited broadcast address is the address formed by setting all 32 bits of the IP address to 1 (255.255.255.255). The limited broadcast address is used when an IP node must perform a one-to-everyone delivery on the local network but the network ID is unknown.
Refer the above Diagram :-
Limited broadcast
Send a single ping request from hostC1 to the broadcast address 255.255.255.255
tcpudmp output:
13:53:53.403545 00:00:0a:01:00:21 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 42: 10.1.3.1 > 255.255.255.255: ICMP echo request, id 0, seq 0, length 8
13:53:53.403737 00:00:0a:01:00:08 > 00:00:0a:01:00:21, ethertype IPv4 (0x0800), length 42: 10.1.3.254 > 10.1.3.1: ICMP echo reply, id 0, seq 0, length 8
13:53:53.403779 00:00:0a:01:00:23 > 00:00:0a:01:00:21, ethertype IPv4 (0x0800), length 42: 10.1.3.3 > 10.1.3.1: ICMP echo reply, id 0, seq 0, length 8
13:53:53.403781 00:00:0a:01:00:22 > 00:00:0a:01:00:21, ethertype IPv4 (0x0800), length 42: 10.1.3.2 > 10.1.3.1: ICMP echo reply, id 0, seq 0, length 8
13:53:53.403783 00:00:0a:01:00:13 > 00:00:0a:01:00:21, ethertype IPv4 (0x0800), length 42: 10.1.3.4 > 10.1.3.1: ICMP echo reply, id 0, seq 0, length 8
Discussion:
Frame 1 is the ICMP echo request which is an IP broadcast and an Ethernet broadcast.
The remaining frames are the ICMP echo replies from all the hosts/routers on the LAN.
There are no other replies because routers don’t route the limited broadcast destination.
Subnet Broadcast
Send a single ping request from hostC1 to the broadcast address. ping –c1 10.1.3.255
ping output:
PING 10.1.3.255 (10.1.3.255): 56 data bytes
64 bytes from 10.1.3.1: icmp_seq=0 ttl=64 time=0.033 ms
--- 10.1.3.255 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.033/0.033/0.033/0.000 ms
tcpdump output:
(1)14:14:00.596703 00:00:0a:01:00:21 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 98: 10.1.3.1 > 10.1.3.255: ICMP echo request, id 47883, seq 0, length 64
(2)14:14:00.596705 00:00:0a:01:00:23 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 10.1.3.1 tell 10.1.3.3, length 28
(3)14:14:00.596707 00:00:0a:01:00:22 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 10.1.3.1 tell 10.1.3.2, length 28
(4)14:14:00.596773 00:00:0a:01:00:13 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 10.1.3.1 tell 10.1.3.4, length 28
(5)14:14:00.596775 00:00:0a:01:00:08 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 10.1.3.1 tell 10.1.3.254, length 28
(6)14:14:00.596777 00:00:0a:01:00:21 > 00:00:0a:01:00:23, ethertype ARP (0x0806), length 42: Reply 10.1.3.1 is-at 00:00:0a:01:00:21, length 28
(7)14:14:00.596779 00:00:0a:01:00:21 > 00:00:0a:01:00:22, ethertype ARP (0x0806), length 42: Reply 10.1.3.1 is-at 00:00:0a:01:00:21, length 28
(8)14:14:00.596781 00:00:0a:01:00:21 > 00:00:0a:01:00:13, ethertype ARP (0x0806), length 42: Reply 10.1.3.1 is-at 00:00:0a:01:00:21, length 28
(9)14:14:00.596783 00:00:0a:01:00:21 > 00:00:0a:01:00:08, ethertype ARP (0x0806), length 42: Reply 10.1.3.1 is-at 00:00:0a:01:00:21, length 28
(10)14:14:00.596785 00:00:0a:01:00:23 > 00:00:0a:01:00:21, ethertype IPv4 (0x0800), length 98: 10.1.3.3 > 10.1.3.1: ICMP echo reply, id 47883, seq 0, length 64
(11)14:14:00.596787 00:00:0a:01:00:22 > 00:00:0a:01:00:21, ethertype IPv4 (0x0800), length 98: 10.1.3.2 > 10.1.3.1: ICMP echo reply, id 47883, seq 0, length 64
(12)14:14:00.596797 00:00:0a:01:00:13 > 00:00:0a:01:00:21, ethertype IPv4 (0x0800), length 98: 10.1.3.4 > 10.1.3.1: ICMP echo reply, id 47883, seq 0, length 64
(13)14:14:00.596799 00:00:0a:01:00:08 > 00:00:0a:01:00:21, ethertype IPv4 (0x0800), length 98: 10.1.3.254 > 10.1.3.1: ICMP echo reply, id 47883, seq 0, length 64
ARP cache
hostC1.test.ca (10.1.3.1) at 00:00:0a:01:00:21 on e0 permanent [ethernet]
hostC2.test.ca (10.1.3.2) at 00:00:0a:01:00:22 on e0 expires in 1088 seconds [ethernet]
hostC3.test.ca (10.1.3.3) at 00:00:0a:01:00:23 on e0 expires in 1088 seconds [ethernet]
routerD.test.ca (10.1.3.4) at 00:00:0a:01:00:13 on e0 expires in 1088 seconds [ethernet]
routerC.test.ca (10.1.3.254) at 00:00:0a:01:00:08 on e0 expires in 1088 seconds [ethernet]
? (10.1.3.255) at (incomplete) on e0 expired [ethernet]
Discussion:
Frame 1 is the ICMP echo request which is an IP broadcast. This becomes an Ethernet broadcast.
Frame 2-5 are the ARP requests of the host/routers on the LAN for 10.1.3.1.
Frame 6-9 are the ARP replies by 10.1.3.1.
Frames 10-13 are the ICMP echo replies from the hosts/routers on the LAN.
The ARP table on the hostC1 now contains an entry for the host/routers on the LAN because