faucet.valve_switch_standalone module

Manage flooding/learning on standalone datapaths.

class faucet.valve_switch_standalone.ValveSwitchFlowRemovedManager(logger, ports, vlans, vlan_table, vlan_acl_table, eth_src_table, eth_dst_table, eth_dst_hairpin_table, flood_table, classification_table, pipeline, use_group_table, groups, combinatorial_port_flood, canonical_port_order, restricted_bcast_arpnd, has_externals, learn_ban_timeout, learn_timeout, learn_jitter, cache_update_guard_time, idle_dst)[source]

Bases: faucet.valve_switch_standalone.ValveSwitchManager

Trigger relearning on flow removed notifications.

Note

not currently reliable.

expire_hosts_from_vlan(_vlan, _now)[source]

Expire hosts from VLAN cache.

flow_timeout(now, table_id, match)[source]

Handle a flow timed out message from dataplane.

class faucet.valve_switch_standalone.ValveSwitchManager(logger, ports, vlans, vlan_table, vlan_acl_table, eth_src_table, eth_dst_table, eth_dst_hairpin_table, flood_table, classification_table, pipeline, use_group_table, groups, combinatorial_port_flood, canonical_port_order, restricted_bcast_arpnd, has_externals, learn_ban_timeout, learn_timeout, learn_jitter, cache_update_guard_time, idle_dst)[source]

Bases: faucet.valve_manager_base.ValveManagerBase

Implement dataplane based flooding/learning for standalone dataplanes.

FLOOD_DSTS = ((True, None, None, None), (False, None, '01:80:c2:00:00:00', 'ff:ff:ff:00:00:00'), (False, None, '01:00:5E:00:00:00', 'ff:ff:ff:00:00:00'), (False, None, '33:33:00:00:00:00', 'ff:ff:00:00:00:00'), (False, None, 'ff:ff:ff:ff:ff:ff', 'ff:ff:ff:ff:ff:ff'))
RESTRICTED_FLOOD_DISTS = ((False, 2054, 'ff:ff:ff:ff:ff:ff', 'ff:ff:ff:ff:ff:ff'), (False, 34525, '33:33:FF:00:00:00', 'ff:ff:ff:00:00:00'), (False, 34525, '33:33:00:00:00:02', 'ff:ff:ff:ff:ff:ff'), (False, 34525, '33:33:00:00:00:01', 'ff:ff:ff:ff:ff:ff'))
add_port(port)[source]

install flows in response to a new port

add_vlan(vlan)[source]

install flows in response to a new VLAN

ban_rules(pkt_meta)[source]

Limit learning to a maximum configured on this port/VLAN.

Parameters

pkt_meta – PacketMeta instance.

Returns

OpenFlow messages, if any.

Return type

list

build_flood_rules(vlan, modify=False)[source]

Add flows to flood packets to unknown destinations on a VLAN.

del_port(port)[source]

delete flows in response to a port removal

del_vlan(vlan)[source]

delete flows in response to a VLAN removal

delete_host_from_vlan(eth_src, vlan)[source]

Delete a host from a VLAN.

static edge_learn_port(_other_valves, pkt_meta)[source]

Possibly learn a host on a port.

Parameters
  • other_valves (list) – All Valves other than this one.

  • pkt_meta (PacketMeta) – PacketMeta instance for packet received.

Returns

port to learn host on.

expire_hosts_from_vlan(vlan, now)[source]

Expire hosts from VLAN cache.

floods_to_root(_dp_obj)[source]

Return True if the given dp floods (only) to root switch

flow_timeout(_now, _table_id, _match)[source]

Handle a flow timed out message from dataplane.

initialise_tables()[source]

Initialise the flood table with filtering flows.

learn_host_on_vlan_port_flows(port, vlan, eth_src, delete_existing, refresh_rules, src_rule_idle_timeout, src_rule_hard_timeout, dst_rule_idle_timeout)[source]

Return flows that implement learning a host on a port.

learn_host_on_vlan_ports(now, port, vlan, eth_src, delete_existing=True, last_dp_coldstart_time=None)[source]

Learn a host on a port.

static update_stack_topo(event, dp, port)[source]

Update the stack topology. It has nothing to do for non-stacking DPs.

update_vlan(vlan)[source]

flows in response to updating an existing VLAN.