# Experiment 2 – SNMP-Based Network Device Monitoring

Objective: Monitor a simulated network switch or SNMP-enabled Linux server using SNMP commands to retrieve device information, interface statistics and network utilization.

## 1. What is SNMP?

SNMP (Simple Network Management Protocol) is an application-layer protocol used to monitor and manage network devices such as routers, switches and servers.

It allows administrators to retrieve information like device uptime, interface status, traffic and errors.

## 2. Explain the architecture of SNMP.

SNMP consists of three main components:

- SNMP Manager: Central system that monitors network devices.
- SNMP Agent: Software running on the device that collects and provides information.
- MIB: Management Information Base, which stores information about managed device parameters.

The manager communicates with the agent to retrieve device information.

## 3. What are the different versions of SNMP?

- SNMPv1: Original version; uses community strings for authentication.
- SNMPv2c: Improved performance and additional operations, but still uses community strings.
- SNMPv3: Provides authentication, encryption and better security.

SNMPv3 is the most secure version.

## 4. What are community strings in SNMP?

Community strings act like passwords for SNMP communication.

- Public: Traditionally used for read-only access.
- Private: Traditionally used for read-write access.

They are not encrypted in SNMPv1 and SNMPv2c.

## 5. What are GET, SET, WALK and TRAP operations?

- GET: Retrieves a specific value from an SNMP agent.
- SET: Modifies a value on the managed device.
- WALK: Retrieves multiple values from a specified MIB subtree.
- TRAP: Sends an unsolicited notification from the agent to the manager when an event occurs.

## 6. What is MIB and OID?

MIB (Management Information Base) is a database containing managed device information.

OID (Object Identifier) is a unique numerical identifier used to identify a particular parameter in the MIB.

For example, an OID can identify a device's system name or network interface counter.

## 7. What are `snmpget` and `snmpwalk`?

- snmpget: Retrieves a specific SNMP object using its OID.
- snmpwalk: Retrieves multiple objects under a particular OID subtree.

In our experiment:

- `snmpget` retrieves `sysName`, `sysDescr` and `sysUpTime`.
- `snmpwalk` retrieves interface information, status and traffic counters.

## 8. What are sysName, sysDescr and sysUpTime?

These are standard SNMP system objects:

- sysName: Name of the network device.
- sysDescr: Description of the device, including system information.
- sysUpTime: Time since the network management subsystem was initialized, measured in hundredths of a second.

## 9. What are interface counters and octets?

Interface counters track network traffic passing through an interface.

- ifInOctets: Total incoming bytes.
- ifOutOctets: Total outgoing bytes.
- ifInErrors: Number of incoming packets containing errors.
- ifOutErrors: Number of outgoing packets containing errors.

These help identify network traffic and interface problems.

## 10. How do you calculate network throughput?

Throughput represents the amount of data transferred per second.

Using two counter samples:

\\[ \text{Throughput (bps)} = \frac{(\text{Counter}\_2-\text{Counter}\_1)\times8} {\text{Time Difference}} \\]

We multiply by 8 to convert bytes into bits.

Example: If 1,000,000 bytes are transferred in 10 seconds:

\\[ \frac{1000000\times8}{10}=800000\text{ bps} \\]

Therefore, throughput = 800 Kbps.

## 11. How do you calculate interface utilization?

Interface utilization represents the percentage of available bandwidth being used.

\\[ \text{Utilization (\\%)} = \frac{\text{Throughput}}{\text{Interface Bandwidth}}\times100 \\]

For example, if throughput is 50 Mbps and interface bandwidth is 100 Mbps, utilization is 50%.

## 12. What are the common abnormal interface conditions?

- High utilization: Interface is approaching its bandwidth capacity.
- High error counters: Indicates possible transmission or hardware problems.
- Interface down: Device interface is not operational.
- Increasing packet drops: Indicates possible congestion or network issues.

## 13. What is the difference between SNMP polling and traps?

- Polling: Manager periodically requests information from the agent.
- Trap: Agent automatically sends a notification when a particular event occurs.

Polling is periodic, whereas traps are event-driven.

## 14. Which ports does SNMP use?

- UDP 161: Used for SNMP requests and responses.
- UDP 162: Used for SNMP traps and notifications.

## 15. How would you identify an abnormal network interface?

I would examine interface operational status, incoming and outgoing traffic counters, error counters and bandwidth utilization. If utilization is consistently high or errors increase significantly, I would investigate and configure an appropriate alert threshold.

## Last-minute revision

| Term        | Remember                    |
| ----------- | --------------------------- |
| SNMP        | Network monitoring protocol |
| Manager     | Monitors devices            |
| Agent       | Runs on monitored device    |
| MIB         | Database of managed objects |
| OID         | Unique object identifier    |
| GET         | Retrieve one value          |
| WALK        | Retrieve multiple values    |
| TRAP        | Event notification          |
| UDP 161     | SNMP requests               |
| UDP 162     | SNMP traps                  |
| ifInOctets  | Incoming bytes              |
| ifOutOctets | Outgoing bytes              |
| SNMPv3      | Authentication + encryption |

Important for practical viva

Focus on:

1. SNMP architecture and versions.
2. Difference between `snmpget` and `snmpwalk`.
3. MIB and OID.
4. sysName, sysDescr and sysUpTime.
5. Throughput and utilization numericals.
6. UDP ports 161 and 162.

Based on Experiment 2 of your CS414 lab question bank.&#x20;

CS414_ITIMM_Lab_ESE.pdf
