20
Linux Kernel AgentX Sub-Agents Oliver Wellnitz [email protected] Institute of Operating Systems and Computer Networks Technical University Braunschweig, Germany page 1/20 Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002 Linux Kernel AgentX sub-agents

Linux Kernel AgentX Sub-Agents

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Linux Kernel AgentX Sub-Agents

Linux Kernel AgentX Sub-Agents

Oliver [email protected]

Institute of Operating Systems and Computer Networks

Technical University Braunschweig, Germany

page 1/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 2: Linux Kernel AgentX Sub-Agents

Overview

� Network Managment (SNMP and AgentX)

� Motivation

� Linux Kernel Implementation

� Conclusions and Outlook

page 2/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 3: Linux Kernel AgentX Sub-Agents

Why Network Management?

� Large computer networks cannot be managed manually

� Heterogeneous LANs

� Network management is essential

Standard network managment protocol in the Internet:

Simple network managment protocol (SNMP)

page 3/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 4: Linux Kernel AgentX Sub-Agents

Simple Network Management Protocol

SNMP contains three principal components:

� SNMP managerrequests and processes information from SNMP agents

� SNMP agentson each device, provides management information to SNMPmanagers

� Management Information Bases (MIBs)define the data models of certain management areas,contain scalars and tables, MIB tree

page 4/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 5: Linux Kernel AgentX Sub-Agents

Simple Network Managment Protocol (cont.)

SNMP agents

Get/Set

Notification

SNMP manager

Get/Set

Notification

Get/SetNotification

! Power

COL 1 2 3 4 5 6 7 8 1 2 3 6 25 50 801210010

Ether 10/100

� ��

� � � �� � � �� � � �� � � �� � � �� � � �

� � � �� � � �� � � �� � � �� � � �� � � �

page 5/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 6: Linux Kernel AgentX Sub-Agents

Extensible Agents

Goals

� Seperate SNMP protocol engine from MIB instrumentation

� Facilitate the (dynamic) extension with new MIB modules

� Extensible agents should be transparent for managers

Get / Set / Traps

Get / Set / Traps

Protocol

Get / Set

SNMPProtocol

Traps

SNMP Agent

Subagent

Subagent

SNMPSNMPManager

SubagentMaster Agent

page 6/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 7: Linux Kernel AgentX Sub-Agents

Subagent Protocols

� SNMP multiplexing protocol (SMUX),RFC 1227, May 1991

� SNMP distributed programm interface (DPI),RFC 1228, May 1991

� Enhanced MANagement Agent Through Extensions(EMANATE), commercial product

� Agent eXtensibility (AgentX),RFC 2741, January 2000

page 7/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 8: Linux Kernel AgentX Sub-Agents

AgentX Protocol Features

� Simplified variable enconding (SNMP uses ASN.1/BER)

� No authentication, no encryption ( � simple to implement)

� Registration conflict arbitration

� Index allocation

� Multiple sessions with one connection

� Multiphase set operation

� Mature (First subagent protocol on IETF’s standards track)

page 8/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 9: Linux Kernel AgentX Sub-Agents

Motivation

Problems of today’s userspace SNMP agents for Linux

� Various methods to gather information from the kernel(ioctl, specific system call, /proc filesystem)

� Specific kernel interfaces may change

� SNMP Notifications are difficult to implement

� Functionality and management of kernel subsystem are splitand often diverge

page 9/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 10: Linux Kernel AgentX Sub-Agents

Management Architecture Overview

......

Master AgentSNMP AgentX Module

SubsystemKernelUserspaceUserspace

SubagentUserspace

SubagentUserspace

KernelUserspace

Kernel

SubagentKernel

SubagentKernel

MgmtInfo

MgmtInfo

MgmtInfo

MgmtInfo

SubsystemSubsystemSubsystem

page 10/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 11: Linux Kernel AgentX Sub-Agents

Kernel AgentX Architecture

SNMP

Masteragent

Ag

entX

mo

du

leM

IB m

od

ules

functions

Notificationemitting

functions

Notificationemitting

functionsCallback

functionsCallback

Socket layer

Session layer

AgentX protocol layer

Receivingthread

specific layerMIB / subsystemKernel subsystem

Kernel subsystem

page 11/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 12: Linux Kernel AgentX Sub-Agents

Subagent Registration

� Register MIB region

� Registration contains list of callback functions

� More than one registration is possible

� Callback functions handle all requests for a specific MIBsubregion

� Asynchronous subagent registration does not depend on masteragent

page 12/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 13: Linux Kernel AgentX Sub-Agents

Get / GetNext / GetBulk Processing

� Transfrom GetNext / GetBulk into (several) Get requests

� Subagent callback functions work on a single variable

� Split up large requests and reassemble responses(Multiplexing)

� Produce errors for requests that cannot be assigned to asubagent callback function

page 13/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 14: Linux Kernel AgentX Sub-Agents

Example: GetBulk processing

BB

B CA

CAA

C C

Manager

Subagent

SNMP

SNMP Agent

Subagent

1 2AgentXSNMP

Master agent module

page 14/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 15: Linux Kernel AgentX Sub-Agents

Set Transaction

Start

Success

Success

AbortTransactionfailed

Transactioncompleted

TestSet

CommitSet

CleanupSet

UndoSet

Transactionaborted

� Four different AgentX PDUs

� Multiphase set operation to maintain atomic nature of SNMPset requests (all-or-nothing)

� Multiplexing similar to Get/GetNext/GetBulk requests

� Stateless subagents; Undo data is stored within the AgentXmodule

page 15/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 16: Linux Kernel AgentX Sub-Agents

Implemented MIB Modules

� Interfaces MIB (IF-MIB, RFC 2863) module

Read-only informational elements (ifname, speed, mtu, etc.)

Can set interface up/down via ifAdminStatus

Can send trap when interface status changes

Standalone kernel module

� Linux Netfilter MIB module

No exisiting MIB, developed our own (with Frank Strauß)

Focuses on Netfilter core functions

Can show / alter / add Netfilter rules

Integrated in the Netfilter subsystem

page 16/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 17: Linux Kernel AgentX Sub-Agents

Conclusions

Easy access to information from inside the kernel

Can efficiently support SNMP notifications

Kernel subsystem and management are integrated

Requires little knowledge of SNMP or AgentX protocol

No immediate information gain except for notifications

Programming inside the kernel is more critical to machinestability

page 17/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 18: Linux Kernel AgentX Sub-Agents

Outlook

� Not publicly released yet but planned to

� Get feedback from the network management and the Linuxcommunity

� Implement more Standard MIBs

page 18/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 19: Linux Kernel AgentX Sub-Agents

Links

Linux Kernel AgentX sub-agents, Diplomarbeit, September 2002http://www.ibr.cs.tu-bs.de/ �wellnitz/kagentxd/

The Simple Webhttp://www.simpleweb.org

IETF AgentX Working Grouphttp://www.scguild.com/agentx/

The NET-SNMP projecthttp://www.net-snmp.org

page 19/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents

Page 20: Linux Kernel AgentX Sub-Agents

Thanks for listening.

Questions? Comments?

page 20/20Oliver Wellnitz, IBR, TU Braunschweig Diplomanden- und Doktorandenseminar, October 2002

Linux Kernel AgentX sub-agents