faucet.valve_flood module¶
Manage flooding to ports on VLANs.
-
class
faucet.valve_flood.
ValveFloodManager
(logger, flood_table, pipeline, use_group_table, groups, combinatorial_port_flood, canonical_port_order, restricted_bcast_arpnd)[source]¶ Bases:
faucet.valve_manager_base.ValveManagerBase
Implement dataplane based flooding 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'))¶
-
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.
-
-
class
faucet.valve_flood.
ValveFloodStackManagerBase
(logger, flood_table, pipeline, use_group_table, groups, combinatorial_port_flood, canonical_port_order, restricted_bcast_arpnd, stack_ports, has_externals, dp_shortest_path_to_root, shortest_path_port, is_stack_root, is_stack_root_candidate, is_stack_edge, graph)[source]¶ Bases:
faucet.valve_flood.ValveFloodManager
Implement dataplane based flooding for stacked dataplanes.
-
edge_learn_port
(other_valves, pkt_meta)[source]¶ Find a port towards the edge DP where the packet originated from
- Parameters
other_valves (list) – All Valves other than this one.
pkt_meta (PacketMeta) – PacketMeta instance for packet received.
- Returns
port to learn host on, or None.
-
-
class
faucet.valve_flood.
ValveFloodStackManagerNoReflection
(logger, flood_table, pipeline, use_group_table, groups, combinatorial_port_flood, canonical_port_order, restricted_bcast_arpnd, stack_ports, has_externals, dp_shortest_path_to_root, shortest_path_port, is_stack_root, is_stack_root_candidate, is_stack_edge, graph)[source]¶ Bases:
faucet.valve_flood.ValveFloodStackManagerBase
Special case for networks of size 2 - no need to reflect off root, we can just flood locally and then to the “other” switch.
-
class
faucet.valve_flood.
ValveFloodStackManagerReflection
(logger, flood_table, pipeline, use_group_table, groups, combinatorial_port_flood, canonical_port_order, restricted_bcast_arpnd, stack_ports, has_externals, dp_shortest_path_to_root, shortest_path_port, is_stack_root, is_stack_root_candidate, is_stack_edge, graph)[source]¶ Bases:
faucet.valve_flood.ValveFloodStackManagerBase
General case for networks > size 2 - floods are reflected off of the root.
If a standalone switch, then flood to local VLAN ports.
If a distributed switch where all switches are directly connected to the root (star topology), edge switches flood locally and to the root, and the root floods to the other edges.
If a non-star distributed switch topologies, use selective flooding (see the following example).
- Hosts
+—-+ +—-+ +—-+
—+1 | |1234| | 1+—
- Hosts —+2 | | | | 2+— Hosts
—+3 | | | | 3+— —+4 5+——-+5 6+——-+5 4+—
+—-+ +—-+ +—-+
Root DP
Non-root switches flood only to the root. The root switch reflects incoming floods back out. Non-root switches flood packets from the root locally and further away. Flooding is entirely implemented in the dataplane.
A host connected to a non-root switch can receive a copy of its own flooded packet (because the non-root switch does not know it has seen the packet already).
A host connected to the root switch does not have this problem (because flooding is always away from the root). Therefore, connections to other non-FAUCET stacking networks should only be made to the root.
On the root switch (left), flood destinations are:
1: 2 3 4 5(s) 2: 1 3 4 5(s) 3: 1 2 4 5(s) 4: 1 2 3 5(s) 5: 1 2 3 4 5(s, note reflection)
On the middle switch:
1: 5(s) 2: 5(s) 3: 5(s) 4: 5(s) 5: 1 2 3 4 6(s) 6: 5(s)
On the rightmost switch:
1: 5(s) 2: 5(s) 3: 5(s) 4: 5(s) 5: 1 2 3 4