This document provides information about a course on network and communication technologies. It discusses network management and topologies including physical, logical and signal topologies. Common network topologies like bus, ring, tree, star and mesh are described. The document also covers SNMP (Simple Network Management Protocol) including SNMP entities, applications, managers, agents and MIB (Management Information Base). Sample applications are presented to demonstrate monitoring network devices and traffic using SNMP.
UiPath Test Automation using UiPath Test Suite series, part 3
Design of Management Application
1. Coursework for CNMTCNMT
European Master of Reseach on Information and
Communication Technologies
Spring semester 2010-2011
Barcelona
Design of ManagementDesign of Management
ApplicationApplication
Filip Mestanov, Marcelline Wilson,
Yatish Bathla
2. 2Communications-Network Management Technologies
• network management must ensure that the network and applications are up-
and-running smoothly and efficiently.
The Manager executes logical programs : managements applications.
Managed Network : TopologyManaged Network : Topology
3. 3Communications-Network Management Technologies
Managed Network : TopologyManaged 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.
5. 5Communications-Network Management Technologies
Managed Network : TopologyManaged 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
7. 7Communications-Network Management Technologies
Managed Network : TopologyManaged Network : Topology
• Phisical Topology
– Star :
each node of the network is connected to a central node, transmitted passes
across the central node
9. 9Communications-Network Management Technologies
Managed Network : TopologyManaged Network : Topology
• Physical Topology
– Interconexion of Network
More complex networks can be built as hybrids of two or more of the above basic
topologies.
11. 11Communications-Network Management Technologies
SNMP Entity General View – SNMP EngineSNMP Entity General View – SNMP Engine
• SNMP Engine
– 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
12. 12Communications-Network Management Technologies
SNMP General View – Application(s)SNMP General View – Application(s)
Application Types:
1. Command generators – monitor and
manipulate management data
• Initiates SNMP Read-Class and/or Write-
Class 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 Confirmed-
Class PDU is received
5. Proxy forwarders – forward messages
between entities
• Forwards SNMP messages irrespective
of the specific managed object
15. 15Communications-Network Management Technologies
Management of devicesManagement 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.
16. 16Communications-Network Management Technologies
DESCRIPTIONDESCRIPTION
• 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 agent’s 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,
17. 17Communications-Network Management Technologies
IMPLEMENTATIONIMPLEMENTATION
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.
18. 18Communications-Network Management Technologies
Pseudo CodesPseudo 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
19. 19Communications-Network Management Technologies
Pseudo CodesPseudo 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//
21. 21Communications-Network Management Technologies
TRANSLATE CODETRANSLATE 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//
22. 22Communications-Network Management Technologies
TRANSLATE CODETRANSLATE 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
24. 24Communications-Network Management Technologies
TRANSLATE CODETRANSLATE 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
25. 25Communications-Network Management Technologies
TRANSLATE CODE ExplanationTRANSLATE 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 couldn’t 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.,
26. 26Communications-Network Management Technologies
SAMPLE APPLICATIONSAMPLE 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-watt-
hour)
28. 28Communications-Network Management Technologies
CONCLUSIONCONCLUSION
• 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,
29. 29Communications-Network Management Technologies
Study case – Managed network topologyStudy case – Managed network topology
• All devices on
the network are
SNMP enabled
• All client WiFi
CPEs are
equiped with
DD-WRT
30. 30Communications-Network Management Technologies
Study case – ApplicationsStudy 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 client’s device
3) At the SNMP Manager/Agent – to monitor the quality of the wireless link
1) Manager
if localTime=20:00:00 {
repeat loop for i=1 until i=LAST_USER {
GET (system.sysDescr.0);
if (system.sys.Descr.0 = NULL) {
return ERR;
SET (flag_user[i]=ERR);
}
else {
SET Stat_user[i]=system.sys.Descr.0);
}
}
}
2) Agent
if interface.Eth0=UP {
GET (prAcMacAddress);
if (prAcMacAddress!=allowed_MAC) {
SET (Alarm_unidentified_client=ON);
}
}
3) Manager/Agent
repeat loop every 1 second {
GET (coDot11CCQ);
if (coDot11CCQ<CCQ_threshold) {
SET (Alarm_link_failure=ON);
SET (Bandwidth_limit=BW_primary);
}
}
31. 31Communications-Network Management Technologies
Study case – SNMP Manager app – Net-SNMP exampleStudy 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.net-
snmp.org");
session.community = "demopublic";
session.community_len =
strlen(session.community);
SOCK_STARTUP;
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);
}
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: %sn", count++, sp);
free(sp);
}
else
printf("value #%d is NOT a string! Ack!n", count++);
}
} else {
if (status == STAT_SUCCESS)
fprintf(stderr, "Error in packetnReason: %sn",
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);
}
if (response)
snmp_free_pdu(response);
snmp_close(ss);
SOCK_CLEANUP;
return (0);
}
32. 32Communications-Network Management Technologies
The ENDThe 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