2

I'm trying to figure out how I can assign a static IP address to my default ethernet adapter eth0 - all attempts so far have been fruitless and ended up in frustration.

I am running Ubuntu 14.04.5 LTS on an NVIDIA Jetson TK1 ARM platform.

Ideally, I want the interface eth0 to assume an IP address such as 192.168.0.xxx as per our company network scheme.

Using network-manager, I've tried (and failed) to manually assign an IP address. However, checking with ifconfig reports an altogether different IP which appears to be DHCP assigned (the IP address changes very regularly).

I have tried un-installing network manager and using the /etc/network/interfaces file to statically assign an address to eth0 however following this, I get a lot of RTNETLINK answers: Network is unreachable errors and no IP ever appears to be assigned to eth0.

Why does network-manager not seem to work in this instance? I have a vino VNC server running on my Ubuntu TK1 platform and the only IP address which allows me to connect is the DHCP address allocated away from network-manager

Confused!

UPDATE

After re-visiting this, I'm no closer to figuring out what is going on.

What I have tried since the original message was posted:

  1. Disabled network-manager
  2. Assigned an IP address on a different subnet to our company network so that the DHCP server cannot allocate it an IP address
  3. Set up a static IP address in /etc/network/interfaces with the following information

>

auto eth0
iface eth0 inet static
address 192.168.200.1
netmask 255.255.255.0

When I take the eth0 interface down and back up again, I see this static IP address assigned correctly. After a while, however, a lot of RTNETLINK answers: Network is unreachable messages appear and the IP address disappears from eth0

weblar83
  • 153

1 Answers1

1

setting up a static IP address can be done through the GUI in Ubuntu 18.04.

  • Click your connection in top right menu bar.
  • Click your connection and click wired/wi-fi settings
  • Click the settings icon on the Wired/ Visible Networks section.
  • In addresses (try in ipv4 tab if not visible, select manual):
    • for address, you will need to enter the static IP address of your choice (eg. 192.168.0.3).
    • set netmask to 255.255.255.0.
    • set gateway to the IP address of your network gateway (most likely 192.168.0.1).
  • In DNS section, set this to your target devices current IP address (192.168.0.x), also can be found for the specific device by navigating to your gateway IP (192.168.0.1).
  • Next to DNS section, set the Automatic switch to off.
  • Click Apply.
  • Disconnect internet (sudo dhclient -r && sudo dhclient), connect again and navigate to gateway settings, your device should now have adopted the static IP (192.168.0.3) you set.