ABSTRACT

In IP packet transmission, the next hop is determined by searching the routing table using the destination address included in the IP header as an index key. In the network that has introduced CIDR (classless interdomain routing), searching is executed on an IP routing table based on the longest-prefix matching method (see Chapter 4). The longest-prefix matching method checks the matching of the IP address between the destination address of the IP header and the combination of each entry’s address and the network mask in the routing table. That is, the method extracts the network address and the network mask of each entry in the routing table. It then calculates a logical AND between the destination address of the arriving IP header and the network mask bit by bit, and it takes the entry that matched over the longest bits with the network address as the next-hop address.