Reasons to Use AND
An
ANDing between the host address and subnet mask is performed by devices in a
data network for various reasons. Routers use ANDing to determine an acceptable
route for an incoming packet. The router checks the destination address and
attempts to associate this address with a next hop. As a packet arrives at a
router, the router performs ANDing on the IP destination address in the
incoming packet and with the subnet mask of potential routes. This yields a
network address that is compared to the route from the routing table whose
subnet mask was used.
An
originating host must determine whether a packet should be sent directly to a
host in the local network or be directed to the gateway. To make this
determination, a host must first know its own network address.
A
host extracts its network address by ANDing its address with its subnet mask. A
logical AND is also performed by an originating host between the destination
address of the packet and the subnet mask of the host. This yields the network
address of the destination. If this network address matches the network address
of the local host, the packet is sent directly to the destination host. If the
two network addresses do not match, the packet is sent to the gateway.
Importance of AND
If
the routers and end devices calculate these processes without your
intervention, why do you need to learn how to AND? The answer is, you need to
understand the operation of the network devices. The more you are able to
predict the operation of a network, the better equipped you are to design and
administer one.
In
network verification and troubleshooting, you often need to determine what IPv4
net-work a host is on or whether two hosts are on the same IP network. You need
to make this determination from the perspective of the network devices. Because
of improper configura-tion, a host might see itself on a network that was not
the intended one. This can create an operation that seems erratic unless
diagnosed by examining the ANDing processes used by the host.
In
addition, a router might have many different routes that can satisfy the
forwarding of packets to a given destination. The selection of the route used
for any given packet is a complex operation. For example, the prefix forming
these routes is not directly associated with the networks assigned to the host.
This means that a route in the routing table can rep-resent many networks. If
there were issues with routing packets, you would need to deter-mine how the
router would make the routing decision. Although there are subnet calculators
available, it is helpful for a network administrator to know how to manually
calculate subnets.
Tidak ada komentar:
Posting Komentar