You are on page 1of 32

Coursework for CNMT

European Master of Reseach on Information and


Communication Technologies

Design of Management
Application
Filip Mestanov, Marcelline Wilson,
Yatish Bathla
Spring semester 2010-2011
Barcelona

Managed Network : Topology

network management must ensure that the network and applications are upand-running smoothly and efficiently.

The Manager executes logical programs : managements applications.

Communications-Network Management Technologies

Managed Network : Topology

configuration of a network

physical and logical arrangement of the nodes that form the network.
Logical Topology :

the paths taken by data to travel over the network

Physical topology :
mapping of the network nodes

physical connections between them.

Signal topology :

the paths use for signals to pass over the network.

Communications-Network Management Technologies

Managed Network : Topology

Physical Topology
BUS :
all the nodes are connected to a common transmission medium.

Communications-Network Management Technologies

Managed Network : Topology

Phisical Topology
Ring :
every node is connected to two other. Data transmitted over the network pass
through each of the nodes in the ring until they reach the destination node

Communications-Network Management Technologies

Managed Network : Topology

Phisical Topology
Tree :
central root node is connected to one or more nodes of a lower hierarchy.

Communications-Network Management Technologies

Managed Network : Topology

Phisical Topology
Star :
each node of the network is connected to a central node, transmitted passes
across the central node

Communications-Network Management Technologies

Managed Network : Topology

Phisical Topology
Mesh
Each network node is connected to every other node in the network.

Communications-Network Management Technologies

Managed Network : Topology

Physical Topology
Interconexion of Network
More complex networks can be built as hybrids of two or more of the above basic
topologies.

Communications-Network Management Technologies

Managed Network : Topology

The Management Network Topolgy associated :


M

Centralised

Distributed
M
M

Both
M

Communications-Network Management Technologies

10

SNMP Entity General View SNMP Engine

SNMP Engine

Communications-Network Management Technologies

Dispatcher

Sending/Receiving SNMP massages


from the Network

Determinign the version of the


SNMP message and responding
with the proper Message processing
model (MPM)

Providing an abstract interface to


SNMP apps for sending/delivering a
PDU

Message Processing Subsystem

Preparing messages for sending and


extracting data from received ones

Contains multiple MPMs

Security Subsystem

Authentication and privacy of


messages

Contains multiple MPMs

Access Control Subsystem

Autorization services by means of


Access Control Model (ACM)

Contains multiple ACMs

11

SNMP General View Application(s)


Application Types:
1. Command generators monitor and
manipulate management data

Initiates SNMP Read-Class and/or WriteClass requests

Processes the responses to these


requests

2. Command responders provide access


to management data

Receives SNMP Read-Class and/or


Write-Class request, destined for the
local system (identified by
contextEngineID)

Performs protocol operation using


Access Control

Generates a response message

Application Types:
3. Notification originators initiate
asynchronous messages

Monitors the system for particular events

Generates Notification-Class messages


based on these events

4 Notification receivers process


asynchronous messages

Listens for notification messages

Responds to notification messages with


a response message, in case ConfirmedClass PDU is received

5. Proxy forwarders forward messages


between entities

Communications-Network Management Technologies

Forwards SNMP messages irrespective


of the specific managed object

12

Traditional SNMP Manager

SNMP Manager
A SNMP entity, containing
one or more Command
Generators and/or
Notification Receiver
applications

Communications-Network Management Technologies

13

Traditional SNMP Agent

SNMP Agent
A SNMP entity, containing
one or more Command
Responder and/or
Notification Originator
application

Communications-Network Management Technologies

14

Management of devices

They allow to control the functionality of each device.

if some devices experience havoc, then we have to keep log of the wrecks of
incidents.

With the use of SNMP-MIB we can keep log of the events occurred in the system,
which would help in identifying the exact cause of the problems, and would help
the administrator in recovery of system.

Example: consider an air conditioner , which can be controlled by service


discovery like UPnP, but to monitor its performance, whether its cooling
performance is appropriate or not, A management protocol like SNMP could be
beneficial.

SNMP allows the standardization of the system and homogeneous interface to the
administrator for the management of SNMP and UPnP based devices.

UPnP (Universal Plug and Play Protocol) enables discovery and control of
networked devices and services, such consumer electronic equipments. UPnP
encompasses two main objects, control point and a device, and use XML,SOAP
as the communication protocol.
Communications-Network Management Technologies

15

DESCRIPTION

we manage one dedicated UPnP control point


with the SNMP agent to monitor the system.

The dedicated control point is used because in


multi user environments , multiple users can
enter and leave the system, with personal or
different control points

This dedicated control point and the SNMP


agent act as a proxy agent between UPnP and
SNMP.

It acts as an eavesdropper to the ubiquitous


environment. the services of the devices are
invoked by other control points, and then the
devices send the appropriate event notifications
to proxy agent.

The proxy agents UPnP control point gathers


information from the devices and its SNMP agent
keeps them in the MIB format .The manager
whenever needed can query the agent,
Communications-Network Management Technologies

16

IMPLEMENTATION
In order to analyze the performance of our system we have emulated our
system using the following simple scenario. We considered a Single Person
apartment and we can control following devices:
Main door sensor, TV, air conditioner, Tube lights
Wash room Bulbs, Fridge. Microwave oven and PC.
We divided the time into 4 parts to simulate the peak hour usage or no usage
breakfast and wakeup timings (6 to 10) and dinner and relaxation time (6 to
11). : Maximum Usage of Managed device
office timings (10 to 6) and sleeping time (11 to 6): Almost No use
So we design four different Pseudo codes, Set clock so that manager monitor
the agent depending how frequently user used the Managed device.

Communications-Network Management Technologies

17

Pseudo Codes
Step 1: Ps_code[n] = Computer clock time;
Step 1.1: 1 n 4 // Set four pseudo codes according to Usage of Managed
device//
Step 2: Ps_code[1] = 6:00 : 10:00 //Maximum Usage//
Step 2.1: Set clock = 0:10 //After 10 Minutes Communication between
Manager and agent Via SNMP and Translate codes//
Step 2.2 : If MIB[n]== Error_occured
step 2.2.1: Set Alarm[n]//Different alarm tune is set for different Managed
device//
Step 3: Ps_code[2] = 10:00 : 18:00 //Almost no Usage Office timing//
Step 3.1: Set clock = 0:30 //After 30 Minutes Communication between
Manager and agent Via SNMP and Translate codes as managed device is
less used//
Step 3.2 : If MIB[n]== Error_occured
Communications-Network Management Technologies

18

Pseudo Codes
step 3.2.1: Call user_mobile and User_office//Call by manager to user with
Pre-recorded message(done by softwares like Rynga,Smsdiscount) //
Step 4: Ps_code[3] = 18:00 : 23:00 //Maximum Usage//
Step 4.1: Set clock = 0:05 //After 05 Minutes Communication between
Manager and agent Via SNMP and Translate codes//
Step 4.2 : If MIB[n]== Error_occured
step 4.2.1: Set Alarm[n]//Different alarm tune is set for different Managed
device//
Step 5: Ps_code[4] = 23:00 : 06:00 //Almost no Usage//
Step 5.1: Set clock = 0:20 //After 20 Minutes Communication between
Manager and agent Via SNMP and Translate codes//
Step 5.2 : If MIB[n]== Error_occured
step 5.2.1: Set Alarm[n]//Different alarm tune is set for different Managed
device//
Communications-Network Management Technologies

19

Control Point With SNMP Agent

Communications-Network Management Technologies

Yatish Bathla

20

TRANSLATE CODE

From SNMP to UDnP

Receive-getRequest:
step 1: ResponseId=LookupMIB_DB(object Identifier)//Validate the object
identifier by look into the MIB database//
Step 2:If ResponseId is null or other error occur
Step 2.1: Issue getResponse(genErr(ResponseId).objectIdentifier)
Step 3: else
Step 3.1:Issue getResponse(Value, Objectidentifier)
Receive-getnext-Request:
Step 1:ObjectIdentifier= NextIdentifier(ObjectIdentifier)//Calculate OID number of
Next Identifier//
step 1.1: ResponseId=LookupMIB_DB(object Identifier)//Validate the object
identifier by look into the MIB database//
Communications-Network Management Technologies

21

TRANSLATE CODE
Step 2:If ResponseId is null or other error occur
Step 2.1: Issue getResponse(genErr(ResponseId).objectIdentifier)
Step 3: else
Step 3.1: Issue getResponse(Value, Objectidentifier)
Receive-SetRequest:
step 1: ResponseId=LookupMIB_DB(object Identifier)//Validate the object
identifier by look into the MIB database//
Step 2:If ResponseId is null or other error occur
Step 2.1: Issue getResponse(genErr(ResponseId).objectIdentifier)
Step 3: else
Step 3.1: ResponseId=UPnPHandler(ObjectIdentifier)// Call the Control
Point Handler//
Step 3.2: If ResponseId==TRUE
Communications-Network Management Technologies

22

TRANSLATE CODE
Step 3.2.1:Issue getResponse(Value, Objectidentifier)//Send to the Manager//
Step 3.2.2: Issue setupMIB_DB(Objectidentifier,Value)//Save in DB//
Step 3.3: Issue getResponse(genErr(ResponseId), Objectidentifier)
UPnP Handler:
Parameter: ObjectIdentifier
Step 1:UPnP_Record= LookUpMIB_DB(objectIdentifier,UPNP)
Step 2:If UPnP_Record==NULL return NULL
Step 3:If(UPnPRecord.deviceservice.ServiceId.Issubscribe==FALSE)
Step 3.1:If(Subscribe_To_Device(UPnP_Record)==True)
Step 3.1.1:Return TRUE
Step 3.1.2:Return FALSE
Step 4:else Return NULL
Communications-Network Management Technologies

23

TRANSLATE CODE

From UPnP to SNMP

OnModifiedStateVar
Description: Call Back Function
Step 1: SetUpMIB_DB(UPnPRecord,UPnP)//Again Overload Function to save
UPnP Record in MIB DB//
Step 2: If(UPnPRecord.Deviceservice.ServiceId.Trap)==TRUE//If Trap Field is
Set, Send the Response to Manager//
Step 2.1:Issue getResponse(Value, Objectidentifier)
Step 2.2:Else return Null

Communications-Network Management Technologies

24

TRANSLATE CODE Explanation

It includes both UPnP control point and SNMP agent, thus acting as a gateway between
UPnP environment and SNMP manager.

The translation code is demonstrated. It is quite simple for both Receive-get Request
and Receive-getNext Request.

In case of Receive-set Request, after validating the OID , control is transferred to the
Control Point (UPnP Handler), where it retrieves the UPnP record related to that OID
and subscribe to the corresponding service.

The Control is then transferred back to the Receive-set Request, where appropriate
entry is done in the MIB_DB. But, if control point couldnt subscribe to the device, then
error message is sent to the manager.

After subscribing to different services, control point receives modification information in


their state variables via a call back function, OnModifiedStateVar.

In this function UPnP Record is saved in the MIB Db and if the trap value is set for the
corresponding OID by the manager, then a response message is sent to the manager.,

Communications-Network Management Technologies

25

SAMPLE APPLICATION
Figure shows our SNMP manager, which
could load MIB files and listen to SNMP traps
and perform different SNMP commands and
operations. It stores the listened data in a
database and helps in performing different
type of analysis.

To check the effectiveness of our system, we


decided to calculate the power consumption
of different devices.

We assumed all the devices power


consumption is already known and its unit is
kilowatt. Energy=Power*Time .

Electricity Cost= Energy*(Cost Per Kilo-watthour)

Communications-Network Management Technologies

26

GRAPH REPRESENTATION

Communications-Network Management Technologies

27

CONCLUSION

The power consumption graph for a single day for 4 different devices is shown in the
above figure and the hourly power consumption of the system in a whole day is shown in
the figure, along with the cost of electricity incurred in a day. The scattered plot for
showing the power consumption in thirty days

Cost of electricity for one day = 15.334 * 0.1 = 1.5334

Cost of electricity for one month = 488.556 * 0.1 = 48.8556

Using this data we could estimate the future power consumptions. The above data can
be extrapolated further to estimate the electricity bills of whole year and if any of the
actual billing cost deviate from our estimated one then by using this we can detect
abnormality or fault in devices like extra power consumption and can take steps to
reduce the cost and consumption

We have observed that UPnP control point with the SNMP agent works quite well, but it
consumes more memory, which is not suitable for small devices. In order to demonstrate
the viability of our system we demonstrated the simple scenario, but we are yet to
analyze its result in a highly complicated environment, where many services move to
and fro, in and out of the systems. Using SNMP for management of UPnP based
devices, we could easily manage heterogeneous UPnP and SNMP based devices from
one single platform, particularly in environments with large number of devices,
Communications-Network Management Technologies

28

Study case Managed network topology

Communications-Network Management Technologies

All devices on
the network are
SNMP enabled

All client WiFi


CPEs are
equiped with
DD-WRT

29

Study case Applications

Three simple applications


1) At the SNMP Manager to get information about the connected system
2) At the SNMP Agent to inform about change of clients device
3) At the SNMP Manager/Agent to monitor the quality of the wireless link

1) Manager

2) Agent

3) Manager/Agent

if localTime=20:00:00 {

if interface.Eth0=UP {

repeat loop every 1 second {

repeat loop for i=1 until i=LAST_USER {

GET (prAcMacAddress);

GET (system.sysDescr.0);

if (prAcMacAddress!=allowed_MAC) {

if (system.sys.Descr.0 = NULL) {

if (coDot11CCQ<CCQ_threshold) {

SET (Alarm_unidentified_client=ON);

return ERR;
SET (flag_user[i]=ERR);

GET (coDot11CCQ);

SET (Alarm_link_failure=ON);

SET (Bandwidth_limit=BW_primary);

}
}

else {
SET Stat_user[i]=system.sys.Descr.0);
}
}
}

Communications-Network Management Technologies

30

Study case SNMP Manager app Net-SNMP example


#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <string.h>
int main(int argc, char ** argv)
{
netsnmp_session session, *ss;
netsnmp_pdu *pdu;
netsnmp_pdu *response;
oid anOID[MAX_OID_LEN];
size_t anOID_len;
netsnmp_variable_list *vars;
int status;
int count=1;
init_snmp("snmpdemoapp");
session.peername = strdup("test.netsnmp.org");
session.community = "demopublic";
session.community_len =
strlen(session.community);
SOCK_STARTUP;

snmp_add_null_var(pdu, anOID, anOID_len);


status = snmp_synch_response(ss, pdu, &response);
if (status == STAT_SUCCESS && response->errstat ==
SNMP_ERR_NOERROR) {
for(vars = response->variables; vars; vars = vars>next_variable)
print_variable(vars->name, vars->name_length, vars);
for(vars = response->variables; vars; vars = vars>next_variable) {
if (vars->type == ASN_OCTET_STR) {
char *sp = (char *)malloc(1 + vars->val_len);
memcpy(sp, vars->val.string, vars->val_len);
sp[vars->val_len] = '\0';
printf("value #%d is a string: %s\n", count++, sp);
free(sp);
}
else
printf("value #%d is NOT a string! Ack!\n", count++);
}
} else {
if (status == STAT_SUCCESS)
fprintf(stderr, "Error in packet\nReason: %s\n",
snmp_errstring(response->errstat));
else if (status == STAT_TIMEOUT)
fprintf(stderr, "Timeout: No response from %s.\n",
session.peername);
else
snmp_sess_perror("snmpdemoapp", ss);

ss = snmp_open(&session);
if (!ss) {
snmp_sess_perror("ack", &session);
SOCK_CLEANUP;
exit(1);
}
pdu = snmp_pdu_create(SNMP_MSG_GET);
anOID_len = MAX_OID_LEN;
if (!snmp_parse_oid(".1.3.6.1.2.1.1.1.0", anOID,
&anOID_len)) {
snmp_perror(".1.3.6.1.2.1.1.1.0");
SOCK_CLEANUP;
exit(1);
}
}

Communications-Network Management Technologies

}
if (response)
snmp_free_pdu(response);
snmp_close(ss);
SOCK_CLEANUP;
return (0);

31

The END

Thank you for your attention!


Contact information:
yatishbathla@gmail.com Yatish Bathla
filip_mestanov@abv.bg Filip Mestanov
marcelline.wilson@gmail.com Marcelline Wilson
Communications-Network Management Technologies

32

You might also like