Routing Static

Definition of Static Routing protocol.

This module defines the StaticRouting protocol, which uses a pre-generated static routing table to direct reservation hops. Routing tables may be created manually, or generated and installed automatically by the Topology class.

class sequence.network_management.routing_static.StaticRoutingProtocol(owner: Node, name: str)

Class to update forwarding table manually.

The StaticRoutingProtocol class writes to the forwarding table (from the NetworkManager). Static in this context means that the forwarding table is manually configured (by a network administrator), not automatically updated via a routing protocol (i.e. computer program).

owner

node that protocol instance is attached to.

Type:

Node

name

label for protocol instance.

Type:

str

add_forwarding_rule(dst: str, next_node: str)

Adds mapping {dst: next_node} to forwarding table.

Parameters:
  • dst (str) – name of destination node.

  • next_node (str) – name of next hop node.

property forwarding_table: dict[str, str]

Returns the forwarding table.

Returns:

forwarding table in format {name of destination node: name of next node}.

Return type:

dict[str, str]

received_message(src: str, msg: Message)

Method to directly receive messages from node (should not be used).

update_forwarding_rule(dst: str, next_node: str)

updates dst to map to next_node in forwarding table.

Parameters:
  • dst (str) – name of destination node.

  • next_node (str) – name of next hop node.