Protocol 87 of 81Layer 7FrameAssembly v3.3.0
Raw .mdllms-full.txt
s1ap4G LTE S1 Application Protocol (S1-MME eNB <-> MME over SCTP)

s1ap — 3GPP 4G S1-MME eNodeB-to-MME ASN.1 APER over SCTP 36412

Default Port / Protocol
SCTP 36412 (PPID 18)
Host Endpoint Rule
Dual-Stack IPv4/IPv6
Wireshark Display Filter
s1ap
Standards & Specs
3GPP TS 36.413, 3GPP TS 24.301, RFC 9260
Wire Stack:Ethernet II[802.1Q / QinQ / MPLS]IPv4 / IPv6SCTP 36412 (PPID 18)4G S1AP (3GPP TS 36.413)
L2 Tagging: vlan · qinq · repeatable mpls · fcsHost Family: Dual-Stack IPv4/IPv6L3 QoS & TTL: ttl · dscp · ecnL4 State: SCTP

What It Does on the Wire

Test 4G LTE S1-MME security gateways and telecom NDR probes offline: s1ap emits 3GPP TS 36.413 ASN.1 APER frames straight inside SCTP 36412 (PPID 18) with Castagnoli CRC-32c.

S1 Application Protocol (s1ap, 3GPP TS 36.413) is the 4G LTE S1-MME control-plane protocol linking eNodeB (eNB) radio base stations to the Mobility Management Entity (MME) exclusively over SCTP port 36412 (PPID = 18). Like 5G NGAP, S1AP uses ASN.1 Aligned PER (APER) encoding to carry cell-level setup (S1SetupRequest/Response with Global-ENB-ID, SupportedTAs 16-bit TAC, and eNBname) and UE-associated signaling (InitialUEMessage, DownlinkNASTransport, UplinkNASTransport, UEContextRelease with MME-UE-S1AP-ID, eNB-UE-S1AP-ID, and embedded EPS-NAS 3GPP TS 24.301 PDUs).

FrameAssembly packs compliant APER S1AP containers inside CRC-32c SCTP DATA chunks (PPID 18) over IPv4 or IPv6 backhaul hosts.

01. Application

LTE Small-Cell / Private CBRS eNodeB <-> MME S1 Setup Testing

Generate s1setuprequest (enbid, plmn, 16-bit tac, enbname) and s1setupresponse captures to validate Magma, Open5GS, srsRAN, and Citizen Broadband Radio Service (315010) EPC cores.

02. Application

4G Attach & EPS-NAS (nas-eps) Dissector Regression Suites

Carry binary 3GPP TS 24.301 Attach Request and Authentication vectors inside naspdu across initialuemessage and downlinknastransport / uplinknastransport.

03. Application

4G/5G NSA Dual-Connectivity Backhaul Firewall Verification

Test IPsec backhaul concentrators and telco firewalls carrying side-by-side 4G s1ap (SCTP 36412, PPID 18), 5G ngap (SCTP 38412, PPID 60), and gtpu (UDP 2152).

Fig. 1 · RFC Octet & Bit Schematic

RFC Wire Header Layout (s1ap)

Select any 32-bit wire word or field slice below to inspect which .frasm modifiers control those octets and what defaults the compiler writes.

0 ··············· 15 · 16 ··············· 31 bit
Selected Wire Segment
4G S1AP (3GPP TS 36.413) Wire PDU & Payload (Variable)
Controlling .frasm Modifiers
s1ap s1setuprequest · msgtype · mmeueid · plmn · enbid · payload · hexpayload
Compiler Default Behavior
RFC-compliant 4G S1AP (3GPP TS 36.413) defaults (3GPP TS 36.413)
Wireshark Dissection Note · Dissecting 4G LTE S1AP ASN.1 APER Inside SCTP 36412 (PPID 18)

Filter with s1ap in Wireshark to inspect SCTP DATA (PPID 18) -> S1AP-PDU IEs including MME-UE-S1AP-ID, eNB-UE-S1AP-ID, Global-ENB-ID, TAI, and embedded EPS NAS-PDU.

Minimal Quickstart (s1ap_quickstart.frasm)

Select Preview Packets to compile in-browser and inspect timestamps + wire byte lengths, or open directly in the Playground.

s1ap_quickstart.frasm7 lines
Open in Playground
host enb_01 { ip 10.44.1.11 }
host mme_epc { ip 10.44.1.100 }
compile {
enb_01 -> mme_epc s1ap s1setuprequest enbid 0x001a2 plmn "00101" tac 10 enbname "enb-macro-01" wait 4ms
enb_01 <- mme_epc s1ap s1setupresponse plmn "00101" enbname "mme-epc-01"
}

Handled Automatically on the Wire

  • Wraps every S1AP message inside IP Protocol 132 SCTP (dstport 36412, DATA chunk PPID = 18) with valid Castagnoli CRC-32c.
  • Encodes ASN.1 APER S1AP-PDU Procedure Codes (17 S1Setup, 12 InitialUEMessage, 11 DownlinkNASTransport, 13 UplinkNASTransport, 23 UEContextRelease, 15 ErrorIndication) and sorted ProtocolIE fields.
  • Formats 3-byte BCD PLMNidentity, 20-bit Macro eNB-ID, and 16-bit LTE TAC (0..65535) automatically.
Multi-Frame Example

4G LTE S1-MME Attach Signaling: S1Setup, InitialUEMessage, EPS-NAS Auth & Release

Simulates a CBRS private-LTE eNodeB onboarding onto an MME over SCTP 36412, forwarding an EPS Attach Request (naspdu "0741..."), completing mutual authentication, and releasing the S1 UE context.

s1ap_lte_attach_flow.frasm16 lines
Open in Playground
host cbrs_enb { ip 172.24.36.12 }
host epc_mme { ip 172.24.36.100 }
compile {
// 1. S1Setup Request & Response (Procedure Code 17, SCTP 36412 PPID 18)
cbrs_enb -> epc_mme s1ap s1setuprequest enbid 0x01020 plmn "315010" tac 401 enbname "cbrs-warehouse-enb1" wait 3ms
cbrs_enb <- epc_mme s1ap s1setupresponse plmn "315010" enbname "magma-mme-01" wait 6ms
// 2. UE Attach: InitialUEMessage (Procedure Code 12) carrying EPS Attach Request (0x07 0x41)
cbrs_enb -> epc_mme s1ap initialuemessage enbueid 101 plmn "315010" tac 401 naspdu "074171080910101234567890" wait 4ms
// 3. Downlink & Uplink NAS Transport (Authentication Request 0x07 0x52 / Response 0x07 0x53)
cbrs_enb <- epc_mme s1ap downlinknastransport mmeueid 9001 enbueid 101 naspdu "075200100102030405060708090a0b0c0d0e0f10" wait 4ms
cbrs_enb -> epc_mme s1ap uplinknastransport mmeueid 9001 enbueid 101 naspdu "075308aabbccddeeff0011" wait 20ms
// 4. Inactivity S1 UE Context Release (Procedure Code 23)
cbrs_enb <- epc_mme s1ap uecontextreleasecommand mmeueid 9001 enbueid 101 wait 2ms
cbrs_enb -> epc_mme s1ap uecontextreleasecomplete mmeueid 9001 enbueid 101
}
Terminal Commands (FrameAssembly CLI v3.3.0)
# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show s1ap_lte_attach_flow.frasm

# 2. Compile .frasm -> classic .pcap, nanosecond .pcapng, or pipe via '-'
frameassembly s1ap_lte_attach_flow.frasm s1ap_lte_attach_flow.pcap
frameassembly s1ap_lte_attach_flow.frasm s1ap_lte_attach_flow.pcapng

# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse s1ap_lte_attach_flow.pcap s1ap_lte_attach_flow_edited.frasm

# 4. Verify dissected protocol fields in tshark
tshark -r s1ap_lte_attach_flow.pcap -Y "s1ap"

All s1ap Keywords & Header Options

Every sub-keyword and header option is lowercase [a-z0-9]+ with zero underscores — mix and match them in any order after s1ap:

src_host -> dst_host s1ap [s1setuprequest | s1setupresponse | s1setupfailure | initialuemessage | downlinknastransport | uplinknastransport | uecontextreleasecommand | uecontextreleasecomplete | errorindication] [msgtype "<text>"] [proccode <0..255>] [criticality "<text>"] [mmeueid <number>] [enbueid <0..16777215>] [plmn "<text>"] [enbid <number>] [tac <0..65535>] [enbname "<text>"] [naspdu "<hex>"]
Keyword / OptionAccepted ValueDefaultEffect on Packet
s1setuprequest | s1setupresponse | s1setupfailure | initialuemessage | downlinknastransport | uplinknastransport | uecontextreleasecommand | uecontextreleasecomplete | errorindication3GPP TS 36.413 S1AP Elementary Procedures1setuprequestSelects the ASN.1 APER PDU Choice and TS 36.413 Procedure Code + mandatory ProtocolIE sequence.
msgtype "<text>" | proccode <0..255> | criticality "<text>"Explicit APER PDU Choice, ProcedureCode, and CriticalityDerived from procedure keywordOverrides the outer S1AP procedureCode and criticality ("reject", "ignore", "notify").
mmeueid <number> | enbueid <0..16777215>32-bit MME-UE-S1AP-ID (IE 0) & 24-bit eNB-UE-S1AP-ID (IE 8)mmeueid 1, enbueid 1 on UE messagesWrites the APER integer UE context identifiers pairing eNB and MME state machines.
plmn "<text>"5- or 6-digit MCC+MNC string (e.g. "00101", "315010")"00101"Encodes the 3-octet TBCD PLMNidentity in Global-ENB-ID, SupportedTAs, TAI, and EUTRAN-CGI.
enbid <number> | tac <0..65535> | enbname "<text>"20-bit Macro eNB-ID, 16-bit LTE TAC (0..65535), and PrintableString eNBnameenbid 1, tac 1, enbname "eNB-01"Populates IE 59 (Global-ENB-ID), IE 64 (SupportedTAs), IE 67 (TAI), and IE 60 (eNBname).
naspdu "<hex>"Even-length hex byte string (IE 26 NAS-PDU)"0741" (EPS Attach stub)Embeds binary 3GPP TS 24.301 EPS-NAS octets inside IE 26 for Wireshark nas-eps dissection.

Cross-Layer Wrappers Valid with s1ap

802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol

13 options
OptionRange / FormatDefaultEffect on Packet
wait <number><ns|us|ms|s|m>Time gap (ns, us, ms, s, m)10msAdvances the packet timestamp clock after sending this packet and before the next packet (wait 0ns sends back-to-back).
comment "<text>"Quoted UTF-8 annotationOmittedAttaches an Enhanced Packet Block opt_comment annotation when compiling to .pcapng (Wireshark pkt_comment filter).
payload "<text>" | hexpayload "<hex>"Quoted text or hex bytes (choose one)OmittedAppends or overrides raw payload bytes ("deadbeef", "de:ad:be:ef", or "\x01\x02") and updates packet lengths and checksums.
srcmac <mac> | dstmac <mac> | ethertype <0..65535>Colon/hyphen/Cisco MAC · EtherType 0..65535 (e.g. 0x0800)Host MAC / RFC multicast MAC / auto EtherTypeOverrides the 14-byte Ethernet II source MAC, destination MAC, or standalone Layer 2 16-bit EtherType.
fcs | badfcsEthernet CRC-32 trailer flags (choose one)Omittedfcs appends a valid IEEE 802.3 4-byte CRC-32 Frame Check Sequence trailer; badfcs XOR-corrupts the CRC-32 for NIC/tap negative tests.
vlan <0..4095> [pcp <0..7>] [dei <0|1>]VLAN ID 0..4095, PCP 0..7, DEI 0..1UntaggedWraps the packet in an IEEE 802.1Q VLAN tag (0x8100) with optional 802.1p QoS priority.
qinq <0..4095> [innervlan <0..4095>]Outer S-VLAN 0..4095, Inner C-VLAN 0..4095Untagged (innervlan 1 when qinq is set)Double-tags the packet with outer IEEE 802.1ad S-Tag (0x88a8) plus inner IEEE 802.1Q C-Tag (0x8100).
mpls <0..1048575> [label <0..1048575>] [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>]Repeatable label stack (0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255)Unlabeled (auto bos=0 on outer labels, bos=1 on bottom)Prepends one or more 32-bit MPLS label shims (0x8847, e.g. mpls 16000 mpls 24010) ahead of Layer 2 EoMPLS or Layer 3 payloads.
ttl <0..255> [dscp <0..63>] [ecn <0..3>]TTL/Hop Limit 0..255, DSCP 0..63, ECN 0..3ttl 64, dscp 0, ecn 0Sets IPv4 TTL or IPv6 Hop Limit plus DiffServ (DSCP) and ECN QoS markings.
ipid <0..65535> [df] [mf] [fragoffset <0..8191>] [routeralert] [badipchecksum]IPv4 ID, DF/MF flags, offset 0..8191, Router Alert & checksum faultipid 1, flags 0, fragoffset 0, valid RFC 1071 checksumSets IPv4 Identification/fragmentation, injects RFC 2113 Router Alert (20 04 00 00), or corrupts the 16-bit IPv4 header checksum (badipchecksum).
flowlabel <0..1048575>20-bit IPv6 Flow Label (0..1048575)0Sets the 20-bit IPv6 Flow Label for ECMP routing tests (valid on IPv6 endpoint pairs only).
srcport <0..65535> | dstport <0..65535>Port number 0..65535srcport 49152 (remembered), SCTP 36412 (PPID 18)Overrides source or destination port and remembers the port pair automatically on <- replies.
badchecksumL4/ICMP/SCTP checksum fault injection flagValid RFC checksum / CRC-32cDeliberately corrupts the TCP, SCTP CRC-32c, ICMP, or ICMPv6 checksum for negative IDS/firewall testing.

Gotchas & Quick Fixes

4G S1AP TAC Is 16-Bit (0..65535), Unlike 5G NGAP 24-Bit TAC

Rejected
enb -> mme s1ap s1setuprequest tac 100000
Valid v3.3.0 Syntax
enb -> mme s1ap s1setuprequest tac 401

In 4G LTE (3GPP TS 36.413), TAC is a 2-octet OCTET STRING (SIZE(2)) (0..=65535), whereas 5G NR (ngap) widened TAC to 3 octets (0..=16777215).

s1ap Is Strictly SCTP-Only (SCTP 36412, PPID 18)

Rejected
enb -> mme s1ap initialuemessage transport udp
Valid v3.3.0 Syntax
enb -> mme s1ap initialuemessage enbueid 1 naspdu "0741"

3GPP TS 36.412 mandates SCTP for S1-MME; validate_semantics rejects transport tcp and transport udp on s1ap.

Field Guide 03
Poke Stateful Firewalls, Suricata, Zeek & OT Conduits