The dump say the request is sent and received back......

and using snmptranslate found that ifAdminStatus has RW permission ..

FYI..

Regards
-----



Arun Raju/BLR/HSS

06/12/2006 10:19 PM
FSS-Private

To
Wes Hardaker <[EMAIL PROTECTED]>
cc
[EMAIL PROTECTED]
Subject
Re: Controlling interfaces with SNMPLink





I am using
Net-Snmp version 5.1.2
linux red hat 5.3

step 1
/etc/rc.d/init.d/snmpd  start  -c  /usr/share/snmp/snmpd.conf
Starting snmpd:                                        [OK]

step 2
checked   /var/log/snmpd.log
   Then there was no errors.

The following was my snmpd.conf  i edited to provide write access ...
---------------
syscontact [EMAIL PROTECTED]

rwcommunity public localhost


#interface        eth0        6        10000000

com2sec        local        default        public

group        notConfigGroup        v1        local
group        notConfifGroup        v2c        local

#provideing write access to all ...

view    rwview                 included         .1
view    rwview          included        system.sysContact
view    rwview          included        system.sysName
view    rwview          included        system.sysLocation
view    rwview          included        interfaces.ifTable.ifEntry.ifAdminStatus
view    rwview          included        at.atTable.atEntry.atPhysAddress
view    rwview          included        at.atTable.atEntry.atNetAddress
view    rwview          included        ip.ipForwarding
view    rwview          included        ip.ipDefaultTTL
view    rwview          included        ip.ipRouteTable.ipRouteEntry.ipRouteDest
view    rwview          included        ip.ipRouteTable.ipRouteEntry.ipRouteIfIndex
view    rwview          included        ip.ipRouteTable.ipRouteEntry.ipRouteMetric1
view    rwview          included        ip.ipRouteTable.ipRouteEntry.ipRouteMetric2
view    rwview          included        ip.ipRouteTable.ipRouteEntry.ipRouteMetric3
view    rwview          included        ip.ipRouteTable.ipRouteEntry.ipRouteMetric4
view    rwview          included        ip.ipRouteTable.ipRouteEntry.ipRouteType
view    rwview          included        ip.ipRouteTable.ipRouteEntry.ipRouteAge
view    rwview          included        ip.ipRouteTable.ipRouteEntry.ipRouteMask
view    rwview          included        ip.ipRouteTable.ipRouteEntry.ipRouteMetric5
view    rwview          included        ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaIfIndex
view    rwview          included        ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaPhysAddress
view    rwview          included        ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaNetAddress
view    rwview          included        ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaType
view    rwview          included        tcp.tcpConnTable.tcpConnEntry.tcpConnState
view    rwview          included        egp.egpNeighTable.egpNeighEntry.egpNeighEventTrigger
view    rwview          included        snmp.snmpEnableAuthenTraps

access        notConfigGroup        "'        any        noauth        exact        rwview        rwview        none
-----------------------------------
**Just to double ckeck , i disbaled the ethernet net , via different tool, and checked the status and it is reflecting the status.
 Hence i concluded that it is managed entity.

Now i was trying to disable my local PC ethernet card via snmpset ...before that i am i checked in the tree structure and using get.
i.e;
 snmpget -v 2c -c public localhost interfcaes.ifTable.ifEntry.ifPhysAddress.2
0/p--> My MAC address
 snmpget -v 2c -c public localhost interfcaes.ifTable.ifEntry.ifAdminStatus.2
o/p---> INTEGER: up(1)
 snmpget -v 2c -c public localhost interfcaes.ifTable.ifEntry.ifOperStatus.2
o/p--->INTEGER: up(1)


Now when i perform
snmpset  -d  -v 2c localhost interfaces.ifTable.ifEntry.ifAdminStatus i 2
o/p--> noWritable.

....I request to please provide some input for accomplising my control on ethernet card via snmp.


Note: There is system.sysLocation.0  variable which was entered in snmpd.conf file, which i commented. >From then onwards i was able to do set operation on that particular varibale alon. But right from the begining i am not able to set/reset ifAdminStatus.2 ... I have gone through all the mail list.

any insite would be great relief...

thanks in advance
-----------



Wes Hardaker <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

06/12/2006 10:05 PM

To
hailkumoso hailkumoso <[EMAIL PROTECTED]>
cc
[email protected]
Subject
Re: Controlling interfaces with SNMP





>>>>> On Wed, 7 Jun 2006 07:44:02 -0700 (PDT), hailkumoso hailkumoso <[EMAIL PROTECTED]> said:

hailkumoso> * disable the interface (eth0) or the Mac port using SNMP
hailkumoso>   API's. I know we can use the set command but am not sure
hailkumoso>   of which OID to use for?

hailkumoso> * enable back the same interface.
 
The ifAdminStatus column of the ifTable will do this for you
 
hailkumoso> Also, whats the procedure for finding a OID of a
hailkumoso> particular leaf node in the MIB.

There is a good tutorial on this:

http://www.net-snmp.org/tutorial/tutorial-5/commands/snmptranslate.html

--
Wes Hardaker
Sparta, Inc.


_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders



***********************  FSS-Private   ***********************



***********************  FSS-Private   ***********************
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to