IP Protocol Numbers
The assigned Internet Protocol numbers that go in the Protocol field of an IPv4 header and the Next Header field of an IPv6 header — 6 for TCP, 17 for UDP, 1 for ICMP, 58 for ICMPv6, and the rest. Each entry pairs the number with its keyword, full protocol name, and defining reference.
Quick fetch
Stable URL. CORS-enabled. No auth.
curl https://staticdata.dev/v1/ip-protocol-numbers.json
Or use as a typed import:
import { ipProtocolNumbers } from "https://staticdata.dev/v1/ip-protocol-numbers.ts"
Formats
- JSON 20.2 KB
/v1/ip-protocol-numbers.json
min: 15.8 KB · /v1/ip-protocol-numbers.min.json
- CSV 8.6 KB
/v1/ip-protocol-numbers.csv
- TypeScript 20.4 KB
/v1/ip-protocol-numbers.ts
export const ipProtocolNumbers
type IpProtocolNumber = (typeof ipProtocolNumbers)[number]
Schema
Each record in the dataset has the following shape.
| Field | Type | Description | Example |
|---|---|---|---|
| number | number | Protocol number (0–255) | 6 |
| keyword | string | null | Short keyword | TCP |
| protocol | string | Full protocol name | Transmission Control |
| reference | string | null | Defining RFC or reference | RFC9293 |
Preview
First 10 records.
| number | keyword | protocol | reference |
|---|---|---|---|
| 0 | HOPOPT | IPv6 Hop-by-Hop Option | RFC8200 |
| 1 | ICMP | Internet Control Message | RFC792 |
| 2 | IGMP | Internet Group Management | RFC1112 |
| 3 | GGP | Gateway-to-Gateway | RFC823 |
| 4 | IPv4 | IPv4 encapsulation | RFC2003 |
| 5 | ST | Stream | RFC1190, RFC1819 |
| 6 | TCP | Transmission Control | RFC9293 |
| 7 | CBT | CBT | Tony_Ballardie |
| 8 | EGP | Exterior Gateway Protocol | RFC888, David_Mills |
| 9 | IGP | any private interior gateway (used by Cisco for their IGRP) | Internet_Assigned_Numbers_Authority |
Fetch examples
Drop-in snippets in five languages.
curl -sSL https://staticdata.dev/v1/ip-protocol-numbers.json | jq '.[0]' import type { IpProtocolNumber } from "https://staticdata.dev/v1/ip-protocol-numbers.ts";
const res = await fetch("https://staticdata.dev/v1/ip-protocol-numbers.min.json");
if (!res.ok) throw new Error(`Fetch failed: ${res.status}`);
const ipProtocolNumbers: IpProtocolNumber[] = await res.json();
console.log(ipProtocolNumbers[0]); import urllib.request, json
with urllib.request.urlopen("https://staticdata.dev/v1/ip-protocol-numbers.min.json") as r:
ipProtocolNumbers = json.load(r)
print(ipProtocolNumbers[0]) package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("https://staticdata.dev/v1/ip-protocol-numbers.min.json")
if err != nil { panic(err) }
defer resp.Body.Close()
var data []map[string]any
if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
panic(err)
}
fmt.Println(data[0])
} use serde_json::Value;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let body = ureq::get("https://staticdata.dev/v1/ip-protocol-numbers.min.json").call()?.into_string()?;
let data: Vec<Value> = serde_json::from_str(&body)?;
println!("{:?}", data.first());
Ok(())
} Sources and methodology
The data comes from the IANA Assigned Internet Protocol Numbers registry. This is the 8-bit field that identifies the next-layer protocol carried in an IP packet — the IPv4 Protocol field and the IPv6 Next Header field share the same number space.
Only individually assigned numbers are included; unassigned and reserved ranges are omitted, so a number absent from this dataset is either unassigned or reserved. keyword and reference are nullable because a few historical assignments have no registered keyword or citation. Number 255 is reserved, and 253/254 are designated for experimentation and testing.
Versioning
URLs under /v1/ are stable: field names and types will not change in a way
that breaks consumers. Values can be corrected or records added when the upstream source
changes; schema-incompatible updates ship under a new version path. See the
ip-protocol-numbers changelog for this dataset's history.
Related datasets
More Web datasets
- aria-attributes
- aria-roles
- character-encodings
- csp-directives
- credit-card-types
- dns-record-types
- dom-events
- emoji
- emoji-shortcodes
- html-elements
- html-entities
- html-attributes
- input-types
- http-auth-schemes
- http-cache-directives
- http-content-codings
- http-headers
- http-status-codes
- http-versions
- iframe-sandbox-tokens
- keyboard-event-codes
- link-relations
- media-type-suffixes
- mime-types
- oauth-grant-types
- referrer-policies
- ip-special-blocks
- svg-elements
- tcp-flags
- tlds
- tls-cipher-suites
- tls-versions
- uri-schemes
- well-known-uris