Skip to content

(feat): Implement functional Layer 1 keepalive support for IOU/IOL nodes#2826

Open
cristian-ciobanu wants to merge 3 commits into
GNS3:3.1from
cristian-ciobanu:iol-l1-keepalive
Open

(feat): Implement functional Layer 1 keepalive support for IOU/IOL nodes#2826
cristian-ciobanu wants to merge 3 commits into
GNS3:3.1from
cristian-ciobanu:iol-l1-keepalive

Conversation

@cristian-ciobanu

@cristian-ciobanu cristian-ciobanu commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Implement functional Layer 1 keepalive support for IOU/IOL nodes so interface status accurately reflects whether a link is connected.

Purpose

Without L1 keepalives, IOU/IOL interfaces may remain up when disconnected or report the wrong interface as connected. This affects both Ethernet and serial interfaces on IOL-L2 and IOL-L3 nodes.

Changes

  • Added a UNIX datagram endpoint for exchanging L1 keepalive messages with IOU/IOL.
  • Periodically sends keepalives for interfaces with an attached NIO.
  • Responds to valid keepalives only when the corresponding interface is connected.
  • Supports both Ethernet and serial adapters using IOU's global adapter numbering.
  • Uses the correct IOU interface encoding:
    • Zero-based port/unit in the high nibble.
    • Zero-based adapter/bay in the low nibble.
  • Starts the responder only when the IOU image supports and enables the -l option.
  • Stops the responder and removes its socket when the node stops, terminates, or fails to start.
  • Validates socket ownership before creating the endpoint.
  • Updated API descriptions for the L1 keepalive option.
  • Added regression tests for:
    • Ethernet and serial interface numbering.
    • Mixed Ethernet/serial topologies.
    • Connected and disconnected interfaces.
    • Malformed or unrelated keepalive messages.
    • Unsupported L1 capability.
    • Startup failure and repeated cleanup.

Examples

Interface Keepalive interface ID
Ethernet0/0 0x00
Ethernet0/2 0x20
Ethernet1/1 0x11
Ethernet2/2 0x22
Serial4/0 0x04

Validation

  • IOU VM test suite: 49 passed
  • IOU API assertions: 31 passed

Tested using latest available IOL L2 and L3 images 17.18.02 version but I assume it should work with other versions.

Fixes #14

@cristian-ciobanu cristian-ciobanu changed the title {feat): Implement functional Layer 1 keepalive support for IOU/IOL nodes (feat): Implement functional Layer 1 keepalive support for IOU/IOL nodes Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants