Difference between revisions of "Software development on Arista hardware"
(11 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
My development platform is an Arista 7148S switch and compatible devices. The firmware version used is EOS 4.7 which based on Fedora Core 12 (with some small exceptions). | My development platform is an Arista 7148S switch and compatible devices. The firmware version used is EOS 4.7 which based on Fedora Core 12 (with some small exceptions). | ||
+ | |||
+ | == Project: arp-2-bgp == | ||
+ | |||
+ | https://github.com/okoeroo/arp-2-bgp | ||
+ | |||
+ | == Helper tools == | ||
+ | |||
+ | https://github.com/okoeroo/arista-EOS-rc | ||
+ | |||
+ | == Useful commands == | ||
+ | |||
+ | === How to purge an extension that doesn't uninstall === | ||
+ | |||
+ | EOS 4.7 seems to have a bug of some sort that an RPM based package can't be uninstalled. A Python(-like) stacktrace is the result on the Switch CLI. | ||
+ | |||
+ | If the extension doesn't appear in the follow commands (could be empty), then the it's not installed as bootable: | ||
+ | On the Switch CLI | ||
+ | show boot-extensions | ||
+ | |||
+ | On the bash shell: | ||
+ | cat /mnt/flash/boot-extensions | ||
+ | |||
+ | If it doesn't exist, just hit '''reload''' on the Switch CLI or '''reboot''' on the bash shell. | ||
+ | If it does exist, edit the '''/mnt/flash/boot-extensions''' from the bash shell to not include the extension in the list and hit '''reboot'''. | ||
+ | |||
+ | == External links == | ||
+ | |||
+ | === Understand the content of the /etc/swi-version file === | ||
+ | |||
+ | http://www.aristanetworks.com/media/system/pdf/Whitepapers/Arista_EOS_parser.pdf | ||
+ | |||
+ | === Managing Extensions === | ||
+ | |||
+ | http://arisq.ylb.jp/documents/extensions | ||
+ | |||
+ | === Document website .jp === | ||
+ | |||
+ | http://arisq.ylb.jp/documents | ||
+ | |||
+ | === SWIX format === | ||
+ | |||
+ | http://arisq.ylb.jp/documents/swix-format | ||
+ | |||
+ | === RPM as Extension === | ||
+ | |||
+ | http://arisq.ylb.jp/documents/rpm-as-extension | ||
+ | |||
+ | NOTE: RPMs on EOS don't install like RPMs on a normal Linux box. When used as extensions the '''post install''' is NOT triggered. | ||
+ | |||
+ | == Unstructured notes == | ||
+ | |||
+ | The flash disk is a FAT32 disk of 2GB and by default mounted on /mnt/flash | ||
+ | |||
+ | The /mnt/flash/persistent/ directory contains the system disk images. | ||
+ | |||
+ | The file /mnt/flash/rc.eos is executed at the end of the boot (switch reload) time. It has the file /etc/swi-version sourced, exposing the EOS version. | ||
+ | |||
+ | The switch CLI is executed by the python script: | ||
+ | /usr/bin/Cli | ||
+ | If you run this shell from the admin user on the switch, then this will not succeed for all switch-CLI commands. Perform a privilege upgrade on the bash shell with "su" or let a cron job run with root privileges. | ||
+ | |||
+ | |||
+ | === Switch CLI commands of interest === | ||
+ | show ip arp | ||
+ | This exposes the IP addresses of the connected hosts and on with Vlan they reside. | ||
+ | |||
+ | show run | include network | ||
+ | Show active run information, and filter on the announced networks. | ||
+ | |||
+ | ena | ||
+ | conf t | ||
+ | Go into configuration mode | ||
+ | |||
+ | ip route 192.168.10.1/24 vlan 66 | ||
+ | Add a static route to 192.168.10.1/24 on Vlan 66 |
Latest revision as of 23:03, 18 July 2011
Development platform
My development platform is an Arista 7148S switch and compatible devices. The firmware version used is EOS 4.7 which based on Fedora Core 12 (with some small exceptions).
Project: arp-2-bgp
https://github.com/okoeroo/arp-2-bgp
Helper tools
https://github.com/okoeroo/arista-EOS-rc
Useful commands
How to purge an extension that doesn't uninstall
EOS 4.7 seems to have a bug of some sort that an RPM based package can't be uninstalled. A Python(-like) stacktrace is the result on the Switch CLI.
If the extension doesn't appear in the follow commands (could be empty), then the it's not installed as bootable: On the Switch CLI
show boot-extensions
On the bash shell:
cat /mnt/flash/boot-extensions
If it doesn't exist, just hit reload on the Switch CLI or reboot on the bash shell. If it does exist, edit the /mnt/flash/boot-extensions from the bash shell to not include the extension in the list and hit reboot.
External links
Understand the content of the /etc/swi-version file
http://www.aristanetworks.com/media/system/pdf/Whitepapers/Arista_EOS_parser.pdf
Managing Extensions
http://arisq.ylb.jp/documents/extensions
Document website .jp
SWIX format
http://arisq.ylb.jp/documents/swix-format
RPM as Extension
http://arisq.ylb.jp/documents/rpm-as-extension
NOTE: RPMs on EOS don't install like RPMs on a normal Linux box. When used as extensions the post install is NOT triggered.
Unstructured notes
The flash disk is a FAT32 disk of 2GB and by default mounted on /mnt/flash
The /mnt/flash/persistent/ directory contains the system disk images.
The file /mnt/flash/rc.eos is executed at the end of the boot (switch reload) time. It has the file /etc/swi-version sourced, exposing the EOS version.
The switch CLI is executed by the python script:
/usr/bin/Cli
If you run this shell from the admin user on the switch, then this will not succeed for all switch-CLI commands. Perform a privilege upgrade on the bash shell with "su" or let a cron job run with root privileges.
Switch CLI commands of interest
show ip arp
This exposes the IP addresses of the connected hosts and on with Vlan they reside.
show run | include network
Show active run information, and filter on the announced networks.
ena conf t
Go into configuration mode
ip route 192.168.10.1/24 vlan 66
Add a static route to 192.168.10.1/24 on Vlan 66