Author Topic: Change the IP Address of a Ubuntu Server from the Terminal  (Read 528 times)

0 Members and 2 Guests are viewing this topic.

rsutter

  • Administrator
  • Hero Member
  • *****
  • Posts: 515
  • I cut the board twice and it's still too short.
    • View Profile
Change the IP Address of a Ubuntu Server from the Terminal
« on: September 02, 2022, 05:07:27 PM »
Hello All,
When I changed my Internet provider over to Starlink, I had to set the Starlink router to Bypass Mode in order to continue using my Netgear Orbi mesh router to assign ip addresses.

After bypassing the Starlink router, the address for all of my networked devices spontaneously changed from the format 192.168.1.xx to 10.0.0.xx

There was one exception; my Ubuntu server that I call Thinkserver remained unchanged at 192.168.1.61

As a result, I could only connect to Thinkserver from the PCs on my network.

Machines running Linux, Mac OS or Raspberry Pi refused to connect to Thinkserver. To fix this, I wanted to change Thinkserver's ip address to 10.0.0.61

These are the steps that I took to change Thinkserver's ip address

On Thinkserver, I went to the Terminal and typed ifconfig

I made note of the values listed there

The relevant information was

eno1 (This is the onboard Ethernet/wired adapter)
inet 192.168.1.61
Netmask 255.255.255.0
Bcast 192.168.1.255

To change my ip address, I typed sudo ifconfig eno1 down (Turns off network)

sudo ifconfig eno1 10.0.0.61 netmask 255.255.255.0
(Ethernet adapter, new inet address, netmask address)

sudo ifconfig eno1 up (Turns network back on)

ifconfig (Confirms whether the requested changes were made)

The operation was successful. Thinkserver is now visible from all devices.

This content is also available on YouTube at https://youtu.be/HmQXqf0pgCI

Ralph Sutter
« Last Edit: September 03, 2022, 09:46:45 AM by rsutter »