Howto activate network device

I really screwed up this time. I was trying to reset the network address and somehow it would not change. I then got the bright idea to deactivate the network device.

Well, how do I activate it again?

So, I found this command called “dhclient” that reactivated the ethernet device and set the network to DHCP.
I was then able to log in with my browser. I tried to reset the IP address to manual and to another ip address but somehow, all that did was make the DHCP address manual.


Every time I try to change the ip address, it “thinks” for about 30 seconds and returns to this screen unchanged.

What am I doing wrong? How do I change the ip address?

OKAY!!

I answered my own question again.

I found the solution on this page. https://www.cyberciti.biz/faq/linux-ip-command-examples-usage-syntax/#3

Here is the command I used to reset the ip address of the server from the command line.

Assigns the IP address to the interface

The syntax is as follows to add an IPv4/IPv6 address:
# ip a add {ip_addr/mask} dev {interface}

To assign 192.168.1.200/255.255.255.0 to eth0, enter:
# ip a add 192.168.1.200/255.255.255.0 dev eth0
OR
# ip a add 192.168.1.200/24 dev eth0

That worked and I am back in business.

1 Like

@fwinograd Hello again.

We basically just use networkmanager for our network config - so if you end up in a spot, such as you indicated in this thread, then nmcli the NetworkManager CLI program is your friend.

Hope that helps, and the nmcli approach is more likely to maintain compatibility network config wise with what we expect to see as we use the same mechanisms it uses to read and write our network config.

2 Likes

Thanks, I appreciate the advise. Hopefully, I won’t do that again.