Configure Ethernet Ports for Devices
Configuring ports can be done in one of two ways listed below.
Using the Network Manager GUI
Using this method is simpler than modifying the /etc/network/interfaces file, but requires a visual interface to the ECU. In multi-ECU setups see the following section on configuring using /etc/network/interfaces This method should not be used on the Drive PX2.
Open the Network Connections Screen by selecting the ethernet or wifi symbol in the desktop top toolbar
or
Select the interface you would like to change from the connections screen and select "Edit"
From the "Editing" window select the "IPv4 Settings" tab
From the "IPv4 Settings" tab change the "Method" to "Manual" and "Add" and address to the table below
Put the address you would like to assign to the port into the "Address" cell. Assign a netmask of 16 (255.255.0.0) or 24 (255.255.255.0) depending on the application. Typically 24 is what is required except for connecting to an unconfigured FLIR (PointGrey) camera using FlyCap2 where 16 is required. You can leave the gateway undefined unless otherwise required.
Modifying the /etc/network/interfaces File
This method is prone to errors and typically needs a computer restart to function without problems, but is a long time method in linux environments for altering network interfaces.
Find the enumerated interface names by opening a new terminal (
Ctrl + Alt+ t) and running eitherifconfig -aorip addr show. On Ubuntu 16.04 interfaces are typically named beginning with "enp" on Ubuntu 14.04 they may be named starting with "eth"
orTake note of the interface you would like to define and open the
/etc/network/interfacesfile with root privilegesgksudo gedit /etc/network/interfacesAfter logging in with the correct password you should be presented with the file to be edited
Add a configuration for the interface following the structure defined below.
auto <interface name> iface <interface name> inet static address <IP Address (192.168.1.100)> netmask <netmask in IP format (255.255.255.0)>Restart the ECU for changes to take full effect.