27.10.2014 Views

Cracking the Coding Interview, 4 Edition - 150 Programming Interview Questions and Solutions

Cracking the Coding Interview, 4 Edition - 150 Programming Interview Questions and Solutions

Cracking the Coding Interview, 4 Edition - 150 Programming Interview Questions and Solutions

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.

<strong>Solutions</strong> to Chapter 17 | Networking<br />

»»<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, <strong>and</strong> establishes routing connections by synchronizing<br />

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

»»<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 />

»»<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 <strong>and</strong><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!