You are not logged in.

#1 2020-11-22 15:11:58

spiri
Member
Registered: 2016-12-31
Posts: 65

Computer connected to two different routers

Hello,

I have to different routers at home, one connection over ethernet to my own router, where connection is working perfectly and a wireless connection (using a wifi dongle) to another guys router in this house, where sometimes connection to his router remains unreachable. When I mean sometimes, it's really just for some time, after a few minutes / hours of debugging and restarting dhcpcd and / or wpa_supplicant for many times, it's working for new. Then, suddenly, I cannot ping the router of my wifi interface anymore.

Here is an overview of my link settings:

$ ip -br l
lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP> 
enp0             UP             70:4d:7b:2e:22:89 <BROADCAST,MULTICAST,UP,LOWER_UP> 
wlp0             UP             24:05:0f:a9:bf:d5 <BROADCAST,MULTICAST,UP,LOWER_UP>

My computer handles it's IP settings using dhcpcd and wpa_supplicant for wireless communications.

My enp0 interface is using a dynamic IP address acquired from my own router and having a default gateway specified to this router.
My wlp0 interface is using a static ip address still set up by dhcpcd and also correctly registered on my friends routers interface.

So far I have this IP configuration:

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 70:4d:7b:2e:22:89 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.63/24 brd 192.168.0.255 scope global dynamic noprefixroute enp0
       valid_lft 600581sec preferred_lft 524981sec
    inet6 fe80::724d:7bff:fe2e:2289/64 scope link 
       valid_lft forever preferred_lft forever
3: wlp0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 24:05:0f:a9:bf:d5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.10/24 brd 192.168.178.255 scope global noprefixroute wlp0
       valid_lft forever preferred_lft forever
    inet6 fe80::b4ce:ea90:3c34:81dc/64 scope link 
       valid_lft forever preferred_lft forever

My routes are looking always the same being a default gateway for my ethernet connection and two routes for accessing both private networks:

# ip r
default via 192.168.0.1 dev enp0 src 192.168.0.63 metric 100 
192.168.0.0/24 dev enp0 proto dhcp scope link src 192.168.0.63 metric 100 
192.168.178.0/24 dev wlp0 proto dhcp scope link src 192.168.178.10 metric 200

dhcpcd is configured like this:

$ cat /etc/dhcpcd.conf
interface enp0
static routers=192.168.0.1
metric 100

interface wlp0
static ip_address=192.168.178.10/24
static routers=192.168.178.1
nogateway
metric 200

# default dhcpcd config
# .
# .
# .

The status of my wpa_supplicant looks good:

# wpa_cli -p /run/wpa_supplicant/ status
Selected interface 'wlp0'
bssid=2c:3a:fd:df:b9:77
freq=0
ssid=<MYSSID>
id=0
mode=station
pairwise_cipher=CCMP
group_cipher=CCMP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
ip_address=192.168.178.10
address=24:05:0f:a9:bf:d5
uuid=bbebae3b-1704-5a99-96c3-756298e38476

Everything looks up and running but pinging the gateway of my wireless interface is not working constantly, thus sometimes I have a broken connection to the private network of my friend including all it's network devices.

Configuring wlp0 to acquire a dynamic IP address is either working or not working. Either I get an IP address, either I get no IP address at all.

Sometimes the ping delays to 3 seconds or more, sometimes I have a stable connection, sometimes connection is not working at all and I don't know what's happening.

As I already told you I'm connecting via wifi dongle, relaying over a repeater to the router of my friend. However same wifi connection on my iPhone seems to be stable...

Do you have any suggestion based on my configuration? I would appreciate this very much. All I know is wpa_supplicant wasn't working using it's default driver nl80211, but using wext driver instead solved at least that problem.

Thank you in advance for any help you can give.

Offline

#2 2020-11-28 15:03:34

spiri
Member
Registered: 2016-12-31
Posts: 65

Re: Computer connected to two different routers

I did not change any settings for now, still using dhcpcd + wpa_supplicant. My friends hosts seem to be reachable since 3 days at an almost constant time.

64 bytes from 192.168.178.11 (192.168.178.11): icmp_seq=17532 ttl=64 time=3.38 ms

Offline

Board footer

Powered by FluxBB