NPM Ques Bank New

Embed Size (px)

Citation preview

  • 8/10/2019 NPM Ques Bank New

    1/26

    JEPPIAAR ENGINEERING COLLEGE

    DEPARTMENT OF INFORMATION TECHNOLOGY

    III YEAR/VI SEM

    IT 2351 NETWORK PROGRAMMING AND MANAGEMENT

    UNIT - I1. Dee!e"#e $e%&ee" TCP '(#)e% *"+ UDP '(#)e%.,APR/MAY 211

    Transmission control protocol (TCP) is a connection-oriented protocol that

    provides a reliable, fill-duplex byte stream to its user.

    Performance slow.

    More secureill have ac!nowled"ement

    #ser $ata"ram Prtocol (#$P) is a connectionless protocol. There is no "uarantee

    that #$P data"rams ever reach their intended deatination.Performance fast

    %o more secure

    %ot have ac!nowled"ement2. G0e %e '%!#%!e ( '%!#% '(#)*++!.,APR/MAY 211 ,APR/MAY 213 struct soc!addr&in '

    short sin&family * +&%T *

    u&short sin&port * /0-bit port number *struct in&addr sin&addr

    char sin&1ero234 * unused *

    5

    3. W*% ' %e !('e ( $"+, '4'%e #*66.,APR/MAY 211 The system call bind associates an address to a soc!et descriptor created by soc!et.

    6include 7syssoc!et.h8int bind(intsocket, const struct soc!addr *address, soc!len&t address_len)

    7. H(& &66 4( +'%"8' * 'e!0e! '(#)e% !(8!* !( * #6e"% '(#)e% !(8!*9

    ,APR/MAY 211

    The ma9or difference between client and server soc!et pro"rams is the way in which theyestablish connections with each other. :asically a server soc!et pro"ram creates a soc!et

    and then uses this soc!et to listen for attempts by client soc!et pro"rams to connect. +

    client soc!et pro"ram, on the other-hand creates a soc!et and then tries to connect thissoc!et to the soc!et created by the server pro"ram. ;nce a connection has been

    established, the data can be sent and received between soc!ets, in both directions.

    5. W*% ' %e +e!e"#e $e%&ee" 'e"+, *"+ &!%e, ,APR/MAY 211

    The 'e"+() call may be used only when the soc!et is in a connectedstate.The only

    difference between 'e"+() and writeis the presence offlags.'e"+() is e

  • 8/10/2019 NPM Ques Bank New

    2/26

    +socketis one endpoint of a two-way communication lin! between two pro"rams

    runnin" on the networ!. + soc!et is bound to a port number so that the TCP layer can

    identify the application that data is destined to be sent.

    ;. De"e &e66 )"(&" P(!% ,NOV/NEC 211

    The well-!nown port numbers are theport numbers that are reserved forassi"nment by the nternet Corporation for +ssi"ned %ames and %umbers (C+%%) for

    use by the application end points that communicate usin" the nternet=s TransmissionControl Protocol (TCP) or the #ser $ata"ram Protocol (#$P).+ number from > throu"h />?@ used to identify a networ! service on an P

    networ! (the nternet). Aesidin" in a field in the TCP or #$P header, the port number

    directs pac!ets to the appropriate application in the server. The most well-!nown port is

    3>, which identifies BTTP traffic for a eb server

    6*" IP.

    nternet Protocol - P

    P is the current delivery protocol on the nternet, between hosts.

    P provides Ebest effortF, unreliable delivery of pac!ets.

    There are two versions

    o PvG is the current routin" protocol on the nternet

    o Pv0, a newer version, still not totally embraced by the community

    http://searchnetworking.techtarget.com/definition/port-numberhttp://searchsoa.techtarget.com/definition/ICANNhttp://searchnetworking.techtarget.com/definition/TCPhttp://searchsoa.techtarget.com/definition/UDPhttp://searchnetworking.techtarget.com/definition/port-numberhttp://searchsoa.techtarget.com/definition/ICANNhttp://searchnetworking.techtarget.com/definition/TCPhttp://searchsoa.techtarget.com/definition/UDP
  • 8/10/2019 NPM Ques Bank New

    3/26

    nternet Protocol version G (PvG) which is denoted as 9ust P, has been the ma9or protocol

    of the P suite. t uses @?-bit addresses. PvG provides pac!et delivery services for TCP,

    #$P, DCTP, CMP, and HMP.

    11. De"e '(#)e% *"+ L'% (% %' %4e'.

    +socketis one endpoint of a two-way communication lin! between two pro"rams

    runnin" on the networ!. + soc!et is bound to a port number so that the TCP layer canidentify the application that data is destined to be sent.

    Types of soc!ets $ata"ram soc!et, Dtream soc!et, se6*" '(#)e% *++!e'' '%!#%!e.,*4/?"e 2=

    + :er!eley soc!et supports the followin" communication protocols

    #nix domain (on same #nix system)

    nternet domain (TCPP)

    Doc!et +ddresses

    The soc!et address specifies the family of the communication facility and the

    communication media.

    13. E>6*" IP07 *++!e'' '%!#%!e.

    PvG Doc!et +ddress Dtructure

    Dtruct in&addr '

    in&addr&t s&addr * @? bit PvG address *

    * networ! byte order *

    5

    17.W*% *!e %e (! "#%("' %( *'' '(#)e% *++!e'' '%!#%!e !( )e!"e6 %( %e

    !(#e''9:ind, connect, sendto, and senms".

    15.W*% *!e %e 0e "#%("' %( *'' '(#)e% *++!e'' '%!#%!e !( !(#e'' %( )e!"e69

    +ccept, recvfrom, recvms", "etpeername, and "etsoc!name.

    1:. W*% ' $4%e (!+e!"8 "#%("9 ,M*4/J"e 212:yte ;rderin" unctions

    convertin" between the host byte order to the networ! byte order

    address +I/ address +

    little-endian byte order hi"h-order byte low-order bytebi"-endian byte order hi"h-order byte low-order byte

    (for a /0-bit inte"er) address + address +I/

    1;. W*% *!e e6ee"%*!4 '(#)e% "#%("'9

    S(#)e%,@"+,@ #(""e#%,@6'%e",@*##e%,@!e*+,@ &!%e,@#6('e,

    1

  • 8/10/2019 NPM Ques Bank New

    4/26

    + concurrent server can handle multiple re

  • 8/10/2019 NPM Ques Bank New

    5/26

    short sun&family *+%N*

    char sun&P+TB2/>34 *path name *

    5

    The nternet soc!et address structure soc!addr&in is defined in 7netinetin.h8.

    struct in&addr '

    u&lon" s&addr *@?-bit net id *

    5

    struct soc!addr&in '

    short sin&family * +&%T *

    u&short sin&port * /0-bit port number *

    struct in&addr sin&addrchar sin&1ero234 * unused *

    5

    2. E>6*" IP07 *++!e'' '%!#%!e.

    PvG Doc!et +ddress Dtructure

    Dtruct in&addr '

    in&addr&t s&addr * @? bit PvG address *

    * networ! byte order *

    5

    struct soc!addr&in '

    uint3&t sin&len * len"th of structure*

    sa&family&t sin&family * +&%T *

    in&port&t sin&port * /0-bit TCP or #DP port*

    * networ! byte order *

    struct in&addr sin&addr * @?-bit PvG address *

    * networ! byte order *

    char sin&1ero234 * unused *

    3. W*% ' $4%e (!+e!"8 "#%("9,A!6/M*4 2

  • 8/10/2019 NPM Ques Bank New

    6/26

    (for a /0-bit inte"er) address + address +I/

    7. W*% *!e e6ee"%*!4 '(#)e% "#%("'9 ,APRIL/MAY 211

    S(#)e% S4'%e C*66

    The system call soc!et creates one end of the soc!et.

    "+ S4'%e C*66

    The system call bind associates an address to a soc!et descriptor created by soc!et.

    L'%e" S4'%e C*66

    The system call listen is used by a connection-oriented server to "et ready for acceptin"

    connection re

  • 8/10/2019 NPM Ques Bank New

    7/26

    iterative type.

    5. W*% *++!e'' #("0e!'(" "#%("' e>6*"9 ,NOV/DEC 211,M*4/JUNE 212

    ,APR/MAY 213

    or PvG only ascii and numeric6include 7arpainet.h8

    int inet&aton (const char *strptr, struct in&addr *addrptr)

    returns / if strin" is valid, > on errorint&addr&t inet&addr (const char *strptr)

    returns @?-bit binary PvG addr, %+$$A&%;% if error

    char *inet&ntoa (struct in&addr inaddr)returns pointer to dotted-decimal strin"

    or PvG (+&%T) and Pv0 (+&%T0) presentation and numeric

    6include 7arpainet.h8int inet&pton (intfamily, const char *strptr, void *addrptr)

    returns / if ;O, > if invalid presentation, -/ on error

    const char *inet&ntop (intfamily, const void *addrptr, char *strptr, si1e&t len)

    returns pointer to result if ;O, %# on error%T&+$$ADTA% L /0 (for PvG), %T0&+$$ADTA% L G0 (for Pv0 hex

    strin")

    ;. De"e 0*6e-!e'6% *!8e"%.

    hen a soc!et address structure is passed to any soc!et function, it is always passed by

    reference. That is, a pointer to the structure is passed. The len"th of the structure is also passed asan ar"ument.

    The reason that the si1e chan"es from an inte"er to be a pointer to an inte"er is because

    the si1e is both a valuewhen the function is called (it tells the !ernel the si1e of the structure sothat the !ernel does not write past the end of the structure when fillin" it in) and a resultwhen

    the function returns (it tells the process how much information the !ernel actually stored in the

    structure). This type of ar"ument is called a value-resultar"ument.

  • 8/10/2019 NPM Ques Bank New

    8/26

    UNIT-II

    1. W*% ' e*"% $4 $6(#)"8 (+e ( '(#)e% (e!*%("9 ,APR/MAY 211

    :y default, TCP soc!ets are in Qbloc!in"Q mode. or example, when you callrecv() to read from a stream, control isn=t returned to your pro"ram until at least one byte

    of data is read from the remote site. This process of waitin" for data to appear is referred

    to as Qbloc!in"Q. The same is true for the write() +P, the connect() +P, etc. hen yourun them, the connection Qbloc!sQ until the operation is complete.

    2. L'% %e '%e' %( #!e*%e TCP e#( 'e!0e!. ,NOV/NEC 211

    Dteps to write TCP echo server/. Create a server soc!et and bind to soc!et address

    ?. listen on server soc!et

    @. create watcher to accept connectionG. write connection accept callbac! function

    R. Create and initiali1e watcher to read messa"e from client

    0. write callbac! function to read messa"e

    S. start event loop

    3. W*% *!e %e (''$6%e' ( 'e6e#% "#%("9 ,NOV/NEC 211 ,MAY/JUNE 2=

    ,APR/MAY 213

    There are three possibilities

    &*% (!e0e!Breturn only when one of the specified descriptors is ready for ; . or this,

    we specify the timeout ar"ument as a null pointer.

    W*% %( * >e+ *("% ( %e return when one of the specified descriptors is ready

    for ;, but do not wait beyond the number of seconds and microseconds specified in the

    timeval structure pointer to by the timeout ar"ument.

    D( "(% &*% *% *66 return immediately after chec!in" the descriptors. This is called

    pollin".

    To specify this, the timeout ar"ument must point to a timeval structure and the timervalue must be 1ero

    n case of first two scenario, the wait is normally interrupted if the process catches a

    si"nal and returns from the si"nal handler.

    7. E>6*" TCP E#( 'e!0e! *"+ #6e"%.

    TCPP server. t will accept a connection from a client application, receive one

    line of text, echo that line bac! to the client and close the connection.

  • 8/10/2019 NPM Ques Bank New

    9/26

    hen networ! testin", it is useful to have a client pro"ram that connects to a TCPP

    server and "ets an echo of a text strin" that you send to the server.

    5. De"e '8"*69 ,M*4/J"e 212

    + si"nal is a messa"e (an inte"er) sent to a process. The receivin" process can try

    to i"nore the si"nal or call a routine (a so-called si"nal handler). +fter returnin" from thesi"nal handler, the receivin" process will resume execution at the point at which it was

    interrupted.The system-calls to deal with si"nals vary between one #nix version and another

    :. E>6*" '8"*6 "#%(". ,A!6/M*4 2

  • 8/10/2019 NPM Ques Bank New

    10/26

    si"nal. hen the process terminates, all the open descriptors are closed, and we then follow the

    same se6*" %e '4"%*> ( '8"*6 "#%(".,A!6/M*4 26*" I/O 6%6e>"8.

    t is seen that the TCP client is handlin" two inputs at the same time standard input and a TCP

    soc!et. t was found that when the client was bloc!ed in a call to read(by callin"

    readline function), and the server process was !illed. The server TCP correctly, correctly sends a

    % to the client TCP, but since the client process is bloc!ed readin" from the standard input, itnever sees the end V of file until it reads from the soc!et . hat we need is the capability to tell

    the !ernel that we want to be notified if one or more ; conditions are ready (i.e. input is ready

    to be read, or the descriptors is capable of ta!in" more outputs).This capability is called ; Multiplexin" and is provided by the select and poll functions

    12. W*% *!e %e '#e"*!(' 'e+ " I/O 6%6e>"8 *6#*%("'. ; multiplexin" is typically is used in networ!in" applications in the followin" scenarios

    hen a client is handlin" multiple descriptors ( normally interactive input and a networ!

    soc!et), ; multiplexin" should be used. This is the scenario that was described in the

    previous para"raph.t is possible, but rare, for a client to handle multiple soc!ets at the same time. e show an

    example of this usin" select in the context of web client

    f a TCP server handles both a listenin" soc!et and its connected soc!ets, ; multiplexin" isnormally used.

    a server handles both TCP and #$P, ; multiplexin" is normally used.

    f a server handles multiple services and perhaps multiple protocols, ; multiplexin" us

    normally used.13. W*% *!e %e 5 $*'# I/O (+e6' *0*6*$6e " UNI9; ModelsThere are five ; models in the #nix. These are

    :loc!in" ;

    %on bloc!in" ;

    ; Multiplexin" (select and poll)Di"nal driven ; (DH;)

    +synchronous ; (the Posix / aio&functions)

    17. S%*%e &e!e POSI "#%(" ' 'e+.

    henever a specific si"nal occurs, a specific function can be provided. This function is

    called si"nal handler and the action is called catchin" the si"nal.The two si"nal DHO and DHDT;P cannot be cau"ht V this is an exception.

    The function is called with a sin"le inte"er ar"ument that is the si"nal number and the

    function returns nothin" as shown below

    const struct si"action actsi"action (DHCB$, act, %#)

    Callin" si"action and specifyin" a function to be called when the si"nal occurs is all that is

    re

  • 8/10/2019 NPM Ques Bank New

    11/26

    or few si"nals li!e DH;, DHP;, and DH#AH etc additional actions on the part of the

    process is re

  • 8/10/2019 NPM Ques Bank New

    12/26

    t is seen that the TCP client is handlin" two inputs at the same time standard input and a

    TCP soc!et. t was found that when the client was bloc!ed in a call to read(by callin"

    readline function), and the server process was !illed. The server TCP correctly, correctly sends a% to the client TCP, but since the client process is bloc!ed readin" from the standard input, it

    never sees the end V of file until it reads from the soc!et . hat we need is the capability to tell

    the !ernel that we want to be notified if one or more ; conditions are ready (i.e. input is readyto be read, or the descriptors is capable of ta!in" more outputs).

    This capability is called ; Multiplexin" and is provided by the select and poll functions

    3. W*% *!e %e '#e"*!(' 'e+ " I/O 6%6e>"8 *6#*%("'. .,A!6/M*4 2

  • 8/10/2019 NPM Ques Bank New

    13/26

    ait upto a fixed amount of time return when one of the specified descriptors is ready for ;,

    but do not wait beyond the number of seconds and microseconds specified in the timeval

    structure pointer to by the timeout ar"ument.$o not wait at all return immediately after chec!in" the descriptors. This is called pollin".

    To specify this, the timeout ar"ument must point to a timeval structure and the timer value must

    be 1eron case of first two scenario, the wait is normally interrupted if the process catches a si"nal and

    returns from the si"nal handler.

    ;. De!e"#e $e%&ee" #6('e "#%(" *"+ '%+(&" "#%(". ,M*4/J"e 212

    The normal way to terminate a networ! function is to call the close function. :ut there are two

    limitations with close that can be avoided with the shutdown function.

    /. Close decrements the descriptorsF reference count and closes the soc!et only if thecount reaches >.

    ith shutdown function, we can initiate TCPFs normal connection termination se

  • 8/10/2019 NPM Ques Bank New

    14/26

    UNIT-III

    1. E>6*" Ge%('%$4"*e "#%(",M*4/J"e 212

    struct hostent *"ethostbyname?(const char *name, int af)int "ethostbyname&r (const char *name,

    struct hostent *ret, char *buf, si1e&t buflen,

    struct hostent **result, int *h_errnop)

    int "ethostbyname?&r (const char *name, int af,struct hostent *ret, char *buf, si1e&t buflen,

    struct hostent **result, int *h_errnop)

    The 8e%('%$4"*e, function returns a structure of type hostent for the "iven host name.

    2. De'#!$e SOKEEPALIVE ,NOV/NEC 211

    The SOKEEPALIVEsoc!et option is desi"ned to allow an application to enable !eep-alive pac!ets for a soc!et connection.

    The D;&OP+U option causes a pac!et (called a =!eepalive probe=) to be sent tothe remote system if a lon" time (by default, more than ? hours) passes with no other data bein"

    sent or received. This pac!et is desi"ned to provo!e an +CO response from the peer. This

    enables detection of a peer which has become unreachable (e.". powered off or disconnected

    from the net).

    @. W*% *!e %e *6%e!"*%0e' (! DNS9 ,NOV/NEC 211 ,APR/MAY 213

    /. Dtatic host files(etchosts)?. %D-%etwor! nformation Dystem or i"htwei"ht $irectory +ccess Protocol($+P)

    @. Dolaris ?.x, BP-#N />G. ree:s$ R.x (etcnsswitch.conf)R. +N(etcnetsvc.conf)

    7. L'% %e 0*!(' TCP S(#)e% (%("' ,MAY/JUNE 2=

    WTCP&OP+U seconds between probes

    WTCP&M+NAT TCP max retx time

    WTCP&M+NDH TCP max se"ment si1e

    WTCP&%;$+X disable %a"le al"orithm, to reduce the number of small pac!ets

  • 8/10/2019 NPM Ques Bank New

    15/26

    WTCP&DT$#AH interpretation of TCPFs ur"ent

    pointer, used with out-of-band data

    5. De"e Re'(!#e Re#(!+' ,*4/?"e 212

    The $%D system defines a number of Aesource Aecords (AAs). The text representation of these

    records are stored in 1one files. $%D resource records (AAs) describe the characteristics of a1one (or domain) and have a binary or wire-format, which is used in

  • 8/10/2019 NPM Ques Bank New

    16/26

    and prot number of the client and as the same pointer is passed to sendto as the destination

    address.

    12. W*% *!e %e (! '%e' 'e+ " #6e"% !(#e''"8 6((.

    There are four steps in the client processin" loop. Aead a line from the standard input usin" f"ets,

    send the line to the server usin" sendto, read bac! the serverFs echo usin" recvfrom and print the

    echoed line to standard output usin" fputs

    13. De"e DNS,A!6/M*4 26*" 8e%'e!0$4"*e *"+ 8e%'e!0$4(!% "#%("'. ,N(0/De# 211,M*4/J"e 212

    6include 7netdb.h8

    struct servent *"etservent(void)struct servent *"etservbyname(const char *name, const char *proto)

    struct servent *"etservbyport(intport, const char *proto)

    void setservent(intstayopen)void endservent(void)

    DESCRIPTION

    The 8e%'e!0e"%, function reads the next line from the file$etc$services and returns a structureservent containin" the bro!en out fields from the line. The$etc$services file is opened if

    necessary.

    The 8e%'e!0$4"*e, function returns aservent structure for the line from$etc$services that

    matches the service name usin" protocolproto. fproto is %#, any protocol will be matched.The 8e%'e!0$4(!%, function returns aservent structure for the line that matches the portport

    "iven in networ! byte order usin" protocolproto. fproto is %#, any protocol will be

    matched.

  • 8/10/2019 NPM Ques Bank New

    17/26

    The 'e%'e!0e"%, function opens and rewinds the$etc$services file. fstayopen is true (/), then

    the file will not be closed between calls to 8e%'e!0$4"*e, and 8e%'e!0$4(!%,.

    The e"+'e!0e"%, function closes$etc$services.

    2. E>6*" UDP 'e!0e! *"+ UDP #6e"%. ,N(0/De# 211 ,M*4/J"e 212

    #$P client does not establishes connection with server, rather it sends data"ram usin" send tofunction alon" with destination address. Dimilarly, the server does not accept connection from a

    client, instead the server 9ust calls recvfrom function which waits until data arrives from someclient. Aecvfrom returns the protocol address of the client alon" with the data"ram so the servercan send a response to the correct client.

    3. E>6*" DNS ,A!6/M*4 211 ,APR/MAY 213

    The D(*" N*e S4'%e (DNS) is a hierarchical namin" system for computers, services, orany resource connected to the nternet or a private networ!. t associates various information

    with domain names assi"ned to each of the participants. Most importantly, it translates domain

    names meanin"ful to humans into the numerical (binary) identifiers associated with networ!in"e6*" " $!e%e 'e%'(#)e% *"+ 8e%'(#)e% "#%("',M*4/J"e 2=

    Ree! %e $(() P*8e.N(B 1=

  • 8/10/2019 NPM Ques Bank New

    18/26

    UNIT-IV

    1. H(& *!e %!e*+' #!e*%e+ " UNI. ,APR/MAY 211 ,APR/MAY 213pthread&create creates a new thread and ma!es it executable. This routine can be called

    any number of times from anywhere within your code.

    pthread create(thread,attr,start&routine,ar")

    pthread&create ar"umentso thread +n opae',NOV/NEC 211 ,APR/MAY 213

    Mutexes are the most basic and primary method of thread synchroni1ation.The ma9or desi"n considerations for mutexes are

    /. +c

  • 8/10/2019 NPM Ques Bank New

    19/26

    7. L'% *"4 %&( +e!e"#e' $e%&ee" "8 *"+ %!*#e !(%e !(8!*. ,NOV/NEC 211,APR/MAY 213

    Pin" is a utility that you use to determine whether or not a specific P address is

    accessible. Pin" wor!s by sendin" a pac!et to a specified address and waitin" for a reply. Pin" will test the speed of your connection to the server and will tell you how lon" a

    pac!et (@? bytes in si1e) ta!es to "o from your computer to the host and bac! to your

    computer a"ain.Traceroute is a utility that traces a pac!et from your computer to an nternet host, but it

    will show you how many hops the pac!et re

  • 8/10/2019 NPM Ques Bank New

    20/26

    Multithreadin" is a sophisticated and refers to the ability to support paths of execution within a

    sin"le address space. ;lder operatin" systems achieve multitas!in" by creatin" multiple

    processes, which creates a "reat deal of overhead.

  • 8/10/2019 NPM Ques Bank New

    21/26

    pthread&t pthread&self (void)Aeturns thread $ of callin" thread

    PART-

    1. C(*!e IP07 *"+ IP0: ,M*4/J"e 2; ,M*4/J"e 2= ,APR/MAY 213

    The Pv0 server starts, creates an Pv0 listenin" soc!et, and we assume it binds the

    wildcard address to the soc!et.

    The PvG client calls "ethostbyname and finds an + record for the server. The server host

    will have both an + record and a ++++ record since it supports both protocols, but the

    PvG client as!s for only an + record. The client calls connect and the client=s host sends an PvG DX% to the server.

    The server host receives the PvG DX% directed to the Pv0 listenin" soc!et, sets a fla"

    indicatin" that this connection is usin" PvG-mapped Pv0 addresses, and responds with

    an PvG DX%+CO. hen the connection is established, the address returned to the server by accept is the

    PvG-mapped Pv0 address.

    2. E>6*" !*& '(#)e%'.,A!6/M*4 26*" %!*#e!(%e !(8!* ,M*4/J"e 212

    T!*#e!(%e is the pro"ram that shows you the route over the networ! between two systems,listin" all the intermediate routers a connection must pass throu"h to "et to its destination. t can

    help you determine why your connections to a "iven server mi"ht be poor, and can often help

    you fi"ure out where exactly the problem is. t also shows you how systems are connected toeach other, lettin" you see how your DP connects to the nternet as well as how the tar"et system

    is connected.

    The nternet is a lar"e and complex a""re"ation of networ! hardware, connected to"ether by"ateways. Trac!in" the route one=s pac!ets follow (or findin" the miscreant "ateway that=s

    discardin" your pac!ets) can be difficult. %raceroute utili1es the P protocol Ytime to live= field

    and attempts to elicit an CMP TM&NC$$ response from each "ateway alon" the pathto some host.

    The only mandatory parameter is the destination host name or P number. The default probe

    data"ram len"th is G> bytes, but this may be increased by specifyin" a pac!et len"th (in bytes)

    after the destination host name.

    7. De"e %e>e' ,M*4/J"e 212

  • 8/10/2019 NPM Ques Bank New

    22/26

    Mutexes are the most basic and primary method of thread synchroni1ation.

    The ma9or desi"n considerations for mutexes are

    /. +c

  • 8/10/2019 NPM Ques Bank New

    23/26

    UNIT-V

    1. G0e %e (!*% TRAP Me''*8e " SNMP !(%(#(6. ,APR/MAY 211 ,APR/MAY

    213

    +synchronous notification from *8e"% %( *"*8e!. ncludes currentsys&p%imevalue,

    an ;$ identifyin" the type of trap and optional variable bindin"s. $estinationaddressin" for traps is determined in an application-specific manner typically throu"h

    trap confi"uration variables in the M:. The format of the trap messa"e was chan"ed in

    D%MPv? and the P$# was renamed '()v2-%rap.

    Trap P$# ormat ----------------------------------------------------------------------

    Z P$# TXP Z nterprise Z +"ent P Z H% trap Z Dpec Trap Z Time Dtame Z

    ----------------------------------------------------------------------

    ------------------

    Z;:[ / Ual /Z .....Z Z-Uariable :indin"s-Z

    ------------------

    2. W*% ' %e "ee+ (! SNMP !(>4 *8e"%' . ,APR/MAY 211

    /. nsure the computer is connected to the networ!.

    ?. Uerify the indows %etwor! service named D%MP Dervice is installed and runnin".@. +ttach a serially connected #PD to the computer.

    G. nstall anDafe for a serially connected #PD.

    R. Confi"ure the indows D%MP service with the proper access privile"es by settin" the

    readwrite community strin"s.0. Confi"ure the trap receivers for the indows D%MP service.

    S. oad the appropriate mana"ement information base (M:) into the %MD.The standard Powerware M: (stdupsv/.mib) is available from the :in directory of theanDafe installation.

    3. Confi"ure the %MD or other external application to reco"ni1e the a"ent by settin" the

    appropriate P address and readwrite community strin"s.

    3. W*% *!e %e +e'8" 8(*6' ( RMON9 . ,NOV/NEC 211

    HoalsW To "ather statistics of remote networ! se"ments

    W Performin" networ! m"mt in networ! se"ments

  • 8/10/2019 NPM Ques Bank New

    24/26

    AM;% $esi"n eatures

    W ;ffline operations trace analysis

    W Preemptive monitorin" continuous monitorin"W Problem detection and reportin" tri""ered filters and notification (event-based vs.

  • 8/10/2019 NPM Ques Bank New

    25/26

    The optional directoryparameter specifies a directory in which old transaction lo"s are held, so

    that the Messa"e +"ent has access to events from before the current lo" was started.

    The Messa"e +"ent uses a number of connections to the database.

    1. De"e SMI

    The Dtructure of Mana"ement nformation (DM), described in detail in AC //RR, is aframewor! that describes the basic types of information that can be manipulated by D%MP. t

    provides a s!eleton that specifies the basic format and hierarchy of mana"ement data but doesnot describe the ob9ects that can be mana"ed. Aather, it describes the buildin" bloc!s from whichmana"ed ob9ects are constructed.

    + fundamental concept of D%MP is the notion of obect identifiers. +n ob9ect identifier

    (;$) is a ta" that allows a mana"ement entity to refer unambi"uously to a particular ob9ect.

    ;b9ect identifiers are allocated in a tree fashion. The value of the ob9ect identifier is ase

  • 8/10/2019 NPM Ques Bank New

    26/26

    ;n an abstract level, D%MP can be seen as a service, a *"*8ee"% *6#*%(" *)e'

    'e (@ %( *"*8e +'%!$%e+ ($?e#%'.

    3. W*% *!e %e *+0*"%*8e' ( SNMP02,APR/MAY 213

    D%MP version ? (D%MPv?) is an evolution of the D%MPv/. The Het, Het%ext, and Detoperations used in D%MPv/ are exactly the same as those used in D%MPv?. Bowever,

    D%MPv? adds and enhances some protocol operations. The D%MPv? Trap operation, for

    example, serves the same function as that used in D%MPv/, but it uses a different messa"eformat and is desi"ned to replace the D%MPv/ Trap.D%MPv? also defines two new operations Het:ul! and nform. The Het:ul! operation is used

    to efficiently retrieve lar"e bloc!s of data. The nform operation allows one %MD to send trap

    information to another %MD and to then receive a response. n D%MPv?, if the a"ent respondin"to Het:ul! operations cannot provide values for all the variables in a list, it provides partial

    results.

    7. E>6*" SNMP03,APR/MAY 213

    D%MP Uersion @ (D%MPv@) adds security and remote confi"uration capabilities to the

    previous versions. The D%MPv@ architecture introduces the #ser-based Decurity Model

    (#DM) for messa"e security and the Uiew-based +ccess Control Model (U+CM) foraccesscontrol. The architecture supports the concurrent use of different security, access control,

    and messa"e processin" models. More specifically

    Decurity authentication and privacyauthori1ation and access control

    +dministrative ramewor!

    namin" of entitiespeople and policies

    usernames and !ey mana"ement

    notification destinationsproxy relationships

    remotely confi"urable via D%MP operationsD%MPv@ also introduces the ability to dynamically confi"ure the D%MP a"ent usin" D%MP

    DT commands a"ainst the M: ob9ects that represent the a"ent=s confi"uration. Thisdynamic confi"uration support enables addition, deletion, and modification of confi"uration

    entries either locally or remotely.