Cisco IOL Nodes starts and stops for L2 image x86_64_crb_linux_l2-adventerprisek9-ms.bin
Make sure that License file is generated with python3
cd /opt/unetlab/addons/iol/bin
ls -l iourc
cat iourc
hostname
! need to check hostname of the server
The iourc file should look broadly like:
[license]
pnetlabs = your-valid-license-value;
The name before = must match the current PNETLab hostname exactly. If the server hostname was changed, restored, cloned or reinstalled, the existing licence may no longer match. PNETLab specifically identifies a corrupted iourc file as a common reason for IOL devices immediately stopping.
Also remove Windows line endings:
sed -i 's/\r$//' /opt/unetlab/addons/iol/bin/iourc
chmod 644 /opt/unetlab/addons/iol/bin/iourc
chown root:unl /opt/unetlab/addons/iol/bin/iourc
cd /opt/unetlab/addons/iol/bin
sed -i 's/\r$//' iourc
chown root:unl iourc
chmod 644 iourc
/opt/unetlab/wrappers/unl_wrapper -a fixpermissions
View file again
hostname
cat -A iourc
Expected:
pnetlab
[license]$
pnetlab = c833425160bc61ec;$
There must be no ^M at the end of either line.
/opt/unetlab/wrappers/unl_wrapper -a fixpermissions
Apply the specific L2 fix and check for the known xml.cisco.com issue
grep -n "xml.cisco.com" /etc/hosts
getent hosts xml.cisco.com
If it returns something such as:
127.0.0.1 xml.cisco.com
Remove that entry
sed -i '/xml.cisco.com/d' /etc/hosts
Then add the DNS-blocking rule:
iptables -I OUTPUT 1 -p udp --dport 53 \
-m string --hex-string "|03|xml|05|cisco|03|com" \
--algo bm -j DROP
Confirm the rule exists:
iptables -L OUTPUT -n -v --line-numbers | head -n 15
Clean the old sockets and fix permissions:
rm -rf /tmp/netio*
rm -rf /opt/unetlab/tmp/1/1/*
chmod 1777 /tmp
/opt/unetlab/wrappers/unl_wrapper -a fixpermissions
One important point: the iptables rule may disappear after a PNETLab reboot. Check whether persistent rules are installed:
dpkg -l | grep iptables-persistent
When available, save the working rule:
mkdir -p /etc/iptables
iptables-save > /etc/iptables/rules.v4
Leave a Reply