faucet.valve_route module

Valve IPv4/IPv6 routing implementation.

class faucet.valve_route.AnonVLAN(vid)[source]

Bases: object

class faucet.valve_route.NextHop(eth_src, port, now)[source]

Bases: object

Describes a directly connected (at layer 2) nexthop.

age(now)[source]

Return age of this nexthop.

cache_time
dead(max_fib_retries)[source]

Return True if this nexthop is considered dead.

eth_src
last_retry_time
next_retry(now, max_resolve_backoff_time)[source]

Increment state for next retry.

next_retry_time
port
resolution_due(now, max_age)[source]

Return True if this nexthop is due to be re resolved/retried.

resolve_retries
class faucet.valve_route.ValveIPv4RouteManager(logger, 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)[source]

Bases: faucet.valve_route.ValveRouteManager

Implement IPv4 RIB/FIB.

CONTROL_ETH_TYPES = (2048, 2054)
ETH_TYPE = 2048
ICMP_SIZE = 110
ICMP_TYPE = 1
IPV = 4
IP_PKT

alias of ryu.lib.packet.ipv4.ipv4

active
advertise(_vlan)[source]
control_plane_handler(now, pkt_meta)[source]
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
pipeline
proactive_learn
route_priority
routers
vip_table
class faucet.valve_route.ValveIPv6RouteManager(logger, 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)[source]

Bases: faucet.valve_route.ValveRouteManager

Implement IPv6 FIB.

CONTROL_ETH_TYPES = (34525,)
ETH_TYPE = 34525
ICMP6_ECHO_SIZE = 160
ICMP_TYPE = 58
IPV = 6
IP_PKT

alias of ryu.lib.packet.ipv6.ipv6

active
advertise(vlan)[source]
control_plane_handler(now, pkt_meta)[source]
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
pipeline
proactive_learn
route_priority
routers
vip_table
class faucet.valve_route.ValveRouteManager(logger, 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)[source]

Bases: faucet.valve_manager_base.ValveManagerBase

Base class to implement RIB/FIB.

CONTROL_ETH_TYPES = ()
ETH_TYPE = None
ICMP_SIZE = 160
ICMP_TYPE = None
IPV = 0
IP_PKT = None
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

add_vlan(vlan)[source]

install flows in response to a new vlan

advertise(vlan)[source]
control_plane_handler(now, pkt_meta)[source]
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

expire_port_nexthops(port)[source]

Expire all hosts on a port.

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]
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
routers
vip_table