Skip to content

Split View: [컴퓨터 네트워크] 20. 네트워크 관리와 SNMP

|

[컴퓨터 네트워크] 20. 네트워크 관리와 SNMP

네트워크 관리와 SNMP

대규모 네트워크를 안정적으로 운영하려면 체계적인 네트워크 관리가 필수입니다. 수천 대의 라우터, 스위치, 서버가 연결된 네트워크에서 장애를 탐지하고, 성능을 모니터링하고, 구성을 관리하는 것은 매우 복잡한 작업입니다.

이 글에서는 네트워크 관리의 개요, 관리 인프라의 구성 요소, SNMP(Simple Network Management Protocol)의 동작 원리, 그리고 MIB와 ASN.1 표현 방식을 살펴봅니다.


1. 네트워크 관리 개요

1.1 네트워크 관리란

네트워크 관리는 합리적인 비용으로 실시간 네트워크 서비스 요구사항을 충족하기 위해, 네트워크와 그 구성 요소의 하드웨어, 소프트웨어, 인적 자원을 모니터링, 테스트, 폴링, 구성, 분석, 평가, 제어하는 활동입니다.

1.2 네트워크 관리의 5대 영역

네트워크 관리 5대 영역 (ISO FCAPS 모델)
==========================================

1. 장애 관리 (Fault Management)
   - 네트워크 장애 탐지, 기록, 알림
   - 장애 원인 분석 및 복구
   - 예: 링크 다운, 장비 고장 탐지

2. 구성 관리 (Configuration Management)
   - 네트워크 장비의 설정 관리
   - 구성 변경 추적 및 감사
   - 예: 라우터 인터페이스 설정, VLAN 구성

3. 회계 관리 (Accounting Management)
   - 네트워크 자원 사용량 측정 및 기록
   - 과금 정보 수집
   - 예: 사용자별 대역폭 사용량, 트래픽 통계

4. 성능 관리 (Performance Management)
   - 네트워크 성능 모니터링 및 최적화
   - 트래픽 패턴 분석, 병목 탐지
   - 예: 링크 사용률, 지연, 패킷 손실률

5. 보안 관리 (Security Management)
   - 네트워크 접근 제어 및 보안 정책 관리
   - 보안 이벤트 모니터링
   - 예: 인증, 권한 관리, 감사 로그

2. 네트워크 관리 인프라

2.1 주요 구성 요소

네트워크 관리 인프라
======================

+-------------------------------------------+
|          관리 서버 (NMS)                    |
|  [관리 애플리케이션]                        |
|  [MIB 데이터베이스]                         |
|  [SNMP 매니저]                             |
+-------------------------------------------+
         |              |              |
      SNMP           SNMP           SNMP
         |              |              |
+--------+--+  +--------+--+  +--------+--+
| 라우터     |  | 스위치     |  | 서버       |
| [에이전트] |  | [에이전트] |  | [에이전트] |
| [MIB]     |  | [MIB]     |  | [MIB]     |
+-----------+  +-----------+  +-----------+
  관리 대상 장비 (Managed Devices)

구성 요소:
  1. 관리 엔티티 (Managing Entity / NMS)
     - 네트워크 관리 애플리케이션 실행
     - 관리 대상 장비의 정보 수집 및 제어

  2. 관리 대상 장비 (Managed Device)
     - 라우터, 스위치, 서버, 프린터 등
     - 에이전트 소프트웨어 실행

  3. 에이전트 (Agent)
     - 관리 대상 장비에서 실행되는 프로세스
     - 장비의 상태 정보를 수집하여 MIB에 저장
     - NMS의 요청에 응답

  4. MIB (Management Information Base)
     - 관리 대상 객체의 정보를 저장하는 데이터베이스
     - 각 객체에 고유 OID 부여

  5. 네트워크 관리 프로토콜
     - NMS와 에이전트 간 통신 프로토콜
     - SNMP가 사실상 표준

3. SNMP (Simple Network Management Protocol)

3.1 SNMP의 역할

SNMP는 관리 서버(NMS)와 관리 대상 장비의 에이전트 사이에서 관리 정보를 교환하는 애플리케이션 계층 프로토콜입니다.

SNMP 동작 방식
================

1. 요청-응답 (Request-Response)
   NMS --> [GetRequest] --> 에이전트
   NMS <-- [Response]   <-- 에이전트

2. 트랩 (Trap)
   NMS <-- [Trap] <-- 에이전트
   (비동기적, 에이전트가 자발적으로 알림)

전송 프로토콜: UDP
  - GetRequest/SetRequest: UDP 포트 161
  - Trap: UDP 포트 162

이유: 네트워크 장애 시에도 동작해야 하므로
  TCP의 연결 설정 오버헤드를 피함

3.2 SNMP PDU (Protocol Data Unit)

SNMP 메시지 유형
==================

메시지 유형     | 방향           | 설명
---------------+-----------------+----------------------------------
GetRequest     | NMS -> Agent   | 하나 이상의 MIB 객체 값 요청
GetNextRequest | NMS -> Agent   | MIB 트리에서 다음 객체 값 요청
GetBulkRequest | NMS -> Agent   | 대량의 MIB 객체 값 한번에 요청 (v2)
SetRequest     | NMS -> Agent   | MIB 객체 값 설정 (구성 변경)
Response       | Agent -> NMS   | 요청에 대한 응답 (값 포함)
Trap           | Agent -> NMS   | 비동기 이벤트 알림 (요청 없이)
InformRequest  | NMS -> NMS     | 관리 서버 간 정보 전달 (v2)

3.3 SNMP 동작 예시

SNMP 동작 시나리오
====================

시나리오 1: 인터페이스 상태 조회

  NMS: "라우터 R1의 eth0 상태를 알려주세요"
    --> GetRequest (OID: 1.3.6.1.2.1.2.2.1.8.1)
  Agent: "eth0는 up 상태입니다"
    <-- Response (값: 1 = up)

시나리오 2: MIB 테이블 순회

  NMS: "첫 번째 인터페이스 정보"
    --> GetNextRequest (OID: 1.3.6.1.2.1.2.2.1)
  Agent: "ifIndex.1 = 1"
    <-- Response

  NMS: "그 다음 정보"
    --> GetNextRequest (OID: 1.3.6.1.2.1.2.2.1.1.1)
  Agent: "ifDescr.1 = eth0"
    <-- Response

시나리오 3: 장애 알림 (Trap)

  Agent: "링크 eth0가 다운되었습니다!"
    --> Trap (linkDown, ifIndex=1)
  NMS: 알림 수신 및 관리자에게 통보

4. SMI (Structure of Management Information)

4.1 SMI의 역할

SMI는 MIB 객체를 정의하는 규칙과 구조를 제공합니다. MIB 객체의 이름, 데이터 타입, 인코딩 방법을 규정합니다.

SMI가 정의하는 것
====================

1. 객체 이름: OID (Object Identifier)
   - 계층적 트리 구조
   - 점으로 구분된 숫자열
   - 예: 1.3.6.1.2.1.1.1 = sysDescr

2. 데이터 타입: ASN.1 기본 타입
   - INTEGER
   - OCTET STRING
   - Counter32
   - Gauge32
   - TimeTicks
   - IpAddress

3. 인코딩: BER (Basic Encoding Rules)
   - TLV (Type-Length-Value) 형식
   - 네트워크 전송을 위한 바이트 인코딩

4.2 OID 트리 구조

OID (Object Identifier) 트리
===============================

           root
          / | \
       iso(1) ...
         |
       org(3)
         |
       dod(6)
         |
      internet(1)
       /    |    \
  mgmt(2)  private(4)  ...
    |          |
  mib-2(1)  enterprises(1)
  /  |  \        |
 system interfaces  ip  ...
 (1)    (2)       (4)
  |      |
sysDescr ifNumber
(1.1)    (2.1)

전체 OID 예시:
  sysDescr = 1.3.6.1.2.1.1.1
    iso.org.dod.internet.mgmt.mib-2.system.sysDescr

  ifNumber = 1.3.6.1.2.1.2.1
    iso.org.dod.internet.mgmt.mib-2.interfaces.ifNumber

5. MIB (Management Information Base)

5.1 MIB-2 주요 그룹

MIB-2 객체 그룹
==================

그룹          | OID               | 설명
--------------+-------------------+---------------------------
system (1)    | 1.3.6.1.2.1.1    | 시스템 기본 정보
interfaces(2) | 1.3.6.1.2.1.2    | 네트워크 인터페이스
at (3)        | 1.3.6.1.2.1.3    | 주소 변환 (ARP)
ip (4)        | 1.3.6.1.2.1.4    | IP 프로토콜 통계
icmp (5)      | 1.3.6.1.2.1.5    | ICMP 통계
tcp (6)       | 1.3.6.1.2.1.6    | TCP 통계
udp (7)       | 1.3.6.1.2.1.7    | UDP 통계
snmp (11)     | 1.3.6.1.2.1.11   | SNMP 자체 통계

5.2 MIB 객체 예시

system 그룹 객체들
====================

OID                    | 이름          | 타입         | 설명
-----------------------+--------------+-------------+-----------
1.3.6.1.2.1.1.1       | sysDescr     | OCTET STRING| 시스템 설명
1.3.6.1.2.1.1.2       | sysObjectID  | OID         | 벤더 식별
1.3.6.1.2.1.1.3       | sysUpTime    | TimeTicks   | 가동 시간
1.3.6.1.2.1.1.4       | sysContact   | OCTET STRING| 관리자 연락처
1.3.6.1.2.1.1.5       | sysName      | OCTET STRING| 장비 이름
1.3.6.1.2.1.1.6       | sysLocation  | OCTET STRING| 장비 위치

interfaces 그룹 (ifTable):
OID                    | 이름          | 설명
-----------------------+--------------+------------------
1.3.6.1.2.1.2.2.1.1   | ifIndex      | 인터페이스 번호
1.3.6.1.2.1.2.2.1.2   | ifDescr      | 인터페이스 설명
1.3.6.1.2.1.2.2.1.5   | ifSpeed      | 인터페이스 속도
1.3.6.1.2.1.2.2.1.8   | ifOperStatus | 동작 상태 (1=up)
1.3.6.1.2.1.2.2.1.10  | ifInOctets   | 수신 바이트 수
1.3.6.1.2.1.2.2.1.16  | ifOutOctets  | 송신 바이트 수

6. ASN.1 (Abstract Syntax Notation One)

6.1 ASN.1의 역할

ASN.1은 네트워크 관리 데이터의 구조를 정의하기 위한 표준 표기법입니다. MIB 객체의 형식적 정의에 사용됩니다.

ASN.1 MIB 객체 정의 예시
==========================

sysDescr OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE (0..255))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "A textual description of the entity."
    ::= { system 1 }

ifOperStatus OBJECT-TYPE
    SYNTAX      INTEGER {
                    up(1),
                    down(2),
                    testing(3)
                }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The current operational state of the interface."
    ::= { ifEntry 8 }

6.2 BER 인코딩

BER (Basic Encoding Rules) TLV 형식
======================================

각 데이터 요소를 Tag-Length-Value로 인코딩

  +------+--------+-------+
  | Tag  | Length | Value |
  +------+--------+-------+

예시: INTEGER 값 5를 인코딩

  Tag:    02 (INTEGER 타입)
  Length: 01 (1바이트)
  Value:  05

  인코딩 결과: 02 01 05

예시: OCTET STRING "Hi"를 인코딩

  Tag:    04 (OCTET STRING 타입)
  Length: 02 (2바이트)
  Value:  48 69 ("Hi"의 ASCII)

  인코딩 결과: 04 02 48 69

7. SNMP 버전별 발전

7.1 SNMPv1, v2c, v3 비교

SNMP 버전 비교
================

항목          | SNMPv1       | SNMPv2c      | SNMPv3
--------------+--------------+--------------+--------------
출시          | 1988         | 1996         | 2004
보안          | 커뮤니티 문자열| 커뮤니티 문자열| USM (인증+암호화)
인증          | 평문 전송    | 평문 전송    | HMAC-MD5/SHA
암호화        | 없음         | 없음         | DES/AES
접근 제어     | 기본적       | 기본적       | VACM (세밀)
벌크 전송     | 없음         | GetBulk      | GetBulk

7.2 SNMPv3 보안 모델

SNMPv3 보안 아키텍처
======================

USM (User-based Security Model):
  인증 수준 3가지:

  1. noAuthNoPriv: 인증 없음, 암호화 없음
     - 사용자 이름만으로 접근
     - 보안이 불필요한 환경

  2. authNoPriv: 인증 있음, 암호화 없음
     - HMAC-MD5 또는 HMAC-SHA로 메시지 인증
     - 변조 방지, 도청 가능

  3. authPriv: 인증 있음, 암호화 있음
     - 인증: HMAC-MD5/SHA
     - 암호화: DES 또는 AES
     - 도청과 변조 모두 방지

VACM (View-based Access Control Model):
  - 사용자별로 접근 가능한 MIB 뷰 정의
  - 읽기 전용, 읽기-쓰기 등 세밀한 접근 제어
  - 보안 수준에 따라 다른 뷰 할당 가능

8. 현대 네트워크 관리 도구

SNMP를 넘어선 현대 네트워크 관리
==================================

도구/기술       | 용도                | 특징
---------------+--------------------+----------------------------
SNMP           | 장비 모니터링       | 표준, 경량, 오래된 기술
NetFlow/sFlow  | 트래픽 분석         | 플로우 기반 상세 분석
YANG/NETCONF   | 구성 관리           | XML 기반, 트랜잭션 지원
gNMI/gRPC      | 텔레메트리          | 스트리밍, 고성능
Prometheus     | 메트릭 수집         | 풀 방식, 시계열 DB
Grafana        | 시각화             | 대시보드, 알림
Ansible        | 자동화 구성 관리    | 에이전트리스, 멱등성
Terraform      | 인프라 코드화       | IaC, 선언적 구성

발전 방향:
  1. SNMP: 기본적인 장비 모니터링에 여전히 사용
  2. NETCONF/YANG: SNMP의 구성 관리 한계 극복
  3. 스트리밍 텔레메트리: 실시간 데이터 수집
  4. SDN: 중앙화된 네트워크 관리 및 제어

9. 네트워크 관리 실습 예시

SNMP 명령어 예시 (snmpwalk, snmpget)
======================================

시스템 정보 조회:
  snmpget -v2c -c public 192.168.1.1 sysDescr.0
  응답: "Cisco IOS Software, Version 15.1"

  snmpget -v2c -c public 192.168.1.1 sysUpTime.0
  응답: 12345678 (1/100초 단위 = 약 1.4일)

인터페이스 상태 조회:
  snmpwalk -v2c -c public 192.168.1.1 ifOperStatus
  응답:
    ifOperStatus.1 = up(1)
    ifOperStatus.2 = down(2)
    ifOperStatus.3 = up(1)

트래픽 통계 조회:
  snmpget -v2c -c public 192.168.1.1 ifInOctets.1
  응답: 1234567890 (수신 바이트 수)

  snmpget -v2c -c public 192.168.1.1 ifOutOctets.1
  응답: 987654321 (송신 바이트 수)

10. 정리

개념핵심 내용
FCAPS장애, 구성, 회계, 성능, 보안의 5대 관리 영역
SNMPUDP 기반 네트워크 관리 프로토콜 (포트 161/162)
MIB관리 객체 정보 저장소, OID로 식별
OID계층적 트리 구조의 객체 식별자
SMIMIB 객체 정의 규칙과 구조
ASN.1데이터 구조 표기법, BER로 인코딩
SNMPv3USM(인증/암호화) + VACM(접근 제어) 보안
Trap에이전트가 NMS에 비동기 이벤트 알림

이 글로 컴퓨터 네트워크 시리즈를 마무리합니다. 애플리케이션 계층부터 물리 계층까지, 인터넷의 프로토콜 스택 전체를 살펴보았습니다. 네트워크의 각 계층이 어떤 문제를 해결하고, 어떻게 서로 협력하는지를 이해하는 것이 중요합니다.


참고 자료

  • James F. Kurose, Keith W. Ross, "Computer Networking: A Top-Down Approach", 6th Edition, Chapter 9
  • RFC 3411 - Architecture for SNMP Management Frameworks
  • RFC 3414 - User-based Security Model (USM) for SNMPv3
  • RFC 3415 - View-based Access Control Model (VACM) for SNMP

[Computer Networking] 20. Network Management and SNMP

Network Management and SNMP

Systematic network management is essential for reliably operating large-scale networks. Detecting failures, monitoring performance, and managing configurations across networks with thousands of routers, switches, and servers is a highly complex task.

In this post, we examine the overview of network management, the components of management infrastructure, the operating principles of SNMP (Simple Network Management Protocol), and MIB with ASN.1 representation.


1. Network Management Overview

1.1 What Is Network Management

Network management is the activity of monitoring, testing, polling, configuring, analyzing, evaluating, and controlling the hardware, software, and human resources of a network and its components to meet real-time network service requirements at reasonable cost.

1.2 Five Areas of Network Management

Five Areas of Network Management (ISO FCAPS Model)
=====================================================

1. Fault Management
   - Network failure detection, logging, alerting
   - Failure cause analysis and recovery
   - Example: Link down, equipment failure detection

2. Configuration Management
   - Managing network device settings
   - Configuration change tracking and auditing
   - Example: Router interface config, VLAN setup

3. Accounting Management
   - Measuring and recording network resource usage
   - Collecting billing information
   - Example: Per-user bandwidth usage, traffic statistics

4. Performance Management
   - Network performance monitoring and optimization
   - Traffic pattern analysis, bottleneck detection
   - Example: Link utilization, delay, packet loss rate

5. Security Management
   - Network access control and security policy management
   - Security event monitoring
   - Example: Authentication, authorization, audit logs

2. Network Management Infrastructure

2.1 Key Components

Network Management Infrastructure
====================================

+-------------------------------------------+
|        Management Server (NMS)             |
|  [Management Application]                  |
|  [MIB Database]                            |
|  [SNMP Manager]                            |
+-------------------------------------------+
         |              |              |
      SNMP           SNMP           SNMP
         |              |              |
+--------+--+  +--------+--+  +--------+--+
| Router     |  | Switch     |  | Server     |
| [Agent]    |  | [Agent]    |  | [Agent]    |
| [MIB]      |  | [MIB]      |  | [MIB]      |
+------------+  +------------+  +------------+
  Managed Devices

Components:
  1. Managing Entity (NMS)
     - Runs network management applications
     - Collects information from and controls managed devices

  2. Managed Device
     - Routers, switches, servers, printers, etc.
     - Runs agent software

  3. Agent
     - Process running on managed device
     - Collects device status information and stores in MIB
     - Responds to NMS requests

  4. MIB (Management Information Base)
     - Database storing managed object information
     - Each object assigned a unique OID

  5. Network Management Protocol
     - Communication protocol between NMS and agents
     - SNMP is the de facto standard

3. SNMP (Simple Network Management Protocol)

3.1 Role of SNMP

SNMP is an application-layer protocol that exchanges management information between the management server (NMS) and agents on managed devices.

SNMP Operation Modes
======================

1. Request-Response
   NMS --> [GetRequest] --> Agent
   NMS <-- [Response]   <-- Agent

2. Trap
   NMS <-- [Trap] <-- Agent
   (Asynchronous, agent sends voluntarily)

Transport Protocol: UDP
  - GetRequest/SetRequest: UDP port 161
  - Trap: UDP port 162

Reason: Must operate even during network failures,
  avoiding TCP connection setup overhead

3.2 SNMP PDU (Protocol Data Unit)

SNMP Message Types
====================

Message Type    | Direction       | Description
----------------+-----------------+----------------------------------
GetRequest      | NMS -> Agent    | Request one or more MIB object values
GetNextRequest  | NMS -> Agent    | Request next object value in MIB tree
GetBulkRequest  | NMS -> Agent    | Request many MIB values at once (v2)
SetRequest      | NMS -> Agent    | Set MIB object value (config change)
Response        | Agent -> NMS    | Response to request (with values)
Trap            | Agent -> NMS    | Async event notification (unsolicited)
InformRequest   | NMS -> NMS      | Inter-manager information transfer (v2)

3.3 SNMP Operation Examples

SNMP Operation Scenarios
==========================

Scenario 1: Interface Status Query

  NMS: "Tell me the status of eth0 on router R1"
    --> GetRequest (OID: 1.3.6.1.2.1.2.2.1.8.1)
  Agent: "eth0 is in up state"
    <-- Response (Value: 1 = up)

Scenario 2: MIB Table Walk

  NMS: "First interface info"
    --> GetNextRequest (OID: 1.3.6.1.2.1.2.2.1)
  Agent: "ifIndex.1 = 1"
    <-- Response

  NMS: "Next info"
    --> GetNextRequest (OID: 1.3.6.1.2.1.2.2.1.1.1)
  Agent: "ifDescr.1 = eth0"
    <-- Response

Scenario 3: Failure Alert (Trap)

  Agent: "Link eth0 is down!"
    --> Trap (linkDown, ifIndex=1)
  NMS: Receives alert and notifies administrator

4. SMI (Structure of Management Information)

4.1 Role of SMI

SMI provides the rules and structure for defining MIB objects. It specifies the naming, data types, and encoding methods for MIB objects.

What SMI Defines
==================

1. Object Names: OID (Object Identifier)
   - Hierarchical tree structure
   - Dot-separated numeric strings
   - Example: 1.3.6.1.2.1.1.1 = sysDescr

2. Data Types: ASN.1 base types
   - INTEGER
   - OCTET STRING
   - Counter32
   - Gauge32
   - TimeTicks
   - IpAddress

3. Encoding: BER (Basic Encoding Rules)
   - TLV (Type-Length-Value) format
   - Byte encoding for network transmission

4.2 OID Tree Structure

OID (Object Identifier) Tree
================================

           root
          / | \
       iso(1) ...
         |
       org(3)
         |
       dod(6)
         |
      internet(1)
       /    |    \
  mgmt(2)  private(4)  ...
    |          |
  mib-2(1)  enterprises(1)
  /  |  \        |
 system interfaces  ip  ...
 (1)    (2)       (4)
  |      |
sysDescr ifNumber
(1.1)    (2.1)

Full OID Examples:
  sysDescr = 1.3.6.1.2.1.1.1
    iso.org.dod.internet.mgmt.mib-2.system.sysDescr

  ifNumber = 1.3.6.1.2.1.2.1
    iso.org.dod.internet.mgmt.mib-2.interfaces.ifNumber

5. MIB (Management Information Base)

5.1 MIB-2 Key Groups

MIB-2 Object Groups
======================

Group          | OID               | Description
---------------+-------------------+---------------------------
system (1)     | 1.3.6.1.2.1.1    | System basic information
interfaces (2) | 1.3.6.1.2.1.2    | Network interfaces
at (3)         | 1.3.6.1.2.1.3    | Address translation (ARP)
ip (4)         | 1.3.6.1.2.1.4    | IP protocol statistics
icmp (5)       | 1.3.6.1.2.1.5    | ICMP statistics
tcp (6)        | 1.3.6.1.2.1.6    | TCP statistics
udp (7)        | 1.3.6.1.2.1.7    | UDP statistics
snmp (11)      | 1.3.6.1.2.1.11   | SNMP self statistics

5.2 MIB Object Examples

system Group Objects
======================

OID                    | Name          | Type         | Description
-----------------------+--------------+-------------+-------------
1.3.6.1.2.1.1.1       | sysDescr     | OCTET STRING| System description
1.3.6.1.2.1.1.2       | sysObjectID  | OID         | Vendor identifier
1.3.6.1.2.1.1.3       | sysUpTime    | TimeTicks   | Uptime
1.3.6.1.2.1.1.4       | sysContact   | OCTET STRING| Admin contact
1.3.6.1.2.1.1.5       | sysName      | OCTET STRING| Device name
1.3.6.1.2.1.1.6       | sysLocation  | OCTET STRING| Device location

interfaces Group (ifTable):
OID                    | Name          | Description
-----------------------+--------------+------------------
1.3.6.1.2.1.2.2.1.1   | ifIndex      | Interface number
1.3.6.1.2.1.2.2.1.2   | ifDescr      | Interface description
1.3.6.1.2.1.2.2.1.5   | ifSpeed      | Interface speed
1.3.6.1.2.1.2.2.1.8   | ifOperStatus | Operational status (1=up)
1.3.6.1.2.1.2.2.1.10  | ifInOctets   | Received bytes
1.3.6.1.2.1.2.2.1.16  | ifOutOctets  | Transmitted bytes

6. ASN.1 (Abstract Syntax Notation One)

6.1 Role of ASN.1

ASN.1 is a standard notation for defining the structure of network management data. It is used for formal definition of MIB objects.

ASN.1 MIB Object Definition Example
=======================================

sysDescr OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE (0..255))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "A textual description of the entity."
    ::= { system 1 }

ifOperStatus OBJECT-TYPE
    SYNTAX      INTEGER {
                    up(1),
                    down(2),
                    testing(3)
                }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The current operational state of the interface."
    ::= { ifEntry 8 }

6.2 BER Encoding

BER (Basic Encoding Rules) TLV Format
=========================================

Each data element encoded as Tag-Length-Value

  +------+--------+-------+
  | Tag  | Length | Value |
  +------+--------+-------+

Example: Encoding INTEGER value 5

  Tag:    02 (INTEGER type)
  Length: 01 (1 byte)
  Value:  05

  Encoded result: 02 01 05

Example: Encoding OCTET STRING "Hi"

  Tag:    04 (OCTET STRING type)
  Length: 02 (2 bytes)
  Value:  48 69 (ASCII for "Hi")

  Encoded result: 04 02 48 69

7. SNMP Version Evolution

7.1 SNMPv1, v2c, v3 Comparison

SNMP Version Comparison
=========================

Item           | SNMPv1        | SNMPv2c       | SNMPv3
---------------+---------------+---------------+--------------
Release        | 1988          | 1996          | 2004
Security       | Community str.| Community str.| USM (Auth+Enc)
Authentication | Plaintext     | Plaintext     | HMAC-MD5/SHA
Encryption     | None          | None          | DES/AES
Access Control | Basic         | Basic         | VACM (granular)
Bulk Transfer  | None          | GetBulk       | GetBulk

7.2 SNMPv3 Security Model

SNMPv3 Security Architecture
===============================

USM (User-based Security Model):
  3 Authentication Levels:

  1. noAuthNoPriv: No authentication, no encryption
     - Access by username only
     - For environments where security is unnecessary

  2. authNoPriv: Authentication, no encryption
     - Message authentication via HMAC-MD5 or HMAC-SHA
     - Prevents tampering, eavesdropping possible

  3. authPriv: Authentication and encryption
     - Authentication: HMAC-MD5/SHA
     - Encryption: DES or AES
     - Prevents both eavesdropping and tampering

VACM (View-based Access Control Model):
  - Define accessible MIB views per user
  - Granular access control: read-only, read-write, etc.
  - Different views assignable by security level

8. Modern Network Management Tools

Beyond SNMP: Modern Network Management
==========================================

Tool/Technology | Purpose              | Features
----------------+----------------------+----------------------------
SNMP            | Device monitoring    | Standard, lightweight, legacy
NetFlow/sFlow   | Traffic analysis     | Flow-based detailed analysis
YANG/NETCONF    | Config management    | XML-based, transaction support
gNMI/gRPC       | Telemetry           | Streaming, high performance
Prometheus      | Metric collection   | Pull-based, time-series DB
Grafana         | Visualization       | Dashboards, alerting
Ansible         | Automated config    | Agentless, idempotent
Terraform       | Infrastructure as Code| IaC, declarative config

Evolution Direction:
  1. SNMP: Still used for basic device monitoring
  2. NETCONF/YANG: Overcomes SNMP config management limitations
  3. Streaming Telemetry: Real-time data collection
  4. SDN: Centralized network management and control

9. Network Management Hands-On Example

SNMP Command Examples (snmpwalk, snmpget)
============================================

System Info Query:
  snmpget -v2c -c public 192.168.1.1 sysDescr.0
  Response: "Cisco IOS Software, Version 15.1"

  snmpget -v2c -c public 192.168.1.1 sysUpTime.0
  Response: 12345678 (1/100 sec units = ~1.4 days)

Interface Status Query:
  snmpwalk -v2c -c public 192.168.1.1 ifOperStatus
  Response:
    ifOperStatus.1 = up(1)
    ifOperStatus.2 = down(2)
    ifOperStatus.3 = up(1)

Traffic Statistics Query:
  snmpget -v2c -c public 192.168.1.1 ifInOctets.1
  Response: 1234567890 (received bytes)

  snmpget -v2c -c public 192.168.1.1 ifOutOctets.1
  Response: 987654321 (transmitted bytes)

10. Summary

ConceptKey Points
FCAPSFive management areas: Fault, Config, Accounting, Performance, Security
SNMPUDP-based network management protocol (ports 161/162)
MIBManaged object information store, identified by OID
OIDHierarchical tree-structured object identifier
SMIRules and structure for MIB object definition
ASN.1Data structure notation, encoded with BER
SNMPv3USM (auth/encryption) + VACM (access control) security
TrapAgent asynchronously notifies NMS of events

This post concludes the Computer Networking series. We have examined the entire Internet protocol stack, from the application layer to the physical layer. Understanding what problems each layer solves and how they cooperate with each other is what matters most.


References

  • James F. Kurose, Keith W. Ross, "Computer Networking: A Top-Down Approach", 6th Edition, Chapter 9
  • RFC 3411 - Architecture for SNMP Management Frameworks
  • RFC 3414 - User-based Security Model (USM) for SNMPv3
  • RFC 3415 - View-based Access Control Model (VACM) for SNMP