|
|
Suppose that the net1 interface of a host configured as a router is reporting many errors. SNMP can be used to mark the link as being ``down'' remotely.
First, the error count can be obtained with snmpstat.
# snmpstat -i paris public Interface statistics Type InOctet InPckts InErrs IfMtu Name Address Speed OutOctet OutPckts OutErrs OutQlen net0 paris enetv2 3682304 14384 4800 1500 02000000ec2f 10000000 2122240 8290 2138 0 net1 paris enetv2 3895218 18239 17036 1500 02000000ec6c 10000000 2392148 8183 8147 0 lo0 localhost loop 5832 64 0 2048 0 5832 64 0 0Next, the interface can be marked as being ``down'' using setany.
# setany paris public ifAdminStatus.2 -i 2 Name: ifAdminStatus.2 Value: 2When the line is repaired, the interface can be reactivated in a similar fashion:
# setany paris public ifAdminStatus.2 -i 1 Name: ifAdminStatus.2 Value: 1