snmpset에 대한 질문..
글쓴이: firehole / 작성시간: 금, 2005/01/14 - 10:41오전
안녕하세요?
저는 snmpset 명령을 테스트 하고 있습니다.
다름이 아니라 게시판의 내용을 참고로 테스트 해봤습니다.
우선
Quote:
이렇게 실행 시키고 확인해보니 원하는데로 잘 바뀌더군요...[root@localhost]# snmpset -v 1 -c public localhost system.sysLocation.0 s "seoul"
그런데...제가 snmpwalk 명령으로 -RW- 모드로 되어 있는 ifAdminStatus를 set으로 변경하려 합니다..
참고로 요것은 아래와 같은 내용이더군요..
[root@localhost]# snmptranslate -On -Td -Ib 'ifAdminStatus' .1.3.6.1.2.1.2.2.1.7 ifAdminStatus OBJECT-TYPE -- FROM IF-MIB, RFC1213-MIB SYNTAX INTEGER {up(1), down(2), testing(3)} MAX-ACCESS read-write STATUS current DESCRIPTION "The desired state of the interface. The testing(3) state indicates that no operational packets can be passed. When a managed system initializes, all interfaces start with ifAdminStatus in the down(2) state. As a result of either explicit management action or per configuration information retained by the managed system, ifAdminStatus is then changed to either the up(1) or testing(3) states (or remains in the down(2) state)." ::= { iso(1) org(3) dod(6) internet(1) mgmt(2) mib-2(1) interfaces(2) ifTable(2) ifEntry(1) 7 }
그래서 위 sysLocation처럼 snmpset을 하려하는데...
첫째 질문) data type이 문제가 되더군요. String type은 s 'abc' 이런식으로 설정한다는 것은 알겠는데...integer type은 어찌되는지 모르겠습니다....비슷하게 해도 에러만 계속 남니다.
둘째 질문) 또다른 data type들을 보니 Integer32, EnumVal, Gauge, TimeTicks, Counter, etc..들이 있던데...이것들은 어찌 set을 해야하는지도 알고 싶습니다.
셋째 질문) 주위 분한테 들은 애기인데...snmp.conf 화일에서 COMMUNITY 값에 따라 snmpset을 할 수 있다고 하는데.
Quote:
# sec.name source community
com2sec local localhost public
위의 public -> private로 변경한 후 set을 해야 된다는 애기를 들었는데..맞는 말인지 궁금합니다.
너무 주저리 주저리 글을 올려 죄송합니다.
답변 부탁드립니다.
좋은 하루 되세요^.^
Forums:
Re: snmpset에 대한 질문..
일단 snmpset의 맨페이지를 참고하세요.
http://www.net-snmp.org/docs/man/snmpset.html
기본적인 방법은
ip.ipforwarding.0 i 2
이나
ip.ipforwarding.0 = 2
ip.ipForwarding.0 = INTEGER: not-forwarding(2)
이런 방식도 가능하다고 하는 군요
그리고 각 타입에 따라 i,u,s,x등을 바꾸시면 됩니다.
TIMETICKS의 경우라면 t 100000이런 식으로 하시면 되겠죠.
http://jungjun.net
답변 고맙습니다.
답변 잘 읽었습니다.
좋은 하루 되세요..
댓글 달기