25.03.2013 Views

Cracking the Coding Interview - Fooo

Cracking the Coding Interview - Fooo

Cracking the Coding Interview - Fooo

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Solutions to Chapter 17 | Networking<br />

» Startup When a router is turned on it sends Hello packets to all of its neighbors, receives<br />

<strong>the</strong>ir Hello packets in return, and establishes routing connections by synchronizing<br />

databases with adjacent routers that agree to synchronize<br />

» Update At regular intervals each router sends an update message called its “link state”<br />

describing its routing database to all <strong>the</strong> o<strong>the</strong>r routers, so that all routers have <strong>the</strong> same<br />

description of <strong>the</strong> topology of <strong>the</strong> local network<br />

» Shortest path tree Each router <strong>the</strong>n calculates a ma<strong>the</strong>matical data structure called a<br />

“shortest path tree” that describes <strong>the</strong> shortest path to each destination address and<br />

<strong>the</strong>refore indicates <strong>the</strong> closest router to send to for each communication; in o<strong>the</strong>r words<br />

-- “open shortest path first”<br />

See http://www livinginternet com/i/iw_route_igp_ospf htm<br />

2 5 1<br />

<strong>Cracking</strong> <strong>the</strong> <strong>Coding</strong> <strong>Interview</strong> | Knowledge Based

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

Saved successfully!

Ooh no, something went wrong!