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.
-
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'))¶
-
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.
-
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.
-
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.
-