Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] wifi stop working and strange behavior of dhcpcd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
emc
Guru
Guru


Joined: 02 Jul 2004
Posts: 541
Location: Cracow, Poland

PostPosted: Wed Jan 11, 2017 9:08 pm    Post subject: [solved] wifi stop working and strange behavior of dhcpcd Reply with quote

Hi, I didn't use my wifi a while (poor signal in bedoom) but now I need it and it stop. I try fix myself but I thing I mess it even more.
First I'm using wicd and wpa_supplicant and according wikis:
https://wiki.gentoo.org/wiki/Wicd
https://wiki.gentoo.org/wiki/Network_management_using_DHCPCD

should use wpa_supplicat in a way described here:
https://wiki.gentoo.org/wiki/Wpa_supplicant

I get confiused. So here is some logs:

after restart:
Code:
# dmesg | grep -i -E '02:00.0|rtlwifi|wlp2s0|wlan0'
[    1.270969] pci 0000:02:00.0: [Firmware Bug]: VPD access disabled
[    9.589199] atl1c 0000:02:00.0: version 1.0.1.1-NAPI
[   46.351161] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   49.390371] atl1c 0000:02:00.0: atl1c: eth0 NIC Link is Up<100 Mbps Full Duplex>
[   51.808412] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   52.017767] atl1c 0000:02:00.0: atl1c: eth0 NIC Link is Up<100 Mbps Full Duplex>
[   52.196459] atl1c 0000:02:00.0: atl1c: eth0 NIC Link is Up<100 Mbps Full Duplex>
[   60.576775] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   60.702152] atl1c 0000:02:00.0: atl1c: eth0 NIC Link is Up<100 Mbps Full Duplex>
[   61.042988] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   64.321257] wlan0: authenticate with 94:0c:6d:e6:99:8c
[   64.329666] wlan0: send auth to 94:0c:6d:e6:99:8c (try 1/3)
[   64.334272] wlan0: authenticated
[   64.335247] wlan0: associate with 94:0c:6d:e6:99:8c (try 1/3)
[   64.338999] wlan0: RX AssocResp from 94:0c:6d:e6:99:8c (capab=0x431 status=0 aid=3)
[   64.339857] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   64.340158] wlan0: associated
[   67.424810] wlan0: deauthenticating from 94:0c:6d:e6:99:8c by local choice (Reason: 3=DEAUTH_LEAVING)
[   67.741579] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   67.860386] atl1c 0000:02:00.0: atl1c: eth0 NIC Link is Up<100 Mbps Full Duplex>


Code:
# dmesg | grep -i -E 'bcma'
[   25.400027] bcma: bus0: Found chip with id 0x4313, rev 0x01 and package 0x08
[   25.400064] bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
[   25.400090] bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
[   25.400132] bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
[   25.413268] bcma: bus0: Bus registered
[   29.120041] brcmsmac bcma0:1: mfg 4bf core 812 rev 24 class 0 irq 16
[   46.350902] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)
[   46.350921] brcmsmac bcma0:1: brcms_ops_config: change power-save mode: false (implement)
[   51.807129] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)
[   51.807150] brcmsmac bcma0:1: brcms_ops_config: change power-save mode: false (implement)
[   60.576302] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)
[   60.576322] brcmsmac bcma0:1: brcms_ops_config: change power-save mode: false (implement)
[   61.042737] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)
[   61.042759] brcmsmac bcma0:1: brcms_ops_config: change power-save mode: false (implement)
[   64.339517] brcmsmac bcma0:1: brcmsmac: brcms_ops_bss_info_changed: associated
[   64.339529] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: true (implement)
[   64.344357] brcmsmac bcma0:1: wl0: brcms_c_d11hdrs_mac80211:  txop exceeded phylen 159/256 dur 1778/1504
[   64.350607] brcmsmac bcma0:1: wl0: brcms_c_d11hdrs_mac80211:  txop exceeded phylen 137/256 dur 1602/1504
[   67.426377] brcmsmac bcma0:1: brcmsmac: brcms_ops_bss_info_changed: disassociated
[   67.426396] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)
[   67.741333] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)
[   67.741353] brcmsmac bcma0:1: brcms_ops_config: change power-save mode: false (implement)
[  326.867770] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)
[  326.867789] brcmsmac bcma0:1: brcms_ops_config: change power-save mode: false (implement)


But I do not get wlan0 interface and dhcpcd didn't assign IP to eth0:
Code:
# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 54:04:a6:0a:9d:68  txqueuelen 1000  (Ethernet)
        RX packets 19  bytes 3423 (3.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 41  bytes 6696 (6.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 1  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 334  bytes 22998 (22.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 334  bytes 22998 (22.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

but:
Code:
# rc-config list | grep 'wpa_supplicant\|dhcpcd\|net.'
  dhcpcd                    default
  net.eth0
  net.lo                    boot
  netmount
  net-online
  net.wlan0
  wpa_supplicant

and of course modules are loaded:
Code:
# lpci -kv
01:00.0 Network controller: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter (rev 01)
        Subsystem: AzureWave BCM4313 802.11bgn Wireless Network Adapter
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at fea00000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [40] Power Management version 3
        Capabilities: [58] Vendor Specific Information: Len=78 <?>
        Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [d0] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [13c] Virtual Channel
        Capabilities: [160] Device Serial Number 00-00-68-ff-ff-a8-74-2f
        Capabilities: [16c] Power Budgeting <?>
        Kernel driver in use: bcma-pci-bridge
        Kernel modules: bcma

02:00.0 Ethernet controller: Qualcomm Atheros AR8152 v2.0 Fast Ethernet (rev c1)
        Subsystem: ASUSTeK Computer Inc. AR8152 v2.0 Fast Ethernet
        Flags: bus master, fast devsel, latency 0, IRQ 29
        Memory at fe900000 (64-bit, non-prefetchable) [size=256K]
        I/O ports at e000 [size=128]
        Capabilities: [40] Power Management version 3
        Capabilities: [48] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [58] Express Endpoint, MSI 00
        Capabilities: [6c] Vital Product Data
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [180] Device Serial Number ff-0a-9d-68-54-04-a6-ff
        Kernel driver in use: atl1c
        Kernel modules: atl1c


Code:
# cat /var/log/rc.log
rc default logging started at Wed Jan 11 21:37:18 2017

 * /etc/init.d/syslog-ng uses runscript, please convert to openrc-run.
 * Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ...
 [ ok ]
 * Starting syslog-ng ...
 [ ok ]
 * Starting acpid ...
 [ ok ]
 * Starting consolekit ...
 [ ok ]
 * Starting DHCP Client Daemon ...
wlan0: starting wpa_supplicant
 [ ok ]
 * /etc/init.d/avahi-daemon uses runscript, please convert to openrc-run.
 * Starting avahi-daemon ...
 [ ok ]
 * Starting cupsd ...
 [ ok ]
 * Starting fcron ...
 [ ok ]
 * /etc/init.d/gpm uses runscript, please convert to openrc-run.
 * Starting gpm ...
 [ ok ]
 * /etc/init.d/hddtemp uses runscript, please convert to openrc-run.
 * Starting hddtemp daemon ...
 [ ok ]
 * /etc/init.d/laptop_mode uses runscript, please convert to openrc-run.
 * Starting laptop_mode ...
 [ ok ]
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not supported.
Failed.
 * Starting Music Player Daemon ...
 [ ok ]
 * Starting sshd ...
 [ ok ]
 * Starting TightVNC server ...
 [ ok ]
 * /etc/init.d/xdm-setup uses runscript, please convert to openrc-run.
 * /etc/init.d/xdm uses runscript, please convert to openrc-run.
 * Setting up slim ...
 [ ok ]
 * Starting local ...
 [ ok ]
rc default logging stopped at Wed Jan 11 21:37:38 2017

and after:
Code:
# /etc/init.d/dhcpcd start
 * WARNING: dhcpcd has already been started
# /etc/init.d/dhcpcd restart
 * Stopping DHCP Client Daemon ...                                                                                                    [ ok ]
 * Starting DHCP Client Daemon ...
wlan0: starting wpa_supplicant


i got:
Code:
# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.4.102  netmask 255.255.255.0  broadcast 192.168.4.255
        inet6 fd50:da97:1fe::a8b  prefixlen 128  scopeid 0x0<global>
        inet6 fd50:da97:1fe:0:caa0:ba5b:1f27:1efa  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::abad:1194:dd4e:7633  prefixlen 64  scopeid 0x20<link>
        ether 54:04:a6:0a:9d:68  txqueuelen 1000  (Ethernet)
        RX packets 29  bytes 5083 (4.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 101  bytes 19741 (19.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 1  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 910  bytes 59084 (57.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 910  bytes 59084 (57.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 74:2f:68:a8:1d:bb  txqueuelen 1000  (Ethernet)
        RX packets 8  bytes 1713 (1.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 30  bytes 6092 (5.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


However hen I disconnect ethernet cable for 0.5 sec I loose IP and dhcpcd never try again.
And whats most important wicd cant connect to my wifi. Here is my confiussion with net.* script wicd and wpa_supplicant configuration.

Code:

# cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1


Code:
# cat /etc/conf.d/net
modules_wlan0="wpa_supplicant"
config_eth0="dhcp"
config_wlan0="dhcp"


Code:
# cat /etc/rc.conf
rc_parallel="NO"
rc_shell=/sbin/sulogin
rc_hotplug="!net.eth* !net.wlan*"
rc_logger="YES"
rc_log_path="/var/log/rc.log"
unicode="YES"
rc_sys=""
rc_tty_number=12


Any idea whats wrong or where to start......

*EDIT:
Code:
# wpa_cli
wpa_cli v2.6
Copyright (c) 2004-2016, Jouni Malinen <j@w1.fi> and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.


Selected interface 'wlan0'

Interactive mode

> scan
OK
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>CTRL-EVENT-NETWORK-NOT-FOUND

but as I said I used wicd...... and there I can see my wifi network but can't connect

**EDIT
with open wpa_cli I clicked on connect in wicd and get:
Code:
Connection to wpa_supplicant lost - trying to reconnect
Connection to wpa_supplicant re-established
<3>CTRL-EVENT-DISCONNECTED bssid=94:0c:6d:e6:99:8c reason=0
<3>CTRL-EVENT-TERMINATING
Connection to wpa_supplicant lost - trying to reconnect

btw this is my SSID


Last edited by emc on Sun Jan 15, 2017 11:37 am; edited 1 time in total
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Thu Jan 12, 2017 10:09 am    Post subject: Re: wifi stop working and strange behavior of dhcpcd Reply with quote

emc wrote:
Hi, I didn't use my wifi a while (poor signal in bedoom) but now I need it and it stop. I try fix myself but I thing I mess it even more.
First I'm using wicd and wpa_supplicant and according wikis:
https://wiki.gentoo.org/wiki/Wicd
https://wiki.gentoo.org/wiki/Network_management_using_DHCPCD

Mixtura mirabilis. As written in
https://wiki.gentoo.org/wiki/Network_management_using_DHCPCD wrote:
For wireless use wpa_supplicant.


emc wrote:
after restart:
Code:
# dmesg | grep -i -E '02:00.0|rtlwifi|wlp2s0|wlan0'
For the wireless device, grep for 01:00.0 instead of 02:00.0 and bcma instead of rtlwifi.

emc wrote:
But I do not get wlan0 interface and dhcpcd didn't assign IP to eth0:
Code:
# ifconfig
Try ifconfig -a

emc wrote:
However hen I disconnect ethernet cable for 0.5 sec I loose IP and dhcpcd never try again.
And whats most important wicd cant connect to my wifi. Here is my confiussion with net.* script wicd and wpa_supplicant configuration.
As already stated above, do not mix wicd with https://wiki.gentoo.org/wiki/Network_management_using_DHCPCD. For wireless use wpa_gui or wpa_cli.
Back to top
View user's profile Send private message
emc
Guru
Guru


Joined: 02 Jul 2004
Posts: 541
Location: Cracow, Poland

PostPosted: Fri Jan 13, 2017 10:11 pm    Post subject: Reply with quote

OK I think I got it, but still need help (to be clear I try to get dhcpcd working for eth0 and wifi, hotplugging)

So lets start I change:
Code:
# cat /etc/conf.d/net
config_eth0="dhcp"
config_wlan0="dhcp"

/etc/wpa_supplicant/wpa_supplicant.conf is empty
then I did:
Code:
# rc-update add dhcpcd default
 * rc-update: dhcpcd already installed in runlevel `default'; skipping
cp /usr/share/dhcpcd/hooks/10-wpa_supplicant /lib/dhcpcd/dhcpcd-hooks
# /etc/init.d/dhcpcd stop
 * Stopping DHCP Client Daemon
# killall wpa_supplicant
wpa_supplicant: no process found

then:
Code:
# dhcpcd -dB
dhcpcd-6.11.3 starting
dev: loaded udev
eth0: adding address fe80::abad:1194:dd4e:7633
eth0: pltime infinity, vltime infinity
eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' CARRIER
wlan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
wlan0: ctrl_interface not defined in /etc/wpa_supplicant/wpa_supplicant.conf
wlan0: not interacting with wpa_supplicant(8)
wlan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' NOCARRIER
DUID 00:01:00:01:1a:7a:6e:0a:74:2f:68:a8:1d:bb
eth0: IAID a6:0a:9d:68
eth0: delaying IPv6 router solicitation for 0.2 seconds
eth0: delaying IPv4 for 0.7 seconds
wlan0: waiting for carrier
eth0: soliciting an IPv6 router
eth0: delaying Router Solicitation for LL address
eth0: soliciting a DHCP lease
eth0: sending DISCOVER (xid 0x49d72309), next in 4.8 seconds
eth0: offered 192.168.4.102 from 192.168.4.1
eth0: sending REQUEST (xid 0x49d72309), next in 4.0 seconds
eth0: acknowledged 192.168.4.102 from 192.168.4.1
eth0: probing address 192.168.4.102/24
eth0: probing for 192.168.4.102
eth0: ARP probing 192.168.4.102 (1 of 3), next in 1.2 seconds
eth0: sending Router Solicitation
eth0: Router Advertisement from fe80::960c:6dff:fee6:998c
eth0: adding address fd50:da97:1fe:0:caa0:ba5b:1f27:1efa/64
eth0: pltime infinity, vltime infinity
eth0: adding route to fd50:da97:1fe::/64
eth0: waiting for Router Advertisement DAD to complete
eth0: reading lease `/var/lib/dhcpcd/dhcpcd-eth0.lease6'
eth0: accepted reconfigure key
eth0: confirming prior DHCPv6 lease
eth0: delaying CONFIRM6 (xid 0x7ee2aa), next in 0.2 seconds
eth0: broadcasting CONFIRM6 (xid 0x7ee2aa), next in 1.1 seconds
eth0: DHCPv6 REPLY: Not On Link
eth0: soliciting a DHCPv6 lease
eth0: delaying SOLICIT6 (xid 0x971998), next in 0.6 seconds
eth0: ARP probing 192.168.4.102 (2 of 3), next in 1.5 seconds
eth0: broadcasting SOLICIT6 (xid 0x971998), next in 1.0 seconds
eth0: SOL_MAX_RT 3600 -> 60
eth0: ADV fd50:da97:1fe::a8b/128 from fe80::960c:6dff:fee6:998c
eth0: broadcasting REQUEST6 (xid 0xf95803), next in 1.0 seconds
eth0: accepted reconfigure key
eth0: REPLY6 received from fe80::960c:6dff:fee6:998c
eth0: adding address fd50:da97:1fe::a8b/128
eth0: pltime infinity, vltime infinity
eth0: renew in 86400, rebind in 138240, expire in 4294967295 seconds
eth0: writing lease `/var/lib/dhcpcd/dhcpcd-eth0.lease6'
eth0: waiting for DHCPv6 DAD to complete
eth0: Router Advertisement DAD completed
eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' ROUTERADVERT
eth0: ARP probing 192.168.4.102 (3 of 3), next in 2.0 seconds
eth0: DHCPv6 DAD completed
eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' BOUND6
eth0: DAD completed for 192.168.4.102
eth0: leased 192.168.4.102 for 172800 seconds
eth0: renew in 86400 seconds, rebind in 151200 seconds
eth0: writing lease `/var/lib/dhcpcd/dhcpcd-eth0.lease'
eth0: adding IP address 192.168.4.102/24 broadcast 192.168.4.255
eth0: adding route to 192.168.4.0/24
eth0: adding default route via 192.168.4.1
eth0: ARP announcing 192.168.4.102 (1 of 2), next in 2.0 seconds
eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' BOUND
eth0: ARP announcing 192.168.4.102 (2 of 2)


This way was and is working.... for eth0
quick check:
Code:
# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.4.102  netmask 255.255.255.0  broadcast 192.168.4.255
        inet6 fd50:da97:1fe::a8b  prefixlen 128  scopeid 0x0<global>
        inet6 fd50:da97:1fe:0:caa0:ba5b:1f27:1efa  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::abad:1194:dd4e:7633  prefixlen 64  scopeid 0x20<link>
        ether 54:04:a6:0a:9d:68  txqueuelen 1000  (Ethernet)
        RX packets 55142  bytes 79938746 (76.2 MiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 30261  bytes 2743694 (2.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 3  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 3652  bytes 218495 (213.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3652  bytes 218495 (213.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 74:2f:68:a8:1d:bb  txqueuelen 1000  (Ethernet)
        RX packets 7  bytes 1366 (1.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 26  bytes 5516 (5.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Code:
# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 54:04:a6:0a:9d:68 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 74:2f:68:a8:1d:bb brd ff:ff:ff:ff:ff:ff


but as I mention earlier unplug and plug eth0 cause this:
Code:
# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 54:04:a6:0a:9d:68  txqueuelen 1000  (Ethernet)
        RX packets 995  bytes 590377 (576.5 KiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 861  bytes 108243 (105.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 3  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 2712  bytes 166312 (162.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2712  bytes 166312 (162.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 74:2f:68:a8:1d:bb  txqueuelen 1000  (Ethernet)
        RX packets 9  bytes 1799 (1.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 27  bytes 5471 (5.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Code:
# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 54:04:a6:0a:9d:68 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 74:2f:68:a8:1d:bb brd ff:ff:ff:ff:ff:ff

I loose IP address.

BTW....
Code:
# rc-config list | grep 'wpa_supplicant\|dhcpcd\|net.'
  dhcpcd                    default
  net.eth0
  net.lo                    boot
  netmount
  net-online
  net.wlan0
  wpa_supplicant

Should I remove net.lo form boot?

After reboot with eth0 connected:
Code:
mesg | grep -i -E '02:00.0|01:00.0|bcma|atl1c|eth0|wlan0'
[    9.528241] atl1c 0000:02:00.0: version 1.0.1.1-NAPI
[   24.922211] bcma: bus0: Found chip with id 0x4313, rev 0x01 and package 0x08
[   24.922249] bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
[   24.922274] bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
[   24.922316] bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
[   24.936175] bcma: bus0: Bus registered
[   28.233663] brcmsmac bcma0:1: mfg 4bf core 812 rev 24 class 0 irq 16
[   46.764681] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)
[   46.764699] brcmsmac bcma0:1: brcms_ops_config: change power-save mode: false (implement)
[   46.764912] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   48.784218] atl1c 0000:02:00.0: atl1c: eth0 NIC Link is Up<100 Mbps Full Duplex>
[   52.783695] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)
[   52.783716] brcmsmac bcma0:1: brcms_ops_config: change power-save mode: false (implement)
[   52.784009] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   53.020396] atl1c 0000:02:00.0: atl1c: eth0 NIC Link is Up<100 Mbps Full Duplex>
[   53.258290] atl1c 0000:02:00.0: atl1c: eth0 NIC Link is Up<100 Mbps Full Duplex>
[   61.419296] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)
[   61.419315] brcmsmac bcma0:1: brcms_ops_config: change power-save mode: false (implement)
[   61.419655] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   61.539229] atl1c 0000:02:00.0: atl1c: eth0 NIC Link is Up<100 Mbps Full Duplex>
[   61.885766] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)
[   61.885787] brcmsmac bcma0:1: brcms_ops_config: change power-save mode: false (implement)
[   61.886036] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   65.342497] wlan0: authenticate with 94:0c:6d:e6:99:8c
[   65.344888] wlan0: send auth to 94:0c:6d:e6:99:8c (try 1/3)
[   65.347509] wlan0: authenticated
[   65.348444] wlan0: associate with 94:0c:6d:e6:99:8c (try 1/3)
[   65.352154] wlan0: RX AssocResp from 94:0c:6d:e6:99:8c (capab=0x431 status=0 aid=2)
[   65.352713] brcmsmac bcma0:1: brcmsmac: brcms_ops_bss_info_changed: associated
[   65.352728] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: true (implement)
[   65.352786] wlan0: associated
[   65.353970] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   65.359536] brcmsmac bcma0:1: wl0: brcms_c_d11hdrs_mac80211:  txop exceeded phylen 159/256 dur 1778/1504
[   65.365268] brcmsmac bcma0:1: wl0: brcms_c_d11hdrs_mac80211:  txop exceeded phylen 137/256 dur 1602/1504
[   68.395703] wlan0: deauthenticating from 94:0c:6d:e6:99:8c by local choice (Reason: 3=DEAUTH_LEAVING)
[   68.397380] brcmsmac bcma0:1: brcmsmac: brcms_ops_bss_info_changed: disassociated
[   68.397396] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)
[   68.705210] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)
[   68.705263] brcmsmac bcma0:1: brcms_ops_config: change power-save mode: false (implement)
[   68.705475] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   68.837661] atl1c 0000:02:00.0: atl1c: eth0 NIC Link is Up<100 Mbps Full Duplex>
[  303.130034] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)
[  303.130054] brcmsmac bcma0:1: brcms_ops_config: change power-save mode: false (implement)
[  303.130508] IPv6: ADDRCONF(NETDEV_UP): wlan0: link


Code:
# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 54:04:a6:0a:9d:68  txqueuelen 1000  (Ethernet)
        RX packets 33  bytes 5243 (5.1 KiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 46  bytes 7640 (7.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 1  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 560  bytes 39088 (38.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 560  bytes 39088 (38.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 74:2f:68:a8:1d:bb  txqueuelen 1000  (Ethernet)
        RX packets 9  bytes 1799 (1.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 27  bytes 5471 (5.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Code:
# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 54:04:a6:0a:9d:68 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 74:2f:68:a8:1d:bb brd ff:ff:ff:ff:ff:ff


when Idhcpcd eth0 is working (entry about wpa is correct????):
Code:
# /etc/init.d/dhcpcd restart
 * Stopping DHCP Client Daemon ...
 * Starting DHCP Client Daemon ...
wlan0: /etc/wpa_supplicant.conf does not exist
wlan0: not interacting with wpa_supplicant(8)


Code:
# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.4.102  netmask 255.255.255.0  broadcast 192.168.4.255
        inet6 fd50:da97:1fe::a8b  prefixlen 128  scopeid 0x0<global>
        inet6 fd50:da97:1fe:0:caa0:ba5b:1f27:1efa  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::abad:1194:dd4e:7633  prefixlen 64  scopeid 0x20<link>
        ether 54:04:a6:0a:9d:68  txqueuelen 1000  (Ethernet)
        RX packets 1081  bytes 604053 (589.8 KiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 1008  bytes 130298 (127.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 3  collisions 0


Regarding wifi I see my network in wicd and when I try to connect I see in logs:
Code:
# tail -f wicd.log
2017/01/13 23:03:46 :: setting use global dns to 0
2017/01/13 23:03:46 :: setting global dns
2017/01/13 23:03:46 :: global dns servers are 208.67.222.222 208.67.220.220 8.8.8.8
2017/01/13 23:03:46 :: domain is
2017/01/13 23:03:46 :: search domain is
2017/01/13 23:03:46 :: setting wireless interface wlan0
2017/01/13 23:03:46 :: setting wired interface eth0
2017/01/13 23:03:46 :: setting wpa driver wext
2017/01/13 23:03:46 :: setting automatically reconnect when connection drops 1
2017/01/13 23:03:46 :: setting backend to external
2017/01/13 23:03:46 :: Setting dhcp client to 0
2017/01/13 23:03:48 :: ifconfig eth0
2017/01/13 23:03:48 :: ifconfig wlan0
2017/01/13 23:03:49 :: Connecting to wireless network Elwood
2017/01/13 23:03:49 :: iwconfig wlan0
2017/01/13 23:03:49 :: /sbin/dhcpcd -k wlan0
2017/01/13 23:03:49 :: ifconfig wlan0 0.0.0.0
2017/01/13 23:03:49 :: /bin/ip route flush dev wlan0
2017/01/13 23:03:49 :: ifconfig wlan0 down
2017/01/13 23:03:49 :: ifconfig wlan0 up
2017/01/13 23:03:50 :: wpa_cli -i wlan0 terminate
2017/01/13 23:03:50 :: /sbin/dhcpcd -k eth0
2017/01/13 23:03:50 :: ifconfig eth0 0.0.0.0
2017/01/13 23:03:50 :: /bin/ip route flush dev eth0
2017/01/13 23:03:50 :: ifconfig eth0 down
2017/01/13 23:03:50 :: ifconfig eth0 up
2017/01/13 23:03:50 :: wpa_cli -i eth0 terminate
2017/01/13 23:03:50 :: Putting interface down
2017/01/13 23:03:50 :: ifconfig wlan0 down
2017/01/13 23:03:50 :: Releasing DHCP leases...
2017/01/13 23:03:50 :: /sbin/dhcpcd -k wlan0
2017/01/13 23:03:50 :: Setting false IP...
2017/01/13 23:03:50 :: ifconfig wlan0 0.0.0.0
2017/01/13 23:03:50 :: Stopping wpa_supplicant
2017/01/13 23:03:50 :: wpa_cli -i wlan0 terminate
2017/01/13 23:03:50 :: Flushing the routing table...
2017/01/13 23:03:50 :: /bin/ip route flush dev wlan0
2017/01/13 23:03:50 :: iwconfig wlan0 mode managed
2017/01/13 23:03:50 :: Putting interface up...
2017/01/13 23:03:50 :: ifconfig wlan0 up
2017/01/13 23:03:52 :: enctype is wpa
2017/01/13 23:03:52 :: Generating psk...
2017/01/13 23:03:52 :: ['/usr/bin/wpa_passphrase', 'my_network', 'xxxxxxxxxxxxxxxxxxxxxxx']
2017/01/13 23:03:52 :: Attempting to authenticate...
2017/01/13 23:03:52 :: ['wpa_supplicant', '-B', '-i', 'wlan0', '-c', '/var/lib/wicd/configurations/940c6de6998c', '-Dwext']
2017/01/13 23:03:52 :: ['iwconfig', 'wlan0', 'essid', '--', 'my_network']
2017/01/13 23:03:52 :: iwconfig wlan0 channel 6
2017/01/13 23:03:52 :: iwconfig wlan0 ap 94:0C:6D:E6:99:8C
2017/01/13 23:03:53 :: WPA_CLI RESULT IS DISCONNECTED
2017/01/13 23:03:54 :: WPA_CLI RESULT IS COMPLETED
2017/01/13 23:03:54 :: Running DHCP with NO hostname
2017/01/13 23:03:54 :: /sbin/dhcpcd --noipv4ll  wlan0
2017/01/13 23:03:54 :: sending commands to master dhcpcd process
2017/01/13 23:03:54 ::
2017/01/13 23:03:54 ::
2017/01/13 23:03:54 :: DHCP connection successful
2017/01/13 23:03:54 :: not verifying
2017/01/13 23:03:54 :: Connecting thread exiting.
2017/01/13 23:03:54 :: ifconfig wlan0
2017/01/13 23:03:54 :: IP Address is: None
2017/01/13 23:03:54 :: Sending connection attempt result success
2017/01/13 23:03:54 :: ifconfig eth0
2017/01/13 23:03:54 :: Forced disconnect on
2017/01/13 23:03:54 :: iwconfig wlan0
2017/01/13 23:03:54 :: /sbin/dhcpcd -k wlan0
2017/01/13 23:03:54 :: ifconfig wlan0 0.0.0.0
2017/01/13 23:03:54 :: /bin/ip route flush dev wlan0
2017/01/13 23:03:54 :: ifconfig wlan0 down
2017/01/13 23:03:54 :: ifconfig wlan0 up
2017/01/13 23:03:54 :: wpa_cli -i wlan0 terminate
2017/01/13 23:03:54 :: /sbin/dhcpcd -k eth0
2017/01/13 23:03:54 :: ifconfig eth0 0.0.0.0
2017/01/13 23:03:54 :: /bin/ip route flush dev eth0
2017/01/13 23:03:55 :: ifconfig eth0 down
2017/01/13 23:03:55 :: ifconfig eth0 up
2017/01/13 23:03:55 :: wpa_cli -i eth0 terminate
2017/01/13 23:03:57 :: ifconfig eth0
2017/01/13 23:03:57 :: ifconfig wlan0
2017/01/13 23:03:57 :: found backend in configuration external
2017/01/13 23:03:59 :: ifconfig eth0
2017/01/13 23:03:59 :: ifconfig wlan0


So any thoughts why dhcpcd do not assign address to eth0 and why I can't connect to my wifi....
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Sat Jan 14, 2017 7:35 am    Post subject: Reply with quote

emc wrote:
OK I think I got it, but still need help (to be clear I try to get dhcpcd working for eth0 and wifi, hotplugging)

So lets start I change:
Code:
# cat /etc/conf.d/net
config_eth0="dhcp"
config_wlan0="dhcp"

/etc/wpa_supplicant/wpa_supplicant.conf is empty

Unmerge netifrc, delete /etc/conf.d/net and put /etc/wpa_supplicant/wpa_supplicant.conf as shown in this wiki article section.

emc wrote:
Regarding wifi I see my network in wicd and when I try to connect I see in logs:
Code:
# tail -f wicd.log
...

The article https://wiki.gentoo.org/wiki/Network_management_using_DHCPCD has been written for wireless using wpa_supplicant. Nothing is known about wicd.
Back to top
View user's profile Send private message
emc
Guru
Guru


Joined: 02 Jul 2004
Posts: 541
Location: Cracow, Poland

PostPosted: Sat Jan 14, 2017 1:38 pm    Post subject: Reply with quote

It's kind of working, but sometimes I need dhcpcd restart and and/or wicd restart. Good news is when I successfully connected eth0 nd unpluc cable wlan0 get hotpluged but never in opposite direction.

But still biggest pain is after reboot I need at least restart dhcpcd to get eth0 or wlan0 working.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Sat Jan 14, 2017 3:34 pm    Post subject: Reply with quote

emc wrote:
It's kind of working, but sometimes I need dhcpcd restart and and/or wicd restart. Good news is when I successfully connected eth0 nd unpluc cable wlan0 get hotpluged but never in opposite direction.

But still biggest pain is after reboot I need at least restart dhcpcd to get eth0 or wlan0 working.

Are you still using this strange settings?
Code:
# cat /etc/rc.conf
...
...
rc_hotplug="!net.eth* !net.wlan*"
...
If so, remove it.
Back to top
View user's profile Send private message
emc
Guru
Guru


Joined: 02 Jul 2004
Posts: 541
Location: Cracow, Poland

PostPosted: Sat Jan 14, 2017 5:00 pm    Post subject: Reply with quote

OK remove, but real problem is running wicd/dhcpcd in default rinlevel
I test with 100's reboots...

So after some reboots, what I find:

1. dhcpcd add default, wicd del default
Both eth0 and wlan0 gets IPs, pluging/unpluging eth0 working, bur wlan0 is always on (now hotplugining)

2. dhcpcd add default, wicd add default
it's working but to get statble IP I need more time (dhcpcd/wicd fighting???) but pluging/unpluging not working and once I try connect wifi I gets disconnected form both interfaces

3. dhcpcd del default, wicd add default
the wost case, can't get working I need start dhcpcd maually, but even then then similar problems like in 2

wicd as kind of frontend for dhcpcd, right? To the best of my knowlage using wicd, dhcpcd should be remove from any runlevel... but my case show something diffrent.

I'm happy I can get working (case 1) but I'm curious (I remember 1,5 year ago I manage my network only via wicd) why it stoped working...

Can I get hotpluging functionality using only dhcpcd (with wicd remove from default runlevel?)
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Sun Jan 15, 2017 7:15 am    Post subject: Reply with quote

emc wrote:
2. dhcpcd add default, wicd add default
it's working but to get statble IP I need more time (dhcpcd/wicd fighting???) but pluging/unpluging not working and once I try connect wifi I gets disconnected form both interfaces

As mentioned before, the article https://wiki.gentoo.org/wiki/Network_management_using_DHCPCD has been written for wireless using wpa_supplicant, not for using wicd.
In case you really want wicd, do not follow https://wiki.gentoo.org/wiki/Network_management_using_DHCPCD.
Back to top
View user's profile Send private message
emc
Guru
Guru


Joined: 02 Jul 2004
Posts: 541
Location: Cracow, Poland

PostPosted: Sun Jan 15, 2017 11:37 am    Post subject: Reply with quote

OK, I will try replace dhcpcd with wicd. Thx for so much patience!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum