faucet.valve_switch_stack module

Manage flooding/learning on stacked datapaths.

class faucet.valve_switch_stack.ValveSwitchStackManagerBase(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, stack_ports, dp_shortest_path_to_root, shortest_path, shortest_path_port, is_stack_root, is_stack_root_candidate, is_stack_edge, dp_name, graph, tunnel_acls, acl_manager)[source]

Bases: faucet.valve_switch_standalone.ValveSwitchManager

Base class for dataplane based flooding/learning on stacked dataplanes.

acl_update_tunnel(acl)[source]

Return ofmsgs for a ACL with a tunnel rule

add_port(port)[source]

install flows in response to a new port

add_tunnel_acls()[source]
del_port(port)[source]

delete flows in response to a port removal

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.

learn_host_intervlan_routing_flows(port, vlan, eth_src, eth_dst)[source]
Returns flows for the eth_src_table that enable packets that have been

routed to be accepted from an adjacent DP and then switched to the destination. Eth_src_table flow rule to match on port, eth_src, eth_dst and vlan

Parameters
  • port (Port) – Port to match on.

  • vlan (VLAN) – VLAN to match on

  • eth_src – source MAC address (should be the router MAC)

  • eth_dst – destination MAC address

shortest_path_root(edge_dp_name)[source]

Return the port along the shortest path to/from root for edge learning

update_stack_topo(event, dp, port)[source]

Update the stack topo according to the event.

class faucet.valve_switch_stack.ValveSwitchStackManagerNoReflection(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, stack_ports, dp_shortest_path_to_root, shortest_path, shortest_path_port, is_stack_root, is_stack_root_candidate, is_stack_edge, dp_name, graph, tunnel_acls, acl_manager)[source]

Bases: faucet.valve_switch_stack.ValveSwitchStackManagerBase

Stacks of size 2 - all switches directly connected to root.

Root switch simply floods to all other switches.

Non-root switches simply flood to the root.

class faucet.valve_switch_stack.ValveSwitchStackManagerReflection(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, stack_ports, dp_shortest_path_to_root, shortest_path, shortest_path_port, is_stack_root, is_stack_root_candidate, is_stack_edge, dp_name, graph, tunnel_acls, acl_manager)[source]

Bases: faucet.valve_switch_stack.ValveSwitchStackManagerBase

Stacks size > 2 reflect floods off of root (selective flooding).

                      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 to switches further away from the root. 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