[질문] net-snmp5.1.1 , snmpd.conf설정중 궁금한게 있어요,,,

nidle의 이미지

안녕하세요 snmp를 공부중인 초보자입니다
어렵게 net-snmp-5.1.1을 페도라4에 설치하고
snmp.conf를 설정중에 궁금한점이 있어서 ...

질문
1. snmp.conf 파일을 example.conf보면 /usr/local/etc/snmp 에 넣으라고 되있는데 이 경로를 바꿀수는 없나요?

2.밑엣 커뮤니티네임 설정에서 local녀석 커뮤니티를 public로 고치니 localhost로는 walk를 날렸는데 타임아웃이 나오더라구요 호스트경우 localhost 커뮤니티가 무조건 private여야 하나요?

#       sec.name  source          community
com2sec local     localhost          private
com2sec mynetwork network/24     public
com2sec public    default            public

3.snmp.conf 설정중 밑에 mask가 머하는녀석인지 모르겠어요 mask의 개념은 대충 알고있는데 여기서 마스크가 왜 필요한지는 모르겠어요

#           incl/excl subtree                          mask
view all    included  .1                               80
view system  included system                           fe
view mib2   included  .iso.org.dod.internet.private.enterprises.ghost  fc

마지막4.밑에 Pass through control 의경우 Extensible sections.( exec .1.3.6.1.4.1.2021.51 ps /bin/ps
이렇게 쓰는거요)과 사용방법이나 쓰임새나 같은거같은데
머가 다른건지 알고싶어요

# Pass through control.
#
 
# Usage:
#   pass MIBOID EXEC-COMMAND


이 많은 질문 읽어주셔셔 감사합니다.
위에 내용은 /net-snmp-5.1.1압축푼 디렉토리/EXAMPLE.conf 파일중의 내용입니다
질문이 많다보니 횡설수설한것 같네요 질문의 내용이 이상하면 다시 생각을 정리해서
자세히 올리겠습니다. 댓글주세요 ^^

nidle의 이미지

2번질문은 제가 snmp.conf 파일을 여러군데 복사해놨는데
정작 사용되는 conf파일을 수정안하고 이상한 파일 수정하고서 안된다고
질문해버렸네요 죄송합니다..^^ 하지만 다른 질문들은 정말 궁금합니다.

wariua의 이미지

1번의 경우...

configure 스크립트를 실행할 때 "--sysconfdir" 옵션으로 기본 설정 파일 경로를 바꿔주실 수 있습니다. (include/net-snmp/net-snmp-config.h에 SNMPCONFPATH로 정의되어 있습니다.) 혹은 실행하면서 "-c" 옵션으로 지정해 주실 수도 있습니다. "man snmp_config"에서 설정 파일의 경로와 관련된 좀더 자세한 정보를 얻으실 수 있습니다.

3번의 경우...

"man snmpd.conf" 내용 중 일부입니다.

man snmpd.conf wrote:

The reason for the mask is, that it allows you to control access to one row in a table, in a relatively simple way. As an example. as an ISP you might consider giving each customer access to his or her own interface:

view cust1 included interfaces.ifTable.ifEntry.ifIndex.1 ff.a0
view cust2 included interfaces.ifTable.ifEntry.ifIndex.2 ff.a0

(interfaces.ifTable.ifEntry.ifIndex.1 == .1.3.6.1.2.1.2.2.1.1.1, ff.a0 == 11111111.10100000. which nicely covers up and including the row index, but lets the user vary the field of the row)


cust1의 경우 ".1.3.6.1.2.1.2.2.1.?.1.*"를 의미하게 됩니다. 즉 마스크에서 처음 9개 비트가 1이니까 처음 9개의 OID 노드는 일치해야 하고, 그 다음 비트가 0이니까 그 다음 노드는 마음대로, 그 다음 노드는 일치, 그 후는 마음대로... 라고 생각할 수 있습니다.

4번의 경우...

Extensible sections의 "exec"는 일반적인 프로그램의 출력을 가지고 행별로 구분해서 문자열 타입으로 처리해 주는 범용적인 방식이고, Pass through control의 "pass"는 하부 OID를 입력으로 받아서 원하는 타입의 결과를 출력해주는 전용 프로그램(local/passtest 스크립트 같은)을 필요로 하는 좀더 특화된 방법이 아닌가 합니다.
----
$PWD `date`

$PWD `date`

nidle의 이미지

이제야 이해가 되는군요,,답변 감사합니다
아무래도 4번은 더 공부를 해야할거 같아요 ^^

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.