Thursday, November 24, 2011

SONET Frame (SPE) in STS1, and overheads

  1. SONET base rate/line rate (STS1/OC1) is 51.840 Mbps (9 * 90 * 8000 * 8)
    1. the frame is 9 rows * 90 Column (810 Byte)
    2. one frame is transmitted every 125*10^-6 seconds (125 mu second) so in each second 8000 frames are transmitted ( 1000000/125)
    3. 8 bits per byte
  2. the first 3 columns contain section overhead and line overhead
    1. first 3 rows of these 3 columns contain section overhead ( 3*3 Bytes)
    2. next 6 rows of theses 3 columns contain line overhead  (6*3 Bytes)
  3. The rest ( 9 rows * 87 columns) is called as Synchronous Payload Envelop (SPE), thus the capacity if SPE is
    1. 9 * 87 * 8000 * 8 i.e. 50.112 Mbps
  4. STS1 line rate of 51.840 Mbps can accommodate 28 DS1 (1.544 Mbps) and one DS3 (44.736 Mbps)
  5. three STS1 combine to form STM1 (51.840 * 3 = 155.52 Mbps)
  6. the higher level signals can be obtained by synchronous multiplexing of STS1/OC1 signal, so the Multiples are called of OC-N where N can be 1,3,12,48,192,768,3072. for example STS-48/OC-48 is 2488.320 Mbps (51.840 * 48)
  7. if the rate needed (like for ISDN) is higher than the STS1 rate, the STS1 are concatenate to form STSNc signal which will be multiplexed, switched and transported as a single entity, some similarities and difference in STS-3 and STS-3c frames are
    1. Both have the same rate of 155.520 Mbps
    2. transport overhead is same for both
    3. STS-3 has 3 separable payloads while STS-3c has a single payload, thus there is only one set of path overhead needed in case of STS-3c SPE
    4. STS-3 may drop/add part of the payload but STS-3c has to drop entire payload
  8. overhead of the DS1 (1.544 Mbps [24 DS0 ie 24 * 64Kbps]1.536 Mbps + overhead) ) signal hierarchy
    1. overhead for DS1 = (1.544 – 1.536)/1.544 * 100 = 0.52 %
  9. overhead for  DS2 (6.312 Mbps [96 DS0 ie  96 * 64Kbps] 6.144 Mbps + overhead )
    1. overhead for DS2 = (6.312 – 6.144)/6.312 * 100 = 2.7 %
  10. overhead for  DS4 (274.176 Mbps [4032 DS0 ie 4032 * 64Kbps] 258.048 Mbps + overhead )
    1. overhead for DS4 = (274.176 – 258.048)/274.176 * 100 =  5.8 %
  11. thus in case of the DS the framing overhead increases as the level/rate increases, and the framing overhead is non linear framing overhead ie the increase in the overhead is increase not by a standard rate
  12. SOH section overhead of SONET frame, is used for communication between adjacent network elements like regenerators, first three rows of transport overhead
    1. A1 and A2 framing bytes , indicate a beginning of a STS-1 frame, A1, A2 byte pattern is F6280X, when 4 consecutive error framing patterns have been received an OOF(out of frame) condition is declared, OOF is cleared when the 2 consecutive error free framing patterns have been received.   
    2. C1/J0/Z0 section trace(J0)/section growth(Z0)/STS-1 ID (C1), formerly defined as STS-1 ID, now redefined as either section trace byte in the first STS1 of STS-N, or as a section growth byte in the second through Nth STS-1S
    3. B1 section bit interleaved parity BIP-8 byte, even parity to check transmission error over a regenerator section, defined for only for STS-1 of a STS-N signal, B1 byte is calculated over all the bits of the previous STS-N frame after scrambling, then place it in the B1 byte of the STS-1 before scrambling, this B1 byte is compared with the B1 byte received from the first STS-1 of the next STS-N frame
    4. E1 section orderwire byte, for voice communication between regenerators, defined for first STS-1 of a STS-N frame
    5. F1 section user channel byte, passed from one STE to another and can be read/written at each STE in the line, defined for first STS-1 for a STS-N frame 
    6. D1 D2 D3 section DCC (data communication channel) bytes, 192 Kbps for OAM&P (operations administration maintenance and provisioning) between STE, only allocated for the first STS-1 of the STS-N frame
  13. LOH line overhead is for STS-N signals between multiplexers, last 6 rows of transport overhead
    1. H1 H2 STS payload pointer, used to indicate the offset in bytes between the pointer and the first byte of the STS-1 SPE, used in all STS-1 of each STS-N to align the STS-1 transport overhead in in the STS-N, and to perform frequency justification, in case of STS-Nc signals only first pointer byte contain the actual pointer to the SPE, subsequent bytes contain the concatenation indicator (10010011 11111111). also used to detect STS path alarm indication signals (AIS-P)
    2. H3 pointer action byte, in each of the STS-1 of the STS-N, for frequency justification,  the H3 byte is used to carry the extra SPE byte only in the event of negative pointer adjustment, other wise the pointer value is undefined
    3. B2 line bit interleaved parity code (BIP-8) byte, in all the STS-1 in the STS-N, for determining a transmission error over the line, even parity calculated over all the bits of the line overhead and STS-1 SPE of the previous STS-1 frame before scrambling. the value is placed in the B2 byte
    4. K1 K2 Automatic Protection Switching (APS channel) bytes, for protection signaling between LTE for bidirectional APS and for detecting line alarm indication signal (AIS-L) and remote defect indication (RDI) signals
      1. bits 1-4 of K1 has different request types (related to priority and type of switching [forced,manual])
      2. bits 5-8 of K1 indicate the number of channels requested
      3. bits 1-4 of K2 selects the channel number
      4. bit 5 of K2 indicates the architecture
      5. bit 6-8 of K2 indicates modes of operation
    5. D4 to D12 line Data communication channel (DCC) bytes, 576 Kbps message channel from a central location for OAM&P (alarms, maintenance, control, monitoring, administration, remote provisioning and communication) between two LTE. A protocol analyzer is required to access the Line DCC. defined only for first STS-1 of STS-N
    6. S1 synchronization status byte, in the first STS-1 of an STS-N, bits 5 to 8 are allocated to convey the synchronization status of the NE
    7. Z1 Growth, located only in the second through Nth STS-1s of an STS-N, and is allocated for future growth, an OC-1 or STS-1 electrical signal does not contain Z1 byte
    8. M0 STS-1 Remote Error Indication REI-L (formerly called as Line Far End Bit Error, FEBE), the M0 byte is only defined for STS-1 in an OC-1 or STS-1 signal, bits 5 to 8 are for REI-L, which conveys the error count detected by LTE (using B2 line BIP-8) back to its peer LTE
    9. M1 STS-N REI-L, The M1 byte is located in the third STS-1 in an STS-N (N >= 3)
    10. Z2 Growth byte, in the first and second STS-1s of an STS-3 and the first second and fourth through Nth STS-1s of an STS-N , these bytes are for future growth and OC1/STS1 doe not have Z2 
    11. E2 order-wire 64 Kbps voice channel, ignored by the STE like regenerators, used by PTE
  14. POH path overhead, added by PTE, as part of SPE until the payload is de-multiplexed at the terminating PTE. Is end to end, and added to DS1 signals when they are mapped into VT, and also for STS-1 payloads that travel end to end. in case of super rate services only one set of POH is contained in the first STS-1 of the STS-Nc
    1. J1 STS path trace byte, repeatedly transmit a 64bytes or 16Byte E.164 format string, used by receiving PTE to verify the continued connection to the intended transmitting terminal, payload independent function
    2. B3 STS path BIP-8 byte, even parity code for determining if a transmission error occurred over a path its value is calculated over all the bits of the previous SPE before scrambling and placed in the B3 byte of the current frame, payload independent function
    3. C2 path signal label byte, for indicating the content of the STS SPE, including the status of the mapped payloads, payload independent function, defined as
        Bits 1-4 Bits 5-8 Status
        0000 0000 Unequipped
        0000 0001 equipped
        0000 0010 VT structured STS-1 SPE (VT pointer changes to accommodate the asynchronous relationship between DS-1 signals and the VT super-frame) 
        0000 0011 Locked VT mode (tributary signal is fixed with respect to SPE)
        0000 0100 Asynchronous mapping for DS3 (44.736 Mbps)
        0001 0010 Asynchronous mapping for DS4NA (139.264 Mbps)
        0001 0011 Mapping for ATM
        0001 0100 Mapping for DQDB (distributed queue dual bus)
        0001 0101 Asynchronous mapping for FDDI
    4. G1 path status byte, for conveying back path terminating status and performance to an originating STS PTE, payload independent function. thus the duplex path in it entirely can be monitored from either end, or from any point along the path.
      1. bits 1 to 4 are for STS Path REI-P (formerly called as path FEBE [far end bit error]), bits 5,6, and 7 for STS Path RDI (remote defect indicator), bit 8 is undefined currently
        Bits 1- 4 STS Remote Error Indicator - Path  
        bits 5-7 STS Remote Defect Indicator - Path Trigger and Interpretation
        111 AIS-P ,LOP-P remote defect
        110 UNEQ–P, TIM-P remote connectivity defect
        101 AIS-P, LOP-P remote server defect
        100 AIS-P, LOP-P remote defect
        011 no defects no remote defect
        010 PLM-P, LCD-P remote payload defect
        001 no defects no remote defect
        000 no defects no remote defect
    5. F2 path user channel byte, for communication between PTE, eg in a DQDB F2 carry DQDB layer mgmt info, thus its a application specific function
    6. H4 Virtual Tributary (VT) multi-frame indicator, application specific function, generalized multi-frame indicator for payload containers, currently used for VT structure payload
    7. Z3 Z4 Z5 reserved for future functions   

SOH,LOH,POH

A1 framing A2 framing J0/Z0/C1 J1 STS path trace
B1 (BIP-8) E1 orderwire F1 user B3 (BIP-8)
D1 dcc D2 dcc D3 dcc C2 path signal label
H1 pointer H2 pointer H3 pointer action (-ve justification) G1
B2 (BIP-8) K1 APS K2 APS F2
D4 dcc D5 dcc D6 dcc H4
D7 dcc D8 dcc D9 dcc Z3
D10 dcc D11 dcc D12 dcc Z4
S1/Z1 (sync and growth) M0 or M1/Z2 (REI-L, growth) E2 orderwire Z5

 

Reference:

http://www.techfest.com/networking/wan/dks1/dks1.htm#A8

http://www.tek.com/Measurement/App_Notes/SONET/overheads.pdf

SONET layers

  1. photonic layer, dealing with transporting bits using optical OC-N signals on optical fiber, and conversion between STS-N (electrical) to OC-N (optical) signals and vice-versa, with decision to be made for
    1. pulse shape
    2. power level
    3. wavelength
  2. section layer, transport of STS-N frame across the physical medium, and decisions to be made for
    1. Framing into STS frame, 
    2. scrambling
    3. Error Monitoring
    4. Section Maintenance
    5. Orderwire (voice connection E1 byte in section overhead)
  3. Line layer, reliable transport of the path layer payload, and its overhead across the physical medium, adds/interprets line overhead for maintenance and protection switching, deals with
    1. synchronization for path layer
    2. Multiplexing for path layer
    3. error monitoring
    4. line maintenance
    5. protection switching
  4. Path Layer, transport of services between path terminating equipments, payload mapping to and from SONET frame, main functions include
    1. map the signals into a format required by line layer, for example and STS PTE can assemble 25 DS1(1.544 Mbps) signals adding path overhead and forming a STS-1 (51.840 Mbps) signal
    2. reads interprets and modifies path overhead for performance monitoring and Automatic Protection Switching

 

References

http://www.techfest.com/networking/wan/dks1/dks1.htm

http://www.cisco.com/en/US/tech/tk482/tk607/technologies_tech_note09186a0080094313.shtml

Friday, November 18, 2011

Process Control Block

  1. the process is defined and maintained by the operating System using its (process) process control block
  2. the process is scheduled by the OS
  3. the PCB is stored in the protected space of the kernel
  4. the PCB contains the following info about the process state
    1. process ID
    2. process priority
    3. parent process id (if any)
    4. child process id (if any)
    5. address to the next PCB which will next run
    6. allocated program memory address block both in physical and virtual memory for the code of the process itself 
    7. allocated process specific data address block
    8. allocated process heap (runtime) addresses
    9. allocated process specific stack address for the functions called during the running of the process
    10. allocated address of the CPU register (Program counter and Stack pointer)
    11. process state signal mask ( when 0 process inhibited from running, when 1 allowed to run)
    12. signals and messages dispatch table for IPC
    13. OS allocated resources ( file, device, device buffer, socket) descriptors
    14. security restrictions and permissions

References

Embedded Systems, architecture programming and design by Raj Kamal

Thursday, July 28, 2011

SONET Network Elements

  1. SONET protocol sits in the Physical Layer of TCP\IP, OSI model
  2. Hardware devices that implement the SONET Protocol are called as SONET NE’s
  3. for each SONET layer (path, line, section, and photonic) we have different network elements
  4. optical interface layer follow a hierarchy with Path layer on the top followed by line layer, section layer and photonic layer  
  5. the group of NE’s for each layer is commonly referred as PTE(path terminating equipment), LTE(line terminating equipment) and STE(section terminating equipment)
  6. each layer will add its own overhead bits to convey information (OH), called as POH, LOH, SOH
  7. Path layer deals with transport of service between between PTE NE, the main function is to map the signals form a format required by the line layer, and its function include reading, interpreting and modifying the POH for performance and APS (Automatic protection switching)
  8. Path Terminating Equipment
    1. Terminal Multiplexer (TM)
    2. aggregate DS1 (digital,PDH), DS3, E1s(Europe,digital,PDH), E3s, STS-Ns (Electrical,SONET), STM-Ns(SDH), into OC-N(Optical) Signals
      1. DS1, Digital Signal 1, 1.544 Mbps, called as T1 in USA, a PDH signal, contains 24 DS0(64Kbps)
      2. DS3, 44.736 Mbps, 672 DS0,
      3. E1, Digital Signal, in Europe, 2.048 Mbps, contains 32 DS0(64Kbps)
      4. STS1, Synchronous Transport Signal, Electrical Level equivalent to optical level OC1, 51.840 Mbps
      5. OC1, 51.840 Mbps with Payload 50.112 Mbps and Overhead of 1.728 Mbps
      6. STM1, Synchronous Transport Module, SDH equivalent of SONET STS3/OC3, 155.520 Mbps, 150.336 Mbps Payload, and 5.184 Mbps Overhead
    3. DS1 signals are mapped into VT1.5s (Virtual Tributaries), and DS3 (44.736) signals into STS1 (51.840) SPE (Synchronous Payload Envelop)
      1. VT1.5, Virtual Tributaries, 1.728 Mbps, called as VC11 (Virtual Container) in SDH
      2. SPE, Synchronous Payload Envelop of SONET
    4. EO (electrical to optical) and OE conversion takes place, during multiplexing and de-multiplexing respectively
    5. TM is an ADM operating in terminal mode
  9. Line Layer, deals with the transport of the path layer payload and it own LOH across the physical medium, main function is to provide synchronization and to perform multiplexing for the path layer, and protection switching, synchronization, line maintenance and error monitoring.
  10. Line Terminating Equipment
    1. Add Drop Multiplexer (ADM)
      1. combines (multiplex) several low bandwidth data streams and combine them into a single beam of light (optical signal)
      2. the add drop part is related to adding one or more lower bandwidth signals into an existing higher bandwidth data stream, and also extracting (dropping) low bandwidth and redirecting them
      3. a single stage Mux/Demux can multiplex various inputs into an OC-N, and then lower signals are added/dropped as required, thus providing interface between different network signals and SONET signals.
      4. SONET also enables dropping and duplicating of the signal, thus preserving the signal to be used by other nodes  (drop and continue), this drop and continue is used by , cable TV , and it also provides ring survivability, by duplicating the signal and passing it along a alternate route
    2. ROADM (Reconfigurable Optical Add Drop Multiplexer)
      1. Type of ADM with the options of remote reconfiguration of traffic, from a WDM (wavelength division multiplexing) system at the wavelength layer, achieved through Wavelength Selective Switching.
      2. the optical wavelengths added/dropped from a transport fiber need not be converted from Optical to Electrical to Optical (O-E-O)
      3. the bandwidth configuration can be done as and when required, without affecting the existing traffic, and allowing remote configuration
  11. Section Layer, deals with the transport of STS-N frame across physical medium, and functions are framing, scrambling, error monitoring and section maintenance
  12. Section Terminating Equipment
    1. this can be any two adjacent SONET network elements,
    2. Regenerator, or Repeater
      1. regenerate (amplify) attenuated signals
      2. needed because of the distance between multiplexers
      3. it clocks itself off the received signal, and replaces the SOH byte, LOH and POH are not changed

 

References

http://www.tek.com/Measurement/App_Notes/SONET/elements.pdf

http://www.techheap.com/communication/sonet/sonet_101.pdf

http://en.wikipedia.org/wiki/Reconfigurable_optical_add-drop_multiplexer

http://www.iphelp.ru/doc/3/Cisco.Press,.Optical.Network.Design.and.Implementation.(2004).DDU/1587051052/ch05lev1sec3.html#ch05fig04

http://www.techfest.com/networking/wan/dks1/dks1.htm

Tuesday, July 26, 2011

String reversal in C

  1: #include <stdio.h>
  2: #include <stdlib.h>
  3: 
  4: int mystrrev(char * str,int size);
  5: 
  6: int main()
  7: {
  8:  char name1[7]="Mithun";
  9:  char name2[6]="Mithu";
 10:  mystrrev(&name1,6);
 11:  mystrrev(&name2,5);
 12: 
 13:  printf("%s \n",name1);
 14:  printf("%s \n",name2);
 15: 
 16: }
 17: 
 18: int mystrrev(char * str,int size)
 19: {
 20:  int pivot = size/2;
 21:  char* s = str;
 22:  char* e = str+size-1;
 23:  printf("%d, %c \n", *s,*e);
 24: 
 25:  while(*str)
 26:  {
 27:   printf("%c , %d \n",*str,*str);
 28:   str++;
 29:  }
 30: 
 31:  while(pivot--)
 32:  {
 33:   *s = (*s)+(*e);
 34:   *e = (*s)-(*e);
 35:   *s = (*s)-(*e);
 36: 
 37:   s++;
 38:   e--;
 39:  }
 40: }
 

Wednesday, December 8, 2010

SIP SUBSCRIBE and NOTIFY Requests

SUBSCRIBE and NOTIFY (rfc 3265) 

  1. ability to receive asynchronous notification of events, on subscription
  2. general concept is that the entities in the network can SUBSCRIBE (which needs to be refreshed periodically) to resource or call state, and be notified when the state changes
  3. SUBSCRIBE requests create a dialog
  4. terms and definitions
    1. Event Package, set of state info to be reported by a notifier to a SUBSCRIBEr
    2. Event Template Package, special kind of event package which defines a set of event packages with a set od states which may be applied to all possible event packages
    3. Notification, act of sending a NOTIFY message to the SUBSCRIBER, informaing the state of resource
    4. Notifier, UA which generates the NOTIFY request, and typically accepts SUBSCRIBE request to create subscriptions
    5. State Agent, notifier which publishes the state on behalf of a resource, they may need to gather such info from multiple sources
    6. SUBSCRIBER, UA which receives a NOTIFY request, typically generate SUBSCRIBE request
    7. subscription is a set of application state associated with a dialog, containing a pointer to the associate dialog, the even package name, and an identifiction token
    8. Subscription Migration, act of moving a subscription from one notifier to another
  5. "Expires" Header
    1. SUBSCRIBE requests should contain an "Expires" header, indicating the duration of subscription 
    2. if no "Expires" header is present then the implied default defined in the even package is used
    3. 200 class response to a SUBSCRIBE request must contain an "Expires" header, the period can be shorter(but not longer) than specified in the request
    4. SUBSCRIBE with an "Expires" of 0 means
      1. the request is for unSUBSCRIBE from an event
      2. can also cause a fetch of state
      3. successful unsubscription will also trigger a final NOTIFY message

SIP Dialog

  1. peer to peer SIP relationship between two user agents
  2. facilitate sequencing messages between UA and proper routing of requests between them
  3. provides a context in which to interpret SIP messages
  4. dialogs can be created by
    1. INVITE method (rfc 3261)
    2. SUBSCRIBE and NOTIFY method (rfc 3265)
  5. a dialog is identified with a Dialog-ID
    1. the dialog-ID at each UA involved in the dialog is not the same, the local tag at one UA are identical to the remote tag at the peer UA
    2. dialog-ID is also associated with all the responses and with any request that contain a tag in To filed
    3. the rules for computing the dialog-ID of a message depends on whether SIP element is a UAS or UAC. 
    4. for a UAC the dialog-ID is composed of 
      1. call-ID
      2. remote tag (tag in the To field)
      3. local tag (tag in the From field), as this is added by the UAC on sending the request
    5. for a UAS the dialog-ID is composed of
      1. call-ID
      2. remote tag (tag in the From field)
      3. local tag (tag in the To field), added by UAS in the response