faucet.valve_route module
Valve IPv4/IPv6 routing implementation.
- class faucet.valve_route.NextHop(eth_src, port, now)[source]
Bases:
object
Describes a directly connected (at layer 2) nexthop.
- cache_time
- eth_src
- last_retry_time
- next_retry_time
- port
- resolve_retries
- class faucet.valve_route.ValveIPv4RouteManager(logger, notify, global_vlan, neighbor_timeout, max_hosts_per_resolve_cycle, max_host_fib_retry_count, max_resolve_backoff_time, proactive_learn, dec_ttl, multi_out, fib_table, vip_table, pipeline, routers, stack_manager)[source]
Bases:
ValveRouteManager
Implement IPv4 RIB/FIB.
- CONTROL_ETH_TYPES = (2048, 2054)
- ETH_TYPE = 2048
- ICMP_SIZE = 174
- ICMP_TYPE = 1
- IPV = 4
- IP_PKT
alias of
ipv4
- active
- control_plane_handler(now, pkt_meta)[source]
Handle packets destined for router otherwise proactively learn host information
- dec_ttl
- fib_table
- global_routing
- global_vlan
- logger
- max_host_fib_retry_count
- max_hosts_per_resolve_cycle
- max_resolve_backoff_time
- multi_out
- neighbor_timeout
- notify
- pipeline
- proactive_learn
- route_priority
- routers
- switch_manager
- vip_table
- class faucet.valve_route.ValveIPv6RouteManager(logger, notify, global_vlan, neighbor_timeout, max_hosts_per_resolve_cycle, max_host_fib_retry_count, max_resolve_backoff_time, proactive_learn, dec_ttl, multi_out, fib_table, vip_table, pipeline, routers, stack_manager)[source]
Bases:
ValveRouteManager
Implement IPv6 FIB.
- CONTROL_ETH_TYPES = (34525,)
- ETH_TYPE = 34525
- ICMP_SIZE = 194
- ICMP_TYPE = 58
- IPV = 6
- IP_PKT
alias of
ipv6
- active
- control_plane_handler(now, pkt_meta)[source]
Resolve packets destined for router or proactively learn host information
- dec_ttl
- fib_table
- global_routing
- global_vlan
- logger
- max_host_fib_retry_count
- max_hosts_per_resolve_cycle
- max_resolve_backoff_time
- multi_out
- neighbor_timeout
- notify
- pipeline
- proactive_learn
- route_priority
- routers
- switch_manager
- vip_table
- class faucet.valve_route.ValveRouteManager(logger, notify, global_vlan, neighbor_timeout, max_hosts_per_resolve_cycle, max_host_fib_retry_count, max_resolve_backoff_time, proactive_learn, dec_ttl, multi_out, fib_table, vip_table, pipeline, routers, stack_manager)[source]
Bases:
ValveManagerBase
Base class to implement RIB/FIB.
- CONTROL_ETH_TYPES = ()
- ETH_TYPE = None
- ICMP_SIZE = None
- ICMP_TYPE = None
- IPV = 0
- IP_PKT = None
- MAX_PACKET_IN_SIZE = 194
- active
- add_host_fib_route_from_pkt(now, pkt_meta)[source]
Add a host FIB route given packet from host.
- Parameters:
now (float) – seconds since epoch.
pkt_meta (PacketMeta) – received packet.
- Returns:
OpenFlow messages.
- Return type:
list
- add_route(vlan, ip_gw, ip_dst)[source]
Add a route to the RIB.
- Parameters:
vlan (vlan) – VLAN containing this RIB.
ip_gw (ipaddress.ip_address) – IP address of nexthop.
ip_dst (ipaddress.ip_network) – destination IP network.
- Returns:
OpenFlow messages.
- Return type:
list
- dec_ttl
- del_route(vlan, ip_dst)[source]
Delete a route from the RIB.
Only one route with this exact destination is supported.
- Parameters:
vlan (vlan) – VLAN containing this RIB.
ip_dst (ipaddress.ip_network) – destination IP network.
- Returns:
OpenFlow messages.
- Return type:
list
- fib_table
- global_routing
- global_vlan
- logger
- max_host_fib_retry_count
- max_hosts_per_resolve_cycle
- max_resolve_backoff_time
- multi_out
- neighbor_timeout
- nexthop_dead(nexthop_cache_entry)[source]
Returns true if the nexthop_cache_entry is considered dead
- notify
- pipeline
- proactive_learn
- resolve_expire_hosts(vlan, now, resolve_all=True)[source]
Re/resolve hosts.
- Parameters:
vlan (vlan) – VLAN containing this RIB/FIB.
now (float) – seconds since epoch.
resolve_all (bool) – attempt to resolve all unresolved gateways.
- Returns:
OpenFlow messages.
- Return type:
list
- resolve_gateways(vlan, now, resolve_all=True)[source]
Re/resolve gateways.
- Parameters:
vlan (vlan) – VLAN containing this RIB/FIB.
now (float) – seconds since epoch.
resolve_all (bool) – attempt to resolve all unresolved gateways.
- Returns:
OpenFlow messages.
- Return type:
list
- route_priority
- router_vlan_for_ip_gw(vlan, ip_gw)[source]
Return router VLAN for IP gateway (or None).
- Parameters:
vlan (vlan) – VLAN containing this RIB.
ip_gw (ipaddress.ip_address) – IP address of nexthop.
- Returns:
VLAN for this gateway or None.
- routers
- switch_manager
- vip_table