[SOLVED] Can't set static IP - XU4, 18.04

Post Reply
sv209
Posts: 3
Joined: Tue May 14, 2019 5:17 am
languages_spoken: english
ODROIDs: xu4
Has thanked: 1 time
Been thanked: 0
Contact:

[SOLVED] Can't set static IP - XU4, 18.04

Unread post by sv209 » Tue May 14, 2019 5:31 am

Hello! I'm new to the Odroid community and have picked up an XU4 board. Currently, it is running Ubuntu 18.04 (Minimal, Bare OS). All setup has been very smooth up until attempting to set a static IP address.

I have attempted to set this using Netplan. Please see my netplan configuration file below:

Code: Select all

network:
 version: 2
 renderer: NetworkManager
 ethernets:
  eht0:
   dhcp4: no
   dhcp6: no
   addresses: [10.0.0.10/24,]
   gateway4: 10.0.0.1
   nameservers:
    addresses: [8.8.8.8, 8.8.4.4]
After saving that configuration I ran `sudo netplan --debug apply`. This was the result:

Code: Select all

** (generate:1140): DEBUG: 20:24:39.339: Processing input file /etc/netplan/01-static.yaml..
** (generate:1140): DEBUG: 20:24:39.339: starting new processing pass
** (generate:1140): DEBUG: 20:24:39.340: eht0: setting default backend to 2
** (generate:1140): DEBUG: 20:24:39.340: Configuration is valid
** (generate:1140): DEBUG: 20:24:39.340: Generating output files..
** (generate:1140): DEBUG: 20:24:39.340: networkd: definition eht0 is not for us (backend 2)
DEBUG:no netplan generated networkd configuration exists
DEBUG:netplan generated NM configuration changed, restarting NM
DEBUG:eht0 not found in {}
DEBUG:Merged config:
network:
  bonds: {}
  bridges: {}
  ethernets:
    eht0:
      addresses:
      - 10.0.0.10/24
      dhcp4: false
      dhcp6: false
      gateway4: 10.0.0.1
      nameservers:
        addresses:
        - 8.8.8.8
        - 8.8.4.4
  vlans: {}
  wifis: {}

DEBUG:Skipping non-physical interface: lo
DEBUG:Skipping non-physical interface: eth0
DEBUG:Skipping non-physical interface: docker0
DEBUG:{}
DEBUG:netplan triggering .link rules for lo
DEBUG:netplan triggering .link rules for eth0
DEBUG:netplan triggering .link rules for docker0
I do not know what is wrong. I have attempted a restart however the board still gets an IP address from my DHCP server. Any suggestions? :?:
Last edited by sv209 on Thu May 16, 2019 11:15 am, edited 1 time in total.

joshua.yang
Posts: 301
Joined: Fri Sep 22, 2017 5:54 pm
languages_spoken: Korean, English
ODROIDs: XU4, XU4Q + Cloudshell2, H2, N2
Has thanked: 3 times
Been thanked: 50 times
Contact:

Re: Can't set static IP - XU4, 18.04

Unread post by joshua.yang » Tue May 14, 2019 11:42 am

Hi.

How about removing renderer property? Because with netplan the default renderer is networkd.

sv209
Posts: 3
Joined: Tue May 14, 2019 5:17 am
languages_spoken: english
ODROIDs: xu4
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Can't set static IP - XU4, 18.04

Unread post by sv209 » Tue May 14, 2019 10:41 pm

Removing the renderer doesn't have any effect. The board still gets an address from DCHP.

Could it be a problem that possibly both NetworkManager and systemd-networkd are running at the same time? Looking into syslog I see entries from both those services.

Tomas J.
Posts: 49
Joined: Wed Aug 16, 2017 4:23 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Can't set static IP - XU4, 18.04

Unread post by Tomas J. » Wed May 15, 2019 3:17 am

Somehow I think you need to specify eth0, not eht0 in netplan config...
These users thanked the author Tomas J. for the post:
sv209 (Thu May 16, 2019 11:11 am)

joshua.yang
Posts: 301
Joined: Fri Sep 22, 2017 5:54 pm
languages_spoken: Korean, English
ODROIDs: XU4, XU4Q + Cloudshell2, H2, N2
Has thanked: 3 times
Been thanked: 50 times
Contact:

Re: Can't set static IP - XU4, 18.04

Unread post by joshua.yang » Wed May 15, 2019 2:19 pm

Then your configuration seems to be working fine. :shock:

This is my netplan configuration for applying static IP.

Code: Select all

root@odroid:~# cat /etc/netplan/static.yaml
network:
    ethernets:
        eth0:
            dhcp4: no
            addresses: [192.168.0.111/24]
            gateway4: 192.168.0.2
            nameservers:
              addresses: [8.8.8.8, 8.8.4.4]
    version: 2
How about ip a?

Any other network options had been changed before?
Just questioned since it is weird that this isn't working even it should work. :)

sv209
Posts: 3
Joined: Tue May 14, 2019 5:17 am
languages_spoken: english
ODROIDs: xu4
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Can't set static IP - XU4, 18.04

Unread post by sv209 » Thu May 16, 2019 11:15 am

The minor eht0 typo was my issue... :shock:

Thanks everyone!

joshua.yang
Posts: 301
Joined: Fri Sep 22, 2017 5:54 pm
languages_spoken: Korean, English
ODROIDs: XU4, XU4Q + Cloudshell2, H2, N2
Has thanked: 3 times
Been thanked: 50 times
Contact:

Re: Can't set static IP - XU4, 18.04

Unread post by joshua.yang » Thu May 16, 2019 12:08 pm

sv209 wrote:
Thu May 16, 2019 11:15 am
The minor eht0 typo was my issue... :shock:

Thanks everyone!
I didn't notice that either.... :D

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 1 guest