Timeline for How to setup eth1 with fixed IP
Current License: CC BY-SA 4.0
19 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 25, 2021 at 6:37 | comment | added | Seamus | BTW, I'm going to delete a few of my comments here as they are now superfluous & possibly confusing. | |
Jun 25, 2021 at 6:36 | comment | added | Seamus |
Your results are interesting, and it seems you're making good progress. It never occurred to me that the lack of a carrier might be the problem as I assumed it was always connected :-P BTW, that's covered up front in man dhcpcd , but is somewhat hidden under the noup option in man dhcpcd.conf !
|
|
Jun 25, 2021 at 0:56 | answer | added | Milliways | timeline score: 0 | |
Jun 24, 2021 at 20:17 | vote | accept | ygramoel | ||
Jun 24, 2021 at 19:02 | answer | added | Seamus | timeline score: 1 | |
Jun 24, 2021 at 15:48 | comment | added | ygramoel | @Seamus Results of my testing are interesting; I edited my question above to include them. | |
Jun 24, 2021 at 15:47 | history | edited | ygramoel | CC BY-SA 4.0 |
added 1030 characters in body
|
Jun 24, 2021 at 15:12 | comment | added | ygramoel | @Seamus I didn't realise that you are only notified if I mention you, will remember that. Your input has been very helpful; if you post the 'inform' solution, I will accept it. I will do a little more testing, and try to contact Roy Marples if that doesn't help. | |
Jun 23, 2021 at 20:26 | comment | added | ygramoel |
. Configuration in /etc/network/interfaces used to work fine, and automatically created the necessary entries in the routing table. My impression is that dhcpcd was not designed to handle that case, so requires "tricks" (like using inform instead of static ) plus manual configuration for routing.
|
|
Jun 23, 2021 at 20:26 | comment | added | ygramoel |
What I want to achieve is a network with just two fixed IP addresses (one for the RPi and one for the PLC). This is something I have done a lot before the time of dhcpcd , typically to connect to a microcontroller or some other hardware device that is not intended to work on a general network. I am absolutely not the only person in the world doing something like that; it was quite common, at least in the kind of places where I used to work.
|
|
Jun 23, 2021 at 20:25 | comment | added | ygramoel | The example you refer to - like the other explanations you referred to earlier - assumes that the configured interfaces (eth0 and wlan0 in that case) are intended for internet access. In that case, it makes perfect sense to configure DNS and a default gateway. That is however not my situation. In my case, there is no internet access via eth1, and there is no gateway and no DNS on the network connected to eth1. | |
Jun 21, 2021 at 7:03 | comment | added | ygramoel |
Sure, I can try that. What do I need to do to properly configure my static address in dhcpcd.conf , for a network without DHCP server? I still have no clue what was wrong with my original configuration.
|
|
Jun 19, 2021 at 11:34 | comment | added | ygramoel | Maybe - but on the other hand, there is no need for a gateway address on eth1, because there is no gateway. I have worked with fixed IP addresses in similar configurations many years ago before the introduction of dhcpcd (i.e. by adding the fixed IP in /etc/network/interfaces) , and as far as I remember, this worked well: the interface did get the requested IP address, and routing worked without further intervention. | |
Jun 18, 2021 at 7:33 | comment | added | ygramoel | I would still like to understand why the static address did not work. Any link to an explanation? | |
Jun 18, 2021 at 7:31 | comment | added | ygramoel | @Seamus Yes it is; this is for the same project. I felt that this question is answered (even if only in the comments) and that the other question is really a different issue, so I didn't want to mix the two. | |
Jun 17, 2021 at 18:13 | comment | added | ygramoel |
@Seamus You are right: inform 192.168.60.10/24 works; thanks. I don't understand how: according to the dhcpcd documentation, inform sends a message to the DHCP ser4ver, but there is no DHCP server on the network connected to eth1. It is intended to be a point-to-point connection, where the other host also has a fixed address. Also, after reading your references, I still don't understand why static does not work. There is no need for DNS on eth1, and the gateway is only reachable via eth0.
|
|
Jun 17, 2021 at 15:49 | comment | added | Seamus |
You may find that things work much better when you read and follow suggestions in the documentation. For example, man dhcpcd.conf says "For IPv4, you should use the inform ipaddress option instead of setting a static address." See these other Q&A: 1, 2, 3
|
|
Jun 17, 2021 at 14:50 | review | First posts | |||
Jun 22, 2021 at 20:28 | |||||
Jun 17, 2021 at 14:50 | history | asked | ygramoel | CC BY-SA 4.0 |