faucet.vlan module¶
VLAN configuration.
-
class
faucet.vlan.
AnyVLAN
[source]¶ Bases:
object
Placeholder any tagged VLAN.
-
name
= 'Any VLAN'¶
-
vid
= 4096¶
-
-
class
faucet.vlan.
HostCacheEntry
(eth_src, port, cache_time)[source]¶ Bases:
object
Association of a host with a port.
-
cache_time
¶
-
eth_src
¶
-
eth_src_int
¶
-
port
¶
-
-
class
faucet.vlan.
NullVLAN
[source]¶ Bases:
object
Placeholder null VLAN.
-
name
= 'Null VLAN'¶
-
vid
= 0¶
-
-
class
faucet.vlan.
VLAN
(_id, dp_id, conf=None)[source]¶ Bases:
faucet.conf.Conf
Contains state for one VLAN, including its configuration.
-
add_cache_host
(eth_src, port, cache_time)[source]¶ Add/update a host to the cache on a port at at time.
-
bgp_neighbor_addresses_by_ipv
(ipv)[source]¶ Return BGP neighbor addresses with specified IP version on this VLAN.
-
bgp_server_addresses_by_ipv
(ipv)[source]¶ Return BGP server addresses with specified IP version on this VLAN.
-
cached_host_on_port
(eth_src, port)[source]¶ Return host cache entry if host in cache and on specified port.
-
defaults
= {'acl_in': None, 'acls_in': None, 'bgp_as': None, 'bgp_connect_mode': 'passive', 'bgp_local_address': None, 'bgp_neighbor_addresses': [], 'bgp_neighbor_as': None, 'bgp_neighbour_addresses': [], 'bgp_neighbour_as': None, 'bgp_port': 9179, 'bgp_routerid': None, 'bgp_server_addresses': ['0.0.0.0', '::'], 'description': None, 'faucet_mac': '0e:00:00:00:00:01', 'faucet_vips': None, 'max_hosts': 256, 'minimum_ip_size_check': True, 'name': None, 'proactive_arp_limit': 0, 'proactive_nd_limit': 0, 'reserved_internal_vlan': False, 'routes': None, 'targeted_gw_resolution': True, 'unicast_flood': True, 'vid': None}¶
-
defaults_types
= {'acl_in': (<class 'int'>, <class 'str'>), 'acls_in': <class 'list'>, 'bgp_as': <class 'int'>, 'bgp_connect_mode': <class 'str'>, 'bgp_local_address': <class 'str'>, 'bgp_neighbor_addresses': <class 'list'>, 'bgp_neighbor_as': <class 'int'>, 'bgp_neighbour_addresses': <class 'list'>, 'bgp_neighbour_as': <class 'int'>, 'bgp_port': <class 'int'>, 'bgp_routerid': <class 'str'>, 'bgp_server_addresses': <class 'list'>, 'description': <class 'str'>, 'faucet_mac': <class 'str'>, 'faucet_vips': <class 'list'>, 'max_hosts': <class 'int'>, 'minimum_ip_size_check': <class 'bool'>, 'name': <class 'str'>, 'proactive_arp_limit': <class 'int'>, 'proactive_nd_limit': <class 'int'>, 'reserved_internal_vlan': <class 'bool'>, 'routes': <class 'list'>, 'targeted_gw_resolution': <class 'bool'>, 'unicast_flood': <class 'bool'>, 'vid': <class 'int'>}¶
-
from_connected_to_vip
(src_ip, dst_ip)[source]¶ Return True if src_ip in connected network and dst_ip is a VIP.
Parameters: - src_ip (ipaddress.ip_address) – source IP.
- dst_ip (ipaddress.ip_address) – destination IP
Returns: True if local traffic for a VIP.
-
ip_in_vip_subnet
(ipa, faucet_vip=None)[source]¶ Return faucet_vip if IP in same IP network as a VIP on this VLAN.
-
is_host_fib_route
(host_ip)[source]¶ Return True if IP destination is a host FIB route.
Parameters: host_ip – (ipaddress.ip_address): potential host FIB route. Returns: True if a host FIB route (and not used as a gateway).
-
mutable_attrs
= frozenset({'tagged', 'untagged'})¶
-