> For the complete documentation index, see [llms.txt](https://netsec.nerd-cafe.ir/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://netsec.nerd-cafe.ir/security-engineering/prtg-network-monitoring/configuring-snmp-v2-on-cisco-devices.md).

# Configuring SNMP v2 on Cisco Devices

### <mark style="color:blue;">**Module 1: Lab Setup & Network Diagram**</mark>

#### **1.1 Required Software & Tools**

* GNS3
* PRTG Network Monitor (Installed on 192.168.202.10)
* A simple network topology

#### 1.2 Lab Topology

<figure><img src="/files/UHUq2Gb3E8rzKfx796uR" alt=""><figcaption><p>Lab Topology</p></figcaption></figure>

| Device            | Interface | IP Address        |
| ----------------- | --------- | ----------------- |
| Router (R1)       | f0/0      | 192.168.202.1/24  |
| Switch (Sw1)      | VLAN 1    | 192.168.202.2/24  |
| PC1 (VPCS)        | e0        | 192.168.202.11/24 |
| PRTG Server (NMS) | eth1      | 192.168.202.10/24 |

The <mark style="color:red;">**PRTG**</mark> is running on <mark style="color:red;">**192.168.202.10**</mark> and will monitor network devices via <mark style="color:red;">**SNMP v2**</mark>.

### <mark style="color:blue;">Module 2: Basic Configure</mark>

#### 2.1 R1 Router

```bash
R1#configure terminal
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 192.168.202.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#^Z
R1#write memory
```

#### 2.2 Sw1 Switch

```bash
Sw1#configure terminal
Sw1(config)#interface vlan 1
Sw1(config-if)#ip address 192.168.202.2 255.255.255.0
Sw1(config-if)# no shutdown
Sw1(config-if)#^Z
Sw1#write memory
```

#### 2.3 PC1

```sh
PC1> ip 192.168.202.11/24 192.168.202.1
Checking for duplicate address...
PC1 : 192.168.202.11 255.255.255.0 gateway 192.168.202.1

PC1> show ip

NAME        : PC1[1]
IP/MASK     : 192.168.202.11/24
GATEWAY     : 192.168.202.1
DNS         :
MAC         : 00:50:79:66:68:00
LPORT       : 20008
RHOST:PORT  : 127.0.0.1:20009
MTU         : 1500

PC1> save
Saving startup configuration to startup.vpc
.  done

PC1> ping 192.168.202.1

84 bytes from 192.168.202.1 icmp_seq=1 ttl=255 time=41.697 ms
84 bytes from 192.168.202.1 icmp_seq=2 ttl=255 time=14.898 ms
^C
PC1> ping 192.168.202.2

84 bytes from 192.168.202.2 icmp_seq=1 ttl=255 time=0.338 ms
84 bytes from 192.168.202.2 icmp_seq=2 ttl=255 time=0.443 ms
^C
PC1> ping 192.168.202.10

84 bytes from 192.168.202.10 icmp_seq=1 ttl=128 time=0.574 ms
84 bytes from 192.168.202.10 icmp_seq=2 ttl=128 time=0.769 ms
^C
PC1>
```

### <mark style="color:blue;">Module 3: Configure SNMP v2 on Cisco Router</mark>

Set <mark style="color:red;">**SNMP Community String**</mark> (Read-Only Access for PRTG Server **192.168.202.10**):

```bash
R1(config)#snmp-server community public RO
```

Define a **contact & location**:

```bash
R1(config)#snmp-server location nerd-cafe-datacenter
R1(config)#snmp-server contact info@nerd-cafe.ir
```

Enable SNMP traps to **PRTG Server (192.168.202.10)**:

```bash
R1(config)#snmp-server host 192.168.202.10 version 2c public
R1(config)#snmp-server enable traps
```

Save the configuration:

```bash
R1#write memory
Building configuration...
[OK]
R1#
```

### <mark style="color:blue;">Module 4: Configure SNMP v2 on Cisco Switch</mark>

Set **SNMP Community String** (Read-Only Access for **PRTG Server - 192.168.202.10**):

```bash
Sw1(config)#snmp-server community public RO
```

Define a **contact & location**:

```bash
Sw1(config)#snmp-server location nerd-cafe-datacenter
Sw1(config)#snmp-server contact info@nerd-cafe.ir
```

Enable SNMP traps to **PRTG Server (192.168.202.10)**:

```bash
Sw1(config)#snmp-server host 192.168.202.10 version 2c public
Sw1(config)#snmp-server enable traps
```

Save the configuration:

```bash
Sw1#write memory
Building configuration...
Compressed configuration from 4630 bytes to 2031 bytes[OK]
Sw1#
```

### <mark style="color:blue;">**Module 5: Install & Configure PRTG Network Monitor (192.168.202.10)**</mark>

Install PRTG on 192.168.202.10

* Download <mark style="color:red;">**PRTG Network Monitor**</mark> from [Paessler’s website](https://www.paessler.com/).
* Install PRTG on <mark style="color:red;">**192.168.202.10**</mark> (Windows Server/PC).
* After installation, log in to <mark style="color:red;">**PRTG Web Interface**</mark> (`http://127.0.0.1`).

### <mark style="color:blue;">**Module 6: Add Cisco Devices to PRTG**</mark>

#### **6.1 Add Router to PRTG (192.168.202.1)**

* Go to **Devices → Add Device**.
* Enter **Router Name**: `Cisco R1`.
* Set **IP Address**: `192.168.202.1`.

<figure><img src="/files/bshSIQ22QJGpeOCpcfIz" alt=""><figcaption></figcaption></figure>

* Under **Credentials for SNMP Devices**, enter:
  * **SNMP Version**: **v2c**
  * **Community String**: `public`

<figure><img src="/files/b35pPSkl7n4NBvn9104m" alt=""><figcaption></figcaption></figure>

* Click **Save & Continue**.

<figure><img src="/files/GThfUiZJm8606ul44xsu" alt=""><figcaption></figcaption></figure>

#### **5.2 Add Switch to PRTG (192.168.202.2)**

* Go to **Devices → Add Device**.
* Enter **Switch Name**: `Cisco Sw1`.
* Set **IP Address**: `192.168.202.2`.

<figure><img src="/files/o6M2DhfFaPpuNjxxVeol" alt=""><figcaption></figcaption></figure>

* Configure SNMP with:
  * **SNMP Version**: **v2c**
  * **Community String**: `public`

<figure><img src="/files/mWgci0XDtVJrlyYLM5ei" alt=""><figcaption></figcaption></figure>

* Click **Save & Continue**.

<figure><img src="/files/rGrY1sHqqbvj8eSeXW2j" alt=""><figcaption></figcaption></figure>

### <mark style="color:blue;">**Module 7: Monitor Traffic & Alerts**</mark>

#### **7.1 Add SNMP Sensors**

* In **PRTG Web Interface**, select **R1**.
* Click **Add Sensor → SNMP Traffic**.

<figure><img src="/files/NnmzRSQHKyREReymvIcv" alt=""><figcaption></figcaption></figure>

* Select **interfaces to monitor** (e.g., `FastEthernet0/0`).

<figure><img src="/files/KIrX6DSqqB56Dufb3pwv" alt=""><figcaption></figcaption></figure>

* Click **Add Sensor**.

<figure><img src="/files/sKLrbnlvpOvdur3J6hBo" alt=""><figcaption></figcaption></figure>

* Repeat the same steps for **Sw1** and monitor VLAN 1.

### <mark style="color:blue;">Module 8: Test SNMP Communication</mark>

Open **VPCS** on GNS3 and test network connectivity:

```sh
PC1> ping 192.168.202.1
```

Now, check the traffic of FastEthernet 0/0 of R1:

<figure><img src="/files/9acF1mQnCIpKFD69jaEp" alt=""><figcaption></figcaption></figure>

### <mark style="color:blue;">**Module 9: Troubleshooting SNMP Issues**</mark>

#### **9.1 Check SNMP Status on Cisco Devices**

* On Router & Switch:

```bash
R1#show snmp
Chassis: 4279256517
Contact: info@nerd-cafe.ir
Location: nerd-cafe-datacenter
114 SNMP packets input
    0 Bad SNMP version errors
    0 Unknown community name
    0 Illegal operation for community name supplied
    0 Encoding errors
    182 Number of requested variables
    0 Number of altered variables
    99 Get-request PDUs
    15 Get-next PDUs
    0 Set-request PDUs
    0 Input queue packet drops (Maximum queue size 1000)
115 SNMP packets output
    0 Too big errors (Maximum packet size 1500)
    0 No such name errors
    0 Bad values errors
    0 General errors
    114 Response PDUs
    1 Trap PDUs
SNMP Dispatcher:
   queue 0/75 (current/max), 0 dropped
SNMP Engine:
   queue 0/1000 (current/max), 0 dropped

SNMP logging: enabled
    Logging to 192.168.202.10.162, 0/10, 1 sent, 0 dropped.
R1#
```

Check if the SNMP community is correctly set:

```bash
R1#show running-config | include snmp
```

#### **9.2 Fixing Common Issues**

PRTG cannot discover devices?

* Ensure SNMP is enabled and **192.168.202.10** is allowed as the SNMP host.

No SNMP traffic on PRTG?

* Check **firewall settings** on PRTG Server (allow UDP port **161 & 162**).

### <mark style="color:blue;">Keywords:</mark>

`SNMP v2`, `PRTG Network Monitor`, `Cisco router`, `Cisco switch`, `network monitoring`, `SNMP configuration`, `network management`, `NMS`, `Simple Network Management Protocol`, `PRTG setup`, `Cisco SNMP`, `network performance`, `network security`, `SNMP community string`, `network traffic analysis`, `fault detection`, `SNMP traps`, `Cisco IOS`, `real-time monitoring`, `IT infrastructure`, `مانیتورینگ شبکه`
