The cookie settings on this website are set to 'allow all cookies' to give you the very best experience. Please click Accept Cookies to continue to use the site.

How to install Cisco iOS-XR on Edgecore 7816?

Posted by admin on 2019 Sep 23rd

Let’s begin by setting up a DHCP server to respond with a default-url option and a web server with the ONIE-compatible NOS installer for IOS-XR.

The relevant ISC-DHCP server config snippet is shown below:


host AS7816-64X {
  hardware ethernet a8:2b:b5:87:9f:f4;
  fixed-address 172.30.0.60;
  next-server 172.30.0.22;
  option default-url = "http://172.30.0.22/AS7816-64X/iosxrwb-k9.amd64.installer";
  if exists user-class and option user-class = "exr-config" {
    filename = "http://172.30.0.22/AS7816-64X/scripts/as7816-64x_nso_ztp.py";
  }
}

Notice the yellow highlighted default-url pointing to the ONIE-compatible NOS installer for IOS-XR: iosxrwb-k9.amd64.installer. This is the native deployment model described in the previous section. The installer contains the complete Software Stack replete with the kernel modules that help integrate with the platform and the ASIC. Further it contains a Wind River Linux (WRL) distribution (rootfs and kernel).

Let’s attempt to fetch and install this image by rebooting the network device.

NOTE: If there is a NOS already installed on the device, then the NOS might have options to force the device to boot into ONIE mode directly. If it does not, make sure you select the ONIE loader when the relevant screen pops up upon reboot.

Once selected, the ONIE loader looks something like:

onie_grub_menu

As is evident, I begin by selecting the Uninstall OS option first. This will force the device to erase internal mass storage devices and remove the existing NOS, before rebooting and attempting a fresh install through ONIE.

onie_grub_menu

Upon reboot, the Install OS option should automatically get selected, thereby triggering the download of the ONIE-compatible installer image of IOS-XR based on DHCP interactions with the dhcp server:

onie_grub_menu


Info: Attempting file://dev/sda3/onie-installer-x86_64.bin ...
Info: Attempting file://dev/sda3/onie-installer ...
Info: Attempting file://dev/sda3/onie-installer.bin ...
Info: Attempting http://172.30.0.22/AS7816-64X/iosxrwb-k9.amd64.installer ...
ONIE: Executing installer: http://172.30.0.22/AS7816-64X/iosxrwb-k9.amd64.installer
installer: computing checksum of original archive
installer: checksum is OK
installer: extracting pad
1+0 records in
1+0 records out
512 bytes (512B) copied, 0.000014 seconds, 34.9MB/s
installer: copying file before resetting pad
installer: resetting pad
1+0 records in
1+0 records out
512 bytes (512B) copied, 0.000012 seconds, 40.7MB/s
installer: extracting shar into /tmp/sfx-dFtTra
installer: invoking installer xrinstaller.sh
Found installer tmpfs on /tmp/sfx-dFtTra (/tmp) using opts rw,noatime
Unpacking ONL installer files...
Extracting from /tmp/sfx-dFtTra/onie-installer.zip: iosxrwb-k9.iso ...
Archive:  /tmp/sfx-dFtTra/onie-installer.zip
  inflating: iosxrwb-k9.iso
Extracting initrd to /tmp/sfx-dFtTra/initrd-F3ONm5

Awesome! The default-url option set up on the dhcp server allowed ONIE to pick up the url for the NOS installer and start expanding and booting it.

The next step is ZTP - enabling IOS-XR on the whitebox platform automatically ensures that capabilities such as ZTP become available for use. If you haven’t heard about ZTP yet, hop over to these great tutorials and blogs on xrdocs:

https://xrdocs.github.io/software-management/tutorials/2016-08-26-working-with-ztp/ https://xrdocs.github.io/software-management/blogs/2017-09-21-ios-xr-ztp-learning-through-packet-captures/

Notice the red-marked filename field in the DHCP server config shown earlier. This field is utilized during the ZTP phase to return a custom python script called as7816-64x_nso_ztp.py to execute on IOS-XR once it comes up. The captured reply from the DHCP server is shown below - notice the returned filename, in line with the server configuration.


  TIME: 2018-03-11 06:12:10.692
    IP: 172.30.0.25 (0:50:56:b7:50:d3) > 172.30.0.60 (a8:2b:b5:87:9f:f4)
    OP: 2 (BOOTPREPLY)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: a8e9d54c
  SECS: 0
 FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 172.30.0.60
SIADDR: 172.30.0.22
GIADDR: 0.0.0.0
CHADDR: a8:2b:b5:87:9f:f4:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: http://172.30.0.22/AS7816-64X/scripts/as7816-64x_nso_ztp.py
OPTION:  53 (  1) DHCP message type         5 (DHCPACK)
OPTION:  54 (  4) Server identifier         172.30.0.25
OPTION:  51 (  4) IP address leasetime      86400 (24h)
OPTION:   1 (  4) Subnet mask               255.255.255.0
OPTION:   3 (  4) Routers                   172.30.0.1
OPTION:   6 (  4) DNS server                172.30.0.25
OPTION:  12 ( 10) Host name                 AS7816-64X
OPTION: 114 ( 56) URL                       687474703a2f2f31 http://1
					    37322e33302e302e 72.30.0.
					    32322f4153373831 22/AS781
					    362d3634582f696f 6-64X/io
					    73787277622d6b39 sxrwb-k9
					    2e616d6436342e69 .amd64.i
					    6e7374616c6c6572 nstaller                 
OPTION:  28 (  4) Broadcast address         172.30.0.255
OPTION:  15 ( 11) Domainname                cisco.local
---------------------------------------------------------------------------

This script is set up to configure an admin user on the system and apply a configuration that enables basic features such as ISIS, LACP etc.

In the end, we are presented with a familiar login prompt if we connect to the box over SSH:


cisco@server:~/$ ssh cisco@172.30.0.61
The authenticity of host '172.30.0.61 (172.30.0.61)' can't be established.
RSA key fingerprint is 45:cb:02:4a:b7:c9:05:ff:6d:74:26:b8:c0:0d:9c:e5.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.30.0.61' (RSA) to the list of known hosts.
Password:

RP/0/RP0/CPU0:leaf3#
RP/0/RP0/CPU0:leaf3#
RP/0/RP0/CPU0:leaf3#show version
Fri Mar  2 10:15:33.919 UTC

Cisco IOS XR Software, Version 6.5.1.04I
Copyright (c) 2013-2018 by Cisco Systems, Inc.

Build Information:
 Built By     : balsup
 Built On     : Fri Mar  2 02:04:10 PST 2018
 Build Host   : vxr-slurm-124
 Workspace    : /nobackup/balsup/release
 Version      : 6.5.1.04I
 Location     : /opt/cisco/XR/packages/

Accton_as7816_64x () processor
System uptime is 19 minutes

RP/0/RP0/CPU0:leaf3#
RP/0/RP0/CPU0:leaf3#

And there you have it - IOS-XR running on an OCP compliant platform.

For complete blog, please consult https://xrdocs.io/cloud-scale-networking/blogs/2018-03-08-enabling-ios-xr-on-third-party-network-hardware/