5

My Pi is configured with Arch to use eth0 with a static IP configured in conf.d:

[gotschi@berry ~]$ cat /etc/conf.d/network@eth0

address=10.0.55.5
netmask=24
broadcast=10.0.55.255
gateway=10.0.55.254

This worked better than any other configuration (e.g. netctl) for me since a few weeks. The only weird thing: It uses 2 IP addresses. When I scan my Network Range my Pi shows up 2 Times: One with the static IP of 10.0.55.5 and the other was assigned by my DHCP I assume (Range set on router: 10.0.55.50-150): 10.0.55.55

nmap also reports the hostname only on the .55 address, so http://raspberry.local/ is assigned to .55

my /etc/netctl folder is empty, except for the default folders...

[gotschi@berry ~]$ ls /etc/netctl
    examples  hooks  interfaces

It also responds to 10.0.55.55 correctly!

Where are other configs stored? Thanks!

[gotschi@berry ~]$ ifconfig
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 10.0.55.5  netmask 255.255.255.0  broadcast 10.0.55.255
    ether b8:27:eb:50:ec:f4  txqueuelen 1000  (Ethernet)
    RX packets 17227  bytes 1077447 (1.0 MiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 85328  bytes 127324380 (121.4 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

edit I think I found something here:

[gotschi@berry ~]$ ip addr
    4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:50:ec:f4 brd ff:ff:ff:ff:ff:ff
inet 10.0.55.5/24 brd 10.0.55.255 scope global eth0
   valid_lft forever preferred_lft forever
inet 10.0.55.55/24 brd 10.0.55.255 scope global secondary eth0
   valid_lft forever preferred_lft forever

sudo ip addr del 10.0.55.55/24 dev eth0 disabled the second IP, just trying a reboot now

-> nope, still got 2 ip addresses :/

  • Could you update your post with the contents of /etc/netctl? It may help us to diagnose the problem better. Also, try one of the examples from /etc/netctl/examples changing the necessary information and see what the result is. – Zeusking19-Code Feb 1 '14 at 11:02
  • That is really weird :) – Piotr Kula Feb 1 '14 at 23:34
3

This helped for me:

update-rc.d dhcpcd disable
service dhcpcd stop
ip addr del %YOURS-SECOND-IP% dev ethX

And when you start raspberry pi again, scope global secondary will disappear.

3

The issue was caused by a separate dhcp@network laying in /etc/systemd/system/

No clue where it came from, but deleting it solved my problem :)

3

Edit /etc/dhcpcd.conf

This happened to me too (albiet on Raspbian).
If you'd rather not totally disable the dhcpcd service, you can add this to /etc/dhcpcd.conf to inform it of your static interface:

interface eth0
static ip_address=192.168.0.10/24   
static routers=192.168.0.1
static domain_name_servers=192.168.0.1 8.8.8.8

This will stop it from grabbing a secondary ip upon rebooting.

(ArchWiki Reference)

-1

It is getting a DHCP IP from dhcpcd.conf and using your netplan - you can run both, I learned the hard way, I think you can even assign different IP ranges and all work - here's the trick, disable DHCP (and for fun you can rename your conf file - but - with no conf file, if DHCP is still running it will auto-use DHCP and you'll see the ip in ip a.)

systemctl stop dhcpcd

systemctl disable dhcpcd

  • Are you sure that archlinux uses dhcpcd? – Ingo Sep 13 at 8:28
  • no, I don't know - I run ubuntu (current), on a Raspberry Pi, sorry, I should have included that, but I think if you're using netplan and have this problem you should look along these lines for your solution. 1st off see if you have a dhcpcd.conf file and see if making changes to it (and rebooting) makes an IP differences so you know if you are using both or not. – 1coolbox Sep 14 at 9:27
  • But the OP uses Arch so your answer does not fit. – Ingo Sep 14 at 10:01
  • I'd still look along these lines, that is, 2 different network setups both running. Mine specifically had NETPLAN implemented and no place did anything say anything about disabling dhcpcd.conf and to my surprise, both were bring used. I must have read 100 articles on this dual IP problem and the only solutions I read that sounded viable all found 2 networking systems running. All other solution - I read about - were work arounds and not solutions ... just trying to add some thoughts on other directions to look, such as a simple true fix. Have a great day. – 1coolbox Sep 15 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.