SlideShare a Scribd company logo
1 of 3
Download to read offline
Understanding SIP ALGs - Technical Documentation - Support - Juniper Networks                                                                                       Seite 1 von 3




    Understanding SIP ALGs
    Session Initiation Protocol (SIP) is an Internet Engineering Task Force (IETF)-standard protocol for initiating, modifying, and terminating multimedia sessions over the
    Internet. Such sessions might include conferencing, telephony, or multimedia, with features such as instant messaging and application-level mobility in network
    environments.

    Junos OS supports SIP as a service, allowing and denying it based on a policy that you configure. SIP is a predefined service in Junos OS and uses port 5060 as the
    destination port.

    One of SIP's functions is to distribute session-description information and, during the session, to negotiate and modify the parameters of the session. SIP is also used
    to terminate a multimedia session, signal a call establishment, provide failure indication, and provide methods for endpoint to register.

    Session-description information is included in INVITE and ACK messages and indicates the multimedia type of the session; for example, whether it is voice or video.
    Although SIP can use different description protocols to describe the session, the Juniper Networks SIP Application Layer Gateway (ALG) supports only the Session
    Description Protocol (SDP).

    SDP provides information that a system can use to join a multimedia session. SDP might include information such as IP addresses, port numbers, times, and dates.
    Note that the IP address and port number in the SDP header (the c= and m= fields, respectively) are the address and port where the client wants to receive the media
    streams and not the IP address and port number from which the SIP request originates (although they can be the same).

    SIP messages consist of requests from a client to a server and responses to the requests from a server to a client with the purpose of establishing a session (or a
    call). A User Agent (UA) is an application that runs at the endpoints of the call and consists of two parts:

   ■ User Agent Client (UAC), which sends SIP requests on behalf of the user
   ■ User Agent Server (UAS), which listens to the responses and notifies the user when they arrive

    UAC and UAS are defined in relation to the role a particular agent is playing in a negotiation.

    Examples of UAs are SIP proxy servers and phones.

    This topic contains the following sections:

     SIP ALG Operation
     SDP Session Descriptions
     Pinhole Creation


    SIP ALG Operation
    There are two types of SIP traffic, the signaling and the media stream. SIP signaling traffic consists of request and response messages between client and server and
    uses transport protocols such as UDP or TCP. The media stream carries the data (audio data, for example) using transport protocols.

    By default, Junos OS supports SIP signaling messages on port 5060. You can configure the port. You can simply create a policy that permits SIP service, and the
    software filters SIP signaling traffic like any other type of traffic, permitting or denying it. The media stream, however, uses dynamically assigned port numbers that can
    change several times during the course of a call. Without fixed ports, it is insecure to create a static policy to control media traffic. In this case, the device invokes the
    SIP ALG. The device transport ports used for the media sessions are not known in advance, however, the ports used for the SIP negotiation are well-known (or
    predefined). The ALG registers interest in packets from the control session which can be easily be distinguished from the other packets and inspects the negotiation
    looking for the transport information used for the media session (both IP addresses and ports).


           Note: Pinholes are created when a matching port, transport address, and protocol is determined (whatever information is known at the time the
           pinhole is opened).


    The SIP ALG monitors SIP transactions and dynamically creates and manages pinholes based on the information it extracts from these transactions. The Juniper
    Networks SIP ALG supports all SIP methods and responses. You can allow SIP transactions to traverse the Juniper Networks firewall by creating a static policy that
    permits SIP service. If the policy is configured to inspect SIP traffic (or, more appropriately, if the policy sends some traffic to the SIP ALG for inspection) the allowed
    actions are to permit the traffic (in which case the appropriate pinholes are opened) or to deny the traffic.

    The SIP ALG intercepts SIP messages that contain SDP and, using a parser, extracts the information it requires to create pinholes. The SIP ALG examines the SDP
    portion of the packet, and a parser extracts information such as IP addresses and port numbers, which the SIP ALG records in a pinhole table. The SIP ALG uses the
    IP addresses and port numbers recorded in the pinhole table to open pinholes and allow media streams to traverse the device.


           Note: When the device is performing NAT, the transport addresses that the user agents employ are incorrect. ALG modifies the transport addresses
           based on the translated ports and addresses allocated by the NAT-ing device. When SDP is encrypted, the device cannot either extract nor modify the
           contents of the message and therefore cannot correct the transport addresses. To provide a workaround, the STUN protocol has been deployed
           (which requires NAT devices to do some form of cone-NAT) which allows the clients to determine the translated addresses and use those newly
           discovered addresses in the SDP messages.


    NEC SIP products are conditionally supported.


    SDP Session Descriptions
    An SDP session description is a well defined format for conveying sufficient information to discover and participate in a multimedia session. A session is described by
    a series of attribute/value pairs, one per line. The attribute names are single characters, followed by '=', and a value. Optional values are specified with '=*'. Values are
    either an ASCII string, or a sequence of specific types separated by spaces. Attribute names are only unique within the associated syntactic construct, such as within
    the session, time, or media only.


               Note: In the SDP session description, the media-level information begins with the m= field.


    Of the many fields in the SDP description, two are particularly useful to the SIP ALG because they contain Transport Layer information.

   ■ c= for connection information
     This field can appear at the session or media level. It displays in this format:

     c=<network-type><address-type><connection-address>

     Currently, Junos OS supports only “ IN” (for Internet) as the network type, “ IP4” as the address type, and a unicast IP address or domain name as the destination
     (connection) IP address.




http://www.juniperfedgov.com/techpubs/en_US/junos/topics/concept/alg-security-sip-... 16.11.2011
Understanding SIP ALGs - Technical Documentation - Support - Juniper Networks                                                                                       Seite 2 von 3



      If the destination IP address is a unicast IP address, the SIP ALG creates pinholes using the IP address and port numbers specified in the media description field
      m=.

   ■ m= for media announcement
      This field appears at the media level and contains the description of the media. It displays in this format:

      m=<media><port><transport><fmt list>

      Currently, the Junos OS supports only “audio” as the media and “RTP” as the Application Layer transport protocol. The port number indicates the destination port
      of the media stream (the origin is allocated by the remote user agent). The format list (fmt list) provides information on the Application Layer protocol that the media
      uses.

      The software opens ports only for RTP and Real-Time Control Protocol (RTCP). Every RTP session has a corresponding RTCP session. Therefore, whenever a
      media stream uses RTP, the SIP ALG must reserve ports (create pinholes) for both RTP and RTCP traffic. By default, the port number for RTCP is one higher than
      the RTP port number.


    Pinhole Creation
    Both pinholes for the RTP and RTCP traffic share the same destination IP address. The IP address comes from the c= field in the SDP session description. Because
    the c= field can appear in either the session-level or media-level portion of the SDP session description, the parser determines the IP address based on the following
    rules (in accordance with SDP conventions):

   ■ First, the SIP ALG parser verifies if there is a c= field containing an IP address in the media level. If there is one, the parser extracts that IP address, and the SIP
     ALG uses it to create a pinhole for the media.
   ■ If there is no c= field in the media level, the SIP ALG parser extracts the IP address from the c= field in the session level, and the SIP ALG uses it to create a
     pinhole for the media. If the session description does not contain a c= field in either level, this indicates an error in the protocol stack, and the device drops the
     packet and logs the event.

    The SIP ALG needs the following information to create a pinhole. This information comes from the SDP session description and parameters on the device:

   ■ Protocol—UDP.
   ■ Source IP—Unknown.
   ■ Source port—Unknown.
   ■ Destination IP—The parser extracts the destination IP address from the c= field in the media or session level.
   ■ Destination port—The parser extracts the destination port number for RTP from the m= field in the media level and calculates the destination port number for
     RTCP using the following formula:
      RTP port number + one

   ■ Lifetime—This value indicates the length of time (in seconds) during which a pinhole is open to allow a packet through. A packet must go through the pinhole
     before the lifetime expires. When the lifetime expires, the SIP ALG removes the pinhole.
      When a packet goes through the pinhole within the lifetime period, immediately afterwards the SIP ALG removes the pinhole for the direction from which the
      packet came.

      Figure 1 describes a call setup between two SIP clients and how the SIP ALG creates pinholes to allow RTP and RTCP traffic. The illustration assumes that the
      device has a policy that permits SIP, thus opening port 5060 for SIP signaling messages.

      Figure 1: SIP ALG Call Setup




           Note: The SIP ALG does not create pinholes for RTP and RTCP traffic when the destination IP address is 0.0.0.0, which indicates that the session is
           on hold. To put a session on hold during a telephone communication, for example, user A sends user B a SIP message in which the destination IP
           address is 0.0.0.0. Doing so indicates to user B that it should not send any media until further notice. If user B sends media anyway, the device drops
           the packets.



    Related Documentation

   ■ Junos OS Feature Support Reference for SRX Series and J Series Devices


   ■ ALG Overview

   ■ Understanding SIP ALG Request Methods




http://www.juniperfedgov.com/techpubs/en_US/junos/topics/concept/alg-security-sip-... 16.11.2011
Understanding SIP ALGs - Technical Documentation - Support - Juniper Networks                                                             Seite 3 von 3



   ■ Understanding SIP ALGs and NAT

   ■ SIP ALG Configuration Overview




    Published: 2011-05-13


    Site Map / RSS Feeds / Careers / Accessibility / Feedback / Privacy & Policy / Legal Notices   Copyright© 1999-2011 Juniper Networks, Inc. All rights reserved.




http://www.juniperfedgov.com/techpubs/en_US/junos/topics/concept/alg-security-sip-... 16.11.2011

More Related Content

What's hot

Tlc 004 - take a sip of sip
Tlc 004 - take a sip of sipTlc 004 - take a sip of sip
Tlc 004 - take a sip of sipAnna Volynkina
 
Session Initiation Protocol
Session Initiation ProtocolSession Initiation Protocol
Session Initiation ProtocolMatt Bynum
 
Cisco Understanding H.323 Gatekeepers
Cisco Understanding H.323 GatekeepersCisco Understanding H.323 Gatekeepers
Cisco Understanding H.323 GatekeepersLong Nguyen
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction setStefan Oprea
 
Videoconference
VideoconferenceVideoconference
Videoconferenceeonx_32
 
H.323 Network Components include H.323 Terminals, Gatekeepers ...
H.323 Network Components include H.323 Terminals, Gatekeepers ...H.323 Network Components include H.323 Terminals, Gatekeepers ...
H.323 Network Components include H.323 Terminals, Gatekeepers ...Videoguy
 
Computer archi&mp
Computer archi&mpComputer archi&mp
Computer archi&mpMSc CST
 
Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...
Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...
Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...ALTANAI BISHT
 
Unit 5 assembly language programming
Unit 5   assembly language programmingUnit 5   assembly language programming
Unit 5 assembly language programmingKartik Sharma
 
Subroutine in 8051 microcontroller
Subroutine in 8051 microcontrollerSubroutine in 8051 microcontroller
Subroutine in 8051 microcontrollerbhadresh savani
 
SIP (Session Initiation Protocol) - Study Notes
SIP (Session Initiation Protocol) - Study NotesSIP (Session Initiation Protocol) - Study Notes
SIP (Session Initiation Protocol) - Study NotesOxfordCambridge
 
B.sc cs-ii-u-3.1-basic computer programming and micro programmed control
B.sc cs-ii-u-3.1-basic computer programming and micro programmed controlB.sc cs-ii-u-3.1-basic computer programming and micro programmed control
B.sc cs-ii-u-3.1-basic computer programming and micro programmed controlRai University
 
Transporting voice by using IP
Transporting voice by using IPTransporting voice by using IP
Transporting voice by using IPMuhammad Jahangir
 
SIP (Session Initiation Protocol)
SIP (Session Initiation Protocol)SIP (Session Initiation Protocol)
SIP (Session Initiation Protocol)KHNOG
 
Introduction to pic
Introduction to picIntroduction to pic
Introduction to picPRADEEP
 
Frafos ABC SBC - Secure peering
Frafos ABC SBC - Secure peeringFrafos ABC SBC - Secure peering
Frafos ABC SBC - Secure peeringstefansayer
 
Current trends and innovations in voice over IP
Current trends and innovations in voice over IPCurrent trends and innovations in voice over IP
Current trends and innovations in voice over IPALTANAI BISHT
 

What's hot (20)

Tlc 004 - take a sip of sip
Tlc 004 - take a sip of sipTlc 004 - take a sip of sip
Tlc 004 - take a sip of sip
 
Session Initiation Protocol
Session Initiation ProtocolSession Initiation Protocol
Session Initiation Protocol
 
Skype
SkypeSkype
Skype
 
Cisco Understanding H.323 Gatekeepers
Cisco Understanding H.323 GatekeepersCisco Understanding H.323 Gatekeepers
Cisco Understanding H.323 Gatekeepers
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction set
 
Videoconference
VideoconferenceVideoconference
Videoconference
 
H.323 Network Components include H.323 Terminals, Gatekeepers ...
H.323 Network Components include H.323 Terminals, Gatekeepers ...H.323 Network Components include H.323 Terminals, Gatekeepers ...
H.323 Network Components include H.323 Terminals, Gatekeepers ...
 
Computer archi&mp
Computer archi&mpComputer archi&mp
Computer archi&mp
 
Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...
Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...
Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...
 
Unit 5 assembly language programming
Unit 5   assembly language programmingUnit 5   assembly language programming
Unit 5 assembly language programming
 
Subroutine in 8051 microcontroller
Subroutine in 8051 microcontrollerSubroutine in 8051 microcontroller
Subroutine in 8051 microcontroller
 
SIP (Session Initiation Protocol) - Study Notes
SIP (Session Initiation Protocol) - Study NotesSIP (Session Initiation Protocol) - Study Notes
SIP (Session Initiation Protocol) - Study Notes
 
B.sc cs-ii-u-3.1-basic computer programming and micro programmed control
B.sc cs-ii-u-3.1-basic computer programming and micro programmed controlB.sc cs-ii-u-3.1-basic computer programming and micro programmed control
B.sc cs-ii-u-3.1-basic computer programming and micro programmed control
 
Transporting voice by using IP
Transporting voice by using IPTransporting voice by using IP
Transporting voice by using IP
 
Sip crash course
Sip crash courseSip crash course
Sip crash course
 
SIP (Session Initiation Protocol)
SIP (Session Initiation Protocol)SIP (Session Initiation Protocol)
SIP (Session Initiation Protocol)
 
Introduction to pic
Introduction to picIntroduction to pic
Introduction to pic
 
SIP for geeks
SIP for geeksSIP for geeks
SIP for geeks
 
Frafos ABC SBC - Secure peering
Frafos ABC SBC - Secure peeringFrafos ABC SBC - Secure peering
Frafos ABC SBC - Secure peering
 
Current trends and innovations in voice over IP
Current trends and innovations in voice over IPCurrent trends and innovations in voice over IP
Current trends and innovations in voice over IP
 

Similar to Understanding sip al gs

1 VoIP Overview[1]
1 VoIP Overview[1]1 VoIP Overview[1]
1 VoIP Overview[1]William Giba
 
Docfoc.com ngn - signaling &amp;amp; protocol analysis
Docfoc.com ngn - signaling &amp;amp; protocol analysisDocfoc.com ngn - signaling &amp;amp; protocol analysis
Docfoc.com ngn - signaling &amp;amp; protocol analysisRashid Khan
 
1 Vo Ip Overview
1 Vo Ip Overview1 Vo Ip Overview
1 Vo Ip OverviewMayank Vora
 
1 Vo I P Overview
1  Vo I P  Overview1  Vo I P  Overview
1 Vo I P OverviewMayank Vora
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocolIshtdeep Hora
 
Gce sip-components-configuration
Gce sip-components-configurationGce sip-components-configuration
Gce sip-components-configurationTelcon Bilişim
 
Protocol For Streaming Media
Protocol For Streaming MediaProtocol For Streaming Media
Protocol For Streaming MediaKaniska Mandal
 
Review of SIP based DoS attacks
Review of SIP based DoS attacksReview of SIP based DoS attacks
Review of SIP based DoS attacksEditor IJCATR
 
Voice over IP, Data Communication & Networking
Voice over IP, Data Communication & NetworkingVoice over IP, Data Communication & Networking
Voice over IP, Data Communication & NetworkingShivangiSingh241
 
Final networks lab manual
Final networks lab manualFinal networks lab manual
Final networks lab manualJaya Prasanna
 
CCNA v6.0 ITN - Chapter 09
CCNA v6.0 ITN - Chapter 09CCNA v6.0 ITN - Chapter 09
CCNA v6.0 ITN - Chapter 09Irsandi Hasan
 
Sinnreich Henry Johnston Alan Pt 2
Sinnreich Henry Johnston Alan   Pt 2Sinnreich Henry Johnston Alan   Pt 2
Sinnreich Henry Johnston Alan Pt 2Carl Ford
 

Similar to Understanding sip al gs (20)

1 VoIP Overview[1]
1 VoIP Overview[1]1 VoIP Overview[1]
1 VoIP Overview[1]
 
1 Vo Ip Overview
1 Vo Ip Overview1 Vo Ip Overview
1 Vo Ip Overview
 
Docfoc.com ngn - signaling &amp;amp; protocol analysis
Docfoc.com ngn - signaling &amp;amp; protocol analysisDocfoc.com ngn - signaling &amp;amp; protocol analysis
Docfoc.com ngn - signaling &amp;amp; protocol analysis
 
lect21-Layer5.ppt
lect21-Layer5.pptlect21-Layer5.ppt
lect21-Layer5.ppt
 
1 Vo Ip Overview
1 Vo Ip Overview1 Vo Ip Overview
1 Vo Ip Overview
 
1 Vo I P Overview
1  Vo I P  Overview1  Vo I P  Overview
1 Vo I P Overview
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocol
 
Sip summary
Sip summarySip summary
Sip summary
 
Gce sip-components-configuration
Gce sip-components-configurationGce sip-components-configuration
Gce sip-components-configuration
 
Protocol For Streaming Media
Protocol For Streaming MediaProtocol For Streaming Media
Protocol For Streaming Media
 
Review of SIP based DoS attacks
Review of SIP based DoS attacksReview of SIP based DoS attacks
Review of SIP based DoS attacks
 
Voice over IP, Data Communication & Networking
Voice over IP, Data Communication & NetworkingVoice over IP, Data Communication & Networking
Voice over IP, Data Communication & Networking
 
Socket Programming w/ C# - IK
Socket Programming w/ C# - IKSocket Programming w/ C# - IK
Socket Programming w/ C# - IK
 
Lecture 04
Lecture 04Lecture 04
Lecture 04
 
R43019698
R43019698R43019698
R43019698
 
Introduction To SIP
Introduction  To  SIPIntroduction  To  SIP
Introduction To SIP
 
Tcp Udp Notes
Tcp Udp NotesTcp Udp Notes
Tcp Udp Notes
 
Final networks lab manual
Final networks lab manualFinal networks lab manual
Final networks lab manual
 
CCNA v6.0 ITN - Chapter 09
CCNA v6.0 ITN - Chapter 09CCNA v6.0 ITN - Chapter 09
CCNA v6.0 ITN - Chapter 09
 
Sinnreich Henry Johnston Alan Pt 2
Sinnreich Henry Johnston Alan   Pt 2Sinnreich Henry Johnston Alan   Pt 2
Sinnreich Henry Johnston Alan Pt 2
 

Recently uploaded

KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 

Recently uploaded (20)

KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 

Understanding sip al gs

  • 1. Understanding SIP ALGs - Technical Documentation - Support - Juniper Networks Seite 1 von 3 Understanding SIP ALGs Session Initiation Protocol (SIP) is an Internet Engineering Task Force (IETF)-standard protocol for initiating, modifying, and terminating multimedia sessions over the Internet. Such sessions might include conferencing, telephony, or multimedia, with features such as instant messaging and application-level mobility in network environments. Junos OS supports SIP as a service, allowing and denying it based on a policy that you configure. SIP is a predefined service in Junos OS and uses port 5060 as the destination port. One of SIP's functions is to distribute session-description information and, during the session, to negotiate and modify the parameters of the session. SIP is also used to terminate a multimedia session, signal a call establishment, provide failure indication, and provide methods for endpoint to register. Session-description information is included in INVITE and ACK messages and indicates the multimedia type of the session; for example, whether it is voice or video. Although SIP can use different description protocols to describe the session, the Juniper Networks SIP Application Layer Gateway (ALG) supports only the Session Description Protocol (SDP). SDP provides information that a system can use to join a multimedia session. SDP might include information such as IP addresses, port numbers, times, and dates. Note that the IP address and port number in the SDP header (the c= and m= fields, respectively) are the address and port where the client wants to receive the media streams and not the IP address and port number from which the SIP request originates (although they can be the same). SIP messages consist of requests from a client to a server and responses to the requests from a server to a client with the purpose of establishing a session (or a call). A User Agent (UA) is an application that runs at the endpoints of the call and consists of two parts: ■ User Agent Client (UAC), which sends SIP requests on behalf of the user ■ User Agent Server (UAS), which listens to the responses and notifies the user when they arrive UAC and UAS are defined in relation to the role a particular agent is playing in a negotiation. Examples of UAs are SIP proxy servers and phones. This topic contains the following sections: SIP ALG Operation SDP Session Descriptions Pinhole Creation SIP ALG Operation There are two types of SIP traffic, the signaling and the media stream. SIP signaling traffic consists of request and response messages between client and server and uses transport protocols such as UDP or TCP. The media stream carries the data (audio data, for example) using transport protocols. By default, Junos OS supports SIP signaling messages on port 5060. You can configure the port. You can simply create a policy that permits SIP service, and the software filters SIP signaling traffic like any other type of traffic, permitting or denying it. The media stream, however, uses dynamically assigned port numbers that can change several times during the course of a call. Without fixed ports, it is insecure to create a static policy to control media traffic. In this case, the device invokes the SIP ALG. The device transport ports used for the media sessions are not known in advance, however, the ports used for the SIP negotiation are well-known (or predefined). The ALG registers interest in packets from the control session which can be easily be distinguished from the other packets and inspects the negotiation looking for the transport information used for the media session (both IP addresses and ports). Note: Pinholes are created when a matching port, transport address, and protocol is determined (whatever information is known at the time the pinhole is opened). The SIP ALG monitors SIP transactions and dynamically creates and manages pinholes based on the information it extracts from these transactions. The Juniper Networks SIP ALG supports all SIP methods and responses. You can allow SIP transactions to traverse the Juniper Networks firewall by creating a static policy that permits SIP service. If the policy is configured to inspect SIP traffic (or, more appropriately, if the policy sends some traffic to the SIP ALG for inspection) the allowed actions are to permit the traffic (in which case the appropriate pinholes are opened) or to deny the traffic. The SIP ALG intercepts SIP messages that contain SDP and, using a parser, extracts the information it requires to create pinholes. The SIP ALG examines the SDP portion of the packet, and a parser extracts information such as IP addresses and port numbers, which the SIP ALG records in a pinhole table. The SIP ALG uses the IP addresses and port numbers recorded in the pinhole table to open pinholes and allow media streams to traverse the device. Note: When the device is performing NAT, the transport addresses that the user agents employ are incorrect. ALG modifies the transport addresses based on the translated ports and addresses allocated by the NAT-ing device. When SDP is encrypted, the device cannot either extract nor modify the contents of the message and therefore cannot correct the transport addresses. To provide a workaround, the STUN protocol has been deployed (which requires NAT devices to do some form of cone-NAT) which allows the clients to determine the translated addresses and use those newly discovered addresses in the SDP messages. NEC SIP products are conditionally supported. SDP Session Descriptions An SDP session description is a well defined format for conveying sufficient information to discover and participate in a multimedia session. A session is described by a series of attribute/value pairs, one per line. The attribute names are single characters, followed by '=', and a value. Optional values are specified with '=*'. Values are either an ASCII string, or a sequence of specific types separated by spaces. Attribute names are only unique within the associated syntactic construct, such as within the session, time, or media only. Note: In the SDP session description, the media-level information begins with the m= field. Of the many fields in the SDP description, two are particularly useful to the SIP ALG because they contain Transport Layer information. ■ c= for connection information This field can appear at the session or media level. It displays in this format: c=<network-type><address-type><connection-address> Currently, Junos OS supports only “ IN” (for Internet) as the network type, “ IP4” as the address type, and a unicast IP address or domain name as the destination (connection) IP address. http://www.juniperfedgov.com/techpubs/en_US/junos/topics/concept/alg-security-sip-... 16.11.2011
  • 2. Understanding SIP ALGs - Technical Documentation - Support - Juniper Networks Seite 2 von 3 If the destination IP address is a unicast IP address, the SIP ALG creates pinholes using the IP address and port numbers specified in the media description field m=. ■ m= for media announcement This field appears at the media level and contains the description of the media. It displays in this format: m=<media><port><transport><fmt list> Currently, the Junos OS supports only “audio” as the media and “RTP” as the Application Layer transport protocol. The port number indicates the destination port of the media stream (the origin is allocated by the remote user agent). The format list (fmt list) provides information on the Application Layer protocol that the media uses. The software opens ports only for RTP and Real-Time Control Protocol (RTCP). Every RTP session has a corresponding RTCP session. Therefore, whenever a media stream uses RTP, the SIP ALG must reserve ports (create pinholes) for both RTP and RTCP traffic. By default, the port number for RTCP is one higher than the RTP port number. Pinhole Creation Both pinholes for the RTP and RTCP traffic share the same destination IP address. The IP address comes from the c= field in the SDP session description. Because the c= field can appear in either the session-level or media-level portion of the SDP session description, the parser determines the IP address based on the following rules (in accordance with SDP conventions): ■ First, the SIP ALG parser verifies if there is a c= field containing an IP address in the media level. If there is one, the parser extracts that IP address, and the SIP ALG uses it to create a pinhole for the media. ■ If there is no c= field in the media level, the SIP ALG parser extracts the IP address from the c= field in the session level, and the SIP ALG uses it to create a pinhole for the media. If the session description does not contain a c= field in either level, this indicates an error in the protocol stack, and the device drops the packet and logs the event. The SIP ALG needs the following information to create a pinhole. This information comes from the SDP session description and parameters on the device: ■ Protocol—UDP. ■ Source IP—Unknown. ■ Source port—Unknown. ■ Destination IP—The parser extracts the destination IP address from the c= field in the media or session level. ■ Destination port—The parser extracts the destination port number for RTP from the m= field in the media level and calculates the destination port number for RTCP using the following formula: RTP port number + one ■ Lifetime—This value indicates the length of time (in seconds) during which a pinhole is open to allow a packet through. A packet must go through the pinhole before the lifetime expires. When the lifetime expires, the SIP ALG removes the pinhole. When a packet goes through the pinhole within the lifetime period, immediately afterwards the SIP ALG removes the pinhole for the direction from which the packet came. Figure 1 describes a call setup between two SIP clients and how the SIP ALG creates pinholes to allow RTP and RTCP traffic. The illustration assumes that the device has a policy that permits SIP, thus opening port 5060 for SIP signaling messages. Figure 1: SIP ALG Call Setup Note: The SIP ALG does not create pinholes for RTP and RTCP traffic when the destination IP address is 0.0.0.0, which indicates that the session is on hold. To put a session on hold during a telephone communication, for example, user A sends user B a SIP message in which the destination IP address is 0.0.0.0. Doing so indicates to user B that it should not send any media until further notice. If user B sends media anyway, the device drops the packets. Related Documentation ■ Junos OS Feature Support Reference for SRX Series and J Series Devices ■ ALG Overview ■ Understanding SIP ALG Request Methods http://www.juniperfedgov.com/techpubs/en_US/junos/topics/concept/alg-security-sip-... 16.11.2011
  • 3. Understanding SIP ALGs - Technical Documentation - Support - Juniper Networks Seite 3 von 3 ■ Understanding SIP ALGs and NAT ■ SIP ALG Configuration Overview Published: 2011-05-13 Site Map / RSS Feeds / Careers / Accessibility / Feedback / Privacy & Policy / Legal Notices Copyright© 1999-2011 Juniper Networks, Inc. All rights reserved. http://www.juniperfedgov.com/techpubs/en_US/junos/topics/concept/alg-security-sip-... 16.11.2011