Network settings

How to change the network settings on your controller.

This chapter will explain how to change the IP address of your controller.

Network adapter configuration

First log in to the controller. Either by connecting a keyboard and screen to the controller or logging in through ssh as explained in Remote Access and file transfer.

  1. go open the interfaces file.

    sudo nano /etc/network/interfaces
    
  2. in the file find this selection of text.

    # Wired or wireless interfaces
    auto eth0
    iface eth0 inet static
        address 192.168.2.100
        netmask 255.255.255.0
        gateway 192.168.2.100
    
  3. Change the address and the gateway to the desired values. Or switch the interface to DHCP if you connect the controller to a router:

    # Wired or wireless interfaces
    auto eth0
    iface eth0 inet dhcp
    
  4. Save the file and exit.

If you want to modify the system’s hostname you can change it by modifying

sudo nano /etc/hostname

or

sudo nano /etc/hosts
  1. Restart the network to apply the new settings.

    sudo /etc/init.d/networking restart
    

It is possible that due to the network change the communication certificate has become invalid. For security reasons, the certificate is only valid for the ip address and hostname of the controller. MCX-Linux OS provides a certificate renewal service that checks the certificate and renews it if either it has expired or if the host name or ip address has changed. To renew the certificate, either reboot the controller or restart the cert-gen service:

sudo /etc/init.d/cert-gen restart

Optionally, you can modify the certificate settings by modifying the cert-gen config file:

sudo nano /usr/share/cert-gen/config.json

After your modification restart the service to generate the new certificate.

EtherCAT adapter config

The EtherCAT master needs to know which card it will use for EtherCAT. The EtherCAT network card should not be configured for normal networking.

To change the EtherCAT network settings do:

sudo nano /etc/ethercat.conf

The important settings in this file are which network adapter to use and which driver to use.

You can select your network adapter by modifying the following line:

MASTER0_DEVICE="eth1"

To select the driver type, change the line:

DEVICE_MODULES="generic"

Refer to the EtherLAB documentation for a description of all available configuration options.

Last modified June 9, 2022: maintainance --> maintenance (7439acba)