0

On Ubuntu 22.04.2 I am using a USB-Ethernet adapter with the identifier enx00e04c680202 which shows up in ifconfig:

enx00e04c680202: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:e0:4c:68:02:02  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I want to set a static IP address for this adapter to 192.168.200.100, which should be the same after a reboot. I always want this adapter enx00e04c680202 to have the static IP address 192.168.200.100 even when I reboot the laptop.

Following an answer given HERE I added a file /etc/network/interfaces with the following content:

iface enx00e04c680202 inet static 
    address 192.168.200.100
    netmask 255.255.255.0
    broadcast 192.168.200.255

However, if I now set the IP address of that adapter manually to 192.168.200.100 using the command

sudo ifconfig enx00e04c680202 192.168.200.100

or restart the network and reboot the laptop, the IP address of the above adapter might be the same(!) or is changed (see the example of the output of ifconfig above -> IP address is NOT 192.168.200.100).

So how to fix this problem? How to make sure that after every reboot/power off and power on the IP address of the adapter enx00e04c680202 is 192.168.200.100?

Additional information

$ cat /etc/netplan/01-network-manager-all.yaml 
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

There is no other file in /etc/netplan/.

In addition, in the network settings this adapter is not even activated:

enter image description here

but it works! I can connect to connected devices on that adapter. I do not understand how I can connect if it is not activated???

Alex
  • 1,115

0 Answers0