16.05.2014 Views

Wireless Security.pdf - PDF Archive

Wireless Security.pdf - PDF Archive

Wireless Security.pdf - PDF Archive

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

28 Chapter 2<br />

Conceptually, the sending device broadcasts a message on the network that requests the<br />

device with a certain IP address to respond with its MAC address. The TCP/IP software<br />

operating in the destination device replies with the requested address and the packet can<br />

be addressed and passed on to the sender’s data link layer.<br />

In practice, the sending device keeps a record of the MAC addresses of devices it has<br />

recently communicated with, so it does not need to broadcast a request each time.<br />

This ARP table or “ cache ” is looked at first and a broadcast request is only made if the<br />

destination IP address is not in the table. In many cases, a computer will be sending the<br />

packet to its default gateway and will find the gateway’s MAC address from its ARP<br />

table.<br />

2.2.5 Routing<br />

Routing is the mechanism that enables a data packet to find its way to a destination,<br />

whether that is a device in the next room or on the other side of the world.<br />

A router compares the destination address of each data packet it receives with a table of<br />

addresses held in memory—the router table. If it finds a match in the table, it forwards<br />

the packet to the address associated with that table entry, which may be the address of<br />

another network or of a “ next-hop ” router that will pass the packet along towards its final<br />

destination.<br />

If the router can’t find a match, it goes through the table again looking at just the network<br />

ID part of the address (extracted using the subnet mask as described above). If a match is<br />

found, the packet is sent to the associated address or, if not, the router looks for a default<br />

next-hop address and sends the packet there. As a final resort, if no default address is<br />

set, the router returns a “ Host Unreachable ” or “ Network Unreachable ” message to the<br />

sending IP address. When this message is received it usually means that somewhere along<br />

the line a router has failed.<br />

What happens if, or when, this elegantly simple structure breaks down? Are there packets<br />

out there hopping forever around the Internet, passing from router to router and never<br />

finding their destination? The IP header includes a control field that prevents this from<br />

happening. The time-to-live (TTL) field is initialized by the sender to a certain value,<br />

usually 64, and reduced by one each time the packet passes through a router. When TTL<br />

get down to zero, the packet is discarded and the sender is notified using an Internet<br />

control message protocol (ICMP) “ time-out ” message.<br />

www.newnespress.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!