Configuration for 2nd ethernet port (Xpack4 main board)
Question
How to configure the second ethernet adapter of the main bord of the XPack4?
Solution
The configuration of the ethernet adapters is based on the Linux standard ifconfig command, similarly as described in the following documentation:
https://www.computerhope.com/unix/uifconfi.htm
In order to save this configuration so that these settings are executed automatically when the XPack4 is booting, you need to proceed this way:
1) Retrieve referenced CM/HIL installation
One of the settings applied during the last execution of the Realtime System Setup program is the specification of which CM/HIL version must be used by the XPack4. By default this file is saved under C:/tftpboot/pxelinux.cfg/default
If the folder path of the TFTP boot directory that is set in the Realtime System Setup GUI (upper right frame intitled Settings) differs from the standard path (C:/tftpboot) then the path of the above file will differ consequently too.
You should not edit this configuration file but you can open it in a text editor to check its information in this case. Particularly, the nfsroot variable defined inside of this file must be checked. Its value specifies a path to a xeno_rt folder related to a CM/HIL installation which enables you to retrieve which CM/HIL version is referenced.
2) Retrieve required configuration script
The xeno_rt folder mentioned above will be mapped as the file system root on your XPack4 computer. As the XPack4 is a Linux based computer, its file system also includes the important folder /etc that contains system related configuration files.
https://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/etc.html
https://www.linuxnix.com/linux-directory-structure-explainedetc-folder/
Navigate on your host computer down to the xeno_rt folder and to the etc folder it contains.
Within the Realtime System Setup you must always specify, which IP address will correspond to the MAC address of the main adapter of the XPack4 main board. During this step you must also specify an alias to this IP address, that is to say a short text that will refer to this IP address (and by extension, to this XPack4 from the host computer). By default the suggestions are 192.168.0.241 for the IP and rt1 for the alias of the first XPack4 to configure.
Inside of the system configuration folder /etc there is a configuration file named bootrc that provides common settings for the XPack4 during the end of its boot sequence. Similar to above section, you should not edit this file. Nevertheless another file (that is executed to apply settings specific to one XPack4) is called at the end of this common configuration file and should be used for this purpose. The filtering is done based on the XPack4 alias (added as file extension). So after the common configuration applied by the bootrc file, the bootrc.rt1 file applies specific settings to the XPack4 named as rt1.
If the alias to your XPack4 set in the Realtime System Setup differs from rt1 then search for the bootrc file with the file extension corresponding to the alias you set.
If the bootrc.rt1 file doesn't exist then simply create it based on the template file named bootrc.hostname.
3) Extend the configuration file for the 2nd ethernet adapter
Open your bootrc.rt1 file in a text editor and add the below command line to configure your second ethernet adapter with the IP address and the network mask corresponding to your particular use case. The provided values below are just a possible example that do not necessarily comply with your use case.
ifconfig eth1 192.168.166.177 netmask 255.255.255.0
To finish, save this file and reboot the XPack4. This is necessary because the bootrc.rt1 is a configuration file only executed during booting of the XPack4 named rt1 as explained above. After it rebooted you can for example check the adapter configuration with the mioutil command once logged on it.
- Date: 13.05.2020
- Product: CarMaker/HIL
- Version: 8.1
- Component: Xpack4
- Language: English
Tags
ifconfigXeno
Realtime System
HIL