Skip to content

Instantly share code, notes, and snippets.

@tuklusan
Created October 29, 2021 00:07
Show Gist options
  • Save tuklusan/b400f2c254bf2b02e681cf808bb7f64d to your computer and use it in GitHub Desktop.
Save tuklusan/b400f2c254bf2b02e681cf808bb7f64d to your computer and use it in GitHub Desktop.
Load HECnet Node List DECnet Node Database into CISCO Router - CISCO IOS used for DECnet over GRE Tunneling: See https://supratim-sanyal.blogspot.com/2017/09/decnet-phase-iv-copy-node-database-from.html
#!/bin/bash
#
# CISCO needs commands of the form
# DECNET HOST PUFF 1.22
#
OUTFILE="nodenames-cisco-ios"
TMPFILE="/tmp/hecnet-cisco-temp.tmp"
curl -sNm 60 http://mim.update.uu.se/hecnod | dos2unix | egrep "^[0-9]" | cut -f 1-2 -d " " | sed -re 's/^/ /' | sed -re 's/[(]/DECNET HOST /' | sed -re 's/[)]//' > ${TMPFILE}
echo "DECNET HOST MIM 1.13" > ${OUTFILE}
while read a b c d; do echo $b $c $d $a; done < ${TMPFILE} >> ${OUTFILE}
echo "EXAMINE THIS CAREFULLY BEFORE COPY PASTE INTO CISCO ROUTER"
echo "Then copy the contents to clipboard, TELNET TO THE ROUTER IP, ena, config t, PASTE from clipboard, end, write mem, logout"
ls -l ${OUTFILE}
sync;sync;sync
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment