CCIE Routing and Switching INE Configs – About IPv6 Hex Dumps and Automatic Upload

By | 25. September 2016

INE has a great CCIE Routing & Switching v5 workbook which includes tasks and explanations about most topics covered in the v5 exam blueprint. For those labs, there are initial configs available which should be preloaded before doing the labs. Looking at the physical topology, they assume a bunch of routers (10 for normal labs) which are connected to an unmanaged switch using one of  their Gig ports. Which is quite clever, as the topology between the routers can be changed just by adding or removing new subinterfaces to the routers. They further assume that the routers being used are CSR1000v IOS-XE based devices, and GigE 1 is the port connected to the switch. Some problems arise with this set of configs:

  • What if your uplink port is not GigE1? In VIRL for example, this port is reserved for internal communication, and GigE2 must be used. On other devices (IOSv image) it might even be GigE0/1 or something like this
  • Most of the IPv6 configs and come other (DHCP for example) cannot be loaded on the router. Trying to display it using more results in the router showing us a hex dump of the file. Looks something like this:

    Basically, there is FF FE in the beginning and further 00 interleaved between every valid set of characters. This means that the file is UTF16 encoded, in particular UTF16 little endian. The router assumes plain old ASCII…
  • Some config file contain the keyword version 15.2 at the beginning and an explicit end in the end, some others do not. Normally not a big deal, but if you want to use configure replace … on the CSRs (what I would highly recommand!), then config files without both of those lines are rejected as not being valid config files.

Next thing, how to get the config files on the routers? Sure you could put them on TFTP and download every single config, but that will take hours, if not days. Time you better spend labbing, right?

Here is my solution to this problem. Plain old bash script, tested under Ubuntu and Debian (not working on Apple OS X), which handles all the issues above. It will rename the Interface, convert the encoding and add version/end statements where required. Optionally, if you have IP connectivity to the routers, it also can automatically upload the files for you. So if you do want to do that, prepare the router for accepting files via SCP:

Next, place the configs on some linux machine that can reach the routers and place the following script in the main directory. It expects INEs naming format, that means the name of the configs are folder-lab-name/Rn.txt where the folder name is the name of the lab and n the number of the router. For every router and for every lab, it will place the corresponding folder-lab-name.txt file on the bootflash in a folder called configs.

You will need to replace some things…

  • IP addresses of the routers in the beginning
  • Format of the Interface names on line 51

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.