1 |
On 2017-04-19 12:46, Florian Gamböck wrote: |
2 |
> On 2017-04-18 20:41, Mick wrote: |
3 |
>> (...) |
4 |
>> |
5 |
>> Something like this should work: |
6 |
>> |
7 |
>> # Define the gateway you want to configure |
8 |
>> gateways_eth0="192.168.0.254,AA:BB:CC:DD:EE:FF,192.168.0.10" |
9 |
>> |
10 |
>> # Define the default route for gateway 192.168.0.254 |
11 |
>> routes_192168000254_AABBCCDDEEFF="default via 192.168.0.254" |
12 |
>> |
13 |
>> # Define the IP and netmask when using gateway 192.168.0.254 |
14 |
>> config_192168000254_AABBCCDDEEFF="192.168.0.10/24" |
15 |
>> |
16 |
>> # Define the DNS servers to use with gateway |
17 |
>> dns_servers_192168000254_AABBCCDDEEFF="192.168.0.254" |
18 |
>> |
19 |
>> # Then you need to add a line for all other routers the Raspi may |
20 |
>> connect to: fallback_eth0="dhcp" |
21 |
>> |
22 |
>> (...) |
23 |
> |
24 |
> (...) |
25 |
> |
26 |
> I'll try it the next days and report back afterwards! |
27 |
|
28 |
That was really a great advice, a big thank you again! It works as |
29 |
expected. |
30 |
|
31 |
Just a few notes for future reference: |
32 |
|
33 |
config_eth0="arping" was necessary for this module to load and for the |
34 |
gateways_* variables to be parsed. |
35 |
|
36 |
I needed to emerge net-misc/iputils with "arping" USE flag. The |
37 |
net-analyzer/arping package is *not* sufficient, because it doesn't work |
38 |
with the spoofing address in the gateway variable. |
39 |
|
40 |
Another side-note: If I am connected to another network, so DHCP is |
41 |
used, and I change networks, as in "lose connection from the network and |
42 |
re-connecting with my home network", then the above configs are *not* |
43 |
used, DHCP is used. But this might be a bug in netifrc or a missing hook |
44 |
in my configs. I'll look more into it and start another thread or even a |
45 |
bug report if I'm not able to solve it. |
46 |
|
47 |
-- |
48 |
Kind regards |
49 |
|
50 |
Flo |