0

I'm connected with WiFi and the internet is running well, soon I connect the LAN wire which is connected to a NAS I lose the internet. WIFI get the IP over DHCP from Router, 192.168.2.xxx My wire connection I set to 192.168.2.111 the NAS have 192.168.2.105 I can see all files on the NAS but the internet is no more working. If I disconnect the wire the internet is back to normal.

What do I wrong

  • Give us output from command 'route -n' when you are connwcted only to wifi, and again when you are connected to both connection. Problem cause changes of default gateway when you connect cable. – 2707974 Jul 16 '17 at 10:42
  • Please add also output of cat /etc/network/interfaces and ifconfig – derHugo Jul 16 '17 at 12:51
  • Sorry about my poor explanation. I add EDIT 1 in my answer. – 2707974 Jul 17 '17 at 11:56
2

The problem occurs because both your interfaces are on the same subnet

 enp3s0    -> addr:192.168.2.111
 wlp2s0    -> addr:192.168.2.125

In network topology

--------      wifi        ----------  
|      |------------------| router |
|  PC  |                  ----------
|      |----------| lan   --------
--------          |-------|  NAS |
                          --------

The solution will be to change the subnet on one link, wifi or lan.

If you do not use lan link except to access NAS, on lan card, do not use gateway setting. It's enough to set up IP and network mask.

When I say to change subnet I meat to change networks, not only subnet mask.

Example of setup

enp3s0
      ip: 192.168.3.111
      nm: 255.255.255.0
      gw: 192.168.3.1

wlp2s0    
      ip: 192.168.2.125
      nm: 255.255.255.0

In this setup you must change ip address on router lan port to192.168.3.1

  • Hi i try this and change the subnet to 255.255.255.128. but no different. – Marcel Jul 17 '17 at 5:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.