📄 snmp howto.htm
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" ><head><title>SNMP HOWTO - FreeRADIUS Wiki</title><meta http-equiv="Content-type" content="text/html; charset=UTF-8" /><meta name="keywords" content="SNMP HOWTO,FreeRADIUS,RADIUS,Status" /><link rel="shortcut icon" href="/favicon.ico" /><link rel="search" type="application/opensearchdescription+xml" href="/opensearch_desc.php" title="FreeRADIUS Wiki (English)" /><link rel='stylesheet' type='text/css' media='print' href='/skins/common/wikiprintable.css' /><script type= "text/javascript"> var skin = "cologneblue"; var stylepath = "/skins"; var wgArticlePath = "/$1"; var wgScriptPath = ""; var wgServer = "http://wiki.freeradius.org"; var wgCanonicalNamespace = ""; var wgNamespaceNumber = 0; var wgPageName = "SNMP_HOWTO"; var wgTitle = "SNMP HOWTO"; var wgArticleId = 1589; var wgIsArticle = true; var wgUserName = null; var wgUserLanguage = "en"; var wgContentLanguage = "en"; </script> <script type="text/javascript" src="/skins/common/wikibits.js"></script><style type='text/css'>/*/*/ /*<![CDATA[*/@import "/skins/common/cologneblue.css?2";@import "/index.php?title=MediaWiki:Common.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";@import "/index.php?title=MediaWiki:Cologneblue.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";a.new, #quickbar a.new { color: #CC2200; }#quickbar { position: absolute; left: 4px; }#article { margin-left: 148px; margin-right: 4px; }/*]]>*/ /* */</style></head><body bgcolor='#FFFFFF' onload='' class='ns-0 ltr'><div id='content'><div id='topbar'><table width='100%' border='0' cellspacing='0' cellpadding='8'><tr><td class='top' align='left' valign='middle' nowrap='nowrap'><a href="/Main_Page"><span id='sitetitle'>FreeRADIUS Wiki</span></a></td><td class='top' align='right' valign='bottom' width='100%'><a href="/Main_Page" title="Main Page">Main Page</a> | <a href="/FreeRADIUS_Wiki:About" title="FreeRADIUS Wiki:About">About</a> | <a href="/Help:Contents" title="Help:Contents">Help</a> | <a href="/FreeRADIUS_Wiki:FAQ" title="FreeRADIUS Wiki:FAQ">FAQ</a> | <a href="/Special:Specialpages" title="Special:Specialpages">Special pages</a> | <a href="/index.php?title=Special:Userlogin&returnto=SNMP_HOWTO" title="Special:Userlogin">Log in</a></td></tr><tr><td valign='top'><font size='-1'><span id='sitesub'></span></font></td><td align='right'><font size='-1'><span id='langlinks'><br /><a href="/index.php?title=SNMP_HOWTO&printable=yes">Printable version</a> | <a href="/FreeRADIUS_Wiki:General_disclaimer" title="FreeRADIUS Wiki:General disclaimer">Disclaimers</a> | <a href="/FreeRADIUS_Wiki:Privacy_policy" title="FreeRADIUS Wiki:Privacy policy">Privacy policy</a></span></font></td></tr></table></div><div id='article'><h1 class="pagetitle">SNMP HOWTO</h1><p class='subtitle'>From FreeRADIUS Wiki</p><table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div><ul><li class="toclevel-1"><a href="#Native_SNMP_support_in_FreeRADIUS_version_2"><span class="tocnumber">1</span> <span class="toctext">Native SNMP support in FreeRADIUS version 2</span></a></li><li class="toclevel-1"><a href="#Build_FreeRADIUS_with_SNMP_Support"><span class="tocnumber">2</span> <span class="toctext">Build FreeRADIUS with SNMP Support</span></a></li><li class="toclevel-1"><a href="#Configuration"><span class="tocnumber">3</span> <span class="toctext">Configuration</span></a><ul><li class="toclevel-2"><a href="#raddb.2Fradiusd.conf"><span class="tocnumber">3.1</span> <span class="toctext">raddb/radiusd.conf</span></a></li><li class="toclevel-2"><a href="#raddb.2Fsnmp.conf"><span class="tocnumber">3.2</span> <span class="toctext">raddb/snmp.conf</span></a></li><li class="toclevel-2"><a href="#snmpd.conf"><span class="tocnumber">3.3</span> <span class="toctext">snmpd.conf</span></a></li></ul></li><li class="toclevel-1"><a href="#Verification"><span class="tocnumber">4</span> <span class="toctext">Verification</span></a></li><li class="toclevel-1"><a href="#SNMP_Query"><span class="tocnumber">5</span> <span class="toctext">SNMP Query</span></a></li></ul></td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script><div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=SNMP_HOWTO&action=edit&section=1" title="Edit section: Native SNMP support in FreeRADIUS version 2">edit</a>]</div><a name="Native_SNMP_support_in_FreeRADIUS_version_2"></a><h2>Native SNMP support in <a href="/FreeRADIUS" title="FreeRADIUS">FreeRADIUS</a> version 2</h2><p>Native SNMP support in <a href="/FreeRADIUS" title="FreeRADIUS">FreeRADIUS</a> version 2 and later is broken. Please see Alan's mail regarding this topic:<a href="http://www.mail-archive.com/freeradius-users%40lists.freeradius.org/msg46012.html" class="external free" title="http://www.mail-archive.com/freeradius-users%40lists.freeradius.org/msg46012.html" rel="nofollow">http://www.mail-archive.com/freeradius-users%40lists.freeradius.org/msg46012.html</a></p><p>At the moment there is only one option to get information about the status and statistics of the server. Please enable the <a href="/Status" title="Status">status</a> server (see: virtual servers). All information is geathered with radius requests to this status server. Please <tt>read man radclient</tt> and the documentation of the status virtual server (<tt>raddb/sites-available/status</tt>). </p><p>Stanislav Sawa from Sky Network Services wrote a <tt>perl</tt> interface to act as a SNMP subagent with the modern AgentX protocol to provide all needed data via that status server interface. Please see <tt>scripts/snmp-proxy</tt>.</p><p><br />Please DO NOT READ THE TEXT BELOW. It is left here only for historical reasons.</p><p><br /></p><div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=SNMP_HOWTO&action=edit&section=2" title="Edit section: Build FreeRADIUS with SNMP Support">edit</a>]</div><a name="Build_FreeRADIUS_with_SNMP_Support"></a><h2>Build <a href="/FreeRADIUS" title="FreeRADIUS">FreeRADIUS</a> with SNMP Support</h2><p>The configure option <i>--with-snmp</i> is enabled by default, so if you have the SNMP libraries correctly installed on your system, your <a href="/FreeRADIUS" title="FreeRADIUS">FreeRADIUS</a> build should include SNMP support.</p><div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=SNMP_HOWTO&action=edit&section=3" title="Edit section: Configuration">edit</a>]</div><a name="Configuration"></a><h2>Configuration</h2><p>Items in bold can be changed per your requirements.</p><div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=SNMP_HOWTO&action=edit&section=4" title="Edit section: raddb/radiusd.conf">edit</a>]</div><a name="raddb.2Fradiusd.conf"></a><h3>raddb/radiusd.conf</h3><pre>snmp = <b>yes</b>$INCLUDE ${confdir}/snmp.conf</pre><div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=SNMP_HOWTO&action=edit&section=5" title="Edit section: raddb/snmp.conf">edit</a>]</div><a name="raddb.2Fsnmp.conf"></a><h3>raddb/snmp.conf</h3><pre>smux_password = <b>verysecret</b>snmp_write_access = <b>no</b></pre><div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=SNMP_HOWTO&action=edit&section=6" title="Edit section: snmpd.conf">edit</a>]</div><a name="snmpd.conf"></a><h3>snmpd.conf</h3><p>NOTE: This example uses Net-SNMP 5.1.2 built with ucd-snmp compatibility. It should work with most versions of net-snmp and ucd-snmp.</p><pre>smuxpeer .1.3.6.1.4.1.3317.1.3.1 <b>verysecret</b></pre><p>For FreeRADIUS versions 2.0.0-pre1 and higher, use the line below. Some versions of 2.0.0-pre0 used 3317 or 11344 as the SNMP enterprise number. The output from debug mode should identify which number to use.</p><pre>smuxpeer .1.3.6.1.4.1.11344.1.3.1 <b>verysecret</b></pre><div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=SNMP_HOWTO&action=edit&section=7" title="Edit section: Verification">edit</a>]</div><a name="Verification"></a><h2>Verification</h2><p>When running <a href="/FreeRADIUS" title="FreeRADIUS">FreeRADIUS</a> in debug mode (radiusd -X), you should see output similar to the following:</p><pre> main: smux_password = "verysecret" main: snmp_write_access = noSMUX connect try 1SMUX open oid: 1.3.6.1.4.1.3317.1.3.1SMUX open progname: radiusdSMUX open password: verysecretSMUX register oid: 1.3.6.1.2.1.67.1.1.1.1SMUX register priority: -1SMUX register operation: 1SMUX register oid: 1.3.6.1.2.1.67.2.1.1.1SMUX register priority: -1SMUX register operation: 1SMUX read startSMUX read len: 12SMUX message received type: 67 rest len: 4SMUX_RRSPSMUX_RRSP value: 0 errstat: 0</pre><div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=SNMP_HOWTO&action=edit&section=8" title="Edit section: SNMP Query">edit</a>]</div><a name="SNMP_Query"></a><h2>SNMP Query</h2><p>The SNMP MIB files for <a href="/RADIUS" title="RADIUS">RADIUS</a> are located in the mibs directory of the <a href="/FreeRADIUS" title="FreeRADIUS">FreeRADIUS</a> source. Once your server is configured and connected to the local SNMP server, you can begin gathering useful information.</p><pre>$ snmpwalk -v 1 -m <i>/path/to/RADIUS-AUTH-SERVER-MIB.txt</i> -c <i>snmp_read_key</i> <i>your.radius.host</i> radiusAuthRADIUS-AUTH-SERVER-MIB::radiusAuthServIdent.0 = STRING: FreeRADIUS Version 2.0.0-pre0, for host i686-pc-linux-gnu, built on Sep 14 2006 at 13:51:51RADIUS-AUTH-SERVER-MIB::radiusAuthServUpTime.0 = Timeticks: (1100) 0:00:11.00RADIUS-AUTH-SERVER-MIB::radiusAuthServResetTime.0 = Timeticks: (1100) 0:00:11.00RADIUS-AUTH-SERVER-MIB::radiusAuthServConfigReset.0 = INTEGER: running(4)RADIUS-AUTH-SERVER-MIB::radiusAuthServTotalAccessRequests.0 = Counter32: 0RADIUS-AUTH-SERVER-MIB::radiusAuthServTotalInvalidRequests.0 = Counter32: 0RADIUS-AUTH-SERVER-MIB::radiusAuthServTotalDupAccessRequests.0 = Counter32: 0RADIUS-AUTH-SERVER-MIB::radiusAuthServTotalAccessAccepts.0 = Counter32: 0RADIUS-AUTH-SERVER-MIB::radiusAuthServTotalAccessRejects.0 = Counter32: 0RADIUS-AUTH-SERVER-MIB::radiusAuthServTotalAccessChallenges.0 = Counter32: 0RADIUS-AUTH-SERVER-MIB::radiusAuthServTotalMalformedAccessRequests.0 = Counter32: 0RADIUS-AUTH-SERVER-MIB::radiusAuthServTotalBadAuthenticators.0 = Counter32: 0RADIUS-AUTH-SERVER-MIB::radiusAuthServTotalPacketsDropped.0 = Counter32: 0RADIUS-AUTH-SERVER-MIB::radiusAuthServTotalUnknownTypes.0 = Counter32: 0RADIUS-AUTH-SERVER-MIB::radiusAuthClientAddress.1 = IpAddress: ...<i>radiusAuthClient output removed</i></pre><!-- Saved in parser cache with key wikiradius-fr_:pcache:idhash:1589-0!1!0!!en!2 and timestamp 20081118190537 --><div class="printfooter"><p>Retrieved from "<a href="http://wiki.freeradius.org/SNMP_HOWTO">http://wiki.freeradius.org/SNMP_HOWTO</a>"</p><p>This page has been accessed 9,771 times. This page was last modified 18:47, 12 October 2008. </p></div></div><br clear='all' /><div id='footer'><br /><script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">_uacct = "UA-1186926-2";urchinTracker();</script><table width='98%' border='0' cellspacing='0'><tr><td width='152' rowspan='1'> </td><td class='bottom' align='center' valign='top'><strong><a href="/index.php?title=SNMP_HOWTO&action=edit" title="SNMP HOWTO">Edit this page</a></strong> |<a href="/index.php?title=Talk:SNMP_HOWTO&action=edit" class="new" title="Talk:SNMP HOWTO">Discuss this page</a> |<a href="/index.php?title=SNMP_HOWTO&action=history" title="SNMP HOWTO">Page history</a> |<a href="/index.php?title=Special:Whatlinkshere&target=SNMP_HOWTO" title="Special:Whatlinkshere">What links here</a> |<a href="/index.php?title=Special:Recentchangeslinked&target=SNMP_HOWTO" title="Special:Recentchangeslinked">Related changes</a><br /><br /><br /><a href="/Main_Page" title="Main Page">Main Page</a> | <a href="/FreeRADIUS_Wiki:About" title="FreeRADIUS Wiki:About">About FreeRADIUS Wiki</a> | <form id="search" method="get" class="inline" action="/Special:Search">Find: <input type='text' name="search" size='14' value="" /><br /><input type='submit' name="go" value="Go" /> <input type='submit' name="fulltext" value="Search" /></form><br />This page has been accessed 9,771 times. This page was last modified 18:47, 12 October 2008. </td></tr></table></div></div><div id='quickbar'><h6>Find</h6><form id="search" method="get" class="inline" action="/Special:Search"><input type='text' name="search" size='14' value="" /><br /><input type='submit' name="go" value="Go" /> <input type='submit' name="fulltext" value="Search" /></form><h6>Browse</h6><a href="/Main_Page">Main Page</a><br /><a href="/FreeRADIUS_Wiki:Community_Portal">Community portal</a><br /><a href="/Current_events">Current events</a><br /><a href="/Special:Recentchanges">Recent changes</a><br /><a href="/Special:Random">Random page</a><br /><a href="/Help:Contents">Help</a><br /><a href="/FreeRADIUS_Wiki:Site_support">Donations</a><br /><h6>Edit</h6><strong><a href="/index.php?title=SNMP_HOWTO&action=edit" title="SNMP HOWTO">Edit this page</a></strong><br /><a href="/Help:Editing" title="Help:Editing">Editing help</a><br /><h6>This page</h6><a href="/index.php?title=Talk:SNMP_HOWTO&action=edit" class="new" title="Talk:SNMP HOWTO">Discuss this page</a><br /><a href="/index.php?title=Talk:SNMP_HOWTO&action=edit&section=new" title="Talk:SNMP HOWTO">Post a comment</a><br /><a href="/index.php?title=SNMP_HOWTO&printable=yes">Printable version</a><br /><h6>Context</h6><a href="/index.php?title=SNMP_HOWTO&action=history" title="SNMP HOWTO">Page history</a><br /><a href="/index.php?title=Special:Whatlinkshere&target=SNMP_HOWTO" title="Special:Whatlinkshere">What links here</a><br /><a href="/index.php?title=Special:Recentchangeslinked&target=SNMP_HOWTO" title="Special:Recentchangeslinked">Related changes</a><br /><h6>My pages</h6><a href="/Special:Userlogin" title="Special:Userlogin">Log in / create account</a><h6>Special pages</h6><a href="/Special:Newpages" title="Special:Newpages">New pages</a><br /><a href="/Special:Imagelist" title="Special:Imagelist">File list</a><br /><a href="/Special:Statistics" title="Special:Statistics">Statistics</a><br /><a href="/FreeRADIUS_Wiki:Bug_reports" title="FreeRADIUS Wiki:Bug reports">Bug reports</a><br /><a href="/Special:Specialpages" title="Special:Specialpages">More...</a><br /></div> <script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script><!-- Served by wiki.freeradius.org in 0.270 secs. --></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -