Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Secondary IP addresses using dhcpcd.conf
-
- Posts: 6
- Joined: 2017-08-28 07:40
Secondary IP addresses using dhcpcd.conf
Hi,
I have been wrestling with this problem for a while now and still cannot get the configuration I am after.
My goal is to have two IPv4 addresses associated with the wlan0 interface such that I can communicate with the server on either. Prior to the introduction of dhcpcd in Jessie I would have edited /etc/network/interfaces to include a statement for "interface wlan0" and "interface wlan0:0" however with the new dhcpcd.conf method of network configuration I have been unable to replicate this.
I have tried several approaches including the arping command and referencing out to profile stanzas within the dhcpcd.conf file but to no avail.
Can anyone shed some light on this for me? TIA
I have been wrestling with this problem for a while now and still cannot get the configuration I am after.
My goal is to have two IPv4 addresses associated with the wlan0 interface such that I can communicate with the server on either. Prior to the introduction of dhcpcd in Jessie I would have edited /etc/network/interfaces to include a statement for "interface wlan0" and "interface wlan0:0" however with the new dhcpcd.conf method of network configuration I have been unable to replicate this.
I have tried several approaches including the arping command and referencing out to profile stanzas within the dhcpcd.conf file but to no avail.
Can anyone shed some light on this for me? TIA
-
- Posts: 6
- Joined: 2017-08-28 07:40
Re: Secondary IP addresses using dhcpcd.conf
If people don't know the answer, are there any suggestions of where to look? I have tried all the FAQs and documents I could find.
Re: Secondary IP addresses using dhcpcd.conf
If a server why are you using dhcp? It should have static ip addresses. Try that.
https://wiki.debian.org/NetworkConfigur ... _Interface
https://wiki.debian.org/NetworkConfigur ... _Interface
-
- Posts: 6
- Joined: 2017-08-28 07:40
Re: Secondary IP addresses using dhcpcd.conf
The latest versions of Jessie state that static IP configuration should be done via the dhcpcd configuration file - there are notes in /etc/network/interfaces to this effect and indeed manual edits to the interfaces file are overwritten.
I realise I can disable the dhcpcd service which I am happy to do, but this would be avoiding the problem rather than understanding how to address it.
I realise I can disable the dhcpcd service which I am happy to do, but this would be avoiding the problem rather than understanding how to address it.
Re: Secondary IP addresses using dhcpcd.conf
I'm sorry guys, but this is a primary example of something that should NOT have been changed. Why the hell would you move static interface configuration from /etc/network/interfaces (where everyone has known it to be for YEARS) to...dhcpcd.conf???
Come on.
Come on.
- dilberts_left_nut
- Administrator
- Posts: 5346
- Joined: 2009-10-05 07:54
- Location: enzed
- Has thanked: 13 times
- Been thanked: 66 times
Re: Secondary IP addresses using dhcpcd.conf
What a load of bollocks.
It works the same as it always has.
edit: and FFS, it's pi-specific as per:
http://forums.debian.net/viewtopic.php? ... 50#p655250
and
https://www.raspberrypi.org/forums/view ... 6&t=111887
It works the same as it always has.
edit: and FFS, it's pi-specific as per:
http://forums.debian.net/viewtopic.php? ... 50#p655250
and
https://www.raspberrypi.org/forums/view ... 6&t=111887
AdrianTM wrote:There's no hacker in my grandma...
Re: Secondary IP addresses using dhcpcd.conf
No, it doesn't. I had 2 interfaces configured as static in /etc/network/interfaces, and /etc/dhcpcd.conf had only one of them configured. The other started grabbing a second, non-static, DHCP address and screwing up routing, in the recent past.
- dilberts_left_nut
- Administrator
- Posts: 5346
- Joined: 2009-10-05 07:54
- Location: enzed
- Has thanked: 13 times
- Been thanked: 66 times
Re: Secondary IP addresses using dhcpcd.conf
And this is on your RaspberryPi?
AdrianTM wrote:There's no hacker in my grandma...
- dilberts_left_nut
- Administrator
- Posts: 5346
- Joined: 2009-10-05 07:54
- Location: enzed
- Has thanked: 13 times
- Been thanked: 66 times
Re: Secondary IP addresses using dhcpcd.conf
OK, so what are you using that pulls in dhcpcd5 rather than the default isc-dhcp-client?
Or did you install it specifically.
It seems it's that package that changes the default behavior.
Presumably because it's gui components need to overwrite the config when the user gets clicky with it...
Or did you install it specifically.
It seems it's that package that changes the default behavior.
Presumably because it's gui components need to overwrite the config when the user gets clicky with it...
AdrianTM wrote:There's no hacker in my grandma...
Re: Secondary IP addresses using dhcpcd.conf
I have confirmed the same bug with a Raspberry Pi running Raspbian jessie, but it is also occurring with my amd64 server.
Routing table:
And here's /etc/network/interfaces:
And finally, boot.log entries showing that dhcpcd started on all interfaces:
dhcpcd5 and isc-dhcp-client and common installed. I never intentionally installed either of these packages; they must have been installed by default.
Code: Select all
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:13:ef:70:57:0c brd ff:ff:ff:ff:ff:ff
inet 192.168.1.11/24 brd 192.168.1.255 scope global wlan0
valid_lft forever preferred_lft forever
inet 192.168.1.52/24 brd 192.168.1.255 scope global secondary wlan0
valid_lft forever preferred_lft forever
inet6 fe80::213:efff:fe70:570c/64 scope link
valid_lft forever preferred_lft forever
Code: Select all
root@raspberrypi:/etc# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default router 0.0.0.0 UG 0 0 0 wlan0
default router 0.0.0.0 UG 303 0 0 wlan0
192.168.1.0 * 255.255.255.0 U 303 0 0 wlan0
And here's /etc/network/interfaces:
Code: Select all
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.11
netmask 255.255.255.0
gateway 192.168.1.1
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Code: Select all
[^[[32m OK ^[[0m] Started dhcpcd on all interfaces.
Code: Select all
root@raspberrypi:/var/log# dpkg --get-selections|grep dhcp
dhcpcd5 install
isc-dhcp-client install
isc-dhcp-common install
[root@amd64-server]# dpkg --get-selections|grep dhcp
dhcpcd5 install
isc-dhcp-client install
isc-dhcp-common install
- dilberts_left_nut
- Administrator
- Posts: 5346
- Joined: 2009-10-05 07:54
- Location: enzed
- Has thanked: 13 times
- Been thanked: 66 times
Re: Secondary IP addresses using dhcpcd.conf
...which is irrelevant here.cob wrote:I have confirmed the same bug with a Raspberry Pi running Raspbian jessie.
(and I don't believe it qualifies as a bug as it's the documented behaviour of the package)
Again, how did you achieve this (non-default) configuration on Debian?
What does 'aptitude why dhcpcd5' show?
AdrianTM wrote:There's no hacker in my grandma...
Re: Secondary IP addresses using dhcpcd.conf
I have not, by some magic of user idiocy, "achieved a non-default configuration" on Debian. All I have done is upgrade over the years. I couldn't tell you at this point what the original release was for the server or Raspberry Pi, but that's all that's been done, and the IP addressing was never a problem until recent updates.
There is no reason why a package that provides DHCP should supersede the network configuration file everyone has grown to know and love.
Code: Select all
i ifupdown Recommends isc-dhcp-client | dhcp-client
i dhcpcd5 Provides dhcp-client
- dilberts_left_nut
- Administrator
- Posts: 5346
- Joined: 2009-10-05 07:54
- Location: enzed
- Has thanked: 13 times
- Been thanked: 66 times
Re: Secondary IP addresses using dhcpcd.conf
Well, it certainly seems that you have.cob wrote:I have not, by some magic of user idiocy, "achieved a non-default configuration" on Debian.
The popcon results for the two(?) dhcp clients you have installed show that dhcpcd5 is clearly not in any type of "default" install (less than 0.5% of the isc-client installs).
https://qa.debian.org/popcon.php?package=isc-dhcp
https://qa.debian.org/popcon.php?package=dhcpcd5
You have (the default) isc-dhcp-client installed, which also provides the virtual package 'dhcp-client', leaving the logical conclusion that dhcpcd5 is either manually installed, or pulled in by one of a very few packages requiring it.
Code: Select all
apt-cache rdepends dhcpcd5
dhcpcd5
Reverse Depends:
dhcpcd5:i386
dhcpcd-dbus
apt-cache rdepends dhcpcd-dbus
dhcpcd-dbus
Reverse Depends:
dhcpcd-dbus:i386
dhcpcd-gtk
apt-cache rdepends dhcpcd-gtk
dhcpcd-gtk
Reverse Depends:
dhcpcd-gtk:i386
dhcpcd5
Again, that's the way dhcpcd5 works, and if you don't want that behaviour, don't install it - it's an installable option, not the default.cob wrote:There is no reason why a package that provides DHCP should supersede the network configuration file everyone has grown to know and love.
Your claims require a bit more proof than "I dunno how it happened so it must be a bug"...
Seems like regular PEBCAK to me.
AdrianTM wrote:There's no hacker in my grandma...
Re: Secondary IP addresses using dhcpcd.conf
What? Are you seriously accepting that a package that provides DHCP doesn't respect the networking config file that has been authoritative throughout debian's history?Again, that's the way dhcpcd5 works, and if you don't want that behaviour, don't install it - it's an installable option, not the default.
- dilberts_left_nut
- Administrator
- Posts: 5346
- Joined: 2009-10-05 07:54
- Location: enzed
- Has thanked: 13 times
- Been thanked: 66 times
Re: Secondary IP addresses using dhcpcd.conf
FFS.
If you're going to install something, maybe you should, you know, find out how it works first?
If you're going to install something, maybe you should, you know, find out how it works first?
Roy Marples wrote:dhcpcd does not parse /etc/network/interfaces.
AdrianTM wrote:There's no hacker in my grandma...
Re: Secondary IP addresses using dhcpcd.conf
sorry about your hellride dude. i think you can just purge the dhcp clients from your system (a server doesn't need dhcp), then reboot. on reboot, the custom configuration in /etc/network/interfaces should take precedence. best of luck, mf