Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] WiFi gets IP via dhcp but cant reach network
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
jody
Guru
Guru


Joined: 16 Oct 2007
Posts: 551
Location: Switzerland

PostPosted: Wed Mar 25, 2020 1:29 pm    Post subject: [SOLVED] WiFi gets IP via dhcp but cant reach network Reply with quote

I have troubles getting the Wifi on my HP Pavilion to run.

It seems to get an IP from 192.168.0.1, but when i then try to ping this address, i get "Host not reachable".
The address 192.168.0.1 is however pingable from other computers in the local network.

lspci tells me about the WifI
Code:
 ~ # lspci | grep WiFi
05:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822BE 802.11a/b/g/n/ac WiFi adapter

and i believe i set the correct config parameter for it:
Code:
 ~ # grep 8822 /usr/src/linux/.config
CONFIG_R8822BE=m

I also followed the Gentoo WiFi handbook and checked:
Code:
~ # grep CONFIG_PACKET /usr/src/linux/.config
CONFIG_PACKET=y
CONFIG_PACKET_DIAG=m
before building the kernel.

ifconfig says the network is up and running:
Code:
 ~ # ifconfig wlo1
wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.101  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::cf45:f6d4:cb6b:c08d  prefixlen 64  scopeid 0x20<link>
        ether 40:5b:d8:68:1e:85  txqueuelen 1000  (Ethernet)
        RX packets 406  bytes 183331 (179.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 35  bytes 4278 (4.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Code:
 ~ # /etc/init.d/net.wlo1 status
 * status: started


I have emerged wpa_supplicant and have written a config file for it:
Code:
 ~ # cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0
ap_scan=1

network={
        priority=1
        ssid="my_ssiod"
        mode=0
        key_mgmt=WPA-PSK
        psk="my_password"
}
which i basically copied from a laptop with a working WiFi.

And here is /etc/conf.d/net:
Code:
modules="wpa_supplicant"

config_eno1="192.168.0.103 netmask 255.255.255.0 brd 192.168.0.255"
routes_eno1="default via 192.168.0.1"

config_wlo1="dhcp"

What do i need to do to get the WiFi running?


Last edited by jody on Wed Mar 25, 2020 4:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Tux's lil' helper
Tux's lil' helper


Joined: 23 Mar 2019
Posts: 141

PostPosted: Wed Mar 25, 2020 1:46 pm    Post subject: Reply with quote

If you want to use wifi disable the ethernet interface.
You cant have 2 interfaces with default gateway assigned up at the same time.
Maybe comment out the line:
Code:

routes_eno1="default via 192.168.0.1"


:D
Back to top
View user's profile Send private message
jody
Guru
Guru


Joined: 16 Oct 2007
Posts: 551
Location: Switzerland

PostPosted: Wed Mar 25, 2020 4:18 pm    Post subject: Reply with quote

Simply uncommenting the line you indicated did not suffice -
after restarting net.wlo1 - i could ping out from the laptop to computers anywhere,
but i could not ping at the laptop from another computer on the local network.

I now completely deactivated the ethernet connection and changed /etc/conf.d/net
Code:
modules="wpa_supplicant"
config_wlo1="192.168.0.103 netmask 255.255.255.0 brd 192.168.0.255"
routes_wlo1="default via 192.168.0.1"

Now the WiFi works fine!
Thanks!
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