Need help is designing the network resiliency design using POX controller. With the current use case, H1 and H2 will be sending same data to the destination H3. The required design is if H1 is an active source, then whatever data H2 sends should be dropped, but when H1 has failure, H2 should be sending to H3.
In POX can a decision be made based on the traffic on other interface?
# Check if we know the destination port for this packet's destination MAC address
if dst_mac in self.mac_to_port:
# Install a flow rule to forward future packets to the known port
out_port = self.mac_to_port[dst_mac]
msg = of.ofp_flow_mod()
msg.match.dl_dst = dst_mac
msg.actions.append(of.ofp_action_output(port = out_port))
event.connection.send(msg)
else:
# Flood the packet to all ports (except the input port)
msg = of.ofp_packet_out()
msg.data = event.ofp
msg.actions.append(of.ofp_action_output(port = of.OFPP_FLOOD))
msg.in_port = in_port
event.connection.send(msg)