Determining the IP address

Connect the IPC to your network via a network cable to access the Linux® system remotely. For remote access, you need the IP address of the Linux® system. The following options are available to determine the IP address of the Linux® system in your network:

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 monitor, you can log in with the username Administrator and password 1. After you have logged into the Linux® system locally, enter the following command for compact, tabular display of the IP address:

ip --brief addr

In the case of non-English keyboard layouts, the hyphen '-' may be in a different position on the keyboard.

Enter the command ip addr show in the console for a complete and detailed output of the network interfaces. This output shows each network interface with all details: name, status, MTU, MAC address, IP addresses (IPv4 & IPv6), broadcast, flags, etc.

ip addr show

The output looks as follows:

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:~$

Network interfaces marked with "UP" are automatically assigned an IP address (this does not necessarily require a DHCP server to be present in the network). In this example, the network interface end0 has been assigned the IPv4 address 192.17.42.14/22 and the IPv6 address fe80::201:5ff:fe3d:6913/64.

Determine IP address without monitor

If your Windows and Linux® systems are in the same Ethernet segment, you can determine the local IPv6 address of the Linux® system as follows:

First identify the network interface of your Windows system with the command ipconfig. Search the output for the desired network connection and note the interface number 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 on the local network. %?? is the interface number (interface index), which specifies the network interface to use for sending a ping. For example, if the interface number of your network interface was 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 on 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 starts 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 and enter the IP address:

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

You can use the IPv6 address determined to access the Linux® system via an SSH connection. 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 IPv6 address using the MAC address

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 middle, placing the 16-bit sequence FFFE between the two halves. This results in a 64-bit address:
3. The universal/local bit (bit 7 from the left in the first octet) is then inverted.
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.