=== TASK 1: SNMP connectivity & system info (Sun Nov  1 17:05:54 UTC 2026) ===
Target: 127.0.0.1  community: labpublic  version: 2c

--- Reachability (ICMP) ---
(ping not installed - skipped)

--- snmpget : all three objects in one request ---
SNMPv2-MIB::sysName.0 = STRING: LAB-SW01
SNMPv2-MIB::sysDescr.0 = STRING: Linux vm 6.18.44-fc-v185 #1 SMP PREEMPT_DYNAMIC @0 x86_64
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (9270) 0:01:32.70

--- snmpget : same, numeric OIDs shown (-On) ---
.1.3.6.1.2.1.1.5.0 = STRING: LAB-SW01
.1.3.6.1.2.1.1.1.0 = STRING: Linux vm 6.18.44-fc-v185 #1 SMP PREEMPT_DYNAMIC @0 x86_64
.1.3.6.1.2.1.1.3.0 = Timeticks: (9274) 0:01:32.74

--- snmpget : one object at a time, values only (-Oqv) ---
sysName   : LAB-SW01
sysDescr  : Linux vm 6.18.44-fc-v185 #1 SMP PREEMPT_DYNAMIC @0 x86_64
sysUpTime : Timeticks: (9285) 0:01:32.85

--- Negative test (wrong community -> must time out) ---
Timeout: No Response from 127.0.0.1.

Timeout above => agent only answers to the correct community.

[saved to output/task1_snmpget.txt]
=== TASK 2: Interface walk (Sun Nov  1 17:05:55 UTC 2026) ===

--- Number of interfaces ---
IF-MIB::ifNumber.0 = INTEGER: 4

--- ifDescr (names) ---
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: ifb0
IF-MIB::ifDescr.3 = STRING: ifb1
IF-MIB::ifDescr.4 = STRING: eth0

--- ifType ---
IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)
IF-MIB::ifType.2 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifType.3 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifType.4 = INTEGER: ethernetCsmacd(6)

--- ifMtu ---
IF-MIB::ifMtu.1 = INTEGER: 65536
IF-MIB::ifMtu.2 = INTEGER: 1500
IF-MIB::ifMtu.3 = INTEGER: 1500
IF-MIB::ifMtu.4 = INTEGER: 1400

--- ifSpeed (bps) ---
IF-MIB::ifSpeed.1 = Gauge32: 10000000
IF-MIB::ifSpeed.2 = Gauge32: 0
IF-MIB::ifSpeed.3 = Gauge32: 0
IF-MIB::ifSpeed.4 = Gauge32: 0

--- ifPhysAddress (MAC) ---
IF-MIB::ifPhysAddress.1 = STRING: 
IF-MIB::ifPhysAddress.2 = STRING: c6:6e:ba:e9:91:5
IF-MIB::ifPhysAddress.3 = STRING: de:12:61:3e:95:d
IF-MIB::ifPhysAddress.4 = STRING: 2:fc:0:0:0:1

--- ifAdminStatus (1=up 2=down) ---
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
IF-MIB::ifAdminStatus.2 = INTEGER: down(2)
IF-MIB::ifAdminStatus.3 = INTEGER: down(2)
IF-MIB::ifAdminStatus.4 = INTEGER: up(1)

--- ifOperStatus (1=up 2=down 7=lowerLayerDown) ---
IF-MIB::ifOperStatus.1 = INTEGER: up(1)
IF-MIB::ifOperStatus.2 = INTEGER: down(2)
IF-MIB::ifOperStatus.3 = INTEGER: down(2)
IF-MIB::ifOperStatus.4 = INTEGER: up(1)

--- ifInOctets (32-bit) ---
IF-MIB::ifInOctets.1 = Counter32: 13012943
IF-MIB::ifInOctets.2 = Counter32: 0
IF-MIB::ifInOctets.3 = Counter32: 0
IF-MIB::ifInOctets.4 = Counter32: 5850023

--- ifOutOctets (32-bit) ---
IF-MIB::ifOutOctets.1 = Counter32: 13012943
IF-MIB::ifOutOctets.2 = Counter32: 0
IF-MIB::ifOutOctets.3 = Counter32: 0
IF-MIB::ifOutOctets.4 = Counter32: 61846

--- ifHCInOctets (64-bit) ---
IF-MIB::ifHCInOctets.1 = Counter64: 13012943
IF-MIB::ifHCInOctets.2 = Counter64: 0
IF-MIB::ifHCInOctets.3 = Counter64: 0
IF-MIB::ifHCInOctets.4 = Counter64: 5850023

--- ifHCOutOctets (64-bit) ---
IF-MIB::ifHCOutOctets.1 = Counter64: 13012943
IF-MIB::ifHCOutOctets.2 = Counter64: 0
IF-MIB::ifHCOutOctets.3 = Counter64: 0
IF-MIB::ifHCOutOctets.4 = Counter64: 61846

--- ifInErrors ---
IF-MIB::ifInErrors.1 = Counter32: 0
IF-MIB::ifInErrors.2 = Counter32: 0
IF-MIB::ifInErrors.3 = Counter32: 0
IF-MIB::ifInErrors.4 = Counter32: 0

--- ifOutErrors ---
IF-MIB::ifOutErrors.1 = Counter32: 0
IF-MIB::ifOutErrors.2 = Counter32: 0
IF-MIB::ifOutErrors.3 = Counter32: 0
IF-MIB::ifOutErrors.4 = Counter32: 0

--- ifInDiscards ---
IF-MIB::ifInDiscards.1 = Counter32: 0
IF-MIB::ifInDiscards.2 = Counter32: 0
IF-MIB::ifInDiscards.3 = Counter32: 0
IF-MIB::ifInDiscards.4 = Counter32: 6

--- ifOutDiscards ---
IF-MIB::ifOutDiscards.1 = Counter32: 0
IF-MIB::ifOutDiscards.2 = Counter32: 0
IF-MIB::ifOutDiscards.3 = Counter32: 0
IF-MIB::ifOutDiscards.4 = Counter32: 0

--- Whole ifTable (first 40 lines) ---
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifIndex.4 = INTEGER: 4
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: ifb0
IF-MIB::ifDescr.3 = STRING: ifb1
IF-MIB::ifDescr.4 = STRING: eth0
IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)
IF-MIB::ifType.2 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifType.3 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifType.4 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifMtu.1 = INTEGER: 65536
IF-MIB::ifMtu.2 = INTEGER: 1500
IF-MIB::ifMtu.3 = INTEGER: 1500
IF-MIB::ifMtu.4 = INTEGER: 1400
IF-MIB::ifSpeed.1 = Gauge32: 10000000
IF-MIB::ifSpeed.2 = Gauge32: 0
IF-MIB::ifSpeed.3 = Gauge32: 0
IF-MIB::ifSpeed.4 = Gauge32: 0
IF-MIB::ifPhysAddress.1 = STRING: 
IF-MIB::ifPhysAddress.2 = STRING: c6:6e:ba:e9:91:5
IF-MIB::ifPhysAddress.3 = STRING: de:12:61:3e:95:d
IF-MIB::ifPhysAddress.4 = STRING: 2:fc:0:0:0:1
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
IF-MIB::ifAdminStatus.2 = INTEGER: down(2)
IF-MIB::ifAdminStatus.3 = INTEGER: down(2)
IF-MIB::ifAdminStatus.4 = INTEGER: up(1)
IF-MIB::ifOperStatus.1 = INTEGER: up(1)
IF-MIB::ifOperStatus.2 = INTEGER: down(2)
IF-MIB::ifOperStatus.3 = INTEGER: down(2)
IF-MIB::ifOperStatus.4 = INTEGER: up(1)
IF-MIB::ifLastChange.1 = Timeticks: (0) 0:00:00.00
IF-MIB::ifLastChange.2 = Timeticks: (0) 0:00:00.00
IF-MIB::ifLastChange.3 = Timeticks: (0) 0:00:00.00
IF-MIB::ifLastChange.4 = Timeticks: (0) 0:00:00.00
IF-MIB::ifInOctets.1 = Counter32: 13012943
IF-MIB::ifInOctets.2 = Counter32: 0
IF-MIB::ifInOctets.3 = Counter32: 0
IF-MIB::ifInOctets.4 = Counter32: 5850023
... (full walk: snmpwalk -v2c -c labpublic 127.0.0.1 IF-MIB::ifTable)

--- Same walk with numeric OIDs (-On) ---
.1.3.6.1.2.1.2.2.1.2.1 = STRING: lo
.1.3.6.1.2.1.2.2.1.2.2 = STRING: ifb0
.1.3.6.1.2.1.2.2.1.2.3 = STRING: ifb1
.1.3.6.1.2.1.2.2.1.2.4 = STRING: eth0

=== Summary table ===
Idx Interface      Speed(Mbps)   Admin            Oper        InOctets       OutOctets
1   lo                      10      up              up        13012943        13012943
2   ifb0                     0    down            down               0               0
3   ifb1                     0    down            down               0               0
4   eth0                     0      up              up         5850023           61846

[saved to output/task2_snmpwalk.txt]
Taking sample 1 ... (then waiting 8s)
Taking sample 2 ...

Counters used : ifHCInOctets/ifHCOutOctets (64-bit)   actual interval: 8.66s

Interface        Speed      dIn(B)     dOut(B)        In bps       Out bps    In %   Out %  Util %
--------------------------------------------------------------------------------------------------
lo                 10M     2936823     2936823     2,712,662     2,712,662  27.127  27.127  27.127
ifb0               n/a           0           0             0             0   0.000   0.000   0.000
ifb1               n/a           0           0             0             0   0.000   0.000   0.000
eth0               n/a           0           0             0             0   0.000   0.000   0.000

--- Worked example (busiest interface: lo ) ---
InOctets delta = 2936823 bytes over 8.66s
Throughput     = 2936823 x 8 / 8.66 = 2,712,662 bit/s = 2.7127 Mbit/s
Utilisation    = 2,712,662 / 10,000,000 x 100 = 27.1266 %

[saved to output/task3_throughput.txt]
*** DEMO MODE: simulated fault injected on eth0 ***

Interface     Admin            Oper   Util%    Err%   Disc%  Status
----------------------------------------------------------------------
lo               up              up    0.00   0.000   0.000  OK
ifb0           down            down    0.00   0.000   0.000  OK
ifb1           down            down    0.00   0.000   0.000  OK
eth0             up            down    0.00   3.500   0.000  CRITICAL

=== FINDINGS ===
[CRITICAL] eth0: admin=up but oper=down (link down / cable / peer fault)
[CRITICAL] eth0: error rate 3.50% > 1.0%

=== RECOMMENDED ALERT THRESHOLDS ===
Condition                         Warning         Critical        Poll / trigger
ifOperStatus (admin=up)           -               != up           SNMP trap linkDown or poll 30-60 s, alert after 2 consecutive polls
Utilisation (max of in/out)       > 70 % 5 min    > 85 % 5 min    poll 60 s, 5-min average to avoid burst false alarms
Error rate (errors/packets)       > 0.1 %         > 1 %           poll 60 s, evaluate on delta of ifIn/OutErrors
Discard rate                      > 0.5 %         > 2 %           indicates congestion / buffer drops
Rationale: link-down is binary and service-affecting -> critical immediately;
sustained (not instantaneous) thresholds avoid alert fatigue; 70 % leaves headroom
for capacity planning before queues build up.

[saved to output/task4_findings.txt]
