User Tools

Site Tools


Sidebar

NetYCE Documentation



maintenance:general:tools:ck_eth.pl

ck_eth.pl

The ck_eth.pl script, located in /opt/yce/system/, is used after instantiating a new VM for CentOS 6. Instantiating a new VM usually leads to new MAC addresses and therefore different interface names, like eth2 and eth3 (since eth0 and eth1 were assigned to the other MAC addresses).

The script will verify and rectify the interface names and configuration if needed, for which a reboot is required. If no changes are required it will report everything is OK.

This script is as of version 7.1.1 integrated in the system startup sequence.
At boot time the (NetYCE) tool /etc/init.d/net_update will be started right after the network is initialised. This runs the script /opt/yce/system/net_update.pl that will start with examining the ethernet interfaces eth0 to eth7 (note: RedHat6.x/CentOS6.x only).

If inconsistent numbering is found, the interface persistency is removed and the configuration files renamed. Then the system automatically reboots. At reboot the interfaces will be re-aligned and no action is taken by ck_eth.pl and the net_update.pl continues its task to detect ip-address changes (e.g. due to DHCP) and reconfigure NetYCE on the fly. The ck_eth.pl script will also detect MAC address changes made by the Hypervisor and reconfigure the Linux network interfaces accordingly.

Note: the script needs to be run as root.

An issue was observed with Oracle VirtualBox where the networking could not be properly configured when two or more network interfaces are used. Although the issue has nothing to do with this script, it could be inadvertently be interpreted as such.
When VirtualBox copies (or clones) a VM, the network interfaces are reinitialised and new MAC addresses assigned. The VM at boot time will then assign these new MAC addresses to the interfaces. The observed problem is that the MAC addresses on the VirtualBox side are switched. The VM and VirtualBox show the same addresses, but for different interfaces. consequently, no networking is possible although the (VM) configurations seem (and are) perfectly correct. The only means to resolve it is by manually reassigning the switched MAC addresses to the interfaces using the VirtualBox GUI.
maintenance/general/tools/ck_eth.pl.txt · Last modified: 2019/07/16 13:33 by jbosch