Skip to content

Commit

Permalink
LAG on Arista EOS
Browse files Browse the repository at this point in the history
  • Loading branch information
ipspace committed Nov 3, 2024
1 parent 0829238 commit e4cf2a6
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/caveats.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* The DHCP client on Arista EOS is finicky. When the DHCP state changes on one of the data-plane Ethernet interfaces, the management interface might lose its IPv4 address.
* You can set Arista cEOS serial number and system MAC address with the **eos.serialnumber** and **eos.systemmacaddr** node properties.
* Use **libvirt.uuid** node property to ensure a vEOS VM does not change its serial number every time you start the lab.
* Arista EOS does not support routed port-channel interfaces. Port channel interfaces can be used only as VLAN trunks or VLAN access interfaces.
* Anycast gateways and DHCP/DHCPv6 clients do not work on Arista cEOS Ethernet interfaces.
* cEOS MPLS data plane was introduced in release 4.32.1F.

Expand Down
1 change: 1 addition & 0 deletions docs/module/lag.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ LAG is currently supported on these platforms:

| Operating system | LACP | Static | Passive<br>LACP |
| --------------------- |:--:|:--:|:--:|
| Arista EOS [](caveats-eos) ||||
| Cumulus Linux ||||
| FRR ||||

Expand Down
14 changes: 14 additions & 0 deletions netsim/ansible/templates/lag/eos.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% for intf in interfaces if intf.type == 'lag' %}
{% for ch in interfaces if ch.lag._parentindex|default(False) == intf.linkindex %}
!
{% set _lag_mode =
'on' if intf.lag.lacp|default('') == 'off' else
'active' if intf.lag.lacp_mode|default('') == 'active' else
'passive' %}
interface {{ ch.ifname }}
channel-group {{ intf.lag.ifindex }} mode {{ _lag_mode }}
{% if intf.lag.lacp|default('') == 'fast' %}
lacp timer fast
{% endif %}
{% endfor %}
{% endfor %}
12 changes: 12 additions & 0 deletions netsim/devices/eos.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ def check_dhcp_clients(node: Box, topology: Box) -> None:
category=log.IncorrectType,
module='quirks')

def check_l3_lag(node: Box, topology: Box) -> None:
for intf in node.interfaces:
if intf.type != 'lag':
continue
if intf.get('ipv4',False) is not False or intf.get('ipv6',False) is not False:
log.error(
f"Interface {intf.ifname} on Arista EOS node {node.name} cannot have IPv4/IPv6 addresses",
category=log.IncorrectType,
module='quirks')

def configure_ceos_attributes(node: Box, topology: Box) -> None:
serialnumber = node.eos.get('serialnumber',None)
systemmacaddr = node.eos.get('systemmacaddr',None)
Expand Down Expand Up @@ -107,5 +117,7 @@ def device_quirks(self, node: Box, topology: Box) -> None:
check_shared_mac(node,topology)
if 'dhcp' in mods:
check_dhcp_clients(node,topology)
if 'lag' in mods:
check_l3_lag(node,topology)
if 'eos' in node:
configure_ceos_attributes(node,topology)
6 changes: 5 additions & 1 deletion netsim/devices/eos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ interface_name: Ethernet{ifindex}
mgmt_if: Management1
loopback_interface_name: Loopback{ifindex}
tunnel_interface_name: Tunnel{ifindex}
lag_interface_name: "port-channel{lag.ifindex}"
virtualbox:
image: arista/veos
group_vars:
Expand Down Expand Up @@ -50,6 +51,8 @@ features:
ipv6: true
network: true
import: [ bgp, ospf, ripv2, connected, vrf ]
lag:
passive: True
mpls:
6pe: true
bgp: true
Expand All @@ -73,7 +76,8 @@ features:
expanded: True
sr: true
stp:
supported_protocols: [stp,rstp,mstp,pvrst] # See https://www.arista.com/assets/data/pdf/Whitepapers/STPInteroperabilitywithCisco.pdf
# See https://www.arista.com/assets/data/pdf/Whitepapers/STPInteroperabilitywithCisco.pdf
supported_protocols: [ stp, rstp, mstp, pvrst ]
enable_per_port: True
port_priority:
max: 240
Expand Down

0 comments on commit e4cf2a6

Please sign in to comment.