Gentoo Archives: gentoo-user

From: Tamer Higazi <th982a@××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] wpa_supplicant not starting dhcpcd
Date: Sat, 21 Dec 2019 18:16:56
Message-Id: 6c23da10-6c05-be91-7b32-8666bb6aad73@googlemail.com
1 Hi,
2 I had the same issue.
3
4 1st you have to check how the ipaddresses are managed ?
5 Are you sure that you make use of gentoo network addressing and not th
6 systemd network manage ?
7
8 Be tripple sure of it, and have a look there:
9 /etc/systemd/network/
10
11 2nd. Your WLAN board should give ip-addresses away, not receive them.
12 The config_wlp3s0="dhcp" is totally wrong.
13
14 you must assign this wlan device an address, and configure  it.
15
16
17 2nd, DHCPD gives IP-Adresses away through one address.
18 Config is here /etc/dhcp/dhcpd.conf
19
20 for example, if the network card is 192.168.0.1 and you configured dhcpd
21 that everything that is wired to it, will receive an ip-address not the
22 wlan board.
23
24
25 dhcpd would look like this (for 2 networks on 2 boards)
26 You cannot have the same network on 2 boards.
27
28 #Wired Board
29
30 subnet 192.168.0.0 netmask 255.255.255.0 {
31     pool {
32         range 192.168.0.100 192.168.0.200;
33         default-lease-time 259200;
34         max-lease-time 518400;
35         option subnet-mask 255.255.255.0;
36         option broadcast-address 192.168.0.255;
37         option routers 192.168.0.1;
38         option domain-name-servers 1.1.1.1;
39     }
40 }
41
42 #WLAN Config
43
44 subnet 192.168.1.0 netmask 255.255.255.0 {
45     pool {
46         range 192.168.1.100 192.168.1.200;
47         default-lease-time 259200;
48         max-lease-time 518400;
49         option subnet-mask 255.255.255.0;
50         option broadcast-address 192.168.0.255;
51         option routers 192.168.1.1;
52         option domain-name-servers 1.1.1.1;
53     }
54 }
55
56 What I would advise, is to setup a network bridge, and add the wlan and
57 lan device to it.
58 Then there is only one network.....
59
60
61
62 best, Tamer
63
64
65 On 2019-12-21 18:15, n952162 wrote:
66 >
67 > Okay, I have an update on this.
68 >
69 > Note that wlp3s0 is the WireLess adapter and enp0s2 is the wired
70 > Ethernet adapter.
71 >
72 > Given the /etc/conf.d/net as shown below (i.e. only config_wlp3s0="dhcp")
73 >
74 > 1. If there is *no* /etc/init.d/net.enp0s2 link (or any adapter
75 > link), then the wireless connection comes up with a dhcp-derived
76 > address
77 > 2. if there *is* an /etc/init.d/net.enp0s2 link, and the same
78 > /etc/conf.d/net file:
79 > 1. the wireless comes up with no address (and no dhcp attempt in
80 > /var/log/syslog)
81 > 2. The wired adapter has a (dhcp-derived) zero-conf address or
82 > something, at 169.
83 > 3. if a fixed ip address is additionally specified for the wired
84 > adapter in /etc/conf.d/net
85 > 1. it is assigned as specified
86 > 2. No attempt is made to run dhcp on the wireless anymore
87 > (although dhcp *is* specified for it in /etc/conf.d/net)
88 >
89 > The thing is, before my root filesystem got crashed by a negligent
90 > ext4 recovery, the system came up multi-homed, with a static and a
91 > dhcp-derived address.
92 > Coming from 4.9.? to 4.19.72.
93 >
94 > Could it be that something changed?
95 >
96 >
97 > On 12/19/19 08:46, n952162 wrote:
98 >> I have this line in /etc/conf.d/net:
99 >>
100 >> config_wlp3s0="dhcp"
101 >>
102 >> given:
103 >>
104 >> $ifconfig wlp3s0
105 >> wlp3s0    Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
106 >>           inet addr:192.168.178.42 Bcast:192.168.178.255
107 >> Mask:255.255.255.0
108 >>           UP BROADCAST RUNNING MULTICAST  MTU:1500 Metric:1
109 >>           RX packets:2008 errors:0 dropped:0 overruns:0 frame:0
110 >>           TX packets:335 errors:0 dropped:0 overruns:0 carrier:0
111 >>           collisions:0 txqueuelen:1000
112 >>           RX bytes:619501  TX bytes:40551
113 >>
114 >> but I still have to manually start dhcpcd (now, after installing kernel
115 >> 4.19.72).
116 >>
117 >> Another problem - wpa_supplicant then defines a default gateway, even
118 >> though one already existed for the wired connection:
119 >>
120 >> config_enp2s0="192.168.179.20 netmask 255.255.255.0 brd 192.168.179.255"
121 >> routes_enp2s0="default via 192.168.179.24"
122 >>
123 >> I have to then manually delete that when I'm on wireless.  That all
124 >> happened automatically before.  I wonder how I broke that all.
125 >>
126 >>
127 >