0% found this document useful (0 votes)
89 views

SS7 Signaling: - Network Architecture

SS7 Signaling uses point codes to uniquely identify signaling points in the network. Signaling Transfer Points route messages between signaling points based on routing tables. The SS7 stack includes layers for physical signaling links, message transfer, and signaling connection control. SS7 protocols like SCCP, TCAP, and MAP are used to establish connections and transfer messages between signaling points for call setup and routing.

Uploaded by

ujwaljay
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views

SS7 Signaling: - Network Architecture

SS7 Signaling uses point codes to uniquely identify signaling points in the network. Signaling Transfer Points route messages between signaling points based on routing tables. The SS7 stack includes layers for physical signaling links, message transfer, and signaling connection control. SS7 protocols like SCCP, TCAP, and MAP are used to establish connections and transfer messages between signaling points for call setup and routing.

Uploaded by

ujwaljay
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 75

SS7 Signaling:

. Network Architecture:

Each signaling point in the SS7 network is uniquely identified by a numeric point code.
Signaling messages exchanged between signaling points carry source destination point codes.
Each signaling point uses a routing table to select the appropriate signaling path for each message.
SSP----Ser!ice Switching "oint
SCP----Ser!ice #ontrol "oint
STP----Signaling $ransfer "oint
SS"s are switches that originate% terminate% or tandem calls.
An SS" may send a query message to a centrali&ed database 'an S#"( to determine how to route a call. An
S#" sends a response to the originating SS" containing the routing number's( associated with the dialed
number.
An S$" routes each incoming message to an outgoing signaling link based on routing information contained
in the SS7 message.
SS7 Signaling )ink $ypes: A through *
A---Access Link: )inks between the SS" 'or S#"( the one mated pair S$" in the quad.
B---Bridge Link: )inks between the S$"s from one network to the S$"s of another network.
C---Cross Link: )inks between the S$"s in a mated pair.
D---Diagonal Link: )inks between two mated pairs in the quad.
E---Extended Link: )inks between the SS" 'or S#"( the alternate mated pair S$" in the quad.
F---Fully Associated: )inks between SS"s S#"s.
SS7 +essage: Signal ,nit
Fill in Signal Unit F!SU": "ro!ides continuous error checking.
Link Status Signal Unit LSSU": ,sed to control link alignment.
#essage Signal Unit #SU": -t has a routing label which allows an originating signaling point to send
information to a destination signaling point across the network.
Flag: -t indicates the beginning of a new signal unit and implies the end of the pre!ious signal unit 'if any(.
BS$ Back%ard Se&uence $u'(er": -t is used to acknowledge the receipt of signal units by the remote
signaling point.
B!B Back%ard !ndicator Bit": -t indicates a negati!e acknowledgment by the remote signaling point
when toggled.
FS$ For%ard Se&uence $u'(er": -t contains the sequence number of the signal unit being transmitted.
F!B For%ard !ndicator Bit": -t is used in error reco!ery. .hen the originating signaling point recei!es a
negati!e acknowledgment% it retransmits all forward messages% beginning with the corrupted message% with
the *-/ toggled.
Li Lengt) !ndicator": -t determines the signal unit type.
Li *alue Signal Unit Ty+e
0 *ill1-n Signal ,nit '*-S,(
2..3 )ink Status Signal ,nit ')SS,(
4..54 +essage Signal ,nit '+S,(
S!, Ser-ice !n.or'ation ,ctet":
-t pro!ides the network indicator 'e.g.% national or international( and the message priority '0..4 with 4 being
the highest priority(.
+essage priority is considered only under congestion conditions% not to control the order in which messages
are transmitted.
)ow priority messages may be discarded during periods of congestion.
Signaling link test messages recei!e a higher priority than call setup messages.
S!F Signaling !n.or'ation Field": -t contains the routing label and signaling information 'e.g.% S##"%
$#A"% and -S," message data(.
C/C Cyclic /edundancy C)eck": -t is used to detect and correct data transmission errors.
SS7 "rotocols:
#TP: +essage $ransfer "art
SCCP: Signaling #onnection #ontrol "art
TCAP: $ransaction #apabilities Application "art
!SUP: -S6N ,ser "art
!$AP: -ntelligent Network Application "art
#AP: +obile Application "art
CAP: #A+E) Application "art
7S-1SS7 Stack:
+$" )e!el 2: -t defines the physical% electrical% and functional characteristics of the digital signaling link.
+$" )e!el 3:
-t ensures accurate end1to1end transmission of a message across a signaling link.
-t implements flow control% message sequence !alidation% and error checking. .hen an error occurs on a
signaling link% the message 'or set of messages( is retransmitted.
+$" )e!el 4:
-t pro!ides message routing between signaling points in the SS7 network.
-t re1routes traffic away from failed links and signaling points and controls traffic when congestion occurs.
S##": -t pro!ides connectionless and connection1oriented network ser!ices.
#onnectionless Ser!ices: All signaling messages are routed independently of each other.
Exa'+le: Sending a request from +S# to 8)9 to get the location of the +obile subscriber.
#onnection17riented Ser!ices: All signaling messages are routed o!er an established signaling connection.
$he signaling connection may be temporary or permanent
Exa'+le: A dialed telephone connection----$emporary #onnection controlled by ser!ice user
A leased telephone line1111"ermanent #onnection pro!ided by ser!ice operator
S##" *unctional Structure:
SCCP consists o. 'ainly t)ree +arts:
SCLP1111S##" #onnectionless "art
SC,P1111S##" #onnection17riented "art
SC#,P1111S##" +anagement 7peration "art
S##" #onnectionless "art 'S#)"(:
S#)#1111S##" #onnectionless #ontrol
S#)91111S##" #onnectionless 9outing
$he S#)# allows the S##" user to transfer the user data without first requesting the establishment of a
signaling connection.
$he transfer of data is accomplished by including the user data in ,6$ or :,6$ messages which are then
deli!ered to the S#)9 to determine the destination. $he S#)9 performs the necessary routing functions
prior to passing the messages to the +$".
S##" #onnection17riented "art 'S#7"(:
SC,C----S##" #onnection17riented #ontrol
SC,/----S##" #onnection17riented 9outing
$he S#7# is responsible for the establishment% super!ision% and release of a temporary signaling connection%
as well as for the transfer of data on the connection.
$he S#79 handles the routing of connection1oriented messages.
S##" +anagement and 7peration "art 'S#+7"(:
+aintain the network performance in case of failure or congestion.
,pdates the S##" routing tables.
S##" "rotocol #lasses:
#lass 0: -t deli!ers its messages 'or Network Ser!ice 6ata ,nits% NS6,s( to the S##" in the origin node
which is then deli!ered to the destination node.
#lass 2: -t deli!ers a sequence control parameter when requesting a data transfer from the S##" to make sure
that a stream of NS6,s are deli!ering in sequence.
#lass 3: Each signaling connection is identified by a pair of reference numbers% referred to as )ocal 9eference
Numbers ')9Ns(. +essages belonging to a gi!en signaling connection contain the same !alue in the S)S field.
#lass 4: -t detects message loss or sequencing errors. .hen such faults occur% the connection is reset and a
corresponding notification is gi!en to the S##".
S##" +essages:
SCCP Connection-less
Messages
SCCP Connection-oriented
Messages
Class (0,1) Class (2,3)
UDT (Unitdata) CR (Connection Request)
XUDT (Extended Unitdata) CC (Connection Confirm)
LUDT (Long Unitdata) CREF (Connection Refused)
UDTS (Unitdata Service) RLSD (Released)
XUDTS (Extended Unitdata
Service) RLC (Release Confirm)
LUDTS (Long Unitdata Service) DT (Data Form)
DT! (Data Form!)
. Class-2: CR"DT# ERR# $T
. Class-3: %ll SCC& connection"
oriented messages exce't DT
. UDTS, XUDTS, UDTS----
!$ndeterminate &rotocol Class
(%(sence of &rotocol Class
&arameter)
%) (Data %c*no+ledgment)
ED (Ex'edited Data)
E% (Ex'edited Data
%c*no+ledgement)
RSR (Reset Request)
RSC (Reset Confirm)
ERR (&rotocol Data Unit Error)
$T ($nactivit, Test)
#9: -t is sent by an originating S##" user to a destination S##" user to set up a signaling connection 'a !irtual
connection( between the two signaling points.
Exa'+le: -n ;S+ cellular networks% a #9 message can be sent between a +obile Switching #enter '+S#( and
a /ase Station #ontroller '/S#( to setup a signaling connection.
##: -t is the acknowledgement to the originating S##" from the destination S##" that it has completed the set
up of the signaling connection.
#9E*: -t is sent from the destination S##" or an intermediate node to the originating S##" to indicate that
the signaling connection setup has been refused.
Exa'+le: -n ;S+ cellular networks% a #9E* message can be sent between a +obile Switching #enter '+S#(
and a /ase Station #ontroller '/S#( to refuse the requested signaling connection.
9)S6: -t is sent in the forward or backward direction to indicate that the 7riginating S##" wants to release
the signaling connection.
Exa'+le: -n ;S+ cellular networks% an 9)S6 message is always sent between a +obile Switching #enter
'+S#( and a /ase Station #ontroller '/S#( to release the S##" connection and the resources that are
associated with it.
9)#: -t is sent in the forward or backward direction as a response to the 9)S6 message to indicate the receipt
of the 9)S6 and the execution of the appropriate actions for releasing the connection.
6$2: Either end of a signaling connection sends it to pass S##" user data between two S##" nodes.
Exa'+le: -n ;S+ cellular networks% all data transfer between +obile Switching #enter '+S#( and a /ase
Station #ontroller '/S#( is performed using 6$2 messages. 6$3 messages are not used in ;S+.
,6$: ,6$ messages are commonly used for $#A" communication within -N ser!ices. -n ;S+ cellular
networks% ,6$ messages are used by the +A" protocol to send its messages. Also% S##" management
messages are transmitted using the ,6$ messages.
,6$S < :,6$S < ),6$S: ,6$S% :,6$S% and ),6$S indicate that the corresponding message ',6$%
:,6$% and ),6$ respecti!ely( could not be deli!ered to the destination.
S##" 9outing:
"oint #ode '"#( routing
Subsystem Number 'SSN( routing
;lobal $itle ';$( routing
"oint #ode '"#( routing: $he +$" layer can only use point code routing. ,sing +$" point code routing%
+S,s pass through the S$"s until they reach the S" that has the correct 6"#.
Subsystem Number 'SSN( routing:
A subsystem is the name gi!en to an application that uses S##".
An SSN is used to identify the S##" user in much the same way as the ser!ice indicator identifies the +$"4
user.
A 6"# and SSN are required in order to deli!er an S##" message to the correct application at the
destination node.
$he SSN is used to identify the application.
Applications using $#A" rely on S##" for message routing since $#A" itself has no routing capabilities.
$herefore% each application is explicitly identified by an SSN at the S##" le!el.
-f SSN routing is used% the SSN is placed inside the #d"A parameter. $he S##" uses the SSN to send an
S##" message to a particular subsystem 'application( at an S". $he SSN of the originating subsystem is
also included in the #alling "arty Address '#g"A( parameter to identify the subsystem that sent the S##"
message.
$he SSN field is one octet in length and% therefore% has a capacity of 3== possible combinations.
Bits
0 1 2 3 4 5 6 7 Su(syste'
0 0 0 0 0 0 0 0 SSN not known<not used
0 0 0 0 0 0 0 2 S##" management
0 0 0 0 0 0 2 0 9eser!ed for -$,1$ allocation
0 0 0 0 0 0 2 2 -S," '-S6N user part(
0 0 0 0 0 2 0 0 7+A" '7peration% +aintenance% and Administration "art(
0 0 0 0 0 2 0 2 +A" '+obile Application "art(
0 0 0 0 0 2 2 0 8)9 '8ome )ocation 9egister(
0 0 0 0 0 2 2 2 >)9 '>isitor )ocation 9egister(
0 0 0 0 2 0 0 0 +S# '+obile Switching #entre(
0 0 0 0 2 0 0 2 E-# 'Equipment -dentifier #entre(
0 0 0 0 2 0 2 0 A,# 'Authentication #entre(
0 0 0 0 2 0 2 2 -S," supplementary ser!ices?2@
0 0 0 0 2 2 0 0 9eser!ed for international use
Bits
0 1 2 3 4 5 6 7 Su(syste'
0 0 0 0 2 2 0 2 /roadband -S6N edge1to1edge applications
0 0 0 0 2 2 2 0 $# test responder?2@
0 0 0 0 2 2 2 2
to
0 0 0 2 2 2 2 2
9eser!ed for international use
0 0 2 0 0 0 0 0
to
2 2 2 2 2 2 2 0
9eser!ed for national networks
2 2 2 2 2 2 2 2 9eser!ed for expansion of national and international SSN
SSN $able used in ;S+ < ;"9S < ,+$S #ellular Networks:
Bits Su(syste'
0000 0220 8)9
0000 0222 >)9
0000 2000 +S#
0000 2002 E-9
0000 2020 Au#
2222 2020 /S#
2222 2022 +S#
2222 2200 S+)#
2222 2202 /SS 7+
2222 2220 /SSA"
2000 2220 9ANA"
2000 2222 9NSA"
2002 0002 ;+)#
2002 0020 #A"
2002 0022 gsmS#*
2002 0200 S-.*
2002 0202 S;SN
2002 0220 ;;SN
Additionally -NA" is specified as 0000 2222.
;lobal $itle ';$( 9outing:
$#A": $ransaction #apabilities Application "art1
Aueries and responses sent between SS"s and S#"s are carried in $#A" messages.
$#A" carries +obile Application "art '+A"( messages sent between SS"s S#"s to support ,ser
authentication% Equipment identification% and 9oaming.
*unctional >iew of $#A":
A dialogue is set up between two $#1users.
$# pro!ides an association between the local and the remote $#. $his association is called a transaction.
$he $#1user data related to its operations and results are called components.
$# recei!es data from the $#1,ser% packs it and hands it o!er to the S##". $he S##" adds some more
information that is necessary for routing the message to the destination% and gi!es it to the +$". $he +$"
puts the data into the Signaling -nformation *ield 'S-*( of +S, and then transmits on a Signaling )ink
'S)(.
S$9,#$,9E 7* $#A":
6ialogue 8andling:
Structured dialogue: -t allows a $# user to start a dialogue% to exchange components within this dialogue%
and to terminate or abort it.
,nstructured dialogue: -t can be used to in!oke operations that need no replies.
#omponent 8andling:
Class 7: both success and failure are reported
Class 6: only failure is reported
Class 5: only success is reported
Class 4: neither success nor failure is reported
$ransaction Sub1layer: -t deals with the exchange of messages containing components and% optionally% a
dialogue portion between two $#1users.
$# +ESSA;ES:
$#A" messages are contained within the S##" portion of an +S,.
$#A" is used to transport -NA" in -ntelligent Networks and +A" in mobile phone networks.
/egin: -nitiates a transaction. $he transaction -6 is allocated and included in all messages that are associated
with the transaction. A $#A" user can respond with a #ontinue or an EN6 message.
#ontinue: Sent when a transaction has been established and further information exchange is needed. A
$ransaction -6 is allocated and used in all messages associated with the transaction. $he #ontinue message
includes both an 7rigination $ransaction -6 and a 6estination $ransaction -6. A $#A" user can respond with
an End or #ontinue message.
End: Ends an existing transaction. $he $ransaction -6 is released when this message is recei!ed.
Abort: -ndicates that an abnormal condition has occurred. $he transaction is ended and all associated
$ransaction -6s are released. $he abort might be initiated by the $#A" user ',1Abort( or the protocol itself '"1
Abort(.
,nidirectional: ,sed to send components to another $#A" user without establishing a transaction. No
$ransaction -6 is allocated. No response is expected when this message is recei!ed. Sometimes referred to as a
Notice.
Transaction !D: A $#A" reference for a set of $#A" operations that are performed within a single dialog.
!n-oke !D: A $#A" reference for a specific $#A" operation.
$he first four messages are used in structured dialoguesB the last message is used for unstructured dialogues.
$#A" #omponents:
-n!oke: A new operation is being requestedB this may or may not solicit a response.
9eturn 9esult )ast: A final response to an in!oke.
9eturn 9esult not )ast: A response to an in!oke% further responses will be sent.
9eturn Error: -ndicates that an error has occurred at the application or user le!el.
9eCect: #omponent is reCected for some reason like duplicate in!ocation% unrecogni&ed liked id% unrecogni&ed
operation or mistyped argument.
-S,": -S6N ,ser "art
-t is used to set1up% manage% and release trunk circuits that carry !oice and data between terminating line
exchanges 'e.g.% between a calling party and a called party(.
,sed for both -S6N and non1-S6N calls.
#alls that originate and terminate at the same switch do not use -S," signaling.
-S," +essages:
-A+ '-nitial Address +essage(: -t contains parameters carrying information about the /1party% the A1party
type% and information concerning the routing and handling of the call.
S;+ 'Segmentation +essage(: -f a message% for example% an -A+% exceeds the maximum permissible
length stated for an +S, '373 octets(% it can be segmented. $he o!er1length information elements are sent in an
S;+ message.
A#+ 'Address #omplete +essage(: -t is sent from the terminating exchange to the originating exchange.
-t indicates that all the necessary address information is recei!ed and that the called subscriber is identified and
free and alerted by a ringing signal.
#"; '#all "rogress +essage(: -t can be sent in both directions during the set1up phase or another acti!e
phase of a call. *or example% it can indicate that the call is being forwarded.
AN+ 'Answer +essage(: -t indicates that a call has been answered. .hen this message is recei!ed% the
charging of the call starts.
9E) '9elease +essage(: -t initiates the release of a circuit used for a call. -t can be sent in both directions.
9)# '9elease #omplete +essage(: 9)# is sent in response to 9E). -t confirms that the release of the
circuit is completed so that the circuit can return to idle state again and ser!e new calls.
+A": +obile Application "art
$#A" carries +obile Application "art '+A"( messages sent between SS"s S#"s to support ,ser
authentication% Equipment identification% and 9oaming.
+A" users exchange information in form of dialogues. Each dialogue is used to perform a common task 'for
example% inter1+S# hando!er(.
+A" Application Entities:
+A"1+S#
+A"1>)9
+A"18)9
+A"1E-9
+A"1A,#%
etc.
+A" Ser!ices:
)ocation update% +S purge% 8ando!er% +S status reporting
9egistration% Acti!ation% 6eacti!ation of supplementary ser!ices
+A" Structure:
Each Application Entity 'AE( is functionally di!ided into a number of ASEs 'Application Ser!ice Elements(.
ASEs consist of one or more operations and their associated parameters to perform a certain task.
+A" "rotocol >ersions:
+A" !2
+A" !3
+A" !4
+A" >3 +essages:
Call "andling ocation #egistration
- sendRouting$nfo
- 'rovideRoaming.um(er
- resumeCall/andling
- u'dateLocation
-
cancelLocation -
'urge0S -
send$dentification
"ando$er
- 're'are/andover
- sendEndSignal
- 'rocess%ccessSignaling
- for+ard%ccessSignaling
- 're'areSu(sequent/andover
S%&&li'entar( Ser$ice "andling
- registerSS
- eraseSS
- activateSS
- deactivateSS
- interrogateSS
- 'rocessUSSD"Request
- unstructuredSS"Request
- unstructuredSS".otif,
- register&ass+ord
- get&ass+ord
)%t*entication
- send%ut1entication$nfo
+M,+ Manage'ent
- c1ec*$0E$
S*ort Message Ser$ice
S%-scri-er Manage'ent
- sendRouting$nfoForS0
- mo"for+ardS0
- mt"for+ardS0
- re'ortS0"Deliver,Status
- informServiceCenter
- alertServiceCenter
- read,ForS0
- insertSu(scri(erData
- deleteSu(scri(erData
.a%lt #eco$er(
- reset
- for+ardC1ec*SS"$ndication
- restoreData
Pro$ide S%-scri-er +n/o
- 'rovideSu(scri(er$nfo
0&eration 1 Maintenance
- activateTrace0ode
- deactivateTrace0ode
- send$0S$
)n( Ti'e +nterrogation
- an,Time$nterrogation
+A" +essages between +S# E-9: $o know the Equipment Status
+A" +essages between >)9 8)9: *or )ocation ,pdating
.hen a subscriber mo!es from '+S# < >)9(2 to '+S# < >)9(3% it requests the +A"1>)9 to update the
location.
A dialogue is initiated to request authentication data from 8)9.
8)9 responds to authenticate the subscriber ends the dialogue.
After authentication -+E- check% a second dialogue is initiated to update the location.
8)9 responds all the rele!ant subscriber information is transferred to the >)9.
>)9 acknowledges the 8)9
8)9 sends a confirmation of Dlocation updateE with 8)9 address to store it in the >)9.
An acknowledgment of the Dlocation updateE is also send to the subscriber.
A D#ancel )ocationE is initiated towards the DoldE +S#<>)9 to clear the subscriber data.
$otes: 9AN611Sets of random numbers
S9ES111Signed 9esponse
Fc11#iphering key
Send "arameters11+A" !2 message
-NA": -ntelligent Network Application "art
-t is a standardi&ed application layer protocol for intelligent networks.
$reated as an SS7 Application "art.
Architecture of -NA":
SCF11 Ser!ice #ontrol *unction
SSF11 Ser!ice Switching *unction
S/F11 Speciali&ed 9esource *unction
SDF11 Ser!ice 6ata *unction
!$AP Ca+a(ility Sets: #S21#SG
CS7:
*unctional Entities are S#*% SS*% S9*% and S6*
6efine == -NA" operation types and 32 -NA" error messages between these functional entities.
CS6:
*unctional Entities are S#*% SS*% S9*% S6*% #,S* '#all ,nrelated Ser!ice *unction(
6efine 204 -NA" operation types and 44 -NA" error messages between these functional entities.
Enhance the -N ser!ices such as mobility% broadband ser!ices
CS5 8 CS4:
$he only functional entity is S+* 'Ser!ice +anagement *unction(
"ro!ides the S-" 'Session -nitiation "rotocol( support ser!ices
#A+E): #ustomi&ed Applications for +obile networks Enhanced )ogic
A set of standards designed for ;S+ networks
,ses the #A" protocol.
-t is a network feature and not a supplementary ser!ice.
S#*
SS*
S6*
S9*
-t is a tool for the network operator to pro!ide the subscribers with the operator specific ser!ices e!en when
roaming in another network.
,ses -N SS"1S#" interface.
#A+E) "hases: "hase2 to "hase G
CA#EL P9ASE 7 A/C9!TECTU/E:
8ome Network:
8ome ")+N of the #A+E) subscriber.
8)9 gsmS#* are functional entities
>isiting Network:
$he ")+N where the #A+E) subscriber is roaming.
>+S#% >)9% gsmSS* are functional entities.
-nterrogating Network:
8andles the terminating calls calling party resides here
;+S#% gsmSS* are the functional entities.
#A+E) Entities:
gs'SCF: ;S+ Ser!ice #ontrol *unction
gs'SSF: ;S+ Ser!ice Switching *unction
gs'S/F: ;S+ Speciali&ed 9esource *unction
g+rsSSF: ;"9S Ser!ice Switching *unction
gsmS#*:
$he #A+E) ser!ices reside here.
All #A+E) ser!ice requests are directed to gsmS#*.
gsmSS*:
Always located in >+S# or ;+S#
9ecei!es store #A+E) data
gsmS9*: "ro!ides a pool of resources for access by other network entities.
#A+E) "hase12 -nterfaces:
!nter.ace Protocol Pur+ose
>)918)9 +A" !4
$ransport of #A+E) trigger data from 8)9
to >)9
;+S#18)9 +A" !4 $erminating #all 8andling
gsmS#*18)9 +A" !4 Any time interrogation
+S#1;+S#
+A" !4%
+A" !G
7ptimal routing of late call forwarding
+S#<gsmSS*1gsmS#* #A" !2 #A+E) control of mobile originated calls
;+S#<gsmSS*1gsmS#* #A" !2 #A+E) control of mobile terminated calls
CA#EL P9ASE 6 Features:
7nline #harging
#all *orwarding Notifications
#A+E) "8ASE 4 *eatures:
#ontrol of ;"9S sessions
Support of facilities to a!oid o!erload
#A+E) "8ASE G *eatures:
"ro!ides the 7ptimal 9outing of circuit1switched mobile1to1mobile calls
$he gsmS#* can request the gsmSS* to play a fixed or a !ariable sequence of tones
#A": #A+E) Application "art
#A" !3 +essages:
%ctivit,Test $nitialD&
%ctivit,Test ac* &la,%nnouncement
%''l,C1arging &rom'tandCollectUser$nformation
%''l,C1argingRe'ort
&rom'tandCollectUser$nformation
ac*
Cancel ReleaseCall
Connect RequestRe'ort2CS0Event
ConnectToResource ResetTimer
Continue DisconnectFor+ardConnection
EventRe'ort2CS0 Esta(lis1Tem'orar,Connection
S'eciali3edResourceRe'ort
Acti-ityTest: ,sed to !erify the existence of the #A+E) dialogue between gsmS#* gsmSS*.
A++lyC)arging: Used to instruct the gsmSS* to apply on1line call duration control.
A++lyC)arging/e+ort: $his operation contains the result of the on1line call duration instruction.
Cancel: ,sed when a #A+E) ser!ice wants to terminate the relationship.
Connect: Enables the #A+E) ser!ice to define or modify specific parameters in the call flow.
ConnectTo/esource: ,sed to instruct the gsmSS* to connect the call to a speciali&ed resource% for user
interaction
Continue: ,sed by the gsmS#* to instruct the gsmSS* to continue call handling.
E-ent/e+ortBCS#: ,sed by the gsmSS* to inform the gsmS#* about the occurrence of an e!ent.
S+eciali:ed/esource/e+ort: ,sed by the gsmS9* to inform the gsmS#* that the playing of an announcement
is complete.
!nitialDP: $he gsmSS* sends it to the gsmS#* to start a #A+E) ser!ice.
PlayAnnounce'ent: ,sed by the #A+E) ser!ice to instruct the gsmS9* or intelligent peripheral to play an
announcement.
Pro'+tandCollectUser!n.or'ation: ,sed by the #A+E) ser!ice to instruct the gsmS9* or intelligent
peripheral to play an announcement and to collect digits from the user.
/eleaseCall: ,sed by the gsmS#* to disallow call establishment or to tear down an ongoing call.
/e&uest/e+ortBCS#: ,sed by the gsmS#* to arm or disarm detection points in the /#S+.
/esetTi'er: ,sed by the gsmS#* to reload and restart the $ssf timer.
DisconnectFor%ardConnection: ,sed to terminate the connection to a speciali&ed resource.
Esta(lis)Te'+oraryConnection: ,sed to establish a temporary connection between the ser!ing ';(+S# and
an +S# with assisting gsmSS*.
,SS6: ,nstructured Supplementary Ser!ices 6ata
-t is a session oriented ser!ice.
,SS6 +essage *ormat: H6igitsI
A ,SS6 message can be upto 2J3 alphanumeric characters in length.
$here will not be any latency in request and response as we experience in S+S based ser!ices.
Simple and easy to send. No need to go into any menus and options. Kust directly entered on the default
mobile screen.
.orks in two modes: "ull mode and "ush mode. "ull +ode% will handle +obile -nitiated ,SS6 9equests.
"ush +ode will handle network -nitiated ,SS6 9equests.
-t uses +A" to recei!e and send ,SS6 data from the 8)9.
Pa+er rec)arge t)roug) USSD: ;5<3;=74 Digit serial $o>?
9eliance Architecture:
;"9S: ;eneral "acket 9adio Ser!ice
,sed to transfer user data packets b<w +S external packet data network.
"ro!ides the data rate from L.5 to 272 kbps.
MSC E
-Recharg
e
TIBCO
Osiyan
USSD
GW
[DAKC]
STP
[H!K]
RT" H"R
[Bh#$anesh%ar
]
&a'aay#
GW
SMSC
Sie(en
s
USSD
GW
K)*+a'a
STP
[,!M]
Architecture:
. -nterfaces:
S;SN: Ser!ing ;"9S Support Node
9esponsible for routing the packet switched data to
and from the mobile stations '+S(
9esponsible for authentication and charging for calls.
;;SN: ;ateway ;"9S Support Node
Acts as interface between the ;"9S backbone and the
external packet data network '"6N(.
-t con!erts the ;"9S packet coming from the S;SN into proper packet data protocol '"6"( format 'i.e. :.3=
or -"( before sending to the outside data network.
;"9S 9egister: +aintains the ;"9S subscriber data 9outing information.
-ntelligent Networks:
-N Architecture:
SS" 'Ser!ice Switching "oint(: -t performs basic call processing and pro!ides trigger and e!ent detection
points for -N processing.
S#" 'Ser!ice #ontrol "oint(: -t stores ser!ice data and executes ser!ice logic for incoming messages. $he
S#" implements a particular type of ser!ice or multiple ser!ices.
AdCunct:
$he AdCunct performs similar functions to an S#".
$he S#" usually ser!es a large number of SS"s and maintains a large amount of data.
$he AdCunct is a much smaller platform but resides locally with the SS" and normally ser!es one or possibly
a few local offices.
S#E 'Ser!ice #reation En!ironment(: -t creates ser!ice logic using Ser!ice )ogic "rograms 'S)"( that is
executed at the S#".
-" '-ntelligent "eripheral(:
Simple -N Ser!ice:
$he communication between the SS" and the S#" takes place using the $#A" layer.
As the SS" handles calls% the S#" is queried for information about how to process the call.
-N 6istribution of Ser!ice 6ata and Ser!ice )ogic:
Ser!ice logic in the S#" or AdCunct is applied to the incoming query.
D9esponseE consists of the requested information and further call processing instructions.
/#S+ '/asic #all State +odel(:
-t defines !arious states in!ol!ed during call progress used for -N control.
,ses the -S," signaling
*or each call that is handled by an +S# a process is started known as a /#S+ instance.
/#S+ #omponents:
P!C Point in Call": indicates the state of the call% i.e. analysis% routing% alerting and acti!e.
DP Detection Point": associated with a state transition-
A set of entry e!ents define the transitional actions that constitute entering into a "-#.
Exit e!ents mark the completion of processing by the current "-#.
Exa'+le: .hen the call is in the alerting phase and an answer e!ent is recei!ed o!er -S,"% the /#S+
processes the 6" that is associated with the answer e!ent. After the processing of the 6" is complete% the /#S+
transits to the acti!e "-#.
/#S+ $ypes:
,BCS# ,riginating BCS#": 9epresents the originating call half established whene!er the SS" detects an
incoming call.
TBCS# Ter'inating BCS#": 9epresents the terminating call half established when the SS" is setting up
the outgoing portion of the call.
$he incoming call from the subscriber line towards the SS" A represents the originating call half.
$he terminating call half is represented by the trunk connected to SS" A.
6" '6etection "oint( $ypes:
$6" '$rigger 6etection "oint(:
TDP-/ Trigger Detection Point - /e&uest": .hen the /#S+ instance for a call transits to a 6" that is
defined as $6"19% an -N ser!ice may be started at that point. $his entails the internal SS* notifying the S#*
and waiting for further instructions. $he call processing in the +S# is halted until the SS* has recei!ed
instructions from the S#*.
TDP-$ Trigger Detection Point - $oti.y": .hen the /#S+ instance for a call transits to a 6" that is defined
as $6"1N% an -N ser!ice may be started at that point. $he SS* will in that case not wait for instructions from the
S#"% but will return the call control immediately to the +S#. As a result the call processing is not halted.
E6" 'E!ent 6etection "oint:(
EDP-/ E-ent Detection Point /e&uest": . An E6"19 requests that the SS" stop call processing 'except in
the case of 7MNoMAnswer and $MNoMAnswer 6"s( and send an E6"19 message to the S#". No further action
is taken until a response is recei!ed.
EDP-$ E-ent Detection Point - $oti.y": An E6"1N requests that the SS" send an E6"1Notification but
continue call processing. $he S#" does not respond to the notification. $he S#" can use the notification for
billing% statistics% or other purposes.
6ialogue 8andling:
$he in!ocation of an -N ser!ice in!ol!es the establishment of an -N dialogue between SS* and S#*.
$he -N dialogue between SS* and S#* facilitates the exchange of instructions and notifications between
SS* and S#*.
.hen the -N ser!ice terminates% the -N dialogue is closed.
6ialogue $ermination +ethods:
Pre-arranged end when communication has taken place between S#* and SS* and both entities can deduce
that% for this call% there will not be any further communication through this -N dialogue% then both entities may
terminate the dialogue without informing the other entity.
Basic end an entity may explicitly terminate the -N dialogue by sending a dialogue closing notification to the
other entity.
$he -N ser!ice is started by the SS* by sending the initial 6" operation to the S#*. $he -N ser!ice
responds by sending the continue operation% which instructs the SS* to continue call establishment.
$he transaction capability '$#( messages '$# /egin% $# #ontinue% $# End( exchanged between SS*
S#*.
-n the pre1arranged end example% there will not be any further communication between SS* and S#* through
this -N dialogue. $he SS* and S#* therefore decide to close the -N dialogue.
-n the basic end example% the S#* instructs the SS* to continue call establishment and at the same time
instructs the SS* to close the -N dialogue.
6" Arming < 6isarming 9ules: Arming and disarming 6"s in the /#S+ is a tool used by the -N ser!ice to
keep informed about the phase of the call and to maintain or close the -N dialogue.
TDP Ar'ing: $6"s are statically armed in the exchange. $he operator may decide for which calls an -N
ser!ice is in!oked and at which 6" in the /#S+ for that call.
EDP Ar'ing: @hen an -N ser!ice is in!oked from a particular $6" in the /#S+% the -N ser!ice may
dynamically arm 6"s in the /#S+ as E6"1N or E6"19. $he arming of a 6" as E6" is !alid only for the
duration of the -N ser!ice.
EDP Disar'ing: .hen a 6" is armed as E6"% it may be disarmed in !arious ways:
$he -N ser!ice may explicitly instruct the SS* to disarm the 6"
.hen a call or call leg is released% all 6"s associated with that call or call leg are disarmed.
Exa'+le: -N ser!ice may arm the disconnect e!ent 'indicating that the calling or called party has terminated
the call( as E6"19. .hen the disconnect e!ent occurs% the SS* reports the e!ent to the S#" and waits for
instructions. $he SS* has% in accordance with 6" disarming rules% disarmed the disconnect e!ent. 8ence% there
is currently no 6" armed for this call.
9elationship between SS* S#*:
$he SS* has reported a $6"19 or E6"19 to the S#" and is waiting for instructions from the
S#"B or
At least one 6" in the /#S+ is armed as E6"1N or E6"19B or
$he S#" has requested the SS* to send a charging reportB or
$he S#" has requested the SS* to send a call information report.
$rigger E!ent "recedence:
+ultiple triggers and e!ents can exist at a single 6".
$he triggers e!ents are processed in the following order% beginning with the highest precedence.
E!ent Notifications
$rigger Notifications
E!ent 9equests
$riggers 9equests
Escape #odes: Escape codes pro!ide a means for a subscriber with the 7ffM8ookM6elay trigger to make
certain calls without in!oking the trigger.
Exa'+le: Emergency 'L22( calls and 0 calls to an operator.
#A+E) 6etection "oints:
7/#S+ 6"s:
C)M, Detection Point Descri&tion
Collect4$nfo
$ndication t1at t1e 5"CS$ is active and anal,sed- T1e dialled
num(er is received# (ut not anal,sed-
54%ns+er
$ndication t1at t1e call is acce'ted and ans+ered (, t1e
terminating 'art,-
54Disconnect
% disconnect indication is received from t1e originating or t1e
termination 'art,-
Route4Select4Failure $ndication t1at t1e call esta(lis1ment failed-
542us,
$ndication t1at a (us, indication is received from t1e terminating
'art,-
54.o4%ns+er
$ndication t1at an a''lication timer associated +it1 t1e
54.o4%ns+er D& ex'ires-
54%(andon
$ndication t1at a disconnect indication is received from t1e
originating 'art, during t1e call esta(lis1ment 'rocedure-
54.ot4Reac1a(le
.ot reac1a(le event can (e determined u'on a cause $E in t1e
$SU& release message-
$/#S+ 6"s:
C)M, Detection Point Descri&tion
Term-4%ttem't4%ut1ori3ed $ndication t1at t1e T"CS$ is active and anal,sed-
T4%ns+er
$ndication t1at t1e call is acce'ted and ans+ered (, t1e
terminating 'art,-
T4Disconnect
% disconnect indication is received from t1e originating or t1e
termination 'art,-
T42us,
$ndication t1at a (us, indication is received from t1e terminating
'art,-
T4.o4%ns+er
$ndication t1at an a''lication timer associated +it1 t1e
54.o4%ns+er D& ex'ires-
T4%(andon
$ndication t1at a disconnect indication is received from t1e
originating 'art, during t1e call esta(lis1ment 'rocedure-
T4.ot4Reac1a(le
.ot reac1a(le or call esta(lis1ment failure event can (e
determined from t1e /LR or u'on a cause $E in t1e $SU& release
message-
.-N1J35 specific $riggers: .ireless -ntelligent Network '.-N( is based on -S1J35 standards% which is
subset of -S1G2 standard.
$riggers Armed *or 7riginating #all:
,riginationA/e&uestAAut)ori:ed: $his trigger can be used to in!oke ""# for an +S originated call after the
+S# authori&es the +S origination and determines that the call is not to a locally allowed number 'e.g.
emergency number(.
CallingA/outingAAddressAA-aila(le: $his trigger is used to send routing address and call type to the S)"-.
,AAns%er : $his is used to notify the S)"- of call answer for a call originated at an +S# or any call
forwarded by an +S#.
,ADisconnect: -t is used to notify the S)"- of call disconnect for a call originated at an +S# or any call
forwarded by an +S#.
$riggers Armed *or $erminating #all:
!nitialATer'ination: $his trigger is armed for the called subscriber by the $riggerAddress)ist '$A)(
parameter recei!ed in the locreq returned to the +S# after the +obileM$ermination trigger was encountered.
CalledA/outingAAddressAA-aila(le: $he same is used to con!ey the routing address and call type to the
S)"-.
TAAns%er: $his is used to notify ser!ice logic of call answer for a call terminated at an +S#.
TADisconnect: $his trigger is used to notify S)"- of call disconnect for a call terminated at an +S#.
#A+E) Normal #all *low:
#A+E) Extended #all *low:
.-N 7riginating #all *low:
.-N $erminating #all *low:
,N-: Shell: A shell is an en!ironment in which we can run our commands% programs% and shell scripts. Each
shell has its own set of recogni&ed commands and functions. $he shell pro!ides an interface to the ,N-:
system.
T)e Bourne S)ell: B T)e C S)ell: C
. /ourne shell ' sh( . # shell ' csh(
. Forn shell ' ksh( . $ENE:<$7"S # shell ' tcsh(
. /ourne Again shell ' bash(
. "7S-: shell ' sh(
$he original ,N-: shell was written in the mid12L70s by Stephen 9. /ourne while he was at A$$ /ell )abs
in New Kersey. $he /ourne shell was the first shell to appear on ,N-: systems.
6irectories:
C)anging t)e directory:
cd

#o-ing into t)e +re-ious
directory: cd DD

#o-ing into t)e )o'e
directory: cd
N cd mail N cd.. N cd

Present @orking
Directory: +%d
Creating a ne% directory: /ena'ing a directory:
N pwd N mkdir >ikash N m! >ikash >ikas

/e'o-ing a directory:
N rmdir >ikash
N rm 1rf >ikash
*iles:
Dis+laying only t)e .ile na'es o. a
directory: ls
Dis+laying t)e .iles o. a directory %it) details: ls -l
N ls bulksms2 N ls 1l bulksms2
ack bin total J4G0

drwxr1xr1x 3 bulksms other 2L34073 +ar 7 20:35
ack
#o-ing a .ile into a directory:
drwxr1xr1x 3 bulksms other =23 Kan 34 22:G=
bin
N m! files bulksms2

N ls bulksms2 Co+y a .ile into a directory:
ack bin files N cp incremental.sh bulksms2

N ls bulksms2
/e'o-ing a .ile: ack bin incremental.sh
N rm chadump

rm: 9emo!e chadumpO y Deter'ining t)e .ile ty+e:
N rm 1rf chadump N file bulksms2

bulksms2: directory
,+ening E creating a .ile: N file 6AS8/7A96.sh
N !i sncplist 6AS8/7A96.sh: executable shell script

N file 9KM#7++M0G043020M;S+N"44MF+M5.cs!
Counting t)e nu'(er o. linesF
%ordsF 8 c)aracters in a .ile:
9KM#7++M0G043020M;S+N"44MF+M5.cs!:
ascii text
N wc sncplist N file sncplist
=7 =7 G02 sncplist sncplist: commands text

Dis+laying t)e .ile contents (y
screen:
Dis+laying t)e .ile contents at once:
N more
isG2MgsmMmoMsuccessMmedM070430
20M221G=147.acti!e
N cat isG2MgsmMmoMsuccessMmedM07043020M221G01
47.acti!e
ANM4%G%4%7J7=%2%0LJ3002GJG0%L2LJ
3002GJG0%3=03
ANM=%G%4%7J7=%2%LLL0=03532%L2LLL0=03532%3=02
ANM7%G%4%7J7=%2%LJ2LGG33==%L2LJ2
LGG33==%3=02
ANM4%G%4%7J7=%2%0L3J5J=J545%L2L3J5J=J545%3=02
11+ore11'3P(


Concatenating t)e .iles AdGunct 8 !$ into F#:
Sorting t)e .ile contents
al+)a(etically:
N touch AdCunct
N echo
Q7ne2Rn3$woRn4$hreeRn*ourQ S
Numbers
N echo QS+S#Rn8)9Q S AdCunct
N sort Numbers N echo Q#6+ARn9#7+Q S -N
3$wo N cat AdCunct -N S *+
4$hree N cat *+
*our S+S#
7ne2 8)9

#6+A
Sorting t)e .ile contents
nu'erically:
9#7+
N echo
Q7ne2Rn3$woRn4$hreeRn*ourQ S
Numbers

N sort 1n Numbers Dis+laying (eginning contents o. a .ile:
*our
N head 13
smppMisG2MmoMsuccessMmedM07043020M2G1G=1
=5.acti!e
7ne2 ANM7%4%3%7J7=%2%L2L4G255023G%L4G255023G%3002
3$wo ANM7%4%3%7J7=%2%L2L4G255023=%L4G255023=%3002
4$hree


Dis+laying t)e .ile contents continuously:
Dis+laying end contents o. a .ile:
N tail 1f smppMisG2MmoMsuccessMmedM07043020M2G1
=01=5.acti!e
N tail 13
smppMisG2MmoMsuccessMmedM07043
020M2G1=01=5.acti!e
ANM7%4%3%7J7=%2%L4L=2=J540%L4L=2=J540%3002
ANM7%4%3%7J7=%2%L477G0GJ02%L477G
0GJ02%3002
:HArshad and 6ia get closer on the film set%07043020
ANM7%4%3%7J7=%2%L2L4G5720=5G%L4G
5720=5G%3002


Finding t)e .iles (eginning %it) s'++As'++:
Finding t)e .iles in current
directory 8 all su(-directories:
N find . 1name QsmppMsmppHQ
N find . 1name inbox
.<smppMsmppMdrptMmtMsuccessM07043020M241G=1
=5.acti!e
.<bulksms2<inbox
.<smppMsmppMdrptMmoMsuccessM07043020M241G=1
=4.acti!e
.<bulksms3<inbox


Finding t)e .iles in Eout+ut directory:
Finding t)e .iles ending %it)
Dacti-e:
N find < output 1name QsmppMsmppHQ
N find . 1name QH.acti!eQ
<
sandeshMoutput<output<#69<smppMsmppMdrptMmtMsu
ccessM07043020M2G1301=5.acti!e
.<gsmMisG2MinterMmtMfailureM070430
20M241=01=4.acti!e
<
sandeshMoutput<output<#69<smppMsmppMinterMmoMfa
ilureM07043020M2G1301=G.acti!e
.<gsmMisG2MinterMmoMfailureM070430
20M241=01=4.acti!e


Finding t)e directory HALA/#SH in Eout+ut:
Finding t)e directories in current
directory 8 all su(-directories:
N find < output d 1name A)A9+
N find . d 1name #69 <sandeshMoutput<output<A)A9+S
.<#69

.<scratchMarea<#69
Escape Sequences:
Esca+e
Se&uences:
Scri+t o. using esca+e
se&uences:
Ra Alert /E) N IT<bin<sh
Rb /ackspace N echo Q>ikash$RbQ
Rf *ormfeed >ikash
Rn Newline N echo Q>ikashRf$iwariQ
Rr #arriage return >ikash
Rt 8ori&ontal tab $iwari
R! >ertical tab

N echo Q>ikashRrQ
>ikash
N echo Q>ikashRt$iwariQ
>ikash $iwari
N echo Q>ikashR!$iwariQ
>ikash
$iwari
>ariables: $he name of a !ariable can contain only letters ' a to & or A to U(% numbers ' 0 to L( or the
underscore character ' M(. >ariable name only starts with alphabets. >ariables holding the single !alues are
called scalar !ariables.
D Local *aria(les D En-iron'ent *aria(les D S)ell *aria(les
/ead-only -aria(les: After a !ariable is marked read1only% its !alue cannot be changed.
Unsetting *aria(les: 7nce you unset a !ariable% you would not be able to access stored !alue in the !ariable.
Vou cannot use the unset command to unset !ariables that are marked read1only.
Scri+t using read-only -aria(les:

Scri+t to unset a -aria(le:
N IT<bin<sh N IT<bin<sh
N NameW>ikash N aWG
N readonly Name N unset a
N NameW$iwari N echo Na
rksh: Name: is read only
N
*ile "ermissions:
File: 1rwxr1xr1x 2 root root 5J0L +ar 30 300L Unix
. 7wner "ermissions: rwx
-r%xr-xr-x: . ;roup "ermissions: r1x
. 7ther '.orld( "ermissions: r1x
r: read% w: write% x: execute
C)anging t)e File Per'issions:
C)'od o+erator Descri+tion
I Adds the designated permission's( to a file or directory.
-
9emo!es the designated permission's( from a file or
directory.
J Sets the designated permission's(.
File: 1rwxr1xr1x 2 root root 5J0L +ar 30 300L Unix
B c)'od u-% Unix ----/e'o-ing t)e %rite +er'issions to t)e o%ner
B ls lrt
1r-xr1xr1x 2 root root 5J0L +ar 30 300L Unix
B c)'od gI% Unix ----Adding t)e %rite +er'issions to t)e grou+
B ls lrt
1r1xr%xr1x 2 root root 5J0L +ar 30 300L Unix
B c)'od oJx Unix ----Setting t)e executa(le +er'issions to t)e %orld
B ls lrt
1r1xrwx--x 2 root root 5J0L +ar 30 300L Unix
File +er'issions can also (e c)anged as .ollo%s:
$u'(er Per'ission
< 111
7 11x
6 1w1
5 1wx
4 r11
3 r1x
2 rw1
1 rwx
x----6K<
%----6K7
r----6K6
File: 1r1xr1xr1x 2 root root 5J0L +ar 30 300L Unix
B c)'od 145 Unix
B ls lrt
1rwxr111wx 2 root root 5J0L +ar 30 300L Unix
1----,%ner Per'issions
4----Lrou+ Per'issions
5----,t)er Per'issions
C)anging ,%ners 8 Lrou+s:
B c)o%n )inux ,nix 1111#hanges the owner of the file ,nix to )inux
B c)gr+ "erl ,nix 1111#hanges the group owner of the file ,nix to "erl
"ipes *ilters:
$he gre+ program searches a file or files for lines that ha!e a certain pattern.
$he sort command arranges lines of text alphabetically or numerically.
2. bash14.00N gre+ L434J5=0J0 H3J023020H
3. bash14.00N sort smppMgsmMmtMsuccessMmedM3J023020M0G13=1=G.acti!e
*ollowing options can be used with gre+:
,+tion Descri+tion
1! "rint all lines that do not match pattern.
1n "rint the matched line and its line number.
1l
"rint only the names of files with matching lines 'letter
QlQ(
1c "rint only the count of matching lines.
1i +atch either upper1 or lowercase.
bash14.00N ls 1lrt X grep 1i smppMisG2H
*ollowing options can be used with sort:
,+tion Descri+tion
1n
Sort numerically 'example: 20 will sort after 3(% ignore
blanks and tabs.
1r 9e!erse the order of sort.
1f Sort upper1 and lowercase together.
Yx -gnore first x fields when sorting.
bash14.00N ls 1lrt X grep smppH X sort Zr
bash14.00N ls 1lrt X sort 1r X more
/asic 7perators:
)rit*'etic 0&erators:

)ddition o/ T2o 3%'-ers:

S%-traction o/ T2o
3%'-ers:
%ddition6 I 7 89:(in:s1 7 89:(in:s1
Su(traction6 - 7 a;< 7 a;<
0ulti'lication6 M; 7 (;= 7 (;=
Division6 E 7 c;>ex'r 7a ? 7(> 7 c;>ex'r 7a " 7(>
0odulus6 C 7 ec1o @5utcome ; 7c@ 7 ec1o @5utcome ; 7c@
%ssignment6 J 5utcome ; ! 5utcome ; "<
Equalit,6 J J

.ot Equalit,6 NJ
M%lti&lication o/ T2o
3%'-ers:
Di$ision o/ T2o 3%'-ers:

7 89:(in:s1 7 89:(in:s1
Scri&t to 2rite 4"ello
5orld6:
7 a;< 7 a;<
7 89:(in:s1 7 (;= 7 (;=
7 8 T1is is a comment9 7 c;>ex'r 7a AB 7(> 7 c;>ex'r 7a : 7(>
7 ec1o H9ello @orldH 7 ec1o @5utcome ; 7c@ 7 ec1o @5utcome ; 7c@
/ello Corld 5utcome ; D! 5utcome ; E

)ssign'ent o/ a n%'-er
into a $aria-le:

Mod%l%s o/ T2o 3%'-ers:
7 89:(in:s1 7 89:(in:s1
7 a;< 7 a;<
7 (;= 7 (;=
7 c;7a 7 c;>ex'r 7a F 7(>
7 ec1o @5utcome ; 7c@ 7 ec1o @5utcome ; 7c@
5utcome ; < 5utcome ; <

Co'&arison %sing 47 76
0&erator:
Co'&arison %sing 4876
0&erator
7 89:(in:s1 7 89:(in:s1
7 a;< 7 a;<
7 (;= 7 (;=
7 if G7a ;; 7(H 7 if G7a 9; 7(H
I t1en I t1en
I ec1o @5utcome 6 a is equal
to (@
I ec1o @5utcome 6 a is not
equal to (@
I else I else
I ec1o @5utcome 6 a is not
equal to (@
I ec1o @5utcome 6 a is equal
to (@
I fi I fi
5utcome 6 a is not equal to ( 5utcome 6 a is not equal to (
/elational ,+erators:

Co'+arison using /elational ,+erators:
Equal $o: -e& N ITbin<sh
Not Equal $o: -ne N aWG
;reater $han: -gt N bWJ
)ess $han: -lt N if ? Na 1eq Nb @ 1111?eq% ne% gt% lt% ge% le@
;reater $han or Equal $o: -ge S then
)ess $han or Equal $o: -le S echo Qa is equal to bQ

S else
S echo Qa is not equal to bQ
S fi
a is not equal to b
Boolean ,+erators:

Scri+t Using Boolean ,+erators:
)ogical Negation: T N ITbin<sh
)ogical 79: 1o N aWG
)ogical AN6: 1a N bWJ

N if ? Na 1lt Nb 1a Na 1gt Nb @ 1111?T% 1o% 1a@
S then
S echo Qa is less than bQ
S else
S echo Qa is not less than bQ
S fi
a is not less than b
String ,+erators:

Scri+t Using String ,+erators:
a is equal to b: J N IT<bin<sh
a is not equal to b: NJ N aWabc
string length is &ero: -: N bWxy&
string length is not &ero: -n N if ? 1& Na @ 1111?W% TW% 1&% 1n% str@
string is not empty: str S then

S echo QString )engh is &eroQ
S else
S echo QString )enght is not &eroQ
S fi
String )enght is not &ero
6ecision +aking Statements:
i/----t*en----/i

i/----t*en----else----/i

i/----t*en----eli/----t*en----
else----/i

Scri&t %sing i/----t*en----/i:
Scri&t %sing i/----t*en----
else----/i:
Scri&t %sing i/----t*en----eli/----
t*en----else----/i:
7 89:(in:s1 7 89:(in:s1 7 89:(in:s1
7 a;< 7 a;< 7 a;<
7 (;= 7 (;= 7 (;=
7 if G 7a 9; 7( H 7 if G 7a ;; 7( H 7 if G 7a ;; 7( H
I t1en I t1en I t1en
I ec1o @a is not equal to (@ I ec1o @a is equal to (@ I ec1o @a is equal to (@
I fi I else I elif G 7a "gt 7( H
a is not equal to ( I ec1o @a is not eqaul to (@ I t1en

I fi I ec1o @a is greater t1an (@
a is not eqaul to ( I elif G 7a "lt 7( H
I t1en
I ec1o @a is less t1an (@
I else
I ec1o @.one of t1e condition
met@
I fi
a is less t1an (
case----esac

Scri+t using case----esac:

N IT<bin<sh
N cWName
N case Nc in
S Name( echo Q+y name is >ikashQBB
S 7rgani&ation( echo Q- am working in 9eliance
#ommunicationsQBB
S Special( echo Q- am a man of a kindQBB
S esac
+y name is >ikash
Shell )oops:
%)ile----do----done

.or----do----done

untill----do----done

Scri+t Using %)ile----
do----done Loo+:
Scri+t Using .or
Loo+:
Scri+t using until----
do----done:
N IT<bin<sh N IT<bin<sh N IT<bin<sh
N aW0 N for a in 0 2 3 4 G N aW0
N while ? Na 1lt = @ S do N until ? T Na 1lt = @
S do S echo Na S do
S echo Na S done S echo Na
S aW[expr Na Y 2[ 0 S aW[expr Na Y 2[
S done 2 S done
0 3 0
2 4 2
3 G 3
4

4
G

G
)oop #ontrol:
(reak

(reak6

continue

Scri+t using
(reak:
Scri+t using (reak 6: Scri+t using continue:
N IT<bin<sh N IT<bin<sh N IT<bin<sh
N aW0 N for !ar2 in 2 3 4 N N,+SWQ2 3 4 G = 5 7Q
N while ? Na 1lt
20 @
S do N for N,+ in NN,+S
S do S for !ar3 in 0 = S do
S echo Na S do S AW[expr NN,+ P 3[
S if ? Na 1eq = @
S if ? N!ar2 1eq 3 1a N!ar3 1eq
0 @
S if ? NA 1eq 0 @
S then S then S then
S break S break 3
S echo QNumber is an e!en
numberTTQ
S fi S else S continue
S aW[expr Na Y 2[ S echo QN!ar2 N!ar3Q S fi
S done S fi S echo Q*ound odd numberQ
0 S done S done
2 S done *ound odd number
3 2 0 Number is an e!en numberTT
4
2 =
*ound odd number
G

Number is an e!en numberTT
= *ound odd number

Number is an e!en numberTT
*ound odd number
Special #haracters:
H O ? @ \ Q R N B ' ( X ] ^ S Rn space tab
Single &uote O": All special characters between these quotes lose their special meaning.
Back Puote Q": Anything in between back quotes would be treated as a command and would be executed.
Backslas) M": Any character immediately following the backslash loses its special meaning.
Dou(le &uote: *or parameter substitution.
Scri+t using
single &uote:

Scri+t using (ack
&uote:

Scri+t using
(ackslas):

Scri+t using
dou(le &uote:
N IT<bin<sh N IT<bin<sh N IT<bin<sh N IT<bin<sh
N aWG N echo [date[ N echo Rdate N aWG
N echo \Na\
$uesday% Kanuary 35%
3020 J:33:4J "+ -S$
6ate N echo QNaQ
Na

G
*unctions:
#reating *unctions
"assing parameters to a function
9eturning !alues from functions
Nested functions
Scri+t to
create a
.unction:

Scri+t to +ass
+ara'eters to a
.unction:

Scri+t to
returning
-alues .ro'
.unctions:

Scri+t o.
recursi-e
.unctions:

Scri+t o.
nested
.unctions:
N IT<bin<sh N IT<bin<sh N IT<bin<sh N IT<bin<sh N IT<bin<sh
N Name '(
1*unction is
defined here
N "rofile '( N "rofile '( N "rofile '( N "rofile '(
S _ S _ S _ S _ S _
S echo >ikash
$iwari
S echo Q9eliance
#ommunications N2
N3 N4Q
S echo
Q9eliance
#ommunications
N2 N3Q
S echo
Q$elecom
"rofessionalQ
S echo
Q$elecom
"rofessionalQ
S ` S ` S return G S "rofile S )ocation
N Name
1*unction is
in!oke here
N "rofile 6AF#
+ain NN7#
S ` S ` S `
>ikash $iwari
9eliance
#ommunications
6AF# +ain NN7#
N "rofile 6AF# N "rofile N )ocation '(

9eliance
#ommunications
6AF#

S _
N aWNO
S echo QNa!i
+umbaiQ
N echo Q9eturn
!alue is NaQ
S `
9eturn !alue is G N "rofile

$elecom
"rofessional
Na!i
+umbai
$he A.F #ommand: -t executes the instructions for each line of the file
/ecord: Each )ine of the *ile
Field: Each word of a line
Deli'eter: 3 or more consecuti!e spaces and<or tabs between 3 fields
Scri+t to execute +rint
state'ent %it) argu'ent:

Scri+t to execute +rint
state'ent %it)out
argu'ent:

Scri+t to execute
BEL!$ state'ent:
N IT<bin<sh N IT<bin<sh N IT<bin<sh
N echo Q>ikashRn9#7+Rn-NQ
S "rofile
N echo
Q>ikashRn9#7+Rn-NQ S
"rofile
N echo
Q>ikashRn9#7+Rn-NQ
S "rofile
N awk \_print Q+y "rofileQ`\
"rofile
N awk \_print`\ "rofile
N awk \/E;-N _print
Q+y "rofileQ`\ "rofile
+y "rofile >ikash +y "rofile
+y "rofile 9#7+
+y "rofile -N

Scri+t to execute t)e
'atc)ed line:
Scri+t to test (lank line E
!nteger E String:
Scri+t o. using .ield
o+erator B:
N IT<bin<sh N IT<bin<sh N IT<bin<sh
N echo
Q>ikashRn9#7+Rn-N RnQ S
"rofile
N echo \<]N< _print Qthis is a
blank lineQ` Rn <?01L@Y<
_print Q$hat is an
integerQ` Rn <?A1Ua1&@Y<
_print Q$his is a stringQ`\ S
$est
N echo Q>ikash 9#7+
L434J5=0J0 Rn"repaid
.irelessQ S Address
N echo \<]N< _print Qthis is a
blank lineQ`\ S /lank
N awk 1f $est
N awk \_print
N3%N2%N4%N0`\ Address
N awk 1f /lank "rofile
9#7+ >ikash
L434J5=0J0 >ikash
9#7+ L434J5=0J0
this is a blank line this is a blank line
.ireless "repaid
"repaid .ireless

G

$hat is an integer
>ikash
$his is a string
7ther Shell Scripts:
Scri+t to login into a ser-er 8
accessing itRs .iles:

Scri+t to +rint t)e current
date:
N IT<bin<sh N IT<bin<sh
N hostWL7.3=4.27.2G3 N date Y\Pd P/ Pm Py\
N portW34 3L Kanuary 02 20
N loginWitMdwh

N "asswordWitMdwh
N cmdWQls 1lrt <-$7"SQ
N echo open Nhost Nport
N sleep 2
N echo Nlogin
N sleep 2
N echo N"assword
N sleep 2
N echo Ncmd
N sleep 2
N echo exit

. Now +ake the file telnet.sh
executable by chmod 777 telnet.sh
. execute the file telnet.sh by .<telnet.sh X
telnet
. Also redirect the output as .<telnet.sh X
telnet S #*S
6isplaying logged in users:
B %)o
bulksms pts<7 +ar 7 20:=L 'L7.3=4.20.55(
bulksms pts<33 +ar = 0L:=3 'L7.3=4.237.303(
bulksms pts<2 +ar = 0L:=4 'L7.3=4.237.303(
bulksms pts<5 +ar = 0L:=G 'L7.3=4.237.303(
*ile System /asics:
E!erything in ,nix is considered to be a file% including physical de!ices such as 6>6197+s% ,S/ de!ices%
floppy dri!es% and so forth.
Each file or directory is uniquely identified by a unique identifier% typically called an inode.
/y con!ention% the root directory has an inode number of 3 and the lostYfound directory has an inode
number of 4. -node numbers 0 and 2 are not used. *ile inode numbers can be seen by specifying the 1i
option to ls command.
*ollowing are the directories that exist on the maCor !ersions of ,nix:
Directory Descri+tion
<
$his is the root directory which should contain only the directories needed at the top
le!el of the file structure.
<bin $his is where the executable files are located. $hey are a!ailable to all user.
<de! $hese are de!ice dri!ers.
<etc
Super!isor directory commands% configuration files% disk configuration files% !alid user
lists% groups% ethernet% hosts% where to send critical messages.
<lib #ontains shared library files and sometimes other kernel1related files.
<boot #ontains files for booting the system.
<home #ontains the home directory for users and other accounts.
<mnt
,sed to mount other temporary file systems% such as cdrom and floppy for the #61
97+ dri!e and floppy diskette dri!e% respecti!ely
<proc
#ontains all processes marked as a file by process number or other information that is
dynamic to the system.
<tmp 8olds temporary files used between system boots
<usr
,sed for miscellaneous purposes% or can be used by many users. -ncludes administrati!e
commands% shared files% library files% and others
<!ar
$ypically contains !ariable1length files such as log and print files and any other type of
file that may contain a !ariable amount of data
<sbin
#ontains binary 'executable( files% usually for system administration. *or example fdisk
and ifconfig utlities.
<kernel #ontains kernel files
$he df 'disk free( #ommand: $he df 1k output is generally the same on all ,nix systems.
Colu'n Descri+tion
*ilesystem $he physical file system name.
kbytes $otal kilobytes of space a!ailable on the storage medium.
used $otal kilobytes of space used 'by files(.
a!ail $otal kilobytes a!ailable for use.
capacity "ercentage of total space used by files.
+ounted on .hat the file system is mounted on.
$he df Zh 'human readable( option can also be used to display the output in a format that shows the si&e in
easier1to1understand notation.
$he !i Editor #ommands:
esc to re!ert to command mode
ctrl-! to clear the command
i inserts text to the left of the cursor
a appends text to the right of the cursor
! inserts text to the beginning of the line
A appends text at the end of the line
o opens new line below current line
, opens new line abo!e current line
r replaces a single character under cursor
s
replaces singe character under cursor with any numbers of
characters
/ replaces text from cursor to right
S replaces entire line
) mo!es the cursor left by one position
G mo!es the cursor down by one position
k mo!es the cursor up by one position
! mo!es the cursor right by one position
( mo!es the cursor back to the beginning of word
e mo!es the cursor forward to the end of word
% mo!es the cursor forward to beginning of next word
< mo!es the cursor to the first character of a line
B mo!es the cursor to the last character of a line
4<L mo!es the cursor to line number G0
7L: mo!es the cursor to line number 2
L: mo!es the cursor to last line of the file
x: deletes a single character under cursor
ctrl-%: $o erase the entire word
dd: deletes the current line
yy: yanks 'copies( the current line
S: Coin current line and the line following it
:%: sa!es file and remains in editing mode
:%&N: sa!es file and quits editing mode
:&N: quits editing mode but after abandoning changes
:% -ikas): writes all lines to another file !ikash
:D% -ikas): writes current line to another file !ikash
:B% -ikas): writes last line to another file !ikash
:DFB% -ikas): writes current line to end line to another file !ikash
:7<F3<% -ikas): writes 'or sa!es( lines from 20 to =0 to another file !ikash
:3% -ikas): writes =th line to another file !ikash
:7FB% -ikas): writes entire file to another file !ikash
:%N -ikas): o!errites the existing file to !ikash
ctrl-:: suspends the current !i session
.g: return to the editor
-r: reco!ers file from a crash
ctrl-.: scrolls a page forward
ctrl-(: scrolls a page backward
ctrl-d: scrolls a half page forward
ctrl-u: scrolls a half page backward
ctrl-g: to know the current line number
esc-u: to undo the last action
esc-U: discard all changes made to the current line
E-ikas): searches the first instance of !ikash forward
T-ikas): searches the first instance of !ikash backward
n:
repeates search in same direction along which pre!ious search
was made
$:
repeates search in direction opposite to that along which
pre!ious search was made
:7FBsE-ikas)Ea'itEg: substitutes !ikash with amit globally throughout the file
:7FBsE-ikas)Ea'itE:
substitutes !ikash with amit only for the first occurrence in
each addressed line throughout the file
:7F3<sE-ikas)EEg:
deletes all occurrences of !ikash from lines 2 through =0
globally
:7FBsE-ikas)Ea'itEgc:
before substitution of !ikash with amit pro!ide options ayb% anb%
aqb% aab for each occurrence
Account +anagement:
useradd 'ass+d usedmod userdel
grou'add grou'mod grou'del

For t1ese commands to +or* one must 1ave su'er
user rig1ts or (e logged in as root-
Creating $e% User: useradd
0&tions:
-D: takes default !alues from the system
-c comment: "assword file comment
-d homeMdir: )ogin directory name
-e expireMdate: $he date 'VVVV1++166( on which the user account will be
disabled.
-. inacti!eMdays: A !alue of 0 disables the account as soon as the password has
expired% and a !alue of 12 disables the feature. $he default !alue is 12.
-g initialMgroup: $he user\s group name < group number. $he default group number is
2.
-L group%?....@: A list of supplementary groups which the user is also a member of.
-': $he user\s home directory will be created if it does not exist. *iles directories
in <etc<skel will be created in the user\s home directory as well.
-#: $he user home directory will not be created.
-n: A group ha!ing the same name as the user being added to the system will be
created by default.
-o: Allow create user with duplicate 'non1unique( ,-6.
-+ +ass%d: $he encrypted password. $he default is to disable the account.
-r: ,sed to create a system account.
-s shell: $he name of the user\s login shell. $he default is to lea!e this field blank.
-u uid: A non1negati!e numerical !alue 'SLL( of the user\s -6.

C)anging t)e de.ault -alues:
-( defaultMhome: $he initial path prefix for a new user\s home directory.
-e defaultMexpireMdate: $he date on which the user account is disabled.
-. defaultMinacti!e: $he number of days after a password has expired before the
account will be disabled.
-g defaultMgroup: $he group name or -6 for a new user\s initial group.
-s defaultMshell: $he name of the new user\s login shell.
Creating ne% user %it) de.ault -alues: Scri+t to -ie% t)e Login details:
I useradd >ikash N finger >ikash
)ogin name: >ikash
Finding t)e userUs uid:
6irectory: <home<>ikash Shell:
<bin<sh
N id 1u >ikash Ne!er logged in
40G No unread mail
No "lan
Finding userRs gid" +ri'ary grou+ id:
N id 1g >ikash Finding a nu'(er o. userRs grou+:
2 N groups >ikash root
>ikash: other admin
Finding t)e userUs grou+: root: root
N groups >ikash
>ikash: other admin Finding t)e gid 8 uid o. t)e user:
N id >ikash
Finding t)e userRs +ri'ary grou+ na'e: uidW40G'>ikash( gidW2'other(
N id 1gn >ikash

other

Creating a ne% user %it) t)e o+tions:
Iuseradd 1u GGG 1g G 1d <home<;enius
>ikash
Setting t)e Pass%ord: passwd
,+tions:
-k: ,sed for expired authentication passwords
-l: ,sed to lock the specified account and it is a!ailable to root only.
--stdin: passwd should read the new password from standard input
-u: ,sed to unlock the specified account and it is a!ailable to root only.
-d: 6isables a password for an account set the named account passwordless. A!ailable to
root only.
-n: Set the minimum password lifetime% in days. A!ailable to root only.
-x: Set the maximum password lifetime% in days. A!ailable to root only.
-%: set the number of days in ad!ance the user will begin recei!ing warnings that her
password will expire. A!ailable to root only.
-i: Set the number of days which will pass before an expired password for this account will
be taken to mean that the account is inacti!e and should be disabled. A!ailable to root only.
-S: $his will output a short information about the status of the password for a gi!en account.
A!ailable to root user only.
Setting t)e +ass%ord .or t)e ne%ly created user account:
I passwd >ikash
Enter new ,nix password: $iwari
9etype new ,N-: password: $iwari
passwd: password updated successfully
#odi.ying t)e User Account: usermod
,+tions:
-c comment: "assword file comment
-d homeMdir: )ogin directory name
-e expireMdate: $he date 'VVVV1++166( on which the user account will be
disabled.
-. inacti!eMdays: A !alue of 0 disables the account as soon as the password has
expired% and a !alue of 12 disables the feature. $he default !alue is 12.
-g initialMgroup: $he user\s group name < group number. $he default group number
is 2.
-L group%?....@: A list of supplementary groups which the user is also a member of.
-': $he user\s home directory will be created if it does not exist. *iles directories
in <etc<skel will be created in the user\s home directory as well.
-l loginMname: $he name of the user will be changed from login to loginMname.
-+ passwd: $he encrypted password.
-s shell: $he name of the user\s login shell. $he default is to lea!e this field blank.
-u uid: A non1negati!e numerical !alue 'SLL( of the user\s -6. >alues between 0 and
LL are reser!ed for system accounts.
-L: )ock a user\s password.
-U: ,nlock a user\s password.
Deleting t)e user account: userdel
,+tions:
-r: 6eletes the user\s home directory all entries that refer to login.
Adding a grou+: groupadd
,+tions:
-g gid: A non1negati!e numerical !alue 'S=00( of the group\s -6.
-r: used to add a system account. gid !alues between 0 GLL are reser!ed for
system accounts.
-.: $he fource flag that will cause groupadd to exit with an error when the
group about to be added already exists on the system.
#odi.ying a grou+: groupmod
,+tions:
-g gid: A non1negati!e numerical !alue 'SLL( of the group\s -6.
-n groupMname: $he name of the group will be changed from group to groupMname.
Deleting a grou+: groupdel
SA): Structured Auery )anguage
,sed to communicate with a database.
SA) is case insensiti!e.
Each SA) statement ends with a semicolon.
SA) statements are used to perform tasks such as update data on a database% or retrie!e data from a
database.
6ata $ypes:
char'si&e(
*ixed1)ength character string. Si&e is specified in parenthesis. +ax 3==
bytes.
!archar'si&e( >ariable1)ength character string. +ax si&e is specified in parenthesis.
number'si&e(
Number !alue with a max number of column digits specified in
parenthesis.
data 6ate !alue
number'si&e%
d(
Number !alue with a max number of digits of Qsi&eQ total% with a max
number of QdQ digits to the right of the decimal.
7perators:
J Equal $o
S ;reater $han
V )ess $han
WJ ;reater $han or Equal $o
VJ )ess $han or Equal $o
VW Not Equal $o
L!XE +atching "atterns
$able /asics:
A 6atabase system contains one or more obCects called tables.
$he data or information for the database is stored in these tables.
$able and column names must start with a letter followed by letters% numbers% underscores.
+ax length of table column names can ha!e 40 characters in length.
Exa'+le:
@eat)er
City State 9ig) Lo%
6elhi 6elhi 4= 3=
+umbai +aharashtra 40 30
/angalore Farnataka 3= 2=
8yderabad Andhra "radesh 43 33
#onstraints:
D uni&ue: Specifies that no two records can ha!e the same !alue in a particular column.
D not null: Specifies that a column can not be left blank.
D +ri'ary key: Specifies a unique identification of each record 'or row( in a table.
#ommands:
select create insert update delete drop
Selecting 6ata:
select #ity% State% 8igh .ro' .eather %)ere 8igh W 3=B
,ut+ut:
City State 9ig)
6elhi 6elhi 4=
+umbai +aharashtra 40
8yderabad
Andra
"radesh
43
select #ity% State% 8igh .ro' .eather %)ere State L!XE a6PbB
,ut+ut:
City State 9ig)
6elhi 6elhi 4=
select #ity% State% 8igh .ro' .eather %)ere State L!XE aPabB
,ut+ut:
City State 9ig)
+umbai +aharashtra 40
/angalore Farnataka 3=
select #ity% State% 8igh .ro' .eather %)ere State W a6elhibB
,ut+ut:
City State 9ig)
6elhi 6elhi 4=
select ; .ro' .eather %)ere 8igh W 3=B
,ut+ut:
City State 9ig) Lo%
6elhi 6elhi 4= 3=
+umbai +aharashtra 40 30
8yderabad Andhra "radesh 43 33
#reating $ables:
create ta(le *amily Name -arc)ar6<"F "rofile -arc)ar6<"F Exp nu'(er4"F Age nu'(er4""Y
-nserting data into a table:
insert into *amily 'Name% "rofile% Exp% Age( -alues 'a>ikashb% aEngineerb% 4% 3J(B
6isplaying the table *amily:
select ; .ro' *amilyY
,ut+ut:
$a'e Pro.ile Ex+ Age
>ikash Engineer 4 3J
,pdating records:
u+date *amily set Age J 3L %)ere Name J O>ikashRY
select ; .ro' *amilyB
,ut+ut:
$a'e Pro.ile Ex+ Age
>ikash Engineer 4 3L
u+date *amily set Age J 3J %)ere Name J O>ikashR and "rofile J OEngineerRY
select ; .ro' *amilyB
,ut+ut:
$a'e Pro.ile Ex+ Age
>ikash Engineer 4 3J
Adding a new row into an existing table:
insert into *amily 'Name% "rofile% Exp% Age( -alues 'a+amtab% a$eacherb% 3% 35(B
select ; .ro' *amilyY
,ut+ut:
$a'e Pro.ile Ex+ Age
>ikash Engineer 4 3J
+amta $eacher 3 35
6eleting records:
delete .ro' *amily %)ere Age W 35B
select ; .ro' *amilyB
,ut+ut:
$a'e Pro.ile Ex+ Age
>ikash Engineer 4 3J
delete .ro' *amily %)ere $a'e J a+amtab or Age W 35B
select ; .ro' *amilyB
,ut+ut:
$a'e Pro.ile Ex+ Age
>ikash Engineer 4 3J
delete .ro' *amily %)ere $a'e J a+amtab and Age W 35B
select ; .ro' *amilyB
,ut+ut:
$a'e Pro.ile Ex+ Age
>ikash Engineer 4 3J
delete .ro' *amilyB
select ; .ro' *amilyB
,ut+ut:
$a'e Pro.ile Ex+ Age
6eleting a $able:
dro+ ta(le *amilyB
7racle:
Architecture:
-t is relational database management system '96/+S(.
Allows to access large amounts of stored information.
#onsists of physical layer logical layer.
$he physical layer consists of the files that reside on the diskB the components of the logical layer map the
data to these physical components.
$he "hysical )ayer:
,ne or #ore Data.iles: 8old the information contained in the database. $he information for a single table
can span many datafiles or many tables can share a set of datafiles.$he number of datafiles that can be
configured is limited by the oracle parameter +A:6A$A*-)ES.
T%o or #ore /edo Log Files: 8old information used for reco!ery in the e!ent of a system failure.
,ne or #ore Control Files: 8old information used to start an oracle instance.
$he )ogical )ayer:
7ne or +ore $able Spaces.
$he database schema% which consists of items such as $ables% #lusters% -ndexes% >iews% Stored "rocedures%
6atabase $riggers% Sequences% and so on.
6atabase% $ablespaces% 6atafiles:
A database is logically di!ided into a number of $ablespaces.
A $ablespace consists of one or more 6atafiles.
A 6atafile reside on the disk.
/y using more than one datafile per tablespace% we can spread data o!er many different disks to distribute
the - < 7 load and impro!e performance.
SVS$E+ $ablespace:
8olds the data dictionary.
$he data dictionary holds the information about tables % indexes % clusters and so on.
$he 6atabase Schema: -t is a collection of logical Z structure obCects known as schema obCects.
Ta(le: #onsists of a tablename% column and rows of data. #olumns are defined by name datatype. A table
is stored within a tablespace% often many table share a tablespace.
Cluster: -t is a set of tables physically stored together as one table that shares a common column.
!ndex: -t is a structure created to help retrie!e data more quickly efficiently. An index is declared on a
column or set of columns.
*ie%: it is a window into one or more tables. A !iew does not store any dataB it presents table data. A !iew
can be queried% updated% and deleted as a table without restriction.
Stored Procedure: -t is a predefined SA) query that allows more efficient query to the 96/+S and thus
reduce network traffic and impro!e performance.
Data(ase Trigger: -t is procedure that is run automatically when an e!en occurs. $his procedure could be
an insert% a deletion% or e!en a selection of data from a table.
Se&uence: $he oracle sequence generator is used to automatically generate a unique sequence of numbers in
cache.
Segments: -t is set of extents used to store a particular type of data.
Data Seg'ent: Stores user data within the database.
!ndex Seg'ent: Stores indexes.
/oll(ack Seg'ent: Stores rollback information used when data must be rolled back.
Te'+orary Seg'ent: #reated when a SA) statement needs a temporary work areaB these segments are
destroyed when the SA) statement is finished.
Extents: -t is a set of data blocks.
-t is used to minimi&e the amount of wasted 'empty( storage.
.hen the data is entered into tablespaces in your database% the extents used to store that data can grow or
shrink as necessary.
6ata /locks: -t is the smallest storage unit which is physically stored on disk.
$he 7racle -nstance: -t consists of the user processes% the oracle background processes% and the shared
memory used by theses processes which are responsible to access information in the database.
$he 7racle +emory Structure:
Syste' Llo(al area SLA": -t is the shared memory region used to store data control information for an
oracle instance. $he S;A is allocated when the 7racle instance starts and de1allocated when the 7racle
instance shuts down.
Progra' Llo(al Area PLA": -t is the shared memory region used to store data control information for
the oracle ser!er processes.
,ser "rocesses: $he user process manipulates the userbs input and communicates with the oracle ser!er
process through the 7racle program interface.
Ser!er "rocesses 'Shadow "rocesses(:
-t is used to communicate with the user and interact with 7racle to carry out the userbs requests.
-f user process requests a piece of data not already in the S;A% the shadow process is responsible for
reading the data blocks from the datafiles into the S;A.
/ackground "rocesses:
Data(ase @riter DB@/": 9esponsible for writing dirty data blocks from the database block buffers to
disk.
Log @riter LL@/": 9esponsible for writing data from the log buffer to the redo log.
C)eck+oint CXPT" :
A checkpoint is an e!ent in which all modified database buffers are written to the datafiles by the 6/.9.
9esponsibilities for signaling the 6/.9 process to perform a checkpoint and to update all the datafiles and
control files for the database to indicate the most recent checkpoint.
Process #onitor P#,$": 9esponsible for keeping track to database processes and cleaning up if a
process prematurely dies.
Syste' #onitor S#,$": "erforms instance reco!ery at instance startup. $his includes cleaning
temporary segments and reco!ering transactions that ha!e died because of a system crash.
/eco-ery /EC,": ,sed to clean transactions that were pending in a distributed database. -t is responsible
for committing or rolling back the local portion of the disputed transactions.
Arc)i-er A/C9": 9esponsible for copying the online redo log files to archi!al storage when they become
full.
Parallel Ser-er Lock LCXn": ,p to 20 )#F processes are used for inter1instance locking.
Dis+atc)er Dnnn": 9esponsible for routing requests from the user processes to a!ailable shared ser!er
processes and back.
#om!erse -N Architecture:
#A+E) #all *low: No "re #all .arning
TR$L5JUE 0anager
TR0
TR$L5JUE 0anager
TR0
Service Data &oint
SD&
Service Data &oint
SD&
Service Logic Unit
SLU
Service Logic Unit
SLU
Call Control
Server
CCS
Call Control
Server
CCS
Signaling Jate+a,
Unit
SJU
Signaling Jate+a,
Unit
SJU
0ulti 0edia
Unit
00U
0ulti 0edia
Unit
00U
+S#bs
8S/N
STP
STP
0essage Storage
Unit
0SU
0essage Storage
Unit
0SU
->9,
;+S#bs
+S
@!$
!SUP
*oice E E7
S%itc) SLU SLU SDP
!nitialDP
P
Ans%er
A++ly C)arge
A? Puery
/es+onse
$ot an Access $u'(er
Su(scri(er !n.o
Ans%er
Disconnect
Disconnect
E$D
E$D Balance U+date
Su(scri(er in
Con-ersation
$he SS* sends an -nitial6" message to the S#*.
$he message arri!es at the S;, that forwards it to one of the S),s using 6$#A" protocol.
$he S), that recei!es the message checks if the #alled "arty is an emergency number% or access number. -f
N7$ it will query the S6" to get information about the #alling "arty% such as A!ailable /alance% Subscriber
State% and Expiration 6ate.
$he S), detects from the response whether to play an announcement or to continue with the call.
-n a case where there is no need to play an announcement% the S), sends Apply#harging message to the
SS* through S;,.
$he SS* then continues with normal call establishment until the called party answers.
.hen the call is answered% the answer 6etection "oint is triggered% and sends it to the S;,% and then to the
7riginal S),.
At this point the S), begins charging the call.
After the call has reached the acti!e state% or one of the parties disconnects% the disconnect trigger is
generated and sent to S#".
$he S#" ends charging the call and responds to the SS* with $#A" EN6 to end the control relationship.
$ote: !nitial DP----#alling "arty Number% #alled "arty Number% #alling "arty )ocation Number% #alling "arty
#ategory% #all 9eference Number% #alling "arty +S# address.
#A+E) #all *low: "re #all $erminate '+:,(
$he SS* sends an -nitial6" message to the S#*.
$he message arri!es at the S;, that forwards it to one of the S),s using 6$#A" protocol.
$he S), that recei!es the message checks if the #alled "arty is an emergency number% or access number. -f
N7$ it will query the S6" to get information about the #alling "arty% such as A!ailable /alance% Subscriber
State% and Expiration 6ate.
$he S), detects from the response whether to play an announcement or to continue with the call.
-f the S), detects to play an announcement% a message Establish$emporary#onnection is sent from the S),
to the +S# that includes the S), -6 and the #9N '#all reference number(.
An -S," message -A+ is sent to the ##S that includes the #alling "arty Number and the #alled number.
-n response to the -A+ message the ##S sends A#+ and AN+ to the +S#.
++, establishes a session with the +S,.
$he +S, accesses the 6/7:% which is associated with the originating S), 'according the information
from the E$#(.
$he +S, establishes a 6+" session with the original S), by sending the ->9,M9EA6V message !ia the
##SNE$ protocol.
-n response the S), sends the ->9, requests that include a sequence of the language -6% "rompts -6%
collect digits% etc.
$he +S, instructs the ++, to play prompts and collect digits as appropriate.
Now a prompt is played to the subscriber% and when the ->9, 6+" session is no longer needed the S),
instructs the SS* to release the -" connection 'to the +:,s( by sending a 6isconnect*orward#onnection
message.
$he SS* then sends a release message to the ##S.
$he ##S responds back with 9)# '9elease #omplete(.
-N Elements:
T/#: $rilogue +anager
SLU: Signaling ;ate way ,nit
SLU: Ser!ice )ogic ,nit
SDP: Ser!ice 6ata "oint
CCS: #all #ontrol Ser!er
##U: +ultimedia ,nit
#SU: +essage Storage ,nit
9SBU: 8igh Speed /ackbone ,nit
LBA: )oad /alancing Assembly
CC@S: #ustomer #are .eb Ser!er
!*/U: -nteracti!e >oice 9esponse ,nit
SA@: Ser!ice Administrati!e .orkstation
CCC: #ustomer #are #lient
#AU: +aintenance Administration ,nit
/#U: 9emote +aintenance ,nit
$9+: $rilogue +anager
9@: 8" 6S20
,S:
B!P Billing inter.ace Package": *ormats and transfers #69s and +easurement files from the S), to the
$9+.
!AP T)e !ntegrated Alar' Package":
+onitors the system% 9ecei!es alarms from the other modules displays them on the $9+.
S+S traffic ;. for the #om!erse -S+S#.
S6": Ser!ice 6ata "oint
9@: 8" 6S30 or 6S3=
,S: $ru5G ,N-: >=.2/
Data(ase: oracle Jg
,racle -ersion: J.2.7.G.0 '8"(% 20.3.0.2.0 '-/+(
All subscriber data is stored on the S6" 6atabase using an 7racle database package.
"ro!ides high capacity storage
#an be setup to +aster<Sla!e #onfiguration
S;,: Signaling ;ateway ,nit
9@: ,", or 6"+
,S: )-N,: 3.G.3212=.E)smp based 7+N-
So.t%are:

-S1J35 IS-826

$he Signaling ;ateway ,nit 'S;,( is the component which controls all -N calls and talks to the S),. S;,
is connected to S$" on -S1J35 interface.
6istributes the $#A" and application portion of the SS7 message o!er -" network to the S),s.
S),: Ser!ice )ogic ,nit $he Ser!ice )ogic ,nit 'S),( is the component% which manages the calls and
directs them to the proper destination. S#" functionality is done by S),.
9@: 6"+
,S: ,N-: Score 7.2.2 based 7+N-
So.t%are: S)* 'Ser!ice )ogic *unction(% -"* '-ntelligent "eripheral *unction(% 7+N-
6$#A"
,N-:
7+N-
#omputing
En!ironment
#ommunication
"latform
Application
+S#
S;,
S),
$#A" 6$#A"
SS7
+S# S$" S;,
S$"
,6"<-"
SLF: "ro!ide the ser!ices such as >"N
!PF: "ro!ide the ser!ices such as /illing% Alarm +anagement
,#$!: "ro!ides an interface between ,N-: 7S -"* processes of the S),.
S), -nterfaces:

##S: #all #ontrol Ser!er $he #all #ontrol Ser!ice '##S( is the component% which handles all -S," calls
and talks to the S),.
9@: ,", or 6"+ '##S S)+(
,S: ,nix.are 7.2.2 based 7+N-
##L:
-S," -S,"
9esponsible for processing SS7 -S," messages
Associated only with ->9 sessions.
++,: +ultimedia ,nit
U$!Z
,#$!
!PF
SLF
SU
9oice
MSC : SSP
S;U
S;U
SS<
SU
Data (;P#S)
MSC : ;;S3
S;U
S;U
SS<
DTC)P
(&ro&rietar()
DTC)P
(&ro&rietar()
MSC CCS MMU
+SUP
CCS3,
T
SS< UDP:+P
+S# -)$ ##S
9@: )ike -nfinity 4.G
,S: 9+:
"lay Announcements
#ollect 6$+*
+S,: +essage Storage ,nit
9@: )ike -nfinity 4.G
,S: 9+:
-t pro!ides the Announcement Syntax and the multiple1language functions for the ->9,.
.hen an ++, recei!es a call% it establishes a session with either a mailbox 'for regular !oice mail
processing(% or with a 6/7:% which must ha!e a unique -6 number. $he 6/7: is connected by simply
specifying its number as the DmailboxE number for that call.
->9,: -nteracti!e >oice 9esponse ,nit
-nternal Architecture: 6->9,
++, +S, '->9,1$ < ->9,1#( play all announcements 'Access Numbers "re1call(
External Architecture: -"
Switch "lay pre call announcements
+:, used for -nfo 9echarge
)/A: )oad /alancing Assembly
9@: 9adware .S6 "97 Y
,S: 9adware
##.S: #ustomer #are .eb Ser!er
9@: 6"+
,S: .indows 3004
Arc)itecture:
8S/,: 8igh Speed /ackbone ,nit
9@: #aCun or Nortel
,S:
+A,: +aintenance Administration ,nit
9@: ,",
,S: .indows N$
Function:
9+,: 9emote +aintenance ,nit
9@: 6"+
,S: ,N-:
Function: "erform +aintenance Acti!ities like /ackup% 9estore% ,pload #onfiguration% 6ownload
#onfiguration
9$#;: 9eal $ime #harging ;ateway
"ay #hannel allows charging of prepaid subscribers for using Non1>oice ser!ices in real time.
-t pro!ides two modes of charging Z /asic +ode and +obility "lus +ode.
Ser!ice $ype #harging +ode
S+S +obility +ode
91.orld /asic +ode
91#onnect /asic +ode
,SA: -t defines a set standard for charging interface.
/TBS: 9esponsible to manage the charging and billing functions.
/TCAgent: An agent that lies in the pur!iew of client and that communicates with "ay #hannel.
/TC +rotocol: A proprietary protocol that is used between 9$# Agent and "ay #hannel for communication.
S,AP: -t is a :+) based protocol to let applications exchange information o!er 8$$"
Z#L: -t is a cross1platform% software and hardware independent tool for transmitting information.
,SA Parlay: "arlay<7SA assumes that applications will run on an application ser!er% and will connect to the
"arlay<7SA ;ateway o!er a $#"<-" network.
Network Architecture:
&re &aid
Server
$&
.et+or*
&a, C1annel
S0SC
RTC&:S0&&?
5S%:&arla,
R"Corld
RTC&:S0&&?
R"
Connect
R%D$US
$&
.et+or*
9##: 9world #ash #ard: 9world #ash card is a prepaid card targeted at the entire reliance prepaid
postpaid subscriber base with 9world enabled handsets.
9echarge Application:
9## Agent should send recharge request to the >+S application with user id% unique "-N number% Ser!ice
Name and the sequence number.
$he next step that application should take is to check the !alidity of the "-N.
After "-N !alidation all the !oucher details corresponding to that "-N number should be retrie!ed from the
>+S 6atabase.
After getting all !oucher information% 9echarge type ser!ice name the application should create an
interface with A+S.
9"# should be called with the user id to be recharged with all the !oucher information.
9echarge will happen now the account of that user id will be credited with the denomination of the
!oucher 9echarge.

You might also like