Determining the IP address

For all subsequent work with the industrial PC and the system, the IP address of the system is required. Using the IP address, remote access via SSH, the Beckhoff Device Manager (web interface) or working with TwinCAT is possible, for example.

Determine IP address with monitor

There are several ways to determine the IP address to access the device via the network. If you have connected a local monitor, you can log in with the user "Administrator" and the password "1".

Enter the command ip addr show in the console to output all available Ethernet interfaces in the system:

Administrator@BTN-000twtq7 ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: end1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 00:01:05:3d:69:12 brd ff:ff:ff:ff:ff:ff
3: end0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:01:05:3d:69:13 brd ff:ff:ff:ff:ff:ff
    inet 192.17.42.14/22 metric 1024 brd 192.17.43.255 scope global dynamic end0
       valid_lft 689597sec preferred_lft 689597sec
    inet6 fe80::201:5ff:fe3d:6913/64 scope link
       valid_lft forever preferred_lft forever
Administrator@BTN-000twtq7:~$

By default, the Ethernet interfaces are configured to receive an IP address from a local DHCP server. In this sample, this is the IP address: 192.17.42.14 which was assigned for the interface end0 via which the industrial PC was connected to the network.

Determine IP address without monitor

You can access the system via SSH from a Windows system. Some basic network diagnostic tools and commands in PowerShell are used for this purpose.

First identify the network interface of your Windows system with the command ipconfig. Search for the desired network connection in the output and make a note of the interface number, which is labeled %??. This number is required to correctly ping the IPv6 link-local address. The output in PowerShell could look like this:

Ethernet adapter Ethernet 5:
   Connection-specific DNS Suffix .. : example.com
   Link-local IPv6 Address . . . . . : fe80::5197:ef72:a352:b7f7%17
   IPv4 Address. . . . . . . . . . . : 172.17.42.17
   Subnet Mask . . . . . . . . . . . : 255.255.252.0
   Default Gateway . . . . . . . . . : 172.17.40.1

Use the command ping ff02::1%?? to check which IPv6-enabled devices are active and accessible in the local network. %?? stands for the interface number (interface index), which specifies the network interface via which the ping is to be sent. Assuming that the interface number of your network interface is 17, the command would look like this:

ping ff02::1%17

If the ping is successful, you will receive a list of the responses from the various devices in the network:

Pinging ff02::1%10 with 32 bytes of data:
Reply from fe80::201:5ff:fe50:5911: icmp_seq=1 ttl=64 time<1 ms
Reply from fe80::201:5ff:fe3d:6913: icmp_seq=1 ttl=64 time<1 ms
...

Depending on your network and firewall settings, the request may time out. However, this is not a problem and you can continue with the command Get-NetNeighbor.

Use the following command in PowerShell to determine the MAC address of the target system:

Get-NetNeighbor -LinkLayerAddress 00-01-05* -AddressFamily IPv6

The output lists the MAC addresses and the corresponding IPv6 addresses of all devices in the network whose MAC address begins with 00-01-05. Identify the Beckhoff RT Linux® system using the MAC address on the name plate of the industrial PC and make a note of the IPv6 address.

Use the following ping command to ensure that the target system can be reached. Replace %?? with the corresponding interface number:

ping fe80::201:5ff:fe3d:6913%17

Finally, you can establish an SSH connection to the target system. To do this, use the following command:

ssh Administrator@fe80::201:5ff:fe3d:6913%17
Determining the IP address 1:Fig.1: Remote access via SSH using Windows PowerShell.

Determine IP address without PowerShell

If PowerShell cannot be used, the IP address can be derived from the MAC address using the EUI-64 method instead. A typical MAC address consists of 48 bits and is represented in the form XX:XX:XX:XX:XX:XX. Example: 00:1A:2B:3C:4D:5E.

1. Split the 48-bit MAC address into two 24-bit halves.
2. Insert the 16-bit FFFE mark in the center: the 16-bit sequence FFFE is inserted between the two halves. This results in a 64-bit address:
3. Invert the 7th bit of the first byte (universal/local bit). In the example address 00:1A:2B:FF:FE:3C:4D:5E, the 7th bit changes from 00 (binary 00000000) to 02 (binary 00000010).
4. Convert to IPv6 format and add prefix: The modified 64-bit address is combined with the link-local prefix fe80:: to obtain the full IPv6 address:
5. A ping command ping <IPv6-Adresse> can be used to check the accessibility and connectivity of a device in the local network.