https://computing.ece.vt.edu/mediawiki/index.php?title=Notes_on_Linux_Router&feed=atom&action=historyNotes on Linux Router - Revision history2024-03-29T08:34:22ZRevision history for this page on the wikiMediaWiki 1.19.1https://computing.ece.vt.edu/mediawiki/index.php?title=Notes_on_Linux_Router&diff=586&oldid=prevJkh at 15:10, 18 July 20072007-07-18T15:10:53Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 15:10, 18 July 2007</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 5:</td>
<td colspan="2" class="diff-lineno">Line 5:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>--</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>--</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>To extend the ARP time out, see: https://wiki.fysik.dtu.dk/niflheim/System_administration<ins class="diffchange diffchange-inline">#kernel-arp-cache</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>To extend the ARP time out, see: <del class="diffchange diffchange-inline"> </del>https://wiki.fysik.dtu.dk/niflheim/System_administration</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">In particular, this part:</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Kernel ARP cache</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Kernel ARP cache</div></td></tr>
</table>Jkhhttps://computing.ece.vt.edu/mediawiki/index.php?title=Notes_on_Linux_Router&diff=585&oldid=prevJkh: New page: These are notes on building a Liunx router that can route without a sub net. -- To extend the ARP time out, see: https://wiki.fysik.dtu.dk/niflheim/System_administration In particula...2007-07-18T15:09:19Z<p>New page: These are notes on building a Liunx router that can route without a sub net. -- To extend the ARP time out, see: https://wiki.fysik.dtu.dk/niflheim/System_administration In particula...</p>
<p><b>New page</b></p><div>These are notes on building a Liunx router that can route without a sub net.<br />
<br />
<br />
<br />
<br />
--<br />
<br />
To extend the ARP time out, see: https://wiki.fysik.dtu.dk/niflheim/System_administration<br />
In particular, this part:<br />
<br />
Kernel ARP cache<br />
<br />
If the number of network devices (cluster nodes plus switches etc.) approach or exceed 512, you must consider the Linux kernel's limited dynamic ARP-cache size. Please read the man-page man 7 arp about the kernel's ARP-cache.<br />
<br />
ARP (Address Resolution Protocol) is the kernel's mapping between IP-addresses (such as 10.1.2.3) and Ethernet MAC-addresses (such as 00:08:02:8E:05:F2). If the soft maximum number of entries to keep in the ARP cache, gc_thresh2=512, is exceeded, the kernel will try to remove ARP-cache entries by a garbage collection process. This is going to hit you in terms of sporadic loss of connectivitiy between pairs of nodes. No garbage collection will take place if the ARP-cache has fewer than gc_thresh1=128 entries, so you should be safe if your network is smaller than this number.<br />
<br />
The best solution to this ARP-cache trashing problem is to increase the kernel's ARP-cache garbage collection (gc) parameters by adding these lines to /etc/sysctl.conf:<br />
<br />
# Don't allow the arp table to become bigger than this<br />
net.ipv4.neigh.default.gc_thresh3 = 4096<br />
# Tell the gc when to become aggressive with arp table cleaning.<br />
net.ipv4.neigh.default.gc_thresh2 = 2048<br />
# Adjust where the gc will leave arp table alone<br />
net.ipv4.neigh.default.gc_thresh1 = 1024<br />
# Adjust to arp table gc to clean-up more often<br />
net.ipv4.neigh.default.gc_interval = 3600<br />
# ARP cache entry timeout<br />
net.ipv4.neigh.default.gc_stale_time = 3600<br />
<br />
Then run /sbin/sysctl -p to reread this configuration file.<br />
<br />
Another solution, although more cumbersome in daily adminsitration, is to create a static ARP database, which is customarily kept in the file /etc/ethers. It may look like this (see man 5 ethers):<br />
<br />
00:08:02:8E:05:F2 n001<br />
00:08:02:89:9E:5E n002<br />
00:08:02:89:62:E6 n003<br />
...<br />
<br />
This file can easily be created from the DHCP configuration file /etc/dhcpd.conf by extracting hostnames and MAC-address fields (using awk, for example). In order to add this information to the permanent ARP-cache, run the command arp -f /etc/ethers.<br />
<br />
In order to do this at boot time, the Redhat Linux file /etc/rc.local can be used. Add these lines to /etc/rc.local:<br />
<br />
# Load the static ARP cache from /etc/ethers, if present<br />
if test -f /etc/ethers then<br />
/sbin/arp -f /etc/ethers<br />
fi<br />
<br />
This configuration should be performed on all nodes and servers in the cluster, as well as any other network device that can be be configured in this way.<br />
<br />
It doesn't hurt to use this configuration also on clusters with 128-512 network devices, since the dynamic ARP-cache will then have less work to do. However, you must maintain a consistent /etc/ethers as compared to the nodes defined in /etc/dhcpd.conf, and you must run the arp command every time the /etc/ethers file is modified (for example, when a node's network card is replaced).<br />
<br />
System administration (last edited 2007-07-13 11:11:29 by OleHolmNielsen)<br />
<br />
* Immutable Page<br />
* Info</div>Jkh