ure 6.40 Example of subnet and subnet mask. Data Communications 193 to 254 (subnet 3). Actually a few more addresses could be used without including hosts with all host part bits O's or 1's, for example, 64 in subnet 1. However, in practice, it is probably better to follow the same addressing princi- ples in all subnetworks. From the outside world, IP packets are routed with the help of a network number section and it is a matter for the company's internal staff to determine how host numbers are divided into subnets. When an IP packet arrives at the router, it detects the address class from the first digits to see what section in the address represents the network. If it identifies its own network, the packet is forwarded to the host identified by the host part; otherwise, it is forwarded to the next router according to the stored routing table. If subnets are implemented, a subnet mask (shown in Figure 6.40) is defined and stored in the router. Now the received packet contains the router's network address and it performs a Boolean AND opera- tion with the subnet mask to get rid of the host section. In our example, the result of this operation could give subnet address 221.109.65.0, 221.109.65.64, 221.109.65.128, or 221.109.65.192. This address is then looked up in the routing tables to find out how to get to hosts in a given sub- net. The example address in Figure 6.40 is 221.109.65.172, which gives sub- net address 112.109.65.128 as a result of an AND operation with a subnet mask and this indicates that the destination host is located in subnet 2. Classless interdomain routing (CIDR) is a technique that divides net- work addresses into smaller address ranges in the same way subnets are divided as explained earlier. With the help of CIDR, for example, an ISP can split up its address range for assignment to its customers. For example, CIDR notation 128.211.176.112/30 defines a subnet mask of 30 bits and a four- address block with highest address 128.211.176.115. 6.6.4.3 IP Header Each IP packet contains a header,