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 Latency | Recommended request_timeout_ms | Total Wait Time |
|---|---|---|
| Low latency (<50ms) | 200-300ms | 600-900ms (3 attempts) |
| Normal (50-150ms) | 500ms (default) | 1.5s (3 attempts) |
| High latency (>150ms) | 1000-2000ms | 3-6s (3 attempts) |
| Unstable/satellite | 2000-3000ms | 6-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 Name | Type | Description |
|---|---|---|
| IMSI | Identity | International Mobile Subscriber Identity |
| MSISDN | Identity | Mobile phone number |
| APN | String | Access Point Name (e.g., "internet") |
| RAT Type | Enum | Radio Access Technology (EUTRAN) |
| Bearer Context | Grouped | Default bearer information |
| UE Time Zone | Timestamp | UE's timezone |
| ULI | Grouped | User Location Information (TAI, ECGI) |
| Serving Network | PLMN | MCC/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 Name | Type | Description |
|---|---|---|
| Cause | Result | Success or error code |
| Bearer Context | Grouped | Bearer information |
| PDN Address Allocation | IP | Allocated UE IP address (see UE IP Allocation) |
| APN Restriction | Enum | APN usage restrictions |
| PCO | Options | Protocol 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 Name | Description |
|---|---|
| EBI | EPS Bearer ID to delete |
| Linked EBI | Related bearer (optional) |
Delete Session Response
Direction: OmniPGW → SGW-C
Purpose: Acknowledge session deletion
Key IEs:
| IE Name | Description |
|---|---|
| Cause | Success 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
| Code | Name | Description |
|---|---|---|
| 16 | Request accepted | Successful operation |
Errors (Permanent Failures)
| Code | Name | When Used |
|---|---|---|
| 65 | User Unknown | PCRF rejected (IMSI not found) |
| 66 | No resources available | IP pool exhausted |
| 93 | Service not supported | Invalid APN |
| 94 | Semantic error in TFT | Invalid traffic flow template |
Errors (Transient Failures)
| Code | Name | When Used |
|---|---|---|
| 72 | Remote peer not responding | PCRF/PGW-U timeout |
| 73 | Collision with network initiated request | Simultaneous 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:
- Network connectivity issue
- OmniPGW not listening on configured IP
- Firewall blocking UDP 2123
- 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
-
Dedicated Network Interface
- Use separate VLAN for S5/S8
- Isolate from management traffic
-
MTU Optimization
- Ensure MTU supports GTP headers
- Minimum MTU: 1500 bytes (1464 payload + 36 GTP)
-
Redundancy
- Multiple OmniPGW instances
- DNS-based load balancing from SGW-C
Performance
-
UDP Buffer Sizes
- Increase socket buffers for high load
- Typical: 4-8 MB per socket
-
Connection Limits
- Plan for expected session count
- Monitor TEID registry count
Security
-
IP Filtering
- Only allow GTP-C from known SGW-C IPs
- Use iptables or network ACLs
-
Message Validation
- OmniPGW validates all incoming messages
- Rejects malformed GTP-C packets
Related Documentation
Core Functions
- Configuration Guide - S5/S8 interface configuration, local IP setup
- Session Management - PDN session lifecycle, bearer establishment
- UE IP Allocation - IP address delivery via Create Session Response
- PCO Configuration - PCO parameters in GTP-C messages
Related Interfaces
- Gn/Gp Interface - GTP-C v1 for 2G/3G GGSN functionality
- PFCP Interface - User plane coordination with S5/S8 control plane
- Diameter Gx Interface - Policy integration with bearer setup
- Diameter Gy Interface - Charging integration with bearer management
Operations
- Monitoring Guide - S5/S8 GTP-C metrics, message tracking
- Data CDR Format - CDR generation from GTP-C sessions
OmniPGW S5/S8 Interface - by Omnitouch Network Services