Skip to content

Commit

Permalink
Feat(eos_cli_config_gen): Add flow tracking sampled support (#2270)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuloc authored Nov 16, 2022
1 parent 76e4ecc commit b9859e4
Show file tree
Hide file tree
Showing 15 changed files with 820 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
# flow-tracking
# Table of Contents

- [Management](#management)
- [Management Interfaces](#management-interfaces)
- [Authentication](#authentication)
- [Monitoring](#monitoring)
- [Flow Tracking](#flow-tracking)
- [Internal VLAN Allocation Policy](#internal-vlan-allocation-policy)
- [Internal VLAN Allocation Policy Summary](#internal-vlan-allocation-policy-summary)
- [Interfaces](#interfaces)
- [Ethernet Interfaces](#ethernet-interfaces)
- [Port-Channel Interfaces](#port-channel-interfaces)
- [Routing](#routing)
- [IP Routing](#ip-routing)
- [IPv6 Routing](#ipv6-routing)
- [Multicast](#multicast)
- [Filters](#filters)
- [ACL](#acl)
- [Quality Of Service](#quality-of-service)

# Management

## Management Interfaces

### Management Interfaces Summary

#### IPv4

| Management Interface | description | Type | VRF | IP Address | Gateway |
| -------------------- | ----------- | ---- | --- | ---------- | ------- |
| Management1 | oob_management | oob | MGMT | 10.73.255.122/24 | 10.73.255.2 |

#### IPv6

| Management Interface | description | Type | VRF | IPv6 Address | IPv6 Gateway |
| -------------------- | ----------- | ---- | --- | ------------ | ------------ |
| Management1 | oob_management | oob | MGMT | - | - |

### Management Interfaces Device Configuration

```eos
!
interface Management1
description oob_management
vrf MGMT
ip address 10.73.255.122/24
```

# Authentication

# Monitoring

## Flow Tracking

### Flow Tracking Sampled

Sample: 666

#### Trackers Summary

| Tracker Name | Record Export On Inactive Timeout | Record Export On Interval | MPLS | Number of Exporters | Applied On |
| ------------ | --------------------------------- | ------------------------- | ---- | ------------------- | ---------- |
| T1 | 3666 | 5666 | True | 0 | |
| T2 | - | - | False | 1 | Ethernet40 |
| T3 | - | - | - | 4 | Ethernet41<br>Ethernet42<br>Port-Channel42 |

#### Exporters Summary

| Tracker Name | Exporter Name | Collector IP/Host | Collector Port | Local Interface |
| ------------ | ------------- | ----------------- | -------------- | --------------- |
| T2 | T2-E1 | - | - | No local interface |
| T3 | T3-E1 | - | - | No local interface |
| T3 | T3-E2 | - | - | No local interface |
| T3 | T3-E3 | - | - | Management1 |
| T3 | T3-E4 | - | - | No local interface |

### Flow Tracking Configuration

```eos
!
flow tracking sampled
sample 666
tracker T1
record export on inactive timeout 3666
record export on interval 5666
record export mpls
tracker T2
exporter T2-E1
collector 42.42.42.42
tracker T3
exporter T3-E1
exporter T3-E2
collector 10.10.10.10 port 777
exporter T3-E3
collector this.is.my.awesome.collector.dns.name port 888
format ipfix version 10
local interface Management1
template interval 424242
exporter T3-E4
collector dead:beef::cafe
no shutdown
```

# Internal VLAN Allocation Policy

## Internal VLAN Allocation Policy Summary

**Default Allocation Policy**

| Policy Allocation | Range Beginning | Range Ending |
| ------------------| --------------- | ------------ |
| ascending | 1006 | 4094 |

# Interfaces

## Ethernet Interfaces

### Ethernet Interfaces Summary

#### L2

| Interface | Description | Mode | VLANs | Native VLAN | Trunk Group | Channel-Group |
| --------- | ----------- | ---- | ----- | ----------- | ----------- | ------------- |
| Ethernet40 | - | access | - | - | - | - |
| Ethernet41 | - | access | - | - | - | - |
| Ethernet42 | - | access | - | - | - | - |

*Inherited from Port-Channel Interface

### Ethernet Interfaces Device Configuration

```eos
!
interface Ethernet40
switchport
flow tracker sampled T2
!
interface Ethernet41
switchport
flow tracker sampled T3
!
interface Ethernet42
switchport
flow tracker sampled T3
```

## Port-Channel Interfaces

### Port-Channel Interfaces Summary

#### L2

| Interface | Description | Type | Mode | VLANs | Native VLAN | Trunk Group | LACP Fallback Timeout | LACP Fallback Mode | MLAG ID | EVPN ESI |
| --------- | ----------- | ---- | ---- | ----- | ----------- | ------------| --------------------- | ------------------ | ------- | -------- |
| Port-Channel42 | - | switched | access | - | - | - | - | - | - | - |

### Port-Channel Interfaces Device Configuration

```eos
!
interface Port-Channel42
switchport
flow tracker sampled T3
```

# Routing

## IP Routing

### IP Routing Summary

| VRF | Routing Enabled |
| --- | --------------- |
| default | False |

### IP Routing Device Configuration

```eos
```
## IPv6 Routing

### IPv6 Routing Summary

| VRF | Routing Enabled |
| --- | --------------- |
| default | False |

# Multicast

# Filters

# ACL

# Quality Of Service
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
!RANCID-CONTENT-TYPE: arista
!
flow tracking sampled
sample 666
tracker T1
record export on inactive timeout 3666
record export on interval 5666
record export mpls
tracker T2
exporter T2-E1
collector 42.42.42.42
tracker T3
exporter T3-E1
exporter T3-E2
collector 10.10.10.10 port 777
exporter T3-E3
collector this.is.my.awesome.collector.dns.name port 888
format ipfix version 10
local interface Management1
template interval 424242
exporter T3-E4
collector dead:beef::cafe
no shutdown
!
transceiver qsfp default-mode 4x10G
!
hostname flow-tracking
!
no enable password
no aaa root
!
interface Port-Channel42
switchport
flow tracker sampled T3
!
interface Ethernet40
switchport
flow tracker sampled T2
!
interface Ethernet41
switchport
flow tracker sampled T3
!
interface Ethernet42
switchport
flow tracker sampled T3
!
interface Management1
description oob_management
vrf MGMT
ip address 10.73.255.122/24
!
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
### Flow Tracking

flow_trackings:
- type: sampled
sample: 666
trackers:
- name: T1
record_export:
on_inactive_timeout: 3666
on_interval: 5666
mpls: true
# no exporter
- name: T2
record_export:
# Should not be rendered
mpls: false
# one exporter
exporters:
- name: T2-E1
collector:
host: 42.42.42.42
# no port
- name: T3
# two exporters
exporters:
- name: T3-E1
collector:
# only port - should not be rendered
port: 666
- name: T3-E2
collector:
host: 10.10.10.10
port: 777
- name: T3-E3
collector:
host: this.is.my.awesome.collector.dns.name
port: 888
format:
ipfix_version: 10
local_interface: Management1
template_interval: 424242
- name: T3-E4
collector:
host: dead:beef::cafe
shutdown: false

ethernet_interfaces:
Ethernet40:
flow_tracker:
sampled: T2
Ethernet41:
flow_tracker:
sampled: T3
Ethernet42:
flow_tracker:
sampled: T3

port_channel_interfaces:
Port-Channel42:
flow_tracker:
sampled: T3
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ errdisable
ethernet-interfaces
event-handlers
event-monitor
flow-tracking
generate_device_documentation
generate-default-config
groups
Expand Down
32 changes: 32 additions & 0 deletions ansible_collections/arista/avd/roles/eos_cli_config_gen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,32 @@ as_path:
origin: < "any" | "egp" | "igp" | "incomplete" | default -> "any" >
```

### Flow Tracking

```yaml
flow_trackings:
# Only 'sampled' is supported for type
- type: < "sampled" >
sample: < 1-4294967295 >
trackers:
- name: < tracker_name >
record_export:
on_inactive_timeout: < 3000-900000 >
on_interval: < 1000-36000000 >
mpls: < true | false >
exporters:
- name: < exporter_name >
collector:
host: < collector_ip_or_hostname >
port: < 1-65535 >
format:
# Note that platforms only support 10 today
ipfix_version: < ipfix_version as integer >
local_interface: < local_interface_name >
template_interval: < 5000-3600000 >
shutdown: < true | false >
```

### Generate Device Documentation

```yaml
Expand Down Expand Up @@ -808,6 +834,8 @@ ethernet_interfaces:
type: < routed | switched | l3dot1q | l2dot1q >
snmp_trap_link_change: < true | false >
vrf: < vrf_name >
flow_tracker:
sampled: < flow_tracker_name >
error_correction_encoding:
enabled: < true | false | default -> true >
fire_code: < true | false >
Expand Down Expand Up @@ -976,6 +1004,8 @@ ethernet_interfaces:
- < trunk_group_name_2 >
l2_protocol:
encapsulation_dot1q_vlan: < vlan number >
flow_tracker:
sampled: < flow_tracker_name >
error_correction_encoding:
enabled: < true | false | default -> true >
fire_code: < true | false >
Expand Down Expand Up @@ -1203,6 +1233,8 @@ port_channel_interfaces:
vlan: < 1-4094 >
l2_protocol:
encapsulation_dot1q_vlan: < vlan number >
flow_tracker:
sampled: < flow_tracker_name >
mtu: < mtu >
mlag: < mlag_id >
trunk_groups:
Expand Down
Loading

0 comments on commit b9859e4

Please sign in to comment.