> 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).

# 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.elastiflow.com/additional-resources-reference-articles/guides/configuring-flow-logs-on-devices/arista.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
