View previous topic :: View next topic |
Author |
Message |
Uli-DD-70 n00b

Joined: 15 Nov 2015 Posts: 2
|
Posted: Sun Nov 15, 2015 8:01 pm Post subject: netifrc + wlan + dhcp + static route |
|
|
Hello,
my box is configured to use wlan via wpa_supplicant using dhcp. On my dhcp-server there is an entry for one static route (host route via gateway).
Problem: The netifrc scripts on client side do not add this given static route as a host-route; the routing table shows a route without gateway address.
Btw., dhcpd gives the right data when asking my dhcp-server.
This problem occures since an update this summer, I don't know anymore which packages are new, think about dhcpd or wpa_supplicant.
Here's server's dhcpd.conf:
Code: |
default-lease-time 3600; # 1 hour
max-lease-time 259200; # 3 days
option rfc3442-classless-static-routes code 121 = array of integer 8;
option ms-classless-static-routes code 249 = array of integer 8;
option domain-name "xxx.xxx";
option domain-name-servers 10.0.0.1;
option broadcast-address 192.168.178.255;
option routers 192.168.178.1;
option subnet-mask 255.255.255.0;
option static-routes 10.0.0.1 192.168.178.6;
subnet 192.168.178.0 netmask 255.255.255.0
{
range 192.168.178.20 192.168.178.199;
}
|
Here's the response from dhcpd on my client when starting interface wlan0:
Quote: |
Nov 15 00:52:03 aphrodite dhcpcd[6076]: wlan0: carrier acquired
Nov 15 00:52:03 aphrodite dhcpcd[6076]: wlan0: IAID 5d:7c:0d:88
Nov 15 00:52:03 aphrodite dhcpcd[13460]: sending commands to master dhcpcd process
Nov 15 00:52:03 aphrodite dhcpcd[6076]: control command: dhcpcd -m 2002 wlan0
Nov 15 00:52:04 aphrodite dhcpcd[6076]: wlan0: rebinding lease of 192.168.178.122
Nov 15 00:52:04 aphrodite dhcpcd[6076]: wlan0: leased 192.168.178.122 for 3522 seconds
Nov 15 00:52:04 aphrodite dhcpcd[6076]: wlan0: adding route to 192.168.178.0/24
Nov 15 00:52:04 aphrodite dhcpcd[6076]: wlan0: adding host route to 10.0.0.1 via 192.168.178.6 --> this is the special host route, response from dhcp-server ok
Nov 15 00:52:04 aphrodite dhcpcd[6076]: wlan0: adding default route via 192.168.178.1
Nov 15 00:52:04 aphrodite dhcpcd[6076]: wlan0: removing route to 192.168.178.0/24
|
As you can see, dhcpd tells the right host route via the right interface
But the resulting kernel routing table looks like this:
Quote: |
ip route list
default via 192.168.178.1 dev wlan0 metric 302
10.0.0.1 dev wlan0 metric 302 ---> this line is wrong, I can't ping 10.0.0.1, gateway missing
127.0.0.0/8 dev lo scope host
127.0.0.0/8 via 127.0.0.1 dev lo
192.168.178.0/24 dev wlan0 proto kernel scope link src 192.168.178.122 metric 302
|
If I manually run this:
Quote: |
ip route add 10.0.0.1 via 192.168.178.6
|
it works and I can ping the 10.0.0.1!!!
Routing table like this:
Quote: |
ip route list
default via 192.168.178.1 dev wlan0 metric 302
10.0.0.1 dev wlan0 metric 302
10.0.0.1 via 192.168.178.6 dev wlan0 --> here is the difference!
127.0.0.0/8 dev lo scope host
127.0.0.0/8 via 127.0.0.1 dev lo
192.168.178.0/24 dev wlan0 proto kernel scope link src 192.168.178.122 metric 302
|
Can someone tell me, why the host route is not added correctly?
Thank You for your help, Uli |
|
Back to top |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Mon Nov 16, 2015 7:36 pm Post subject: |
|
|
Looks like a bug with dhcpcd to me!
Code: | Nov 15 00:52:04 aphrodite dhcpcd[6076]: wlan0: adding default route via 192.168.178.1
Nov 15 00:52:04 aphrodite dhcpcd[6076]: wlan0: removing route to 192.168.178.0/24 |
That by itself is a problem.
What dhcpcd version are you running? If not 6.9.3, could you try upgrading please?
If you are running 6.9.3, can you try the 9999 ebuild to see if it's already fixed? _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
 |
Uli-DD-70 n00b

Joined: 15 Nov 2015 Posts: 2
|
Posted: Wed Nov 18, 2015 4:46 pm Post subject: |
|
|
My dhcpcd was 6.9.0. I've tried both 6.9.3 and 9999. No difference...
Btw.: The message "dhcpcd[6076]: wlan0: removing route to 192.168.178.0/24" looks like a problem, but my routing table still has an entry for that route:
Quote: |
default via 192.168.178.1 dev wlan0 metric 302
10.0.0.1 dev wlan0 metric 302 ---> this line is wrong, I can't ping 10.0.0.1, gateway missing
127.0.0.0/8 dev lo scope host
127.0.0.0/8 via 127.0.0.1 dev lo
192.168.178.0/24 dev wlan0 proto kernel scope link src 192.168.178.122 metric 302
|
Problem still the host route to 10.0.0.1.
Anyone an idea?
Thanks Uli |
|
Back to top |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
 |
|