Skip to main content

S5/S8 Interface Documentation

GTP-C Communication with SGW-C

OmniPGW by Omnitouch Network Services


Overview

The S5/S8 interface connects OmniPGW to the SGW-C (Serving Gateway Control plane) using the GTP-C v2 (GPRS Tunnelling Protocol - Control plane) protocol. This interface handles session management signaling between the gateways.


Protocol Details

GTP-C Version 2

  • Protocol: GTP-C v2 (3GPP TS 29.274)
  • Transport: UDP
  • Port: 2123 (standard)
  • Interface Type: Control Plane

TEID (Tunnel Endpoint Identifier)

Each session has a unique TEID for routing messages:

  • Local TEID - Allocated by OmniPGW for incoming messages
  • Remote TEID - Allocated by SGW-C for outgoing messages
Message Flow:
SGW-C → OmniPGW: Destination TEID = OmniPGW's Local TEID
OmniPGW → SGW-C: Destination TEID = SGW-C's Remote TEID

Configuration

Basic Configuration

# config/runtime.exs
config :pgw_c,
s5s8: %{
# Local IPv4 address for S5/S8 interface
local_ipv4_address: "10.0.0.20",

# Optional: Local IPv6 address
local_ipv6_address: nil,

# Optional: Override default port
local_port: 2123,

# GTP-C request timeout in milliseconds (default: 500ms)
# Timeout per attempt when waiting for GTP-C responses (Create Bearer, Delete Bearer, etc.)
request_timeout_ms: 500,

# Number of retry attempts for GTP-C requests (default: 3)
# Total maximum wait time = request_timeout_ms * request_attempts
# Example: 500ms * 3 attempts = 1500ms (1.5 seconds) total
request_attempts: 3
}

Timeout Configuration

The S5/S8 interface uses configurable timeouts for GTP-C request/response transactions.

Parameters:

  • request_timeout_ms - Timeout in milliseconds per retry attempt (default: 500ms)
  • request_attempts - Number of retry attempts before giving up (default: 3)

Total Wait Time: request_timeout_ms × request_attempts

Default behavior: 500ms × 3 attempts = 1.5 seconds total maximum wait

Tuning Guidelines:

Network LatencyRecommended request_timeout_msTotal Wait Time
Low latency (<50ms)200-300ms600-900ms (3 attempts)
Normal (50-150ms)500ms (default)1.5s (3 attempts)
High latency (>150ms)1000-2000ms3-6s (3 attempts)
Unstable/satellite2000-3000ms6-9s (3 attempts)

Example - High Latency Network:

s5s8: %{
local_ipv4_address: "10.0.0.20",
request_timeout_ms: 1500, # 1.5 seconds per attempt
request_attempts: 3 # Total: 4.5 seconds max
}

When timeout occurs:

  • OmniPGW logs error: "Create Bearer Request timed out"
  • Returns error to PCRF (Diameter Result-Code: 5012 UNABLE_TO_COMPLY)
  • Bearer remains in early storage for cleanup via Charging-Rule-Remove

Network Requirements

Firewall Rules:

# Allow GTP-C from SGW-C network
iptables -A INPUT -p udp --dport 2123 -s <sgw_network>/24 -j ACCEPT

# Allow outbound GTP-C to SGW-C
iptables -A OUTPUT -p udp --dport 2123 -d <sgw_network>/24 -j ACCEPT

Routing:

# Ensure route to SGW-C network
ip route add <sgw_network>/24 via <gateway_ip> dev eth0

Message Types

The S5/S8 interface handles GTP-C signaling for PDN session management. For detailed session lifecycle and state management, see Session Management Guide.

Session Management

Create Session Request

Direction: SGW-C → OmniPGW

Purpose: Establish a new PDN connection

Key IEs (Information Elements):

IE NameTypeDescription
IMSIIdentityInternational Mobile Subscriber Identity
MSISDNIdentityMobile phone number
APNStringAccess Point Name (e.g., "internet")
RAT TypeEnumRadio Access Technology (EUTRAN)
Bearer ContextGroupedDefault bearer information
UE Time ZoneTimestampUE's timezone
ULIGroupedUser Location Information (TAI, ECGI)
Serving NetworkPLMNMCC/MNC of serving network

Example:

Create Session Request
├── IMSI: 310260123456789
├── MSISDN: 14155551234
├── APN: internet
├── RAT Type: EUTRAN (6)
├── Bearer Context
│ ├── EBI: 5
│ ├── Bearer QoS (QCI 9, ARP, bitrates)
│ └── S5/S8 F-TEID (SGW-U tunnel endpoint)
└── ULI
├── TAI: MCC 310, MNC 260, TAC 12345
└── ECGI: MCC 310, MNC 260, ECI 67890

Create Session Response

Direction: OmniPGW → SGW-C

Purpose: Acknowledge session creation

Key IEs:

IE NameTypeDescription
CauseResultSuccess or error code
Bearer ContextGroupedBearer information
PDN Address AllocationIPAllocated UE IP address (see UE IP Allocation)
APN RestrictionEnumAPN usage restrictions
PCOOptionsProtocol Configuration Options (see PCO Configuration)

Success Response:

Create Session Response
├── Cause: Request accepted (16)
├── PDN Address Allocation
│ └── IPv4: 100.64.1.42
├── Bearer Context
│ ├── EBI: 5
│ ├── Cause: Request accepted
│ └── S5/S8 F-TEID (PGW-U tunnel endpoint from PFCP)
├── APN Restriction: Public-1 (1)
└── PCO
├── DNS Server: 8.8.8.8
├── DNS Server: 8.8.4.4
└── Link MTU: 1400

Delete Session Request

Direction: SGW-C → OmniPGW

Purpose: Terminate PDN connection

Key IEs:

IE NameDescription
EBIEPS Bearer ID to delete
Linked EBIRelated bearer (optional)

Delete Session Response

Direction: OmniPGW → SGW-C

Purpose: Acknowledge session deletion

Key IEs:

IE NameDescription
CauseSuccess or error code

Bearer Management

Create Bearer Request

Direction: OmniPGW → SGW-C

Purpose: Create dedicated bearer (initiated by PCRF policy)

Triggered by:

  • PCRF sends new PCC rule requiring dedicated bearer
  • OmniPGW requests SGW-C to establish bearer

Delete Bearer Request

Direction: OmniPGW → SGW-C or SGW-C → OmniPGW

Purpose: Delete dedicated bearer

Scenarios:

  • PGW-initiated: PCRF policy change removes dedicated bearer
  • SGW-initiated: Radio resource release

Message Flows

Session Establishment

Session Termination


Cause Codes

Success

CodeNameDescription
16Request acceptedSuccessful operation

Errors (Permanent Failures)

CodeNameWhen Used
65User UnknownPCRF rejected (IMSI not found)
66No resources availableIP pool exhausted
93Service not supportedInvalid APN
94Semantic error in TFTInvalid traffic flow template

Errors (Transient Failures)

CodeNameWhen Used
72Remote peer not respondingPCRF/PGW-U timeout
73Collision with network initiated requestSimultaneous operations

Monitoring

S5/S8 Metrics

# Message counters
s5s8_inbound_messages_total{message_type="create_session_request"}
s5s8_inbound_messages_total{message_type="delete_session_request"}

# Error counters
s5s8_inbound_errors_total

# Message handling latency
s5s8_inbound_handling_duration_bucket

# Active TEIDs
teid_registry_count

Useful Queries

Session Creation Rate:

rate(s5s8_inbound_messages_total{message_type="create_session_request"}[5m])

Error Rate:

rate(s5s8_inbound_errors_total[5m])

Latency (p95):

histogram_quantile(0.95,
rate(s5s8_inbound_handling_duration_bucket{request_message_type="create_session_request"}[5m])
)

Troubleshooting

Issue: No Response from OmniPGW

Symptoms:

  • SGW-C sends Create Session Request
  • No response received
  • Timeout at SGW-C

Causes:

  1. Network connectivity issue
  2. OmniPGW not listening on configured IP
  3. Firewall blocking UDP 2123
  4. Wrong TEID in request

Debug:

# Check OmniPGW is listening
netstat -ulnp | grep 2123

# Check for incoming packets
tcpdump -i any -n port 2123

# Verify configuration
grep "local_ipv4_address" config/runtime.exs

# Check firewall
iptables -L -n | grep 2123

Issue: Session Creation Fails

Symptoms:

  • Create Session Response with error cause
  • Session not established

Common Causes:

Cause 65 (User Unknown):
→ PCRF rejected subscriber
→ Check IMSI in HSS/SPR

Cause 66 (No resources):
→ IP pool exhausted
→ Check: curl http://pgw:9090/metrics | grep address_registry_count
→ Expand IP pool

Cause 72 (Remote peer not responding):
→ PCRF timeout or PGW-U down
→ Check Gx connectivity
→ Check PFCP association

Issue: TEID Collision

Symptoms:

  • Message routed to wrong session
  • Unexpected behavior

Cause:

  • TEID reused before cleanup
  • Bug in TEID allocation

Resolution:

  • Ensure unique TEID allocation
  • Check TEID registry for leaks

Best Practices

Network Design

  1. Dedicated Network Interface

    • Use separate VLAN for S5/S8
    • Isolate from management traffic
  2. MTU Optimization

    • Ensure MTU supports GTP headers
    • Minimum MTU: 1500 bytes (1464 payload + 36 GTP)
  3. Redundancy

    • Multiple OmniPGW instances
    • DNS-based load balancing from SGW-C

Performance

  1. UDP Buffer Sizes

    • Increase socket buffers for high load
    • Typical: 4-8 MB per socket
  2. Connection Limits

    • Plan for expected session count
    • Monitor TEID registry count

Security

  1. IP Filtering

    • Only allow GTP-C from known SGW-C IPs
    • Use iptables or network ACLs
  2. Message Validation

    • OmniPGW validates all incoming messages
    • Rejects malformed GTP-C packets

Core Functions

Operations


Back to Operations Guide


OmniPGW S5/S8 Interface - by Omnitouch Network Services