> For the complete documentation index, see [llms.txt](https://docs.elastiflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elastiflow.com/additional-resources-reference-articles/guides/configuring-flow-logs-on-devices/arista.md). Agents can also search and read this documentation through its [MCP server](https://docs.elastiflow.com/~gitbook/mcp).

# Arista

Here's a general guideline to configure sFlow on an Arista:

### **1. Enable sFlow globally**

```eos
sflow run
sflow agent <interface>            ! interface for sFlow agent IP (usually loopback)
sflow collector <collector-ip> <udp-port> vrf <vrf-name>
sflow sample <rate>                ! e.g. 4096 (1 out of every 4096 packets)
sflow polling-interval <seconds>   ! e.g. 30
```

Example:

```eos
sflow run
sflow agent Loopback0
sflow collector 192.0.2.10 6343 vrf default
sflow sample 4096
sflow polling-interval 30
```

### **2. Enable sFlow on interfaces**

```eos
interface Ethernet1
   sflow enable
!
interface Ethernet2
   sflow enable
```

### **3. Enable BGP for Flow Export (Optional: BGP-LS / BMP / FlowSpec)**

If you want **flow data enriched with routing/BGP context**, you usually:

* Run BGP on the router.
* Export sFlow to a collector (Kentik, InMon, ElastiFlow, etc.) that can ingest BGP data.
* Export the routing table to the same collector, so flows get annotated with AS-path, prefix, community, etc.

Example (simple BGP config):

```eos
router bgp 65001
   router-id 203.0.113.1
   neighbor 192.0.2.20 remote-as 65002
   !
   address-family ipv4
      neighbor 192.0.2.20 activate
```

The collector (not the switch) does the **join** between sFlow records and BGP routing information.
