Error in the network connection on my Linux machine

BenTom07

New Member
Joined
Dec 7, 2022
Messages
7
Reaction score
0
Credits
128
I am trying to set up a network connection on my Linux machine, but I am having trouble with the networking commands. I want to assign the IP address 192.168.1.100 to my network interface eth0, but the command I am using is not working.
Here is the code I am using:
Code:
ifconfig eth0 192.168.1.100
The error message I get is: "SIOCSIFADDR: No such device". I realize that the ifconfig command is deprecated and I need to use the ip command instead. The correct code should be:
Code:
ip addr add 192.168.1.100/24 dev eth0
This will assign the IP address 192.168.1.100 to the eth0 network interface. I also need to make sure that the network interface is up and running before assigning the IP address. From this article, I understand that once a server is operational, it can be used to assign an IP address to an interface and enable or disable the interface as needed but I need more information. I can do this with the following command:
Bash:
ip link set dev eth0 up
 


A few questions to get the context:
What distro is running?
Which networking configuration tool is being used to configure the network?
What is the output of:
Code:
ip a
"No such device" may simply mean the name of the device name is different. The ip command will clear that up.
 


Top