def default_routing_policy(node,
                           dst_ip,
                           dst_port=None,
                           src_ip=None,
                           src_port=None,
                           protocol='tcp',
                           **args):
    """
    Default routing policy for networks.

    Args:
        node: node id for the network.
        dst_ip: destination ip address.
        dst_port: optional.
        src_ip: optional.
        src_port: optional.
        protocol: optional.
        args: additional flow spec.

    Returns:
        The next hop of the give flow spec from this node.
    """
    if dst_ip not in node['rib']:
        return None
    else:
        prefix_actions = node['rib'][dst_ip]
        # print(dst_ip, dst_port, prefix_actions)
        return prefix_actions.get(dst_port, prefix_actions.get(0, None)) or None