Guest

Gateway Protocols

Understanding, Configuring and Troubleshooting Resource Allocation Indication

Cisco - Understanding, Configuring and Troubleshooting Resource Allocation Indication

Document ID: 14075

Updated: Feb 02, 2006

   Print

Introduction

This document briefly describes the need for Resource Allocation Monitor, how it works, how to configure it and troubleshoot it, and some Cisco IOS® defects (bugs) to watch for.

Prerequisites

Requirements

There are no specific requirements for this document.

Components Used

The information in this document is based on these software and hardware versions:

  • Cisco IOS Software Release 12.2(1)

  • Cisco AS5300, 3660, 2611, 3640

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.

Conventions

For more information on document conventions, refer to the Cisco Technical Tips Conventions.

RAI Concept

To allow gatekeepers to make intelligent call routing decisions, the gateway reports the status of its resource availability to its gatekeeper. Resources that are monitored are DS0 channels and DSP channels.

The gateway reports its resource status to the gatekeeper with the use of RAS Resource Availability Indication (RAI). When a monitored resource falls below a configurable threshold, the gateway sends an RAI to the gatekeeper that indicates that the gateway is almost out of resources. When the available resources then cross above another configurable threshold, the gateway sends an RAI that indicates that the resource depletion condition no longer exists.

This feature was included in Cisco IOS Software Release 12.0(5)T on the Cisco AS5300 gateway, and Cisco IOS Software Release 12.1(1)T for other gateways in H.323 version 2.

H.225 Definition of RAI

The RAI is a notification from a gateway to a gatekeeper of its current call capacity for each H-series protocol and data rate for that protocol. The gatekeeper responds with a Resource Availability Confirmation (RAC) upon receiving an RAI to acknowledge its reception.

The RAI message includes:

  • requestSeqNum

  • protocolIdentifier

  • nonStandardData

  • endpointIdentifier

  • protocols

  • almostOutOfResources (TRUE, FALSE)

  • tokens, cryptoTokens

  • integrityCheckValue

The RAC message includes:

  • requestSeqNum

  • protocolIdentifier

  • nonStandardData

  • tokens

  • cryptoTokens

  • integrityCheckValue

Note: This definition is from the H.225 protocol. In H.323 version 2 and H.323 version 3, RAI is used to report that the gateway has or does not have the resources to process the incoming VoIP calls. Call capacity comes in H.323 version 4.

How RAI Works on Cisco Gateway and Gatekeeper

  • Resource reporting thresholds are configured by using the resource threshold command under the gateway CLI. The upper and lower thresholds are separately configurable to prevent the gateway from operating sporadically due to the availability or lack of resources.

    resource threshold [all] [high percentage-value] [low percentage-value]

    The default for "high" and "low" values is 90.

    The Utilization is calculated as seen here:

    • Accessible channels = Inuse + Free

    • Utilization = Inuse / Accessible

    When you calculate utilization, take into account the accessible channels. The disabled channels are not counted. The command show call resource voice stat shows the number of "Addressable Channels". Addressable Channels are the channels that are associated with valid POTS dial-peers (for example, a POTS dial-peer that is shutdown is not considered valid). Addressable Channels do not necessarily equal Accessible Channels, since you can have disabled Addressable Channels (controller is down, or you busyout some of the DS0s as an example).

    For example, assume you have four T1s: two T1s for incoming calls, two for outgoing. You have busied out 46 timeslots of the outgoing timeslots and you have one call on one of the outgoing timeslots. You will have:

    • Total = 96

    • Addressable = 48

    • Disabled = 46

    • Inuse = 1

    • Free = 1

    The utilization = 1/(1+1)= 50 %. So if the configured high threshold is 90%, the Gateway still accepts calls.

    If you have "0" Inuse and "0" Free channels, then you immediately hit the high threshold. This is one way to stop sending calls to that gateway in case you need to maintain it. The two ways to do this are to busy out all timeslots in steps, or shut the POTS dial-peers. There is a risk when you use the POTS dial-peers method. At the time you shut the POTS dial-peer, the gatekeeper might have already routed some calls to the gateway. These calls are disconnected with "no circuit available" disconnect cause code. This happens because shutting the dial-peer affects all the channels configured under it. The best way is to busy out a certain number of timeslots until you hit the high threshold. Once you reach that point, be sure the gatekeeper is not sending any calls while you busy out the other timeslots.

  • The above calculations only took the DS0 resources into consideration. However, the DSP resources are monitored and calculated in the same way. Also, depending on which resource (DSP or DS0) reaches the low or high threshold first, the gateway sends the RAI messages.

  • No configuration is needed on the gatekeeper to activate the RAI.

  • An RAI message, like any other RAS message, is UDP. Once the gateway sends an RAI message to the gatekeeper, it starts a three second timer. If the timer expires before it receives the RAC, the gateway tries to send the RAI again nine more times. Then, it gives up until the resource availability status changes again.

  • RAI is useful if you want to give priority to a certain gateway. Also, once the threshold is reached, then you route the traffic to other gateways.

  • The gatekeeper selects the gateway based on priority and resource threshold. If all gateways have the same priority and resources, the gatekeeper does load balancing. Once a gateway is marked as "out of resources", the gatekeeper puts the gateway in the bottom of the priority list (it changes the gateway priority to "1"). If there is no other gateway with a higher priority or if all gateways in that zone have priority "1", then the gatekeeper still sends calls to the gateway that sent an RAI message declaring that it is almost out of resources.

  • With the command lrq reject-resource-low, the gatekeeper rejects the inter-zone call if all gateways in that zone are marked as almost-out-of-resources. This command is integrated in Cisco IOS Software Release 12.1(3a)XI6. If you do not use this command, the gatekeeper does not reject any calls from other zones when all gateways in that zone are marked as out of resources.

  • The default gateway priority is 5. And the default value can be changed using the command zone prefix <gatekeeper name> <E.164 prefix> gw-default-priority <priority 0-10> command. This command is also helpful in case you want to route the calls to certain gateways for that prefix. However, this is not the case for others. Also, you do not want to configure every other gateway with priority "0" using the command zone prefix <gatekeeper name> <E.164 prefix> gw-priority.

Case Study

ram.gif

The calls originate from PBX A on the T1s connected to 5300-4. The call matches a VoIP dial-peer with RAS session target. In the 2611-gatekeeper configuration, this call is handled by Zone B. The 2611-gatekeeper sends LRQ to the 3660-2 gatekeeper in Zone B and a RIP back to 5300-4.

The 3660-2 gatekeeper is configured to route that call with priority 10 to the 5300-3. The next priority is the 3640-3 (configured as priority 9). As long as 5300-3 has resources, all the calls are routed to it.

The 3660-2 gatekeeper sends LCF with 5300-3 as the destination gateway. When 5300-3 gets the setup message, it sends ARQ to its gatekeeper. After the ACF, it establishes the second leg, which is an FGB Telephony leg toward PBX B.

Once 5300-3 is marked as "out-of-resources", the 3660-2 gatekeeper in Zone B lowers the priority of 5300-3 to "1" and starts to route the traffic to the 3640-3 gateway since it has a higher priority of "9".

In this setup the 5300-3 has 48 addressable DS0 and is configured with a 70 percent high threshold value.

The first 34 calls from PBX A cause 34 DS0 to be used on 5300-3. The thirty-fifth call causes the 5300-3 to send a RAI message to the gatekeeper informing it that it becomes out-of-resources. The thirty-sixth call and what follows are routed to the 3640-3 as long as the 5300-3 is still "out-of-resources".

5300-3 Configuration

!
controller T1 0
 framing esf
 clock source line primary
 linecode b8zs
 ds0-group 1 timeslots 1-24 type e&m-fgb dtmf dnis
!
controller T1 2
 framing esf
 clock source line secondary 1
 linecode b8zs
 ds0-group 1 timeslots 1-24 type e&m-fgb dtmf dnis
!
interface Ethernet0
 ip address 172.16.13.45 255.255.255.224
 load-interval 30
 h323-gateway voip interface
 h323-gateway voip id cisco_2 ipaddr 172.16.13.42 1718
 h323-gateway voip h323-id 5300-3
 h323-gateway voip tech-prefix 2#
!
voice-port 0:1
!
voice-port 2:1
!
dial-peer voice 11 pots
 incoming called-number .
 destination-pattern 2#987654
 direct-inward-dial
 port 0:1
 prefix 987654
!
dial-peer voice 12 pots
 destination-pattern 2#987654
 port 2:1
 prefix 987654
!
gateway 
 resource threshold high 70 low 60

!--- The gateway is configured for a high resource threshold 
!--- of 70% and low resource threshold of 60%.

!

3640-3 Configuration

!
controller T1 2/0
 framing esf
 linecode b8zs
 ds0-group 0 timeslots 1-24 type e&m-wink-start
!
interface Ethernet0/0
 ip address 172.16.13.40 255.255.255.224
 half-duplex
 h323-gateway voip interface
 h323-gateway voip id cisco ipaddr 172.16.13.50 1718
 h323-gateway voip id cisco_2 ipaddr 172.16.13.42 1718
 h323-gateway voip h323-id 3640-3
 h323-gateway voip tech-prefix 2#
!
voice-port 2/0:0
! 
dial-peer voice 987654 pots
 destination-pattern 2#987654
 port 2/0:0
 prefix 987654
!
gateway 

!--- No resource monitor is configured on this gateway in this lab setup.

!

3660-2 Gatekeeper Configuration

!
interface FastEthernet0/0
 ip address 172.16.13.42 255.255.255.224
 duplex auto
 speed auto
!
gatekeeper
 zone local cisco_2 cisco.com 172.16.13.42
 zone remote cisco cisco.com 172.16.13.50 1719
 zone prefix cisco 1*
 zone prefix cisco_2 9* gw-priority 10 5300-3
 
!--- 5300-3 is configured for priority 10 for this prefix.

 zone prefix cisco_2 9* gw-priority 9 3640-3
 gw-type-prefix 2#* default-technology
 no shutdown
!

5300-4 Configuration

!
controller E1 0
 clock source line primary
 ds0-group 0 timeslots 1-15,17-31 type r2-digital r2-compelled 
 cas-custom 0
!
controller E1 1
 clock source line secondary 1
 ds0-group 1 timeslots 1-15,17-31 type r2-digital r2-compelled 
 cas-custom 1
!
controller E1 2
 clock source line secondary 2
 ds0-group 2 timeslots 1-15,17-31 type r2-digital r2-compelled 
!
controller E1 3
 clock source line secondary 3
 ds0-group 3 timeslots 1-15,17-31 type r2-digital r2-compelled 
!
interface Ethernet0
 ip address 172.16.13.46 255.255.255.224
 no ip mroute-cache
 load-interval 30
 h323-gateway voip interface
 h323-gateway voip id cisco ipaddr 172.16.13.50 1718
 h323-gateway voip h323-id 5300-4
 h323-gateway voip tech-prefix 1#
!
voice-port 0:0
 compand-type a-law
!
voice-port 1:1
 compand-type a-law
!
voice-port 2:2
 compand-type a-law
!
voice-port 3:3
 compand-type a-law
!
dial-peer voice 1234 voip
 incoming called-number .
 destination-pattern 987654
 session target ras
 tech-prefix 2#
!
dial-peer voice 9876 pots
 incoming called-number .
 direct-inward-dial
!
gateway 
!

2611-Gatekeeper Configuration

!
interface Ethernet0/0
 ip address 172.16.13.50 255.255.255.224
 half-duplex
!
!
gatekeeper
 zone local cisco cisco.com 172.16.13.50
 zone remote cisco_2 cisco.com 172.16.13.42 1719
 zone prefix cisco 1* gw-priority 10 5300-4
 zone prefix cisco_2 9*
 gw-type-prefix 1#* default-technology
 no shutdown
!

Status of 5300-3 when 34 Calls are Up Simultaneously

Use the command show pool from the "test dsprm" mode to show how many DSPs are in use.

dsprm 4> show pool
VFC-voice-pool      Total=120: free=86/86, in_use=34/34, pending=0/0, disabled=0/0

Use the command show call resource voice stat from the enable mode to show the statistics of all the resources (DSPs and DS0s).

In this output, the DSP utilization is 34/120= 28%, and the DS0 utilization is 34/48= 70%. The high threshold value configured on both cases (DSP and DS0 utitlization) is not exceeded.

5300-3#show call resource voice stat

Resource Monitor -  Dial-up Resource Statistics Information:

DSP Statistics:

Utilization: 0 percent
Total channels: 120
Inuse channels: 34   

!--- Number of DSP channels used.

Disabled channels: 0
Pending channels: 0
Free channels: 86

DS0 Statistics:

Utilization: 0 percent
Total channels: 96
Addressable channels: 48
Inuse channels: 34 

!--- Number of DS0 channels used.
    
Disabled channels: 24
Free channels: 14

Use the command show call resource voice threshold from enable mode to check the threshold state on the gateway as shown here.

5300-3#show call resource voice threshold

Resource Monitor -  Dial-up Resource Threshold Information:

DS0 Threshold:

Client Type: h323
High Water Mark: 70
Low Water Mark: 60
Threshold State: low_threshold_hit

!--- DS0 threshold is still below the low value.


DSP Threshold:

Client Type: h323
High Water Mark: 70
Low Water Mark: 60
Threshold State: low_threshold_hit

!--- DSP threshold is still below the low value.

Use the command show gateway to check the status of the H.323 resource threshold if it is enabled and active. It also gives you the configured low and high threshold values.

In this output you can see that resource threshold is enabled and active. "Enabled" means configured and "Active" means that the H.323 RAS processes in the IOS is registered with the Resource Monitor. As an example, if the gateway is not registered with the gatekeeper, the H.323 RAS process is not initialized and resource threshold is enabled, but not active. The output of the command is shown here.

5300-3#show gateway
 Gateway  5300-3  is registered to Gatekeeper cisco_2

Alias list (CLI configured) 
 H323-ID 5300-3
Alias list (last RCF) 
 H323-ID 5300-3

 H323 resource thresholding is Enabled and Active
 H323 resource threshold values:
  DSP: Low threshold 60, High threshold 70
  DS0: Low threshold 60, High threshold 70
5300-3#show gateway
 Gateway  5300-3  is not registered to any gatekeeper

Alias list (CLI configured) 
 H323-ID 5300-3
Alias list (last RCF) 
 H323-ID 5300-3

 H323 resource thresholding is Enabled but NOT Active
 H323 resource threshold values:
  DSP: Low threshold 60, High threshold 70
  DS0: Low threshold 60, High threshold 70

Status of 3660-2 Gatekeeper when 34 Calls are Up Simultaneously

Use the command show gatekeeper gw-type-prefix to check the priority of the gateways registered with the gatekeeper. See if any are marked as "out-of-resources."

In this output, all the gateways have resources and there is no "(out-of-resources)" displayed, which means the 5300-3 still has resources.

3660-2#show gatekeeper gw-type-prefix 
GATEWAY TYPE PREFIX TABLE
=========================
Prefix: 2#*    (Default gateway-technology)
  Zone cisco_2 master gateway list:
    172.16.13.40:1720 6789 
    172.16.13.45:1720 5300-3
  Zone cisco_2 prefix 9* priority gateway list(s):
   Priority 10:
    172.16.13.45:1720 5300-3
   Priority 9:
    172.16.13.40:1720 6789 

Also, you can use the command show gatekeeper endpoint to see if any of the gateways are flagged as out of resources. If the field "F" has the letter "O" under it for a gateway, then that gatekeeper received an "out-of-resource" RAI from that gateway.

3660-2#show gatekeeper endpoint
                    GATEKEEPER ENDPOINT REGISTRATION
                    ================================
CallSignalAddr       Port    RASSignalAddr    Port  Zone Name   Type  F 
-------------------- -----  ----------------  ------ ---------- -------    --
172.16.13.40         1720    172.16.13.40     52975   cisco_2   VOIP-GW  
    E164-ID: 6789
    E164-ID: 11
    E164-ID: 336699
    H323-ID: 3640-3
172.16.13.45         1720   172.16.13.45    58131   cisco_2     VOIP-GW  
    H323-ID: 5300-3
Total number of active registrations = 2

Status of 5300-3 when 35 Calls are Up Simultaneously

In this output, the DSP utilization is 35/120= 29%, and the DS0 utilization is 35/48= 73%. The value of the high threshold configured for the DS0 channels is exceeded. Also, an RAI message with the "out-of-resource" field "TRUE" is sent to the gatekeeper. This indicates that the gateway cannot accept any more calls.

dsprm 4>show pool
VFC-voice-pool      Total=120: free=85/85, in_use=35/35, pending=0/0, disabled=0/0

5300-3#show call resource voice stat

Resource Monitor -  Dial-up Resource Statistics Information:

DSP Statistics:

Utilization: 0 percent
Total channels: 120
Inuse channels: 35
Disabled channels: 0
Pending channels: 0
Free channels: 85

!--- Number of used DSPs is 35.


DS0 Statistics:

Utilization: 0 percent
Total channels: 96
Addressable channels: 48
Inuse channels: 35
Disabled channels: 24
Free channels: 13

!--- Number of used DS0s is 35.

As you can see here, the gateway hit the high threshold value for the DS0 channels.

In this output the letter "O" under the "F" field indicates that the gateway 5300-3 is out-of-resources.

5300-3#show call resource voice threshold

Resource Monitor -  Dial-up Resource Threshold Information:

DS0 Threshold:

Client Type: h323
High Water Mark: 70
Low Water Mark: 60
Threshold State: high_threshold_hit

!--- The DS0 resources reached the high threshold value.


DSP Threshold:

Client Type: h323
High Water Mark: 70
Low Water Mark: 60
Threshold State: low_threshold_hit

And on the gatekeeper, you see that the gateway 5300-3 is marked as "out-of-resources".

3660-2#show gatekeeper gw-type-prefix 
GATEWAY TYPE PREFIX TABLE
=========================
Prefix: 2#*    (Default gateway-technology)
  Zone cisco_2 master gateway list:
    172.16.13.40:1720 6789 
    172.16.13.45:1720 5300-3 (out-of-resources)
  Zone cisco_2 prefix 9* priority gateway list(s):
   Priority 10:
    172.16.13.45:1720 5300-3 (out-of-resources)
   Priority 9:
    172.16.13.40:1720 6789

!--- 5300-3 is out-of-resources.

3660-2#show gatekeeper endpoint
                    GATEKEEPER ENDPOINT REGISTRATION
                    ================================
CallSignalAddr     Port  RASSignalAddr  Port   Zone Name  Type    F 
-----------------  ----- -------------- ------ ---------- ------- --
172.16.13.40       1720  172.16.13.40   52975   cisco_2   VOIP-GW  
  E164-ID: 6789
  E164-ID: 11
  E164-ID: 336699
  H323-ID: 3640-3
172.16.13.45       1720  172.16.13.45   58131  cisco_2   VOIP-GW O
  H323-ID: 5300-3
Total number of active registrations = 2

Debugs

Turn on debug ras and debug h225 asn1 if you think that the gateway is not sending the proper RAI message or the gatekeeper is not sending the RAC message.

Note:  debug h225 asn1 is verbose. You therefore have to be careful when you turn it on, especially when the gatekeeper or the gateway is in production and they are handling many calls. The debug h225 asn1 shows all the H.225 messages (not only RAS). This is the output of these debugs on the 3660-2 gatekeeper after thirty-five calls are up:

In this output the "almostOutOfResources" field is "TRUE". This means the gateway reports to the gatekeeper it is out of resources. When the gateway hits the low threshold value, it sends another RAI message. However, with this field "FALSE", it tells the gatekeeper to start to send calls again. All RAS messages as a sequence number and any response to these messages carries the same sequence number.

RAW_BUFFER::=
81 340000A1 06000891 
*Mar  5 11:26:02.961: PDU DATA = 60E28808

value RasMessage ::= resourcesAvailableIndicate : 
                     
!--- RAI message.

    {
      requestSeqNum 162
      
!--- Sequence number of the H.225 message.

      protocolIdentifier { 0 0 8 2250 0 2 }
      endpointIdentifier {"6165B9D400000006"}
      protocols 
      {
        voice : 
        {
          supportedPrefixes 
          {

            {
              prefix e164 : "2#"
            }
          }
        }
      }
      almostOutOfResources TRUE
      
!--The value of  almostOutOfResources.

    }
*Mar  5 11:26:02.965: RAI (seq# 162) rcvd

This is the RAC message sent from the gatekeeper to the gateway acknowledging its reception of the RAI message.

PDU DATA = 60E28808

value RasMessage ::= resourcesAvailableConfirm : 
                     
!--- RAC message.

    {
      requestSeqNum 162
      
!--- Sequence number of the H.225 message.

      protocolIdentifier { 0 0 8 2250 0 2 }
    }


RAW_BUFFER::=
82 0A0000A1 06000891 4A0002
*Mar  5 11:26:02.965: 
*Mar  5 11:26:02.965:       RASLib::RASSendRAC: RAC (seq# 162) sent to 172.16.13.45

Some Bugs to Watch For

These are some of the Cisco bug IDs that have been on different platforms. Almost all of them are resolved, but it would help you in case you get an issue with RAI to see if you are running into any of these.

Note: You can access these Cisco bug IDs through the Bug Toolkit (registered customers only) .

  • CSCds41207

  • CSCds79319

  • CSCds90317

  • CSCdt00087

  • CSCdt68781

  • CSCdt77870

  • CSCdt93779

  • CSCdu55874

  • CSCdu76312

  • CSCdu79860

Related Information

Updated: Feb 02, 2006
Document ID: 14075