Tech Tip originally posted by Edmund Roche-Kelly 09 Nov 2012
This tech tip describes how to set up and network EOS VMs in VirtualBox. The examples are based on a vanilla installation of VirtualBox 4.2.4 on Mac OS X Version 10.7.4. By the end of the post, we will have 4 EOS VMs connected together with remote ssh access.
Install VirtualBox and download vEOS images
VirtualBox is “a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL) version 2.” It can be downloaded from here. Installation on Mac OS is simply running the dmg image. We need to download two files – Aboot for VirtualBox and the EOS flash file (Access to the software download page of www.aristanetworks.com required). Save these files somewhere you’ll remember when creating the VMs in VirtualBox.
Aboot for VirtualBox — https://www.arista.com/support/download/vEOS/Aboot-veos-2.0.8.iso
EOS 4.13.7 flash file — vEOS-4.13.7M.vmdk
Adding EOS VMs to VirtualBox There are a number of steps to get our 4 VMs installed.
1. Add a VM with 1 GB of memory using the EOS flash file as the primary master IDE drive and the Aboot ISO as the primary slave.
Note: You should remove any SATA controllers from your configuration even if they are unused. Failure to remove SATA controllers will result in boot issues.
2. Configure 4 network interfaces – one management interface and 3 internal networks. The internal networks represent the inter-switch links in the diagram above. Each inter switch link is a separate internal network, e.g. vEOS1 to vEOS2 is internal network 1 and vEOS3 to vEOS4 is internal network 6. The management interface can be NAT or Bridged. We use NAT in this example. Check the VirtualBox manual for more details.
Note: There are known issues with vlan tags being stripped by the Intel adapter type in Virtualbox. If you have issues with vlan tags please try the PCnet-FASTIII adapter type.
3. Clone this VM for each additional switch required, changing the internal networks to be unique for each interswitch link.
Follow along with this video to get all the VMs setup:
Configuring Networking and ssh access VirtualBox uses an internal DHCP server to assign addresses to NAT interfaces. Network Adapter 1 is on the 10.0.2.0/24 network with a default gateway of 10.0.2.2. We can assign addresses from this subnet to the management1 interfaces of the VMs. To allow SSH access, we need to set up port forwarding. This can be done using the VBoxManage command or via the GUI.
% VBoxManage modifyvm <VM> --natpf1 "guestssh,tcp,,2222,10.0.2.19,22"
Another video shows how all this is done (best viewed fullscreen for the cli interaction)
Configuring the VMs Now that we have ssh access, we can configure EOS as we would a physical switch. For example, here we bring up OSPF between two of the VMs (only one side is shown).
sw1#sho lldp neighbors Last table change time : 0:00:04 ago Number of table inserts : 1 Number of table deletes : 0 Number of table drops : 0 Number of table age-outs : 0 Port Neighbor Device ID Neighbor Port ID TTL Et3 sw2 Ethernet1 120 sw1#conf t sw1(config)#int loop0 sw1(config-if-Lo0)#ip add 22.214.171.124/32 sw1(config-if-Lo0)#int e 3 sw1(config-if-Et3)#no switchport sw1(config-if-Et3)#ip add 10.1.12.1/24 sw1(config-if-Et3)#router ospf 1 sw1(config-router-ospf)#network 10.1.0.0/16 area 0 sw1(config-router-ospf)#netw 126.96.36.199/32 area 1 sw1(config-router-ospf)# sw1(config-router-ospf)#sho ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 188.8.131.52 1 FULL/DR 00:00:32 10.1.12.2 Ethernet3 sw1(config-router-ospf)#ping 184.108.40.206 source 220.127.116.11 PING 18.104.22.168 (22.214.171.124) from 126.96.36.199 : 72(100) bytes of data. 80 bytes from 188.8.131.52: icmp_req=1 ttl=64 time=5.10 ms 80 bytes from 184.108.40.206: icmp_req=2 ttl=64 time=4.18 ms 80 bytes from 220.127.116.11: icmp_req=3 ttl=64 time=8.80 ms 80 bytes from 18.104.22.168: icmp_req=4 ttl=64 time=4.25 ms 80 bytes from 22.214.171.124: icmp_req=5 ttl=64 time=7.53 ms --- 126.96.36.199 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 24ms rtt min/avg/max/mdev = 4.188/5.976/8.804/1.863 ms, ipg/ewma 6.064/5.591 ms sw1(config-router-ospf)#sho ip route 188.8.131.52 Codes: C - connected, S - static, K - kernel, O - OSPF, IA - OSPF inter area, E1 - OSPF external type 1, E2 - OSPF external type 2, N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type2, B I - iBGP, B E - eBGP, R - RIP, A - Aggregate O IA 184.108.40.206/32 [110/20] via 10.1.12.2 sw1(config-router-ospf)#
VM Properties submitted by Edmund Roche-Kelly
Here are the properties of an vm using the generic Aboot-veos-2.0.8.iso:
$ VBoxManage showvminfo “demo” Name: vEOS Guest OS: Fedora UUID: 10c2019e-6b59-4089-b150-077f5e5238da Config file: /Users/edmundroche-kelly/virtualbox/demo/demo.vbox Snapshot folder: /Users/edmundroche-kelly/virtualbox/demo/Snapshots Log folder: /Users/edmundroche-kelly/virtualbox/demo/Logs Hardware UUID: 10c2019e-6b59-4089-b150-077f5e5238da Memory size: 1024MB Page Fusion: off VRAM size: 12MB CPU exec cap: 100% HPET: off Chipset: piix3 Firmware: BIOS Number of CPUs: 1 Synthetic Cpu: off CPUID overrides: None Boot menu mode: message and menu Boot Device (1): Floppy Boot Device (2): DVD Boot Device (3): HardDisk Boot Device (4): Not Assigned ACPI: on IOAPIC: off PAE: off Time offset: 0 ms RTC: UTC Hardw. virt.ext: on Hardw. virt.ext exclusive: off Nested Paging: on Large Pages: on VT-x VPID: on State: running (since 2013-06-05T03:49:32.760000000) Monitor count: 1 3D Acceleration: off 2D Video Acceleration: off Teleporter Enabled: off Teleporter Port: 0 Teleporter Address: Teleporter Password: Storage Controller Name (0): IDE Controller Storage Controller Type (0): PIIX4 Storage Controller Instance Number (0): 0 Storage Controller Max Port Count (0): 2 Storage Controller Port Count (0): 2 Storage Controller Bootable (0): on IDE Controller (0, 0): /Users/edmundroche-kelly/Downloads/vEOS-4.13.7M.vmdk (UUID: be88216f-cf2c-4c30-ad18-77c515953f87) IDE Controller (0, 1): /Users/edmundroche-kelly/Downloads/Aboot-veos-2.0.8.iso (UUID: 05bdaec6-0191-44fb-a5d5-a14f38a8f5be) NIC 1: MAC: 0800277A4ED6, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny NIC 1 Settings: MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64) NIC 2: MAC: 080027B81932, Attachment: Internal Network ‘intnet1′, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: allow-vms NIC 3: MAC: 080027BDFFD0, Attachment: Internal Network ‘intnet2′, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny NIC 4: MAC: 080027E3E7B2, Attachment: Internal Network ‘intnet3′, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny NIC 5: disabled NIC 6: disabled NIC 7: disabled NIC 8: disabled Pointing Device: USB Tablet Keyboard Device: PS/2 Keyboard UART 1: disabled UART 2: disabled Audio: enabled (Driver: CoreAudio, Controller: AC97) Clipboard Mode: disabled Video mode: 720x400x0 VRDE: disabled USB: enabled
USB Device Filters:
Available remote USB devices:
Currently Attached USB Devices:
VRDE Connection: not active Clients so far: 0
Configured memory balloon size: 0 MB OS type: Fedora Additions run level: 0
No active facilities.