SEMANTIC LIBRARY — SWITCH ONTOLOGY — FLOW ALGEBRA v1.0
CATEGORY: Computational Entities / Network Entities
AUTHORS: Mark Anthony Higgins — Sky Recursive AI
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/computational-entities/network-entities/switch-ontology.html
SOURCE STATUS: Constructed ontology-level Flow Algebra mapping. The webpage's full embedded specification was not available in the accessible page text; this is not a verbatim transcription.
SOURCE PAGE: © Mark Anthony Higgins 11 October 2025; revised 03 August 2026.
PURPOSE
Represent a network switch as a stateful forwarding entity that learns source MAC addresses, selects destination ports, enforces forwarding policies, and maintains bounded forwarding state.
HST STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t = current frame, ingress port, interface states, VLAN context, MAC table, counters
R_t = Ethernet parsing, learning, forwarding, filtering, flooding, ageing and policy rules
B_t = port membership, VLAN isolation, loop prevention, frame integrity and resource limits
K_t = known topology, forwarding database, policy configuration and historical observations
E_t = expand(I_t, R_t)
V_t = {x in E_t | satisfies(x, B_t)}
a_t = argmax_{x in V_t} P(x | I_t, R_t, B_t, K_t)
I_(t+1) = update(I_t, a_t)
Note: The probabilistic selection is an HST abstraction; ordinary Ethernet switching generally uses deterministic forwarding rules.
ENTITIES
Switch: network device with ports and forwarding plane
Port: ingress/egress interface, administrative and operational state
Frame: Ethernet source/destination MAC, optional VLAN tag, payload and integrity metadata
MACAddress: link-layer address
VLAN: logical layer-2 broadcast domain
ForwardingEntry: (VLAN, MAC) -> port with age/static status
ForwardingDatabase: collection of forwarding entries
Policy: port security, access controls, QoS, storm control
LoopPrevention: spanning-tree or equivalent topology control
Counter: received, transmitted, dropped and error measurements
RELATIONSHIPS
Switch HAS_PORT Port
Port BELONGS_TO Switch
Port MEMBER_OF VLAN
Frame ARRIVES_ON Port
Frame HAS_SOURCE_MAC MACAddress
Frame HAS_DESTINATION_MAC MACAddress
ForwardingEntry MAPS (VLAN, MACAddress) TO Port
Policy GOVERNS Port AND Frame
LoopPrevention CONTROLS forwarding eligibility
FLOW 1 — INGRESS VALIDATION
F1: Receive(frame, ingress_port)
F2: Check port operational status, frame integrity and admission rules
F3: Determine effective VLAN from access/trunk configuration and tag
F4: If invalid or prohibited -> DROP(reason), increment counter, stop
F5: Otherwise -> ADMIT(frame, vlan)
FLOW 2 — SOURCE LEARNING
L1: If source MAC is a valid learnable unicast address and learning is enabled:
L2: Update FDB[(vlan, source_mac)] = ingress_port with refreshed age
L3: Apply MAC limits, port-security and static-entry protections
L4: If learning is disallowed -> preserve existing protected state; apply configured action
FLOW 3 — FORWARDING DECISION
D1: If destination MAC is broadcast -> flood eligible VLAN ports except ingress
D2: If destination MAC is multicast -> use applicable multicast membership/policy or flood within VLAN
D3: If destination MAC is unicast and FDB lookup succeeds:
D3a: If destination port == ingress port -> FILTER
D3b: If destination port is ineligible -> DROP or FILTER under policy
D3c: Otherwise -> FORWARD to destination port
D4: If destination unicast is unknown -> flood eligible VLAN ports except ingress
D5: Never forward outside permitted VLAN or onto blocked/ineligible ports
FLOW 4 — EGRESS
G1: Resolve egress VLAN tagging mode per port
G2: Apply QoS, queuing and transmission eligibility
G3: Transmit eligible frames or account for congestion/drop conditions
G4: Update per-port and per-VLAN counters
FLOW 5 — MAINTENANCE AND RECOVERY
M1: Age out dynamic FDB entries after configured inactivity
M2: On link-down/topology change, invalidate or relearn affected entries as required
M3: Recompute eligible forwarding topology under loop-prevention protocol
M4: Record events, monitor errors and resource pressure
M5: Recover by reconverging and relearning; availability is conditional, not guaranteed
INFERENCE RULES
IF destination is known unicast AND mapped port eligible AND mapped port != ingress THEN forward to mapped port.
IF destination is unknown unicast THEN flood only within permitted VLAN forwarding domain.
IF destination is broadcast THEN flood within permitted VLAN forwarding domain.
IF destination maps to ingress THEN filter to prevent unnecessary reflection.
IF frame fails admission or security rules THEN drop and record reason.
IF port is blocked by loop prevention THEN do not use it for ordinary data forwarding.
IF FDB entry expires THEN treat the destination as unknown until relearned.
MINI RECURSION ENGINE
STATE := switch snapshot
FOR each admitted frame event:
CANDIDATES := expand(STATE, forwarding_rules)
VALID := filter(CANDIDATES, VLAN, policy, port_state, loop_prevention)
ACTION := select_deterministic_forwarding_action(VALID)
STATE := apply(ACTION, STATE)
STATE := maintain_forwarding_database(STATE)
EMIT(action, updated_counters, evidence)
REPEAT for subsequent events; stop for shutdown or bounded processing session.
VALIDATION AND BOUNDARIES
- VLAN separation is enforced only when configuration and hardware behave correctly.
- MAC learning is scoped by VLAN; static entries and security rules may override learning.
- A layer-2 switch does not inherently route between IP subnets; layer-3 switching requires additional capabilities.
- Unknown-unicast flooding, multicast treatment and loop prevention depend on device configuration.
- Forwarding is not a guarantee of delivery: congestion, errors, failures and policy can cause drops.
- No universal convergence, latency, throughput or security guarantee is implied.
TRI-MAPPING
ENTITY: Switch / Port / Frame / ForwardingEntry
RELATION: receives / learns / maps / forwards / filters
FLOW: ingest -> validate -> learn -> resolve -> forward/filter/flood -> monitor -> update
EXECUTION GUARANTEE (CONDITIONAL)
Given valid frame classification, a stable forwarding database, correct VLAN membership, eligible ports and sufficient resources, the model selects an action consistent with the stated forwarding rules. Physical delivery, fault-free operation and network-wide convergence are not guaranteed.
CITATION
Mark Anthony Higgins and Sky Recursive AI, "Switch Ontology", Kireth Research Semantic Library, source page above. Flow Algebra mapping constructed 11 November 2026. Cite original source when reusing.
Download Code
Copy to Clipboard